cloud-web-corejs 1.0.240 → 1.0.243

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.240",
4
+ "version": "1.0.243",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -7,7 +7,10 @@
7
7
  <div class="tree-form" v-if="option.showCategoryFilterArea !== false">
8
8
  <el-input
9
9
  :placeholder="
10
- $t2('请输入文件夹名称', 'components.fileLibrary.categoryPlaceholder')
10
+ $t2(
11
+ '请输入文件夹名称',
12
+ 'components.fileLibrary.categoryPlaceholder'
13
+ )
11
14
  "
12
15
  v-model="filterText"
13
16
  class="txt"
@@ -59,15 +62,23 @@
59
62
  class="tree-list"
60
63
  icon-class="el-icon-arrow-down"
61
64
  :style="
62
- option.showCategoryFilterArea === false ? 'height: calc(100vh - 113px)' : ''
65
+ option.showCategoryFilterArea === false
66
+ ? 'height: calc(100vh - 113px)'
67
+ : ''
63
68
  "
64
69
  >
65
- <span class="el-tree-node__label" slot-scope="{ node }" v-if="!node.data.moreBtn">
70
+ <span
71
+ class="el-tree-node__label"
72
+ slot-scope="{ node }"
73
+ v-if="!node.data.moreBtn"
74
+ >
66
75
  <i class="ico-wenjian"></i>
67
76
  <span>{{ node.label }}</span>
68
77
  </span>
69
78
  <span v-else class="el-tree-node__label">
70
- <el-button type="primary" plain class="button-sty">{{ node.label }}</el-button>
79
+ <el-button type="primary" plain class="button-sty">{{
80
+ node.label
81
+ }}</el-button>
71
82
  </span>
72
83
  </el-tree>
73
84
  </div>
@@ -79,7 +90,11 @@
79
90
  </label>
80
91
  <div class="main-right file-library fr" style="overflow: hidden">
81
92
  <div class="pop-annex-filter" v-if="popAnnexFilter">
82
- <div class="item" v-for="(checkBillData, index) in checkBillDatas" :key="index">
93
+ <div
94
+ class="item"
95
+ v-for="(checkBillData, index) in checkBillDatas"
96
+ :key="index"
97
+ >
83
98
  <span>{{ getBillLabel(checkBillData) }}</span
84
99
  ><i class="el-icon-close" @click="deleteBillData(index)"></i>
85
100
  </div>
@@ -100,7 +115,11 @@
100
115
  }}
101
116
  </el-button>
102
117
  <div class="abox">
103
- <div class="item" v-for="(checkBillData, index) in checkBillDatas" :key="index">
118
+ <div
119
+ class="item"
120
+ v-for="(checkBillData, index) in checkBillDatas"
121
+ :key="index"
122
+ >
104
123
  <span>{{ getBillLabel(checkBillData) }}</span
105
124
  ><i class="el-icon-close" @click="deleteBillData(index)"></i>
106
125
  </div>
@@ -210,7 +229,9 @@
210
229
  {{ $t1("搜索") }}
211
230
  </el-button>
212
231
 
213
- <template v-for="(fileButton, customToobarButtonIndex) in customToobarButtons">
232
+ <template
233
+ v-for="(fileButton, customToobarButtonIndex) in customToobarButtons"
234
+ >
214
235
  <template
215
236
  v-if="
216
237
  fileButton.dirs === null ||
@@ -276,7 +297,10 @@
276
297
  <template v-if="currentFileCategory && currentFileCategory.id">
277
298
  <el-input
278
299
  :placeholder="
279
- $t2('请输入文件名', 'components.fileLibrary.filePlaceholder')
300
+ $t2(
301
+ '请输入文件名',
302
+ 'components.fileLibrary.filePlaceholder'
303
+ )
280
304
  "
281
305
  v-model="formData.fileName"
282
306
  clearable
@@ -337,13 +361,17 @@
337
361
  class="item"
338
362
  :class="checkList.includes(attachment.id) ? 'on' : ''"
339
363
  >
340
- <el-checkbox :label="attachment.id"><span></span></el-checkbox>
364
+ <el-checkbox :label="attachment.id"
365
+ ><span></span
366
+ ></el-checkbox>
341
367
  <div class="oper">
