cloud-web-corejs 1.0.194 → 1.0.195

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.
Files changed (124) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/index.js +48 -1
  3. package/src/components/VabUpload/mixins.js +1821 -1
  4. package/src/components/VabUpload/privateProfileDialogMixins.js +1063 -1
  5. package/src/components/advancedSearchDialog/mixins.js +28 -1
  6. package/src/components/baseAlert/index.js +44 -1
  7. package/src/components/baseAlert/mixins.js +61 -1
  8. package/src/components/baseAttachment/install.js +21 -5
  9. package/src/components/baseAttachment/mixins.js +317 -1
  10. package/src/components/baseInputBatch/mixins.js +58 -1
  11. package/src/components/baseInputExport/mixins.js +391 -1
  12. package/src/components/baseTabs/mixins.js +166 -1
  13. package/src/components/cnPrint/index.js +44 -1
  14. package/src/components/cnPrint/mixins.js +189 -1
  15. package/src/components/code-editor/index.vue +51 -136
  16. package/src/components/confirmDialog/index.js +41 -1
  17. package/src/components/confirmDialog/mixins.js +31 -1
  18. package/src/components/errorMsg/index.js +44 -1
  19. package/src/components/errorMsg/mixins.js +96 -1
  20. package/src/components/excelExport/index.js +43 -1
  21. package/src/components/excelExport/mixins.js +964 -1
  22. package/src/components/excelImport/index.js +74 -13
  23. package/src/components/excelImport/mixins.js +774 -1
  24. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  25. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  26. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  27. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +202 -350
  28. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +26 -33
  29. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +5 -5
  30. package/src/components/fileLibrary/mixins/indexMixins.js +106 -250
  31. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +4 -64
  32. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +4 -3
  33. package/src/components/formOplog/mixins.js +77 -1
  34. package/src/components/hiprint/view/design/mixins.js +611 -1
  35. package/src/components/jdPrint/index.js +44 -1
  36. package/src/components/jdPrint/mixins.js +208 -1
  37. package/src/components/jsonImport/index.js +187 -17
  38. package/src/components/jsonImport/mixins.js +332 -1
  39. package/src/components/langImport/index.js +80 -1
  40. package/src/components/langImport/mixins.js +484 -1
  41. package/src/components/langTag/mixins/addButton.js +51 -5
  42. package/src/components/langTag/mixins/deleteButton.js +55 -5
  43. package/src/components/langTag/mixins/view.js +47 -5
  44. package/src/components/luckysheet/export.js +591 -1
  45. package/src/components/luckysheet/fileUtils.js +147 -1
  46. package/src/components/luckysheet/index.js +72 -1
  47. package/src/components/obsUpload/index.js +34 -1
  48. package/src/components/obsUpload/mixins.js +1469 -1
  49. package/src/components/onlineTalk/index.vue +5 -327
  50. package/src/components/onlineTalk/mixins.js +852 -1
  51. package/src/components/oplogTable/mixins.js +80 -1
  52. package/src/components/pddPrint/index.js +44 -1
  53. package/src/components/pddPrint/mixins.js +252 -1
  54. package/src/components/projectTag/mixins/addButton.js +52 -1
  55. package/src/components/projectTag/mixins/deleteButton.js +52 -1
  56. package/src/components/projectTag/mixins/view.js +43 -1
  57. package/src/components/scriptDescription/mixins.js +30 -1
  58. package/src/components/scriptTest/mixins.js +90 -1
  59. package/src/components/statusTag/mixins.js +66 -1
  60. package/src/components/table/CellSlot.vue +2 -29
  61. package/src/components/table/config - hx5.0.js +79 -0
  62. package/src/components/table/config.js +74 -1
  63. package/src/components/table/index - hx5.0.js +958 -0
  64. package/src/components/table/index.js +1055 -1
  65. package/src/components/table/tableFormMixin.js +281 -1
  66. package/src/components/table/util/index.js +3 -10
  67. package/src/components/table/vxeFilter/index.js +153 -1
  68. package/src/components/table/vxeFilter/mixin.js +301 -1
  69. package/src/components/vipPrint/index.js +44 -1
  70. package/src/components/vipPrint/mixins.js +268 -1
  71. package/src/components/wf/mixins/addOpinionButton.js +51 -1
  72. package/src/components/wf/mixins/setCandidateButton.js +156 -1
  73. package/src/components/wf/mixins/setCandidateDialog.js +212 -1
  74. package/src/components/wf/mixins/setCandidateDialog2.js +247 -1
  75. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +129 -1
  76. package/src/components/wf/mixins/wfTaskUserRangeDialog.js +67 -1
  77. package/src/components/wf/wf.js +2156 -1
  78. package/src/components/wf/wfUtil.js +279 -1
  79. package/src/components/xform/form-designer/designer.js +1685 -1
  80. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +112 -1
  81. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +290 -1
  82. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1769 -1
  83. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1654 -1
  84. package/src/components/xform/form-designer/form-widget/indexMixin.js +183 -1
  85. package/src/components/xform/form-designer/indexMixin.js +847 -1
  86. package/src/components/xform/form-designer/setting-panel/indexMixin.js +335 -1
  87. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +589 -1
  88. package/src/components/xform/form-designer/widget-panel/indexMixin.js +308 -1
  89. package/src/components/xform/form-render/container-item/containerItemMixin.js +389 -1
  90. package/src/components/xform/form-render/container-item/data-table-mixin.js +3064 -1
  91. package/src/components/xform/form-render/dynamicDialogRender.js +199 -1
  92. package/src/components/xform/form-render/indexMixin.js +3725 -1
  93. package/src/components/xform/form-render/refMixin.js +31 -1
  94. package/src/components/xform/mixins/defaultHandle.js +343 -1
  95. package/src/components/xform/mixins/scriptHttp.js +1 -1
  96. package/src/components/xform/utils/emitter.js +4 -4
  97. package/src/components/xform/utils/format.js +1 -1
  98. package/src/components/xform/utils/formula-util.js +4 -0
  99. package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
  100. package/src/components/xform/utils/util.js +1464 -1
  101. package/src/components/xform/utils/validators.js +134 -1
  102. package/src/components/xhsPrint/index.js +44 -1
  103. package/src/components/xhsPrint/mixins.js +269 -1
  104. package/src/directive/LimitNumber/index.js +125 -1
  105. package/src/directive/el-dialog-center/index.js +34 -1
  106. package/src/directive/el-drag-dialog/drag.js +86 -1
  107. package/src/directive/el-readonly/index.js +15 -1
  108. package/src/directive/permission/hasPermi.js +34 -1
  109. package/src/permission.js +135 -1
  110. package/src/store/config/index.js +667 -1
  111. package/src/store/modules/permission.js +0 -15
  112. package/src/store/modules/settings.js +26 -1
  113. package/src/store/modules/tagsView.js +200 -1
  114. package/src/store/modules/user.js +356 -1
  115. package/src/utils/aes.js +15 -1
  116. package/src/utils/auth.js +27 -1
  117. package/src/utils/global.js +362 -1
  118. package/src/utils/index.js +579 -1
  119. package/src/utils/keepAlive.js +181 -1
  120. package/src/utils/pddLog.js +17 -28
  121. package/src/utils/request.js +368 -1
  122. package/src/utils/vab.js +1258 -1
  123. package/src/utils/validate.js +106 -1
  124. package/src/utils/wf.js +749 -4
