Ldc
2024-04-07 0652600959e5e3b5796fb6e8da129704ca95347a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
/**
 * 附件管理
 * 包括:
 *     文件查看
 *     文件上传
 *     文件预览
 *     文件分享
 * weidy重新调整一下
 *     所有的配置项需需要先传入主键,所有的操作都需要先传入主键
 *     以前的存在不同的页面都使用这个组件时,配置信息会被覆盖的情况
 */
layui.define(['layer','util','table','form','upload','code','FilePreviewBase'],function(exports){
    var fileManager = function(){
        this.moduleKey='vciWebFileManager';
        this.backPath = configData.compatibility?path:configData.fileServicePath;
        this.processPath = configData.compatibility?path:configData.processServicePath;
        this.url={
            process:{//流程相关的url
                dataGrid:'/webProcessDefineController/dataGridFileInProcess',
                previewUrlByFileOid:'/webFileController/previewFile',//在流程中的单个文件的预览
                previewUrlByDataOid:'/webProcessDefineController/getPreviewUrlByDataOid'//根据业务数据来获取文件预览的路径
            },
            bus:{//普通业务相关的url
                controller:'vciFileQueryController/',
                dataGrid:'gridFiles',
                previewUrlByFileOid:'previewFile'//在流程中的单个文件的预览
            },
            downloadByFileOid:'vciFileDownloadController/downloadByFileOid',//下载文件
            reviseByFileOid:'vciFileUploadController/uploadFile'//修改文件
            //这个组件只能提供公共的路径,特殊业务的按钮需要自行注册
        };
        this.id="vciWebFileManager";
        this.sourceData = {};
        this.columns = [];
 
        this.config = {};
        this.defaultConfig = {
            inProcess:false,//是否是流程中的值
            showInDialog : false,//显示到窗口中
            dataIsProcessInstance : false,//是否为流程实例
            reviseButton : false
        };
        this.defaultButtonInfos = [{
            uniqueFlag: "DOWNLOADFILE",
            alias: '下载文件'
        },{
            uniqueFlag:'PREVIEW',
            alias:'预览'
        }];
        this.defaultReviseButtonInfo = {
            uniqueFlag: 'revisefile',
            alias: '修改'
        };
        this.buttonIconMap = {
            DOWNLOADFILE:"layui-icon-download-circle",
            PREVIEW:"layui-icon-carousel",
            revisefile:"layui-icon-upload"
        };
        this.getContent = function(){//不调用
            return "";
        };
        this.getButtonHtml = function(id){
            //按钮的html
            var that = this;
            var options = that.getConfig(id);
            if(options && $webUtil.isNull(options['toolbarId'])){
                that.updateConfig(id,"toolbarId",'#toolbar_' + id);
                that.updateConfig(id,'destoryToolbar',true);
                return '<div id="toolbar_' + id +'" layui-filter="toolbar_' + id + '" class="layui-btn-container"></div>';
            }else{
                return '';
            }
        };
        this.getTableHtml = function(id){
            var that = this;
            //表格的html
            var options = that.getConfig(id);
            if(options && $webUtil.isNull(options['tableId'])){
                that.updateConfig(id,'tableId','#table_' + id);
                that.updateConfig(id,'destoryTable',true);
                return '<table id="table_' +id+ '" lay-filter="' + id +'"></table>';
            }else{
                return '';
            }
        };
        this.init = function(){//不调用
            var that = this;
            $webUtil.copyConfig(that,that.moduleKey);
        };
        this.setConfig = function(id,options){
            var that = this;
            //设置配置项,自动继承默认的配置
            var ops = {};
            $.extend(ops,that.defaultConfig,options);
            /**
             * 配置相关的内容
             *
             */
            that.config[id] = ops;
        };
        this.updateConfig = function(id,key,value){
            //更新配置
            var that = this;
            var options = that.getConfig(id);
            options[key] = value;
            that.config[id]=options;
        };
        this.getConfig = function(id){
            //获取配置项
            var that = this;
            if(id in that.config){
                return that.config[id];
            }
            return {};
        };
        this.destoryFileManage = function(id){
            //销毁
            var that = this;
            var options = that.getConfig(id);
            if(options.destoryToolbar){
                //是这个组件里自己加的
                $(options.toolbarId).remove();
            }else{
                //删除已经存在的按钮
                $(options.toolbarId).find('button').remove();
                var searchInput = $(options.toolbarId).find('[name="fast_search_select_value"]');
                searchInput.prev().remove();
                searchInput.remove();
            }
            if(options.destoryTable){
                $(options.tableId).remove();
            }else{
                //把以前的表格移除
                var tableContent = $(options.tableId).children();
                if(tableContent){
                    tableContent.remove();
                }
            }
            delete that.config[id];
        };
        this.render = function(id,options){
            var that = this;
            if($webUtil.isNull(id)){
                $webUtil.showErrorMsg("文件管理页面错误,在调用render方法时,没有设置主键");
                return false;
            }
            if(id in that.config){
                //如果已经存在某个页面,则先销毁
                that.destoryFileManage(id);
            }
            that.setConfig(id,options);
            options = that.getConfig(id);
            //最先处理Html
            that.renderHtml(id,options);
            //处理button
            that.renderButton(id,options);
            //处理表格
            that.renderTable(id,options);
        };
        this.renderHtml = function(id,options){
            //处理html,如果没有传递html的id对象
            var that = this;
            if($webUtil.isNull(options.elem)){
                $webUtil.showErrorMsg("没有elem属性");
                return false;
            }
            $(options.elem).prepend(that.getButtonHtml(id) + that.getTableHtml(id));
        };
        this.renderButton = function(id,options){
            //处理按钮
            var that = this;
            var buttonHtml = [];
            var buttonIdPrefix = options.buttonIdPrefix;
            if(!buttonIdPrefix){
                buttonIdPrefix = id;
            }
            var buttonIconMap = options.buttonIconMap;
            if(!buttonIconMap){
                buttonIconMap = that.buttonIconMap;
            }
            //是在流程中,那就要全部添加
            var buttonInfoMap = options.buttonInfoMap;
            if(!buttonInfoMap && ( options.inProcess || options.buttonSameProcess)){
                //流程的才添加按钮
                buttonInfoMap = $.extend(true, [], that.defaultButtonInfos);
                if(options.reviseButton){
                    buttonInfoMap.push( $.extend(true,{},that.defaultReviseButtonInfo));
                }
            }
            if(!buttonInfoMap){
                //这个是说明不存在,从后台去获取按钮
                var sourceData = $.extend(true,{},options.sourceData);
                $webUtil.createButtonHtmlEx(sourceData, buttonIconMap, $(options.toolbarId), buttonIdPrefix, [{uniqueFlag: 'refresh',alias: '刷新'}], [], function (buttons, hasViewRight, hasQueryRight) {
                    $webUtil.bindDefultButtonLisenter(that, buttonIdPrefix);
                    if(hasQueryRight){
                        $webUtil.createSearchHtml({
                            name: '文件名称'
                        }, $(options.toolbarId), buttonIdPrefix);
                    }
                    $(options.toolbarId).append('<input type="hidden" name="filecomponentid" value="' + id + '"/>');
                });
            }else{
                //说明已经有按钮了
                buttonInfoMap.push({
                    uniqueFlag: 'refresh',
                    alias: '刷新'
                });//刷新是都有的
                if(buttonInfoMap && buttonInfoMap.length > 0){
                    layui.each(buttonInfoMap,function(_index,_item){
                        if(_item.uniqueFlag != 'DOWNLOADFILE' || options.inProcess || options.hasDownloadRight ){
                            //下载,需要获取权限
                            buttonHtml.push($webUtil.getButtonHtmlFromBtnObject(_item, buttonIdPrefix, buttonIconMap));
                        }
                    });
                }
                   $(options.toolbarId).prepend(buttonHtml.join(''));
                   $(options.toolbarId).append('<input type="hidden" name="filecomponentid" value="' + id + '"/>');
                $webUtil.bindDefultButtonLisenter(that,buttonIdPrefix);
                $webUtil.createSearchHtml({
                    name: '文件名称'
                }, $(options.toolbarId), id);
            }
        };
        this.renderTable = function(id,options){
            //处理表格
            var that = this;
            var fileTableColumns = options.fileTableColumns;
            if(!fileTableColumns){
                fileTableColumns = that.getFileTableColumns(id,((options.inProcess || options.hasDownloadRight) == true));
            }
            if($webUtil.isNull(options.dataOid)){
                $webUtil.showErrorMsg("没有业务数据的主键信息,前端调用有问题");
                return false;
            }
            if(!options.inProcess && $webUtil.isNull(options.dataBtmType)){
                $webUtil.showErrorMsg("没有业务类型的主键信息,前端调用有问题");
                return false;
            }
            var queryMap = {
                currentButtonKey:'VIEW',
                ownbizOid:options.ownbizOid,
                ownbizBtm:options.ownbizBtm
            };
            if(options.dataIsProcessInstance){
                //是流程实例
                queryMap['executionid'] = options.dataOid;
                queryMap['dataOid'] = "";
                delete queryMap['dataOid'];
            }
            if(options.inProcess){
                //在流程中需要绕过权限,传输下面这三个参数
                 queryMap['viewProcessLinkBusinessDataToken']=options.sourceData['viewProcessLinkBusinessToken'];
                 queryMap['executionidOnlyNumber']=options.sourceData['executionidNoInProcess'];
                 queryMap['businessOids']=options.sourceData['businessOidsInProcess'];
            }
            if(options.where){
                $.extend(queryMap,options.where);
            }
            var table=layui.table;
            if(!options.pageObject){
                options.pageObject = {
                    limit:25,
                    page:1
                };
            }
            if(options.inProcess){
                options.pageObject = false;
            }
            var url = options.url;
            if($webUtil.isNull(url)){
                url = options.inProcess?that.url.process.dataGrid:(that.url.bus.controller + that.url.bus.dataGrid);
            }
            var tableOption = {
                elem :  options.tableId,
                url : url,
                backPath:that.backPath,
                where : queryMap,
                selectMode : table.selectMode.muti,
                id : id,
                page : options.pageObject,
                cols : [fileTableColumns],
                height:(options.tableHeight?options.tableHeight:''),
                done:function(res,cur,total){
                    table.on('tool(' + id + ')',function(obj){
                        var data = obj.data;//当前选择行的数据
                        var layEvent = obj.event;//点的是什么按钮
                        if(layEvent == 'PREVIEW'){
                            //that.doPreview(data.oid,id,data.id?data.id:data.name);
                            //文件预览
                            layui.use('BaseFileDownloadAction', function () {
                                var vciWebFilePreview = layui['BaseFileDownloadAction'];
                                vciWebFilePreview.PREVIEW(data.oid,{fileOid:data.oid},function (){
                                    $webUtil.showErrorMsg("文件预览失败,请联系管理员")
                                })
                            })
                        }
                    });
                }
            };
            table.render(tableOption);
        }
        this.reloadByWhere = function(id,dataOid,dataBtmType,where){
            //利用数据重新加载列表
            var that = this;
            var queryMap = {
                currentButtonKey:'VIEW'
            };
            if(dataOid){
                queryMap['dataOid'] = dataOid;
            }
            if(dataBtmType){
                queryMap['dataBtmType'] = dataBtmType;
            }
            var options = that.getConfig(id);
            if(options.dataIsProcessInstance && dataOid){
                queryMap['executionid'] = dataOid;
                queryMap['dataOid'] = "";
                delete queryMap['dataOid'];
            }
            if(where){
                if(!options.where){
                    options.where = {};
                }
                $.extend(queryMap,options.where,where);
            }
            layui.table.reload(id,{
                where:queryMap,
                done:function(){
                    //delete this.where
                }
            });
        };
        this.getFileTableColumns = function(filecomponseoid,hasDownloadFileRight){
            //获取文件的列表
            var that = this;
            var table = layui.table;
            return [
                table.getIndexColumn(),
                table.getCheckColumn(),
                {
                    field:'name',
                    title:'文件名称',
                    width:250,
                    templet:function(d){
                        if(hasDownloadFileRight){
                            //说明有下载文件的权限,那么我们就添加一个超链接
                            return '<a name="filenamedownloadlink " class="layui-btn layui-btn-intable" lay-event="PREVIEW" fileoid="' + d.oid +'" filecomponseoid="' + filecomponseoid +  '">' + ($webUtil.isNotNull(d.id)?d.id:d.name) + '</a>';
                        }else{
                            if($webUtil.isNotNull(d.id)){
                                return d.id;
                            }
                            return d.name;
                        }
                    }
                },{
                    field:'fileSize',
                    title:'大小',
                    width:80,
                    templet:function(d){
                        if(!d.fileSize || d.fileSize == null || d.fileSize*1 == 0 || isNaN(d.fileSize*1) ){
                            return "未知大小";
                        }else{
                            //原始大小是B
                            var filesize = d.fileSize*1;
                            if(filesize>1024*1024*1024*1024){
                                return parseInt(filesize/(1024*1024*1024*1024)) + "TB";
                            }else if(filesize> 1024*1024*1024){
                                return parseInt(filesize/(1024*1024*1024)) + "GB";
                            }else if(filesize> 1024*1024){
                                return parseInt(filesize/(1024*1024)) + "MB";
                            }else if(filesize> 1024){
                                return parseInt(filesize/1024) + "KB";
                            }else {
                                return filesize + "B";
                            }
                        }
                    }
                },{
                    field:'secretGradeText',
                    title:'密级',
                    width:60,
                    hidden:(!configData.controllerSecret)
                },{
                    field:'fileDocClassifyName',
                    title:'文档类别',
                    width:130
                },{
                    field:'creator',
                    title:'上传人/时间',
                    width:210,
                    templet:function(d){
                        return d.creator + "(" + $webUtil.formateDateTimeNoSecond(d.createTime) + ")";
                    }
                },{
                    field:'downloadCount',
                    title:'下载数量',
                    hidden: true,
                    width:90
                }
            ];
        };
        this.refresh = function(event,thisButtonPoint){
            var that = this;
            //刷新,需要找到id
            var    filecomponentid = that.getFileComponentId(thisButtonPoint);
            that.reloadByWhere(filecomponentid);
        };
        this.doPreview = function(fileoid,filecomponentid,fileName){
            //执行预览
            var that = this;
            if($webUtil.isNull(fileoid) || $webUtil.isNull(filecomponentid)){
                return false;
            }
            var options = that.getConfig(filecomponentid);
            var url = options.previewUrl;
            if($webUtil.isNull(url)){
                url = that.url.bus.controller + that.url.bus.previewUrlByFileOid;
                if(options.inProcess){
                    url = that.url.process.previewUrlByFileOid;
                }
            }
            //后台主要是控制权限
            $webUtil.post(url,{ownbizOid:options.ownbizOid,ownbizBtm:options.ownbizBtm,fileOid:fileoid},function(result){
                 if(result.success){
                     //直接调用预览的页面
                     //弹出窗口,还是选项卡显示
                     var title = '预览【' + fileName + "】";
                     if("tab" == options.showType){
                         portal.showTabByMenu(options.id + "_preview",{
                             text:title,
                             id:filecomponentid + "_preview",
                             multiCompent:true,
                             url:'usejs:FilePreviewBase?fileOids=' + fileoid + "&reswitch=" + (options.reswitch?options.reswitch:"true") + "&viewtype=" + (options.viewType?options.viewType:"pdf")
                         });
                     }else {
                         //默认是弹出窗口
                         $webUtil.dialog({
                             content:'<div id="' + filecomponentid + '_preview"></div>',
                             title:title,
                             fullScreen:true,
                             success:function(layero){
                                 var preview = layui['FilePreviewBase'];
 
                                 $("#" + filecomponentid + "_preview").html(preview.getContent(filecomponentid));
                                 preview.init(filecomponentid,{
                                     id:filecomponentid,
                                     fileOids:fileoid,
                                     reswitch:(options.reswitch?options.reswitch:"true"),
                                     viewtype:(options.viewType?options.viewType:"pdf"),
                                     showType:'inner',
                                     height:$webUtil.getDialogScreenHeight({fullScreen: true})-55,
                                     ownbizOid:options.ownbizOid,
                                     ownbizBtm:options.ownbizBtm
                                 })
                             }
                         })
                     }
                 }else if(result.code == "notsupportpreview"){
                     $webUtil.showMsg("您选择的文件不支持预览,将为您跳转至下载文件",function(){
                         that.downloadFileByOid(fileoid,filecomponentid);
                     });
                 }else{
                     $webUtil.showErrorMsg(result.msg);
                 }
             },function(xhr,error){
                 $webUtil.showErrorMsg("在验证是否可以预览的时候出现了错误,可能是文件服务没有启动");
             },options.inProcess?that.processPath:that.backPath);
        };
        this.downloadFileByOid =function(oid,filecomponentid){
            var that = this;
            //下载文件
            var iframeId = MD5(oid + $webUtil.getSystemVar($webUtil.systemValueKey.userOid));
            $webUtil.fileDownload(that.backPath + that.url.downloadByFileOid + "?fileOid=" + oid +"&downloadUUID=" + iframeId);
        };
        this.getFileComponentId = function(button){
            //根据按钮所在的位置获取文件组件的ID;
             var that = this;
             var filecomponentid = $(button).parent().find('[name="filecomponentid"]').val();
             if($webUtil.isNull(filecomponentid)){
                 $webUtil.showErrorMsg("filecomponentid属性没有值,请前端开发人员检查");
                 return ;
             }
             return filecomponentid;
        };
        this.PREVIEW = function(event,thisButtonPoint){
            //预览按钮
            var that = this;
            var filecomponentid = that.getFileComponentId(thisButtonPoint);
            var fileoid = $webUtil.getOidFromGrid(filecomponentid,true,true);
            if(!fileoid){
                return false;
            }
            var name = $webUtil.getOidFromGrid(filecomponentid,false,false,'name');
            that.doPreview(fileoid,filecomponentid,name);
        };
        this.DOWNLOADFILE = function(event,thisButtonPoint){
            //下载按钮
            var that = this;
            var filecomponentid = that.getFileComponentId(thisButtonPoint);
            var fileoid = $webUtil.getOidFromGrid(filecomponentid,true,true);
            if(!fileoid){
                return false;
            }
            that.downloadFileByOid(fileoid,filecomponentid);
        };
        this.revisefile = function(event,thisButtonPoint){
             var that = this;
             var filecomponentid = that.getFileComponentId(thisButtonPoint);
             var fileoid = $webUtil.getOidFromGrid(filecomponentid,true,true);
             if(!fileoid){
                 return false;
             }
             var options = that.getConfig(filecomponentid);
             var form = layui.form;
              var filter ='upload_form'+options.id;
              var uploadIndex = layer.open({
                  type:1,
                  title:'修改文件',
                  //skin:'layui-layer-lan',
                  content:'<form id="form_' + filter + '" lay-filter="' + filter + '" class="layui-form" style="margin-top:55px" enctype="multipart/form-data"></form>',
                  area:['370px','200px'],
                  closeBtn:1,
                  shade:true,
                  shadeClose:true,
                  success:function(layero){
                     form.addItems(filter,[{
                         type:'text',
                         name:'oid',
                         text:'文件主键',
                         hidden:true
                     }],function(){
                         if($("#NCFile_upload_form_file" + filter )){
                             $("#NCFile_upload_form_file" + filter).remove();
                         }
                        form.setValues({
                            fileOid:fileoid,
                            updateFileFlag:true
                         },filter);
                         $("#form_" + filter).append('<button type="button" class="layui-btn" id="button_' + filter + '" style="margin-left:100px"><i class="layui-icon">&#xe67c;</i>选择文件后自动上传</button>');
                         var upload = layui.upload;
                         //执行实例
                         var uploadForm = upload.render({
                             elem: '#button_' + filter //绑定元素
                             ,accept:'file'
                             ,auto:true
                             ,url: that.backPath + that.url.reviseByFileOid//上传接口
                             ,before:function(obj){
                                 if(form.validata(filter)){
                                     var values = form.getValues(filter);
                                     obj.setData(values);
                                     $webUtil.showProgress("文件上传中……");
                                     return true;
                                 }else{
                                     $webUtil.showErrorMsg("请先输入内容后再选择文件");
                                     return false;
                                 }
                             }
                             ,done: function(result){
                                 if(result.success){
                                    layer.close(uploadIndex);
                                     $webUtil.showMsg("修改文件成功");
                                     $webUtil.closeProgress();
                                     that.reloadByWhere(filecomponentid);
                                 }else{
                                     $webUtil.showErrorMsg(result.msg);
                                     $webUtil.closeProgress();
                                 }
                             }
                             ,error: function(){
                               //请求异常回调
                                 $webUtil.showErrorMsg("上传文件出现了异常");
                             }
                         });
                     },{},{
                         defaultColumnOneRow:1
                     });
                 }
             });
        };
        this.showFileDialog = function (id,options){
            var that = this;
            if(!("inProcess" in options)) {
                options.inProcess = false;
            }
            if(options.onUse){
                if(!options.buttonIconMap){
                    options.buttonIconMap=[];
                }
                options.buttonInfoMap = [{
                    uniqueFlag: 'DOWNLOADFILE',
                    alias: '下载'
                },{
                    uniqueFlag:'PREVIEW',
                    alias:'预览'
                }];
                options.hasDownloadRight=true;
            }
            that.setConfig(id,options);
            $webUtil.dialog({
                title:(options.title?options.title:'文件管理'),
                content:'<div id="referGrid_toolbar_' + id + '" layui-filter="referGrid_toolbar_' + id + '" class="layui-table-toolbar layui-form referGrid_toolbar_'+id+'" style="height:550px;"></div>',
                area:[(($webUtil.isNotNull(options.width) && options.width*1>1) ?options.width*1 : 950) +'px',
                    (($webUtil.isNotNull(options.height) && options.height*1>1) ?options.height*1 : 670) + 'px'],
                success:function(layero){
                    options.elem ='#referGrid_toolbar_' + id ;
                    that.render(id,options);
                }
            });
        };
    };
    var fm = new fileManager();
    exports("vciWebFileManager",fm);
});