342
368
  <el-tooltip
343
369
  effect="dark"
344
370
  content="详情"
345
371
  placement="top"
346
- v-if="!attachment.dirs && isEdit && fileObjAuth.editAuth"
372
+ v-if="
373
+ !attachment.dirs && isEdit && fileObjAuth.editAuth
374
+ "
347
375
  ><i
348
376
  class="el-tooltip iconfont icon-shuxing ico"
349
377
  @click="openPropertiesDialog(attachment)"
@@ -383,7 +411,9 @@
383
411
  ><i class="el-icon-share"></i>分享
384
412
  </el-dropdown-item>
385
413
  <el-dropdown-item
386
- @click.native="replaceFile(attachment, index, page.records)"
414
+ @click.native="
415
+ replaceFile(attachment, index, page.records)
416
+ "
387
417
  v-if="
388
418
  !attachment.dirs &&
389
419
  isEdit &&
@@ -398,7 +428,6 @@
398
428
  v-if="
399
429
  !attachment.dirs &&
400
430
  isEdit &&
401
- attachment.status != 1 &&
402
431
  fileObjAuth.historyAuth
403
432
  "
404
433
  >
@@ -417,12 +446,18 @@
417
446
  </el-dropdown-item>
418
447
  <el-dropdown-item
419
448
  @click.native="deleteCategory(attachment)"
420
- v-if="attachment.dirs && isEdit && fileObjAuth.deleteDirAuth"
449
+ v-if="
450
+ attachment.dirs &&
451
+ isEdit &&
452
+ fileObjAuth.deleteDirAuth
453
+ "
421
454
  >
422
455
  <i class="el-icon-delete"></i>删除
423
456
  </el-dropdown-item>
424
457
  <template
425
- v-for="(fileButton, fileButtonIndex) in customFileButtons"
458
+ v-for="(
459
+ fileButton, fileButtonIndex
460
+ ) in customFileButtons"
426
461
  >
427
462
  <template
428
463
  v-if="
@@ -432,15 +467,24 @@
432
467
  "
433
468
  >
434
469
  <template
435
- v-if="customFileButtonVisable(fileButton, attachment)"
470
+ v-if="
471
+ customFileButtonVisable(
472
+ fileButton,
473
+ attachment
474
+ )
475
+ "
436
476
  >
437
477
  <el-dropdown-item
438
478
  @click.native="
439
- customFileButtonEvent(fileButton, attachment)
479
+ customFileButtonEvent(
480
+ fileButton,
481
+ attachment
482
+ )
440
483
  "
441
484
  :key="fileButtonIndex"
442
485
  >
443
- <i :class="fileButton.icon"></i>{{ fileButton.label }}
486
+ <i :class="fileButton.icon"></i
487
+ >{{ fileButton.label }}
444
488
  </el-dropdown-item>
445
489
  </template>
446
490
  </template>
@@ -490,13 +534,17 @@
490
534
  <div class="tb-left"></div>
491
535
  <div class="tb-mid">
492
536
  <div class="txt">
493
- <span class="name">{{ getFileName(attachment) }}</span
537
+ <span class="name">{{
538
+ getFileName(attachment)
539
+ }}</span
494
540
  ><span v-if="attachment.extension"
495
541
  >.{{ attachment.extension }}</span
496
542
  >
497
543
  </div>
498
544
  </div>
499
- <div class="format">... .{{ attachment.extension }}</div>
545
+ <div class="format">
546
+ ... .{{ attachment.extension }}
547
+ </div>
500
548
  </div>
501
549
  </el-tooltip>
502
550
  </li>
@@ -561,7 +609,9 @@
561
609
  >
562
610
  <template #right>
563
611
  <span>
564
- <span>{{ $t2("当前记录", "components.table.pageInfo") }}</span>
612
+ <span>{{
613
+ $t2("当前记录", "components.table.pageInfo")
614
+ }}</span>
565
615
  <span class="f-red"> {{ page.records.length }} </span>
566
616
  <span>/</span>
567
617
  <span class="f-red"> {{ page.total }}</span>