@@ -1,15 +1,12 @@
1
- import { treeScollx } from "@base/utils/global.js";
2
- import ElImageViewer from "@base/components/VabUpload/image-viewer";
3
- import propertiesDialog from "@base/components/fileLibrary/propertiesDialog";
4
- import categoryMoveDialog from "@base/components/fileLibrary/categoryMoveDialog";
5
- import fileHistoryDialog from "@base/components/fileLibrary/fileHistoryDialog";
6
- import shareDialog from "@base/components/fileLibrary/shareDialog";
7
- import recycleBinDialog from "@base/components/fileLibrary/recycleBinDialog";
8
- import videoDialog from "@base/components/video/dialog";
9
- import userDialog from "@base/views/user/user/dialog";
10
- import { encode } from "js-base64";
11
- import fileObjAuthDialog from "@base/components/fileLibrary/fileObjAuthDialog";
12
- import filterDialog from "@base/components/fileLibrary/filterDialog.vue";
1
+ import {treeScollx} from "../../../utils/global.js";
2
+ import ElImageViewer from "../../../components/VabUpload/image-viewer";
3
+ import propertiesDialog from "../propertiesDialog";
4
+ import categoryMoveDialog from "../categoryMoveDialog";
5
+ import fileHistoryDialog from "../fileHistoryDialog";
6
+ import shareDialog from "../shareDialog";
7
+ import recycleBinDialog from "../recycleBinDialog";
8
+ import videoDialog from "../../../components/video/dialog";
9
+ import userDialog from "../../../views/user/user/dialog";
13
10
 
14
11
  let modules;
