@{
    //图片路径
    var FilePath = PageData["FilePath"] == null ? "" : PageData["FilePath"] as string;
    //图片的ID名称
    var FileID = PageData["FileID"];

    //用于替换图片路径
    System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex("http://(\\w)+.cnxox.com");
    //是否多图
    var ImgIsMultiple = PageData["ImgIsMultiple"];
}



<script type="text/plain" id="j_ueditorupload_@(FileID)" style="height:5px;display:none;">
</script>
<script>
    //实例化编辑器
    var o_ueditorupload_@(FileID) = UE.getEditor('j_ueditorupload_@(FileID)',
    {
        autoHeightEnabled: false
    });
    var number@(FileID)=0;
    o_ueditorupload_@(FileID).ready(function () {
        o_ueditorupload_@(FileID).hide();//隐藏编辑器
        /* 文件上传监听
        * 需要在ueditor.all.min.js文件中找到
        * d.execCommand("insertHtml",l)
        * 之后插入d.fireEvent('afterUpfile',b)
        */
        o_ueditorupload_@(FileID).addListener('afterUpfile',function (t, arg)
        {
            //批量图片
            for(var i=0;i<arg.length;i++)
            {
                Add_Files(number@(FileID) + 1 + i, arg[i].url);
            }
        });
    });

    //弹出文件上传的对话框
    function upFile_@(FileID)() {
        var myFiles = o_ueditorupload_@(FileID).getDialog("attachment");
        myFiles.open();
    }


    //***********************************************************************************


    //关闭窗体
    function close() {
        if (grid != null) { grid.datagrid("clearSelections"); }
        if (arraylistWin != null) { arraylistWin.dialog('close'); }
        if (dialogWin != null) { dialogWin.dialog('close'); }
    }


    $(function () {
        @FilePath.Split(',').Count()
        @if (!string.IsNullOrWhiteSpace(FilePath))
    {
        var _list = FilePath.Split(',');

        for (var i = 0; i < _list.Count(); i++)
        {
            var _model = _list[i];
            <text>
                Add_Files(@(i), "@(Url.Domain_Static(_model))");
            </text>
        }
    }



    });

    function Add_Files(i, url) {
        var _item_text = "<li class=\"drag-item-@(FileID)\" id=\"@(FileID)_item_" + i + "\">";
        _item_text = _item_text + "<input id=\"@(FileID)_" + i + "\" name=\"@(FileID)\" type=\"hidden\" value=\"" + url + "\">";
        _item_text = _item_text + "<a href='"+url+"' target='_blank'>附件："+url+"</a>";
        _item_text = _item_text + "<a onclick=\"number@(FileID)=number@(FileID)-1;$(\'#@(FileID)_item_" + i + "\').remove()\" style=\"display:inline-block;cursor:pointer; padding:1px 4px;background: #f00;z-index:10000;color:#fff;margin-left:10px;\" target=\"_blank\">删除</a>";
        _item_text = _item_text + "</li>";
        $("#files_list_@(FileID)").append(_item_text);
    }

</script>



<a href="javascript:;" class="easyui-linkbutton" onclick="upFile_@(FileID)();" data-options="iconCls:'icon-large-clipart',size:'large',iconAlign:'top'">文件上传</a>
<ul style="margin:0;padding:0;margin-top:10px; " id="files_list_@(FileID)"></ul>
<style type="text/css">
    .drag-item-@(FileID) {
        list-style-type: none;
        display: block;
        padding: 5px;
        border: 1px dashed #ccc;
        margin: 2px;
        background: #fafafa;
        color: #444;
        text-align: left;

    }

    .indicator {
        position: absolute;
        font-size: 9px;
        width: 10px;
        height: 10px;
        display: none;
        color: red;
    }
</style>