@@ -622,7 +672,9 @@
622
672
  <a
623
673
  href="javascript:void(0);"
624
674
  class="a-link"
625
- v-if="isEdit && row.status != 1 && fileObjAuth.replaceAuth === 1"
675
+ v-if="
676
+ isEdit && row.status != 1 && fileObjAuth.replaceAuth === 1
677
+ "
626
678
  @click="replaceFile(row, rowIndex, items)"
627
679
  >
628
680
  <el-tooltip
@@ -638,7 +690,7 @@
638
690
  <a
639
691
  href="javascript:void(0);"
640
692
  class="a-link"
641
- v-if="isEdit && row.status != 1 && fileObjAuth.historyAuth === 1"
693
+ v-if="isEdit && fileObjAuth.historyAuth === 1"
642
694
  @click="openFileHistoryDialog(row)"
643
695
  >
644
696
  <el-tooltip
@@ -654,7 +706,9 @@
654
706
  <a
655
707
  href="javascript:void(0);"
656
708
  class="a-link"
657
- v-if="isEdit && row.status != 1 && fileObjAuth.deleteAuth === 1"
709
+ v-if="
710
+ isEdit && row.status != 1 && fileObjAuth.deleteAuth === 1
711
+ "
658
712
  @click="deleteAttach(row)"
659
713
  >
660
714
  <el-tooltip
@@ -688,7 +742,9 @@
688
742
  <a
689
743
  href="javascript:void(0);"
690
744
  class="a-link"
691
- v-if="isEdit && isCategoryEdit && fileObjAuth.deleteDirAuth === 1"
745
+ v-if="
746
+ isEdit && isCategoryEdit && fileObjAuth.deleteDirAuth === 1
747
+ "
692
748
  @click="deleteAttach(row)"
693
749
  >
694
750
  <el-tooltip
@@ -758,26 +814,42 @@
758
814
  class="adSearchForm"
759
815
  >
760
816
  <el-form-item
761
- :label="$t2('文件夹路径', 'components.fileLibrary.fileCategoryPath')"
817
+ :label="
818
+ $t2('文件夹路径', 'components.fileLibrary.fileCategoryPath')
819
+ "
762
820
  >
763
821
  <el-breadcrumb separator-class="el-icon-arrow-right">
764
- <el-breadcrumb-item v-for="(treeNode, index) in treeNodeArr" :key="index"
822
+ <el-breadcrumb-item
823
+ v-for="(treeNode, index) in treeNodeArr"
824
+ :key="index"
765
825
  >{{ treeNode.label }}
766
826
  </el-breadcrumb-item>
767
827
  </el-breadcrumb>
768
828
  </el-form-item>
769
829
  <el-form-item
770
- :label="$t2('文件夹编码', 'components.fileLibrary.fileCategorySn')"
830
+ :label="
831
+ $t2('文件夹编码', 'components.fileLibrary.fileCategorySn')
832
+ "
771
833
  >
772
834
  <span>{{ editCategory.fileSn }}</span>
773
835
  </el-form-item>
774
836
  <el-form-item
775
- :label="$t2('文件夹名称', 'components.fileLibrary.fileCategoryName')"
837
+ :label="
838
+ $t2('文件夹名称', 'components.fileLibrary.fileCategoryName')
839
+ "
776
840
  >
777
- <el-input v-model="editCategory.fileName" clearable class="all-width" />
841
+ <el-input
842
+ v-model="editCategory.fileName"
843
+ clearable
844
+ class="all-width"
845
+ />
778
846
  </el-form-item>
779
847
  <el-form-item :label="$t1('关联编码')">
780
- <el-input v-model="editCategory.relationCode" clearable class="all-width" />
848
+ <el-input
849
+ v-model="editCategory.relationCode"
850
+ clearable
851
+ class="all-width"
852
+ />
781
853
  </el-form-item>
782
854
  </el-form>
783
855
  </div>
@@ -791,7 +863,11 @@
791
863
  <i class="el-icon-close el-icon"></i>
792
864
  {{ $t2("取 消", "system.button.cancel2") }}
793
865
  </el-button>