15
12
  modules = {
@@ -27,8 +24,6 @@ modules = {
27
24
  recycleBinDialog,
28
25
  videoDialog,
29
26
  userDialog,
30
- fileObjAuthDialog,
31
- filterDialog,
32
27
  },
33
28
  provide() {
34
29
  return {
@@ -48,9 +43,6 @@ modules = {
48
43
  getObjectForeignId: () => {
49
44
  return this.objectForeignId;
50
45
  },
51
- getFileStoreArea: () => {
52
- return this.fileStoreArea;
53
- },
54
46
  };
55
47
  },
56
48
  async created() {
@@ -80,7 +72,6 @@ modules = {
80
72
  billDialogContent: null,
81
73
  checkBillDatas: [],
82
74
  title: "",
83
- fileStoreArea: {},
84
75
  folderStatus: false,
85
76
  filterText: "",
86
77
  defaultProps: {
@@ -88,7 +79,8 @@ modules = {
88
79
  label: "fileName",
89
80
  isLeaf: "leaf",
90
81
  },
91
- resolveFunc: function () {},
82
+ resolveFunc: function () {
83
+ },
92
84
  fileAttachmentCategorys: [],
93
85
  currentFileCategoryCode: null,
94
86
  chooseIndex: -1,
@@ -157,10 +149,6 @@ modules = {
157
149
  end_y: 0,
158
150
  scrollTop1: 0,
159
151
  scrollTop2: 0,
160
- showFileObjAuthDialog: false,
161
- fileObjAuth: {},
162
- popAnnexFilter: false,
163
- showFilterDialog: false,
164
152
  };
165
153
  },
166
154
  computed: {
@@ -184,8 +172,8 @@ modules = {
184
172
  let dataId = this.isBillEnabled
185
173
  ? this.checkBillDatas.map((row) => row.id)
186
174
  : this.option.dataId
187
- ? [this.option.dataId]
188
- : [0];
175
+ ? [this.option.dataId]
176
+ : [0];
189
177
  return dataId;
190
178
  },
191
179
  objectForeignId() {
@@ -254,8 +242,8 @@ modules = {
254
242
  },
255
243
  currentCategoryId() {
256
244
  return this.currentFileCategory &&
257
- this.currentFileCategory.id &&
258
- this.currentFileCategory.id > 0
245
+ this.currentFileCategory.id &&
246
+ this.currentFileCategory.id > 0
259
247
  ? this.currentFileCategory.id
260
248
  : 0;
261
249
  },
@@ -266,39 +254,9 @@ modules = {
266
254
  customToobarButtons() {
267
255
  let buttonConfig = this.option.buttonConfig || {};
268
256
  return buttonConfig && buttonConfig.toobar ? buttonConfig.toobar : [];
269
- },
257
+ }
270
258
  },
271
259
  methods: {
272
- openFileDirs(row) {
273
- let keys = row.treePath.split(",").filter((item) => !!item);
274
- if(row.dirs){
275
- keys.push(row.id + "")
276
- }
277
- let size = keys.length;
278
- let tree = this.$refs.tree;
279
-
280
- let parent = null;
281
- let loopDo = (index) => {
282
- if (size <= index) return;
283
- let key = keys[index];
284
- let node = tree.getNode(key + "");
285
- let data = node.data;
286
- if (size == index + 1) {
287
- tree.setCurrentKey(data);
288
- this.handleNodeClick(data, node, this);
289
- return;
290
- }
291
-
292
- if (!data.leaf) {
293
- node.expand(() => {
294
- loopDo(index + 1);
295
- });
296
- }
297
- };
298
- this.getTopNode().expand(() => {
299
- loopDo(0);
300
- });
301
- },
302
260
  getTopNode() {
303
261
  return this.$refs.tree.root.childNodes[0];
304
262
  },
@@ -339,12 +297,7 @@ modules = {
339
297
  let checkRows = this.getCheckRows();
340
298
  if (!checkRows.length) {
341
299
  let msg =
342
- handleType == 1
343
- ? this.$t2("请选择需要移动的文件", "components.fileLibrary.moveTip")
344
- : this.$t2(
345
- "请选择需要复制的文件",
346
- "components.fileLibrary.copyTip"
347
- );
300
+ handleType == 1 ? this.$t2('请选择需要移动的文件', 'components.fileLibrary.moveTip') : this.$t2('请选择需要复制的文件', 'components.fileLibrary.copyTip');
348
301
  this.$message({
349
302
  message: msg,
350
303
  type: "error",
@@ -416,22 +369,14 @@ modules = {
416
369
  deleteCategory(category) {
417
370
  if (!category && !this.currentCategoryId) {
418
371
  this.$message({
419
- message: this.$t2(
420
- "请选择需要删除的文件夹",
421
- "components.fileLibrary.deleteCategoryTip"
422
- ),
372
+ message: this.$t2('请选择需要删除的文件夹', 'components.fileLibrary.deleteCategoryTip'),
423
373
  type: "error",
424
374
  showClose: true,
425
375
  duration: 3000,
426
376
  });
427
377
  return;
428
378
  }
429
- this.$baseConfirm(
430
- this.$t2(
431
- "您确定要删除文件夹吗?",
432
- "components.fileLibrary.deleteCategoryConfirmTip"
433
- )
434
- ).then(() => {
379
+ this.$baseConfirm(this.$t2('您确定要删除文件夹吗?', 'components.fileLibrary.deleteCategoryConfirmTip')).then(() => {
435
380
  let categoryId = category ? category.id : this.currentCategoryId;
436
381
  this.$http({
437
382
  method: "post",
@@ -500,7 +445,7 @@ modules = {
500
445
  if (!field) field = "medium";
501
446
  return this.$commonFileUtil.getShowUrl(
502
447
  attachment.domain +
503
- (attachment[field] ? attachment[field] : attachment.url)
448
+ (attachment[field] ? attachment[field] : attachment.url)
504
449
  );
505
450
  },
506
451
  isVideo(fileSuffix) {
@@ -542,7 +487,7 @@ modules = {
542
487
  };
543
488
 
544
489
  let parent = this.currentCategoryId;
545
- this.$commonHttp({
490
+ this.$http({
546
491
  method: "post",
547
492
  url: this.current_prefix + "/file_obj/listPage",
548
493
  data: {
@@ -561,25 +506,21 @@ modules = {
561
506
  let checkBillDatas = this.checkBillDatas;
562
507
  let done = (res) => {
563
508
  this.page = res;
564
- };
509
+ }
565
510
  let preHandlePage = this.option.preHandlePage;
566
511
  if (preHandlePage) {
567
- preHandlePage({ page, objectForeignId, checkBillDatas, done });
512
+ preHandlePage({page, objectForeignId, checkBillDatas, done})
568
513
  } else {
569
514
  done(page);
570
515
  }
571
- },
516
+ }
572
517
  });
573
518
  },
574
519
  addFile() {
575
520
  let currentFileCategory = this.currentFileCategory;
576
521
  if (!currentFileCategory || !currentFileCategory.id) {
577
522
  this.$message({
578
- message: this.$t2(
579
- "文件夹[" + this.title + "]不允许上传",
580
- "components.fileLibrary.uploadTip1",
581
- { title: this.title }
582
- ),
523
+ message: this.$t2("文件夹[" + this.title + "]不允许上传", 'components.fileLibrary.uploadTip1', {title: this.title}),
583
524
  type: "error",
584
525
  showClose: true,
585
526
  duration: 3000,
@@ -590,11 +531,7 @@ modules = {
590
531
  if (!this.checkBillDatas.length) {
591
532
  let billName = this.billConfig.name;
592
533
  this.$message({
593
- message: this.$t2(
594
- "请选择" + billName,
595
- "components.fileLibrary.uploadTip2",
596
- { billName: billName }
597
- ),
534
+ message: this.$t2("请选择" + billName, 'components.fileLibrary.uploadTip2', {billName: billName}),
598
535
  type: "error",
599
536
  showClose: true,
600
537
  duration: 3000,
@@ -654,8 +591,8 @@ modules = {
654
591
  if (attachment) {
655
592
  if (attachment.status == 1) {
656
593
  this.$message({
657
- message: "归档文件不允许删除",
658
- type: "error",
594
+ message: '归档文件不允许删除',
595
+ type: 'error',
659
596
  showClose: true,
660
597
  duration: 3000,
661
598
  });
@@ -665,13 +602,13 @@ modules = {
665
602
  if (attachment.dirs) {
666
603
  categorys.push(attachment);
667
604
  }
668
- checkRows = [attachment];
605
+ checkRows = [attachment]
669
606
  } else {
670
607
  checkRows = this.getCheckRows();
671
- if (checkRows.find((row) => row.status == 1)) {
608
+ if (checkRows.find(row => row.status == 1)) {
672
609
  this.$message({
673
- message: "归档文件不允许删除",
674
- type: "error",
610
+ message: '归档文件不允许删除',
611
+ type: 'error',
675
612
  showClose: true,
676
613
  duration: 3000,
677
614
  });
@@ -682,10 +619,7 @@ modules = {
682
619
  }
683
620
  if (!data.length) {
684
621
  this.$message({
685
- message: this.$t2(
686
- "请选择需要删除的文件",
687
- "components.fileLibrary.deleteFileTip"
688
- ),
622
+ message: this.$t2('请选择需要删除的文件', 'components.fileLibrary.deleteFileTip'),
689
623
  type: "error",
690
624
  showClose: true,
691
625
  duration: 3000,
@@ -693,17 +627,13 @@ modules = {
693
627
  return;
694
628
  }
695
629
 
696
- let deleteDirAuth =
697
- this.fileObjAuth && this.fileObjAuth.deleteDirAuth ? 1 : 0;
630
+ let deleteDirAuth = this.fileObjAuth && this.fileObjAuth.deleteDirAuth ? 1 : 0;
698
631
  let deleteAuth = this.fileObjAuth && this.fileObjAuth.deleteAuth ? 1 : 0;
699
632
  for (let i = 0; i < checkRows.length; i++) {
700
633
  let item = checkRows[i];
701
634
  if (item.dirs && !deleteDirAuth) {
702
635
  this.$message({
703
- message: this.$t2(
704
- "您没有删除文件夹的权限!",
705
- "components.fileLibrary.deleteCategoryTip2"
706
- ),
636
+ message: this.$t2('您没有删除文件夹的权限!', 'components.fileLibrary.deleteCategoryTip2'),
707
637
  type: "error",
708
638
  showClose: true,
709
639
  duration: 3000,
@@ -711,10 +641,7 @@ modules = {
711
641
  return;
712
642
  } else if (!item.dirs && !deleteAuth) {
713
643
  this.$message({
714
- message: this.$t2(
715
- "您没有删除文件的权限!",
716
- "components.fileLibrary.deleteFileTip2"
717
- ),
644
+ message: this.$t2('您没有删除文件的权限!', 'components.fileLibrary.deleteFileTip2'),
718
645
  type: "error",
719
646
  showClose: true,
720
647
  duration: 3000,
@@ -724,9 +651,7 @@ modules = {
724
651
  }
725
652
 
726
653
  // let data = [attachment.id];
727
- this.$baseConfirm(
728
- this.$t2("您确定要删除吗?", "components.fileLibrary.deleteConfirmTip")
729
- ).then(() => {
654
+ this.$baseConfirm(this.$t2('您确定要删除吗?', 'components.fileLibrary.deleteConfirmTip')).then(() => {
730
655
  this.$http({
731
656
  method: "post",
732
657
  url: this.current_prefix + "/file_obj/setDisable",
@@ -750,9 +675,7 @@ modules = {
750
675
  },
751
676
  initTableList() {
752
677
  let that = this;
753
- let customColumns = this.option.customColumns
754
- ? this.option.customColumns()
755
- : [];
678
+ let customColumns = this.option.customColumns ? this.option.customColumns() : [];
756
679
  let tableOption = {
757
680
  vue: this,
758
681
  tableRef: "table-m1",
@@ -765,14 +688,14 @@ modules = {
765
688
  },
766
689
  },
767
690
  columns: [
768
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
691
+ {type: "checkbox", width: 48, resizable: false, fixed: "left"},
769
692
  {
770
- title: this.$t2("文件名称", "components.fileLibrary.fileName"),
693
+ title: this.$t2('文件名称', 'components.fileLibrary.fileName'),
771
694
  field: "fileName",
772
695
  width: 250,
773
696
  fixed: "left",
774
697
  slots: {
775
- default: ({ row, $rowIndex }) => {
698
+ default: ({row, $rowIndex}) => {
776
699
  let h = this.$createElement;
777
700
  if (!row.dirs) {
778
701
  let showUrl = that.getShowUrl(row, "thumbnail");
@@ -795,10 +718,7 @@ modules = {
795
718
  props: {
796
719
  enterable: false,
797
720
  effect: "dark",
798
- content: this.$t2(
799
- "预览",
800
- "components.fileLibrary.preview"
801
- ),
721
+ content: this.$t2('预览', 'components.fileLibrary.preview'),
802
722
  placement: "top",
803
723
  "popper-class": "tooltip-skin",
804
724
  },
@@ -836,7 +756,7 @@ modules = {
836
756
  },
837
757
  [
838
758
  h("svg-icon", {
839
- props: { "icon-class": "ico-wenjianjia" },
759
+ props: {"icon-class": "ico-wenjianjia"},
840
760
  }),
841
761
  h("span", row.fileName),
842
762
  ]
@@ -849,11 +769,11 @@ modules = {
849
769
  },
850
770
  },
851
771
  {
852
- title: this.$t2("文件大小", "components.fileLibrary.fileSize"),
772
+ title: this.$t2('文件大小', 'components.fileLibrary.fileSize'),
853
773
  field: "fileSize",
854
774
  width: 150,
855
775
  slots: {
856
- default: ({ row, $rowIndex }) => {
776
+ default: ({row, $rowIndex}) => {
857
777
  if (!row.dirs) {
858
778
  return this.formatFileSize(row.fileSize);
859
779
  }
@@ -861,53 +781,41 @@ modules = {
861
781
  },
862
782
  },
863
783
  {
864
- title: this.$t2("版本号", "components.fileLibrary.fileRev"),
784
+ title: this.$t2('版本号', 'components.fileLibrary.fileRev'),
865
785
  field: "rev",
866
786
  width: 150,
867
787
  slots: {
868
- default: ({ row, $rowIndex }) => {
788
+ default: ({row, $rowIndex}) => {
869
789
  if (!row.dirs) {
870
790
  return row.rev;
871
791
  }
872
- },
873
- },
874
- },
875
- {
876
- title: this.$t2("分辨率", "components.fileLibrary.widthHeight"),
877
- field: "widthHeight",
878
- width: 150,
879
- },
880
- {
881
- title: this.$t2("所属对象描述", "components.fileLibrary.note"),
882
- field: "note",
883
- width: 250,
792
+ }
793
+ }
884
794
  },
795
+ {title: this.$t2('分辨率', 'components.fileLibrary.widthHeight'), field: "widthHeight", width: 150},
796
+ {title: this.$t2('所属对象描述', 'components.fileLibrary.note'), field: "note", width: 250},
885
797
  {
886
- title: "状态",
887
- field: "status",
798
+ title: '状态',
799
+ field: 'status',
888
800
  width: 150,
889
801
  slots: {
890
- default: ({ row, $rowIndex }) => {
802
+ default: ({row, $rowIndex}) => {
891
803
  if (!row.dirs) {
892
- return row.status == 1 ? "已归档" : "未归档";
804
+ return row.status == 1 ? '已归档' : '未归档';
893
805
  }
894
- },
895
- },
806
+ }
807
+ }
896
808
  },
897
809
  {
898
- title: this.$t2("文件编码", "components.fileLibrary.fileSn"),
810
+ title: this.$t2('文件编码', 'components.fileLibrary.fileSn'),
899
811
  field: "fileSn",
900
- width: 150,
812
+ width: 150
901
813
  },
902
814
  ...customColumns,
903
- {
904
- title: this.$t2("创建人", "components.fileLibrary.createBy"),
905
- field: "_createBy",
906
- width: 150,
907
- },
815
+ {title: this.$t2('创建人', 'components.fileLibrary.createBy'), field: "createBy", width: 150},
908
816
  {
909
817
  field: "createDate",
910
- title: this.$t2("创建时间", "components.fileLibrary.createDate"),
818
+ title: this.$t2('创建时间', 'components.fileLibrary.createDate'),
911
819
  width: 150,
912
820
  },
913
821
  {
@@ -916,11 +824,12 @@ modules = {
916
824
  title: "",
917
825
  sortable: false,
918
826
  slots: {
919
- default: "operate",
827
+ default: "operate"
920
828
  },
921
829
  },
922
830
  ],
923
- callback(a, b) {},
831
+ callback(a, b) {
832
+ },
924
833
  };
925
834
  this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
926
835
  this.vxeOption = opts;
@@ -930,21 +839,15 @@ modules = {
930
839
  let customFileButtons = this.customFileButtons;
931
840
  let nodes = [];
932
841
  customFileButtons.forEach((fileButton, index) => {
933
- if (
934
- fileButton.dirs === null ||
935
- fileButton.dirs === undefined ||
936
- attachment.dirs === fileButton.dirs
937
- ) {
842
+ if (fileButton.dirs === null || fileButton.dirs === undefined || (attachment.dirs === fileButton.dirs)) {
938
843
  if (this.customFileButtonVisable(fileButton, attachment)) {
939
- nodes.push(
940
- this.getBtnVnode({
941
- class: fileButton.icon,
942
- title: fileButton.label,
943
- click: (event) => {
944
- that.customFileButtonEvent(fileButton, attachment);
945
- },
946
- })
947
- );
844
+ nodes.push(this.getBtnVnode({
845
+ class: fileButton.icon,
846
+ title: fileButton.label,
847
+ click: (event) => {
848
+ that.customFileButtonEvent(fileButton, attachment);
849
+ },
850
+ }))
948
851
  }
949
852
  }
950
853
  });
@@ -986,7 +889,7 @@ modules = {
986
889
  );
987
890
  }
988
891
  },
989
- changePageNew({ type, currentPage, pageSize, $event }) {
892
+ changePageNew({type, currentPage, pageSize, $event}) {
990
893
  this.checkList = [];
991
894
  this.checkAll = false;
992
895
  this.initAttchInfo({
@@ -1036,7 +939,7 @@ modules = {
1036
939
  if (page.pages > page.current) {
1037
940
  rows.push({
1038
941
  parent: param.parent,
1039
- fileName: this.$t2("更多", "components.fileLibrary.more"),
942
+ fileName: this.$t2('更多', 'components.fileLibrary.more'),
1040
943
  moreBtn: true,
1041
944
  leaf: true,
1042
945
  pages: page.pages,
@@ -1087,7 +990,7 @@ modules = {
1087
990
  if (page.pages > page.current) {
1088
991
  rows.push({
1089
992
  parent: param.parent,
1090
- fileName: this.$t2("更多", "components.fileLibrary.more"),
993
+ fileName: this.$t2('更多', 'components.fileLibrary.more'),
1091
994
  moreBtn: true,
1092
995
  leaf: true,
1093
996
  pages: page.pages,
@@ -1100,44 +1003,36 @@ modules = {
1100
1003
  rows.forEach((value) => {
1101
1004
  value.leaf = !value.hasChild;
1102
1005
  });
1103
- let items = [];
1104
1006
  if (node.level === 0) {
1105
- let item = {
1106
- parent: null,
1107
- fileName: this.title,
1108
- leaf: rows.length == 0,
1109
- allFileBtn: true,
1110
- id: 0,
1111
- children: rows,
1112
- };
1113
- items.push(item);
1114
1007
  setTimeout(() => {
1115
1008
  this.$refs.tree.setCurrentKey(node.childNodes[0].data);
1116
1009
  this.handleNodeData(node.childNodes[0]);
1117
1010
  node.childNodes[0].expand();
1118
- if (this.option.treeExpandAll) {
1119
- //默认全部展开树分类
1120
- node.childNodes[0].childNodes.forEach((item) => {
1121
- if (!item.data.leaf) item.expand();
1122
- });
1123
- }
1124
1011
  }, 200);
1125
1012
  this.$nextTick(() => {
1126
1013
  callback && callback();
1127
1014
  });
1128
1015
  this.searchEvent();
1129
1016
  } else {
1130
- items = rows;
1131
1017
  this.$nextTick(() => {
1132
- if (this.option.treeExpandAll) {
1133
- //默认全部展开树分类
1134
- node.childNodes.forEach((item) => {
1135
- if (!item.data.leaf) item.expand();
1136
- });
1137
- }
1138
1018
  callback && callback();
1139
1019
  });
1140
1020
  }
1021
+ let items = [];
1022
+ if (node.level === 0) {
1023
+ let item = {
1024
+ parent: null,
1025
+ fileName: this.title,
1026
+ leaf: rows.length == 0,
1027
+ allFileBtn: true,
1028
+ id: 0,
1029
+ children: rows,
1030
+ };
1031
+ items.push(item);
1032
+ } else {
1033
+ items = rows;
1034
+ }
1035
+
1141
1036
  resolve(items);
1142
1037
  },
1143
1038
  });
@@ -1164,10 +1059,7 @@ modules = {
1164
1059
  let currentFileCategory = category || this.currentFileCategory;
1165
1060
  if (!currentFileCategory) {
1166
1061
  this.$message({
1167
- message: this.$t2(
1168
- "请选择文件夹",
1169
- "components.fileLibrary.editCategoryTip"
1170
- ),
1062
+ message: this.$t2('请选择文件夹', 'components.fileLibrary.editCategoryTip'),
1171
1063
  type: "error",
1172
1064
  showClose: true,
1173
1065
  duration: 3000,
@@ -1180,12 +1072,7 @@ modules = {
1180
1072
  confirmEditCategoryDialog() {
1181
1073
  this.$refs.editCategoryForm.$baseValidate((valid) => {
1182
1074
  if (valid) {
1183
- this.$baseConfirm(
1184
- this.$t2(
1185
- "您确定要保存吗?",
1186
- "components.fileLibrary.saveConfirmTip"
1187
- )
1188
- ).then(() => {
1075
+ this.$baseConfirm(this.$t2('您确定要保存吗?', 'components.fileLibrary.saveConfirmTip')).then(() => {
1189
1076
  var url =
1190
1077
  this.current_prefix +
1191
1078
  (this.editCategory.id ? "/file_obj/update" : "/file_obj/save");
@@ -1211,7 +1098,8 @@ modules = {
1211
1098
  message: res.content,
1212
1099
  type: "success",
1213
1100
  duration: 500,
1214
- onClose: (t) => {},
1101
+ onClose: (t) => {
1102
+ },
1215
1103
  });
1216
1104
  let nodeData = res.objx;
1217
1105
  nodeData.leaf = !nodeData.hasChild;
@@ -1306,10 +1194,7 @@ modules = {
1306
1194
  let checkRows = this.getCheckRows();
1307
1195
  if (!checkRows.length) {
1308
1196
  this.$message({
1309
- message: this.$t2(
1310
- "请选择需要下载的文件",
1311
- "components.fileLibrary.downloadTip"
1312
- ),
1197
+ message: this.$t2('请选择需要下载的文件', 'components.fileLibrary.downloadTip'),
1313
1198
  type: "error",
1314
1199
  showClose: true,
1315
1200
  duration: 3000,
@@ -1325,10 +1210,7 @@ modules = {
1325
1210
  let checkRows = this.getCheckRows();
1326
1211
  if (!checkRows.length) {
1327
1212
  this.$message({
1328
- message: this.$t2(
1329
- "请选择需要下载的文件",
1330
- "components.fileLibrary.downloadTip"
1331
- ),
1213
+ message: this.$t2('请选择需要下载的文件', 'components.fileLibrary.downloadTip'),
1332
1214
  type: "error",
1333
1215
  showClose: true,
1334
1216
  duration: 3000,
@@ -1374,7 +1256,7 @@ modules = {
1374
1256
  let ids = rows.map((row) => row.id);
1375
1257
  let data = {
1376
1258
  ids: ids,
1377
- objectForeignId: this.objectForeignId,
1259
+ objectForeignId: this.objectForeignId
1378
1260
  };
1379
1261
  if (this.option.foreignDirs === true) {
1380
1262
  data.foreignDirs = true;
@@ -1520,23 +1402,13 @@ modules = {
1520
1402
  success: (res) => {
1521
1403
  let fileStoreArea = res.objx;
1522
1404
  if (fileStoreArea) {
1523
- this.fileStoreArea = fileStoreArea;
1524
1405
  this.title = fileStoreArea.storeAreaName;
1525
- let tabType = this.option.tabType;
1526
- if (tabType) {
1527
- this.showType = tabType === "table" ? 2 : 1;
1528
- }
1529
1406
  this.$nextTick(() => {
1530
- treeScollx({ target: this, type: "default" });
1407
+ treeScollx({target: this, type: "default"});
1531
1408
  this.treeFlag = true;
1532
1409
  });
1533
1410
  } else {
1534
- this.$baseAlert(
1535
- this.$t2(
1536
- "文档工作区未维护",
1537
- "components.fileLibrary.fileStoreAreaTip"
1538
- )
1539
- );
1411
+ this.$baseAlert(this.$t2('文档工作区未维护', 'components.fileLibrary.fileStoreAreaTip'));
1540
1412
  }
1541
1413
  },
1542
1414
  });
@@ -1636,10 +1508,7 @@ modules = {
1636
1508
  let checkRows = this.getCheckRows();
1637
1509
  if (!checkRows.length) {
1638
1510
  this.$message({
1639
- message: this.$t2(
1640
- "请选择需要替换的文件",
1641
- "components.fileLibrary.replaceFileTip"
1642
- ),
1511
+ message: this.$t2('请选择需要替换的文件', 'components.fileLibrary.replaceFileTip'),
1643
1512
  type: "error",
1644
1513
  showClose: true,
1645
1514
  duration: 3000,
@@ -1662,7 +1531,7 @@ modules = {
1662
1531
  },
1663
1532
  });
1664
1533
  },
1665
- checkBatchReplace({ files, done }) {
1534
+ checkBatchReplace({files, done}) {
1666
1535
  let newFileObjDTOs = files.map((file) => {
1667
1536
  return {
1668
1537
  name: file.name,
@@ -1860,37 +1729,24 @@ modules = {
1860
1729
  },
1861
1730
  customFileButtonEvent(customFileButton, attachment) {
1862
1731
  customFileButton.onclick({
1863
- row: attachment,
1732
+ row: attachment
1864
1733
  });
1865
1734
  },
1866
1735
  customToobarButtonEvent(customFileButton) {
1867
1736
  customFileButton.onclick({
1868
- rows: this.checkRows,
1737
+ rows: this.checkRows
1869
1738
  });
1870
1739
  },
1871
1740
  customFileButtonVisable(customFileButton, attachment) {
1872
1741
  if (customFileButton.visable === "function") {
1873
1742
  let checkBillDatas = this.checkBillDatas;
1874
- return customFileButton.visable({ row: attachment, checkBillDatas });
1875
- } else if (
1876
- customFileButton.visable === null ||
1877
- customFileButton.visable == undefined
1878
- ) {
1743
+ return customFileButton.visable({row: attachment, checkBillDatas});
1744
+ } else if (customFileButton.visable === null || customFileButton.visable == undefined) {
1879
1745
  return true;
1880
1746
  } else {
1881
1747
  return customFileButton.visable;
1882
1748
  }
1883
- },
1884
- downloadSingerFile(attachment) {
1885
- let fileObjAuth = this.fileObjAuth;
1886
- if (attachment.dirs || !fileObjAuth.downloadAuth) return;
1887
- let url = attachment.domain + attachment.url;
1888
- if (this.fileStoreArea.toDownWatermark && fileObjAuth.downWatermarkAuth) {
1889
- let loginAccount = this.$store.getters.loginAccount;
1890
- url += "?_w=" + encodeURIComponent(encode(loginAccount));
1891
- }
1892
- this.$commonFileUtil.downloadFile(url, attachment.fileName);
1893
- },
1749
+ }
1894
1750
  },
1895
1751
  };
1896
1752
  export default modules;