794
- <el-button type="primary" @click="confirmEditCategoryDialog" class="button-sty">
866
+ <el-button
867
+ type="primary"
868
+ @click="confirmEditCategoryDialog"
869
+ class="button-sty"
870
+ >
795
871
  <i class="el-icon-check el-icon"></i>
796
872
  {{ $t2("确 定", "system.button.confirm2") }}
797
873
  </el-button>
@@ -889,7 +965,9 @@
889
965
  size="small"
890
966
  clearable
891
967
  value-format="yyyy-MM-dd"
892
- :picker-options="$baseStartPickerOptions(advancedFormData.endTime)"
968
+ :picker-options="
969
+ $baseStartPickerOptions(advancedFormData.endTime)
970
+ "
893
971
  ></el-date-picker>
894
972
  <span>-</span>
895
973
  <el-date-picker
@@ -899,7 +977,9 @@
899
977
  size="small"
900
978
  clearable
901
979
  value-format="yyyy-MM-dd"
902
- :picker-options="$baseEndPickerOptions(advancedFormData.startTime)"
980
+ :picker-options="
981
+ $baseEndPickerOptions(advancedFormData.startTime)
982
+ "
903
983
  ></el-date-picker>
904
984
  </template>
905
985
  </vxe-form-item>
package/src/utils/vab.js CHANGED
@@ -1,10 +1,6 @@
1
1
  /**version-1.0*/
2
2
  let install = {};
3
3
 
4
- function reqImg(a) {
5
- return require("@/resources/images/" + a);
6
- }
7
-
8
4
  import request from "./request";
9
5
  import * as lodash from "lodash";
10
6
  import { Loading, Message, MessageBox, Notification, Form } from "element-ui";
@@ -30,6 +26,156 @@ let imFun = {
30
26
  prefixConfig,
31
27
  };
32
28
 
29
+ function reqImg(a) {
30
+ return require("@/resources/images/" + a);
31
+ }
32
+
33
+ const FILE_ICON_NAME_MAP = {
34
+ word: "ico-wrod.svg",
35
+ excel: "ico-excel.svg",
36
+ ppt: "ico-ppt.svg",
37
+ pdf: "ico-pdf.svg",
38
+ picture: "ico-photo.svg",
39
+ video: "ico-video.svg",
40
+ audio: "ico-music.svg",
41
+ html: "ico-html.svg",
42
+ txt: "ico-txt.svg",
43
+ java: "ico-java.svg",
44
+ vue: "ico-vue.svg",
45
+ ftl: "ico-ftl.svg",
46
+ xml: "ico-xml.svg",
47
+ flash: "ico-flash.svg",
48
+ zip: "ico-yasuobao.svg",
49
+ exe: "ico-ext.svg",
50
+ psd: "ico-psd.svg",
51
+ folder: "ico-wenjianjia.svg",
52
+ other: "ico-default_wenjian.svg",
53
+ };
54
+
55
+ const FILE_ICON_TYPE_MAP = {
56
+ doc: "word",
57
+ docx: "word",
58
+ xls: "excel",
59
+ xlsx: "excel",
60
+ ppt: "ppt",
61
+ pptx: "ppt",
62
+ pdf: "pdf",
63
+ jpg: "picture",
64
+ jpeg: "picture",
65
+ png: "picture",
66
+ gif: "picture",
67
+ mp3: "video",
68
+ mp4: "video",
69
+ mpg: "video",
70
+ mkv: "video",
71
+ rmvb: "video",
72
+ avi: "video",
73
+ mov: "video",
74
+ wav: "audio",
75
+ html: "html",
76
+ htm: "html",
77
+ txt: "txt",
78
+ java: "java",
79
+ vue: "vue",
80
+ ftl: "ftl",
81
+ xml: "xml",
82
+ swf: "flash",
83
+ zip: "zip",
84
+ rar: "zip",
85
+ "7z": "zip",
86
+ // exe: 'exe',
87
+ psd: "psd",
88
+ };
89
+
90
+ let typeList = [
91
+ "doc",
92
+ "docx",
93
+ "xls",
94
+ "xlsx",
95
+ "ppt",
96
+ "pptx",
97
+ "csv",
98
+ "wps",
99
+ "dps",
100
+ "et",
101
+ "ett",
102
+ "wpt",
103
+ "vsd",
104
+ "vsdx",
105
+ "wmf",
106
+ "emf",
107
+ "psd",
108
+ "eps",
109
+ "pdf",
110
+ "xmind",
111
+ "obj",
112
+ "3ds",
113
+ "stl",
114
+ "ply",
115
+ "gltf",
116
+ "glb",
117
+ "off",
118
+ "3dm",
119
+ "fbx",
120
+ "dae",
121
+ "wrl",
122
+ "3mf",
123
+ "ifc",
124
+ "brep",
125
+ "step",
126
+ "iges",
127
+ "fcstd",
128
+ "bim",
129
+ "dwg",
130
+ "dxf",
131
+ "dwf",
132
+ "iges",
133
+ "igs",
134
+ "dwt",
135
+ "dng",
136
+ "ifc",
137
+ "dwfx",
138
+ "stl",
139
+ "cf2",
140
+ "plt",
141
+ "txt",
142
+ "xml",
143
+ "md",
144
+ "java",
145
+ "php",
146
+ "py",
147
+ "js",
148
+ "css",
149
+ "zip",
150
+ "rar",
151
+ "jar",
152
+ "tar",
153
+ "gzip",
154
+ "7z",
155
+ "mp3",
156
+ "wav",
157
+ "mp4",
158
+ "flv",
159
+ "avi",
160
+ "rm",
161
+ "mkv",
162
+ "mpeg",
163
+ "mpg",
164
+ "rmvb",
165
+ "wmv",
166
+ "3gp",
167
+ "swf",
168
+ "drawio",
169
+ "tif",
170
+ "tiff",
171
+ "jfif",
172
+ "webp",
173
+ "tga",
174
+ "svg",
175
+ "vue",
176
+ "ftl",
177
+ ];
178
+
33
179
  const accessToken = imFun.store.getters["user/token"];
34
180
 
35
181
  const loadingText = "";
@@ -245,93 +391,6 @@ install = (Vue, opts = {}) => {
245
391
  /* 全局事件总线 */
246
392
  Vue.prototype.$baseEventBus = new Vue();
247
393
 
248
- let typeList = [
249
- "doc",
250
- "docx",
251
- "xls",
252
- "xlsx",
253
- "ppt",
254
- "pptx",
255
- "csv",
256
- "wps",
257
- "dps",
258
- "et",
259
- "ett",
260
- "wpt",
261
- "vsd",
262
- "vsdx",
263
- "wmf",
264
- "emf",
265
- "psd",
266
- "eps",
267
- "pdf",
268
- "xmind",
269
- "obj",
270
- "3ds",
271
- "stl",
272
- "ply",
273
- "gltf",
274
- "glb",
275
- "off",
276
- "3dm",
277
- "fbx",
278
- "dae",
279
- "wrl",
280
- "3mf",
281
- "ifc",
282
- "brep",
283
- "step",
284
- "iges",
285
- "fcstd",
286
- "bim",
287
- "dwg",
288
- "dxf",
289
- "dwf",
290
- "iges",
291
- "igs",
292
- "dwt",
293
- "dng",
294
- "ifc",
295
- "dwfx",
296
- "stl",
297
- "cf2",
298
- "plt",
299
- "txt",
300
- "xml",
301
- "md",
302
- "java",
303
- "php",
304
- "py",
305
- "js",
306
- "css",
307
- "zip",
308
- "rar",
309
- "jar",
310
- "tar",
311
- "gzip",
312
- "7z",
313
- "mp3",
314
- "wav",
315
- "mp4",
316
- "flv",
317
- "avi",
318
- "rm",
319
- "mkv",
320
- "mpeg",
321
- "mpg",
322
- "rmvb",
323
- "wmv",
324
- "3gp",
325
- "swf",
326
- "drawio",
327
- "tif",
328
- "tiff",
329
- "jfif",
330
- "webp",
331
- "tga",
332
- "svg",
333
- "vue",
334
- ];
335
394
  Vue.prototype.$commonFileUtil = {
336
395
  // 文件类型获取与判断接口
337
396
  getFileSuffix: function (name) {
@@ -537,102 +596,27 @@ install = (Vue, opts = {}) => {
537
596
  return this.getFileIconRequire(filename);
538
597
  }
539
598
  },
540
- getFileIconRequire: function (name, showType) {
541
- let iconType = this.getDiyFileIconType(name);
542
- if (!iconType) {
543
- iconType = "other";
544
- }
545
- let fileIconNameMap = {
546
- word: "ico-wrod.svg",
547
- excel: "ico-excel.svg",
548
- ppt: "ico-ppt.svg",
549
- pdf: "ico-pdf.svg",
550
- picture: "ico-photo.svg",
551
- video: "ico-video.svg",
552
- audio: "ico-music.svg",
553
- html: "ico-html.svg",
554
- txt: "ico-txt.svg",
555
- flash: "ico-flash.svg",
556
- zip: "ico-yasuobao.svg",
557
- exe: "ico-ext.svg",
558
- psd: "ico-psd.svg",
559
- folder: "ico-wenjianjia.svg",
560
- other: "ico-default_wenjian.svg",
561
- };
599
+ resolveFileIconName: function (name, showType) {
600
+ let iconType = this.getDiyFileIconType(name) || "other";
562
601
  if (showType) {
563
602
  iconType = showType;
564
603
  }
565
- let fileIcenName = fileIconNameMap[iconType];
566
- return reqImg(fileIcenName);
604
+ return FILE_ICON_NAME_MAP[iconType];
605
+ },
606
+ getFileIconRequire: function (name, showType) {
607
+ return reqImg(this.resolveFileIconName(name, showType));
567
608
  },
568
609
  getFileIconPath: function (name, showType) {
569
- let iconType = this.getDiyFileIconType(name);
570
- if (!iconType) {
571
- iconType = "other";
572
- }
573
- let fileIconNameMap = {
574
- word: "ico-wrod.svg",
575
- excel: "ico-excel.svg",
576
- ppt: "ico-ppt.svg",
577
- pdf: "ico-pdf.svg",
578
- picture: "ico-photo.svg",
579
- video: "ico-video.svg",
580
- audio: "ico-music.svg",
581
- html: "ico-html.svg",
582
- txt: "ico-txt.svg",
583
- flash: "ico-flash.svg",
584
- zip: "ico-yasuobao.svg",
585
- exe: "ico-ext.svg",
586
- psd: "ico-psd.svg",
587
- folder: "ico-wenjianjia.svg",
588
- other: "ico-default_wenjian.svg",
589
- };
590
- if (showType) {
591
- iconType = showType;
592
- }
593
- let fileIcenName = fileIconNameMap[iconType];
594
- let path = "/resources/images/" + fileIcenName;
595
- return path;
610
+ return "/resources/images/" + this.resolveFileIconName(name, showType);
596
611
  },
597
612
  getDiyFileIconType: function (name) {
598
- let fileIconTypeMap = {
599
- doc: "word",
600
- docx: "word",
601
- xls: "excel",
602
- xlsx: "excel",
603
- ppt: "ppt",
604
- pptx: "ppt",
605
- pdf: "pdf",
606
- jpg: "picture",
607
- jpeg: "picture",
608
- png: "picture",
609
- gif: "picture",
610
- mp3: "video",
611
- mp4: "video",
612
- mpg: "video",
613
- mkv: "video",
614
- rmvb: "video",
615
- avi: "video",
616
- mov: "video",
617
- wav: "audio",
618
- html: "html",
619
- htm: "html",
620
- txt: "txt",
621
- swf: "flash",
622
- zip: "zip",
623
- rar: "zip",
624
- "7z": "zip",
625
- // exe: 'exe',
626
- psd: "psd",
627
- };
628
-
629
613
  let suffix = this.getFileSuffix(name);
630
614
  if (suffix === "") {
631
615
  // 默认是文本类型
632
616
  return "";
633
617
  }
634
618
 
635
- let iconType = fileIconTypeMap[suffix];
619
+ let iconType = FILE_ICON_TYPE_MAP[suffix];
636
620
  if (undefined === iconType) {
637
621
  return "";
638
622
  }