cloud-web-corejs 1.1.0-dev.10 → 1.1.0-dev.13

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 (34) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/view.vue +25 -25
  3. package/src/components/excelExport/exportColumnMemory.js +118 -0
  4. package/src/components/excelExport/exportFieldDialog.vue +50 -38
  5. package/src/components/excelExport/index.js +30 -13
  6. package/src/components/excelExport/mixins.js +390 -64
  7. package/src/components/excelImport/mixins.js +898 -850
  8. package/src/components/mobile/wf/addTaskUserdialog.vue +100 -100
  9. package/src/components/mobile/wf/content.vue +5 -5
  10. package/src/components/mobile/wf/deleteTaskUserDialog.vue +73 -73
  11. package/src/components/mobile/wf/selectUserDialog.vue +8 -12
  12. package/src/components/mobile/wf/setCandidateDialog.vue +69 -69
  13. package/src/components/mobile/wf/urgingDialog.vue +75 -75
  14. package/src/components/table/index.js +14 -1
  15. package/src/components/table/vxeFilter/mixin.js +28 -18
  16. package/src/components/xform/docs/2026-07 table/344/270/216excelExport/344/277/256/345/244/215/345/217/212/345/257/274/345/207/272/344/274/230/345/214/226.md" +64 -57
  17. package/src/components/xform/docs/2026-09 /346/235/241/344/273/266/345/257/274/345/207/272/345/244/247/346/225/260/346/215/256/351/207/217/345/264/251/346/272/203/346/216/222/346/237/245.md" +389 -0
  18. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +243 -243
  19. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +228 -228
  20. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +165 -165
  21. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +61 -2
  22. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +3 -0
  23. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -145
  24. package/src/components/xform/form-render/container-item/data-table-item.vue +350 -347
  25. package/src/components/xform/form-render/container-item/data-table-mixin.js +240 -37
  26. package/src/components/xform/form-render/container-item/detail-h5-item.vue +1 -1
  27. package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -1
  28. package/src/components/xform/styles/h5.scss +483 -459
  29. package/src/components/xform/utils/dynamicSchemaUtil.js +385 -361
  30. package/src/layout/components/TagsView/index.vue +325 -323
  31. package/src/store/modules/tagsView.js +241 -217
  32. package/src/utils/importLimit.js +72 -0
  33. package/src/utils/pdfUtil.js +6 -1
  34. package/src/utils/request.js +17 -0
@@ -1,165 +1,165 @@
1
- <template>
2
- <container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
3
- :index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
4
- <div class="grid-container" :key="widget.id"
5
- :class="{'selected': selected}" @click.stop="selectWidget(widget)">
6
- <!-- 常驻选中把手(设计器专用)。h5卡片自己的可点区域会被它的卡片选项卡整块铺满
7
- —— 拖入「H5详情」时默认就带三个(基础信息/明细信息/附件信息,见 designer.js
8
- 的 detail-h5 分支),一落地就点不中,只能「先选中里面的选项卡、再点返回上级」
9
- 才能打开它的属性面板,而增删/改名/排序选项卡都在那个面板里。
10
- container-wrapper 的 drag-handler 帮不上忙:它只在**已经选中之后**才出现。
11
- 运行期走 h5-card-item,不含本文件,故只影响设计器画布。 -->
12
- <div class="h5-card-handler" @click.stop="selectWidget(widget)">
13
- {{ i18n2t(`designer.widgetLabel.${widget.type}`, `extension.widgetLabel.${widget.type}`) }}
14
- </div>
15
- <h5CardPaneWidget v-for="(paneWidget, index) in widget.panes" :key="index" :widget="paneWidget"
16
- :designer="designer" :parent-list="widget.panes"
17
- :index-of-parent-list="index" :parent-widget="widget"
18
- :col-height="widget.options.colHeight" tabRef="baseTabRef"
19
- :tabPaneGrade="2"></h5CardPaneWidget>
20
-
21
- </div>
22
- </container-wrapper>
23
- </template>
24
- <script>
25
-
26
- import h5CardPaneWidget from "../../../../../components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue";
27
- import ContainerWrapper from "../../../../../components/xform/form-designer/form-widget/container-widget/container-wrapper.vue";
28
- import i18n from "../../../../../components/xform/utils/i18n";
29
- import containerMixin from "../../../../../components/xform/form-designer/form-widget/container-widget/containerMixin";
30
- import refMixinDesign from "../../../../../components/xform/form-designer/refMixinDesign";
31
-
32
- export default {
33
- name: "h5-card-widget",
34
- componentName: 'ContainerWidget',
35
- mixins: [i18n, containerMixin, refMixinDesign],
36
- inject: ['refList'],
37
- components: {ContainerWrapper, h5CardPaneWidget},
38
- props: {
39
- widget: Object,
40
- parentWidget: Object,
41
- parentList: Array,
42
- indexOfParentList: Number,
43
- designer: Object,
44
- },
45
- computed: {
46
- selected() {
47
- return this.widget.id === this.designer.selectedId
48
- },
49
-
50
- customClass() {
51
- return this.widget.options.customClass || ''
52
- },
53
-
54
- },
55
- watch: {
56
- //
57
- },
58
- created() {
59
- this.initRefList()
60
- },
61
- mounted() {
62
- //
63
- },
64
- methods: {
65
- checkContainerMove(evt) {
66
- return true;
67
- }
68
- }
69
- }
70
- </script>
71
- <style lang="scss" scoped>
72
- .grid-container {
73
- min-height: 50px;
74
- //line-height: 48px;
75
- /* 侧边与底部留一圈属于卡片自己的可点区域,和顶上的把手一起圈出它的边界 */
76
- padding: 0 6px 6px;
77
- outline: 1px dashed #336699;
78
-
79
- > div {
80
- height: 100%;
81
- }
82
-
83
- .form-widget-list {
84
- // min-height: 28px;
85
- height: 100%;
86
- }
87
-
88
- }
89
-
90
- .grid-container.selected, .grid-cell.selected {
91
- outline: 2px solid $--color-primary !important;
92
- }
93
-
94
- /* 把手条。★ 必须显式给高度:上面那条 `.grid-container > div{height:100%}` (0,1,1)
95
- 会把所有直接子元素拉满,本条 (0,2,0) 压得过。
96
- 负的左右外边距把它顶回容器的 6px 内边距之外,与虚线框贴齐。 */
97
- .grid-container > .h5-card-handler {
98
- height: 20px;
99
- line-height: 20px;
100
- margin: 0 -6px 6px;
101
- padding: 0 6px;
102
- font-size: 12px;
103
- color: $--color-primary;
104
- background: transparentize($--color-primary, 0.88);
105
- cursor: pointer;
106
- }
107
-
108
- .grid-container.selected > .h5-card-handler {
109
- color: #fff;
110
- background: $--color-primary;
111
- }
112
-
113
- .grid-cell {
114
- min-height: 38px;
115
- //margin: 6px 0; /* 设置了margin,栅格列的offset、push、pull会失效!! */
116
- padding: 3px;
117
- outline: 1px dashed #336699;
118
- position: relative;
119
-
120
- > div {
121
- height: 100%;
122
- }
123
-
124
- .form-widget-list {
125
- min-height: 50px;
126
- height: 100%
127
- }
128
-
129
- .grid-col-action {
130
- position: absolute;
131
- bottom: 0;
132
- right: -2px;
133
- height: 28px;
134
- line-height: 28px;
135
- background: $--color-primary;
136
- z-index: 999;
137
-
138
- i {
139
- font-size: 14px;
140
- color: #fff;
141
- margin: 0 5px;
142
- cursor: pointer;
143
- }
144
- }
145
-
146
- .grid-col-handler {
147
- position: absolute;
148
- top: -2px;
149
- left: -2px;
150
- height: 22px;
151
- line-height: 22px;
152
- background: $--color-primary;
153
- z-index: 9;
154
-
155
- i {
156
- font-size: 14px;
157
- font-style: normal;
158
- color: #fff;
159
- margin: 4px;
160
- cursor: default;
161
- }
162
- }
163
- }
164
-
165
- </style>
1
+ <template>
2
+ <container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
3
+ :index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
4
+ <div class="grid-container" :key="widget.id"
5
+ :class="{'selected': selected}" @click.stop="selectWidget(widget)">
6
+ <!-- 常驻选中把手(设计器专用)。h5卡片自己的可点区域会被它的卡片选项卡整块铺满
7
+ —— 拖入「H5详情」时默认就带三个(基础信息/明细信息/附件信息,见 designer.js
8
+ 的 detail-h5 分支),一落地就点不中,只能「先选中里面的选项卡、再点返回上级」
9
+ 才能打开它的属性面板,而增删/改名/排序选项卡都在那个面板里。
10
+ container-wrapper 的 drag-handler 帮不上忙:它只在**已经选中之后**才出现。
11
+ 运行期走 h5-card-item,不含本文件,故只影响设计器画布。 -->
12
+ <div class="h5-card-handler" @click.stop="selectWidget(widget)">
13
+ {{ i18n2t(`designer.widgetLabel.${widget.type}`, `extension.widgetLabel.${widget.type}`) }}
14
+ </div>
15
+ <h5CardPaneWidget v-for="(paneWidget, index) in widget.panes" :key="index" :widget="paneWidget"
16
+ :designer="designer" :parent-list="widget.panes"
17
+ :index-of-parent-list="index" :parent-widget="widget"
18
+ :col-height="widget.options.colHeight" tabRef="baseTabRef"
19
+ :tabPaneGrade="2"></h5CardPaneWidget>
20
+
21
+ </div>
22
+ </container-wrapper>
23
+ </template>
24
+ <script>
25
+
26
+ import h5CardPaneWidget from "../../../../../components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue";
27
+ import ContainerWrapper from "../../../../../components/xform/form-designer/form-widget/container-widget/container-wrapper.vue";
28
+ import i18n from "../../../../../components/xform/utils/i18n";
29
+ import containerMixin from "../../../../../components/xform/form-designer/form-widget/container-widget/containerMixin";
30
+ import refMixinDesign from "../../../../../components/xform/form-designer/refMixinDesign";
31
+
32
+ export default {
33
+ name: "h5-card-widget",
34
+ componentName: 'ContainerWidget',
35
+ mixins: [i18n, containerMixin, refMixinDesign],
36
+ inject: ['refList'],
37
+ components: {ContainerWrapper, h5CardPaneWidget},
38
+ props: {
39
+ widget: Object,
40
+ parentWidget: Object,
41
+ parentList: Array,
42
+ indexOfParentList: Number,
43
+ designer: Object,
44
+ },
45
+ computed: {
46
+ selected() {
47
+ return this.widget.id === this.designer.selectedId
48
+ },
49
+
50
+ customClass() {
51
+ return this.widget.options.customClass || ''
52
+ },
53
+
54
+ },
55
+ watch: {
56
+ //
57
+ },
58
+ created() {
59
+ this.initRefList()
60
+ },
61
+ mounted() {
62
+ //
63
+ },
64
+ methods: {
65
+ checkContainerMove(evt) {
66
+ return true;
67
+ }
68
+ }
69
+ }
70
+ </script>
71
+ <style lang="scss" scoped>
72
+ .grid-container {
73
+ min-height: 50px;
74
+ //line-height: 48px;
75
+ /* 侧边与底部留一圈属于卡片自己的可点区域,和顶上的把手一起圈出它的边界 */
76
+ padding: 0 6px 6px;
77
+ outline: 1px dashed #336699;
78
+
79
+ > div {
80
+ height: 100%;
81
+ }
82
+
83
+ .form-widget-list {
84
+ // min-height: 28px;
85
+ height: 100%;
86
+ }
87
+
88
+ }
89
+
90
+ .grid-container.selected, .grid-cell.selected {
91
+ outline: 2px solid $--color-primary !important;
92
+ }
93
+
94
+ /* 把手条。★ 必须显式给高度:上面那条 `.grid-container > div{height:100%}` (0,1,1)
95
+ 会把所有直接子元素拉满,本条 (0,2,0) 压得过。
96
+ 负的左右外边距把它顶回容器的 6px 内边距之外,与虚线框贴齐。 */
97
+ .grid-container > .h5-card-handler {
98
+ height: 20px;
99
+ line-height: 20px;
100
+ margin: 0 -6px 6px;
101
+ padding: 0 6px;
102
+ font-size: 12px;
103
+ color: $--color-primary;
104
+ background: transparentize($--color-primary, 0.88);
105
+ cursor: pointer;
106
+ }
107
+
108
+ .grid-container.selected > .h5-card-handler {
109
+ color: #fff;
110
+ background: $--color-primary;
111
+ }
112
+
113
+ .grid-cell {
114
+ min-height: 38px;
115
+ //margin: 6px 0; /* 设置了margin,栅格列的offset、push、pull会失效!! */
116
+ padding: 3px;
117
+ outline: 1px dashed #336699;
118
+ position: relative;
119
+
120
+ > div {
121
+ height: 100%;
122
+ }
123
+
124
+ .form-widget-list {
125
+ min-height: 50px;
126
+ height: 100%
127
+ }
128
+
129
+ .grid-col-action {
130
+ position: absolute;
131
+ bottom: 0;
132
+ right: -2px;
133
+ height: 28px;
134
+ line-height: 28px;
135
+ background: $--color-primary;
136
+ z-index: 999;
137
+
138
+ i {
139
+ font-size: 14px;
140
+ color: #fff;
141
+ margin: 0 5px;
142
+ cursor: pointer;
143
+ }
144
+ }
145
+
146
+ .grid-col-handler {
147
+ position: absolute;
148
+ top: -2px;
149
+ left: -2px;
150
+ height: 22px;
151
+ line-height: 22px;
152
+ background: $--color-primary;
153
+ z-index: 9;
154
+
155
+ i {
156
+ font-size: 14px;
157
+ font-style: normal;
158
+ color: #fff;
159
+ margin: 4px;
160
+ cursor: default;
161
+ }
162
+ }
163
+ }
164
+
165
+ </style>
@@ -8,6 +8,14 @@ let XLSX = window.XLSX || { read, utils };
8
8
  import { getToken } from "../../../../../utils/auth";
9
9
  import XEUtils from "xe-utils";
10
10
  import { getErrorMsg } from "@base/utils/index.js";
11
+ import {
12
+ getImportCellText,
13
+ getImportFileSizeLimit,
14
+ getImportRowLimit,
15
+ isImportFileOversize,
16
+ isImportRowsOverLimit,
17
+ toFileSizeMb,
18
+ } from "../../../../../utils/importLimit";
11
19
 
12
20
  let configUtil = {
13
21
  baseUrl: process.env.VUE_APP_BASE_API,
@@ -372,6 +380,25 @@ tmixins = {
372
380
  let that = this;
373
381
  let option = this.option;
374
382
 
383
+ // 业务侧的 importFileLimitSize 允许到 200MB,而这里是整文件 readAsBinaryString +
384
+ // XLSX.read 同步解析,占用约为文件体积的 5~20 倍 —— 那个量级必然把标签页撑爆,
385
+ // 且崩在库内部,连提示都给不出来。这里再收一道解析安全上限,可用
386
+ // importOption.maxFileSize 覆盖(0 表示不限制)。
387
+ if (isImportFileOversize(file, option)) {
388
+ this.$baseAlert(
389
+ this.$t1(
390
+ "导入文件过大({size}MB),当前最多支持 {limit}MB,请拆分后分批导入",
391
+ {
392
+ size: toFileSizeMb(file.size),
393
+ limit: toFileSizeMb(getImportFileSizeLimit(option)),
394
+ }
395
+ )
396
+ );
397
+ // 与上游那道 importFileLimitSize 校验保持一致:只提示、不关弹窗,
398
+ // 用户可以直接重选一个小文件。
399
+ return false;
400
+ }
401
+
375
402
  if (option.importOption.multipleSheet) {
376
403
  this.readExcel2(file, callback);
377
404
  return;
@@ -403,6 +430,22 @@ tmixins = {
403
430
  let range = configUtil.XLSX.utils.decode_range(sheet["!ref"]);
404
431
  let dataSize = range.e.r + 1; //行数
405
432
  that.dataSize = dataSize - 3 >= 0 ? dataSize - 3 : 0;
433
+ // 行数闸门:下面逐格取值、建行对象、再整批发包全是同步的,行数失控时主线程会被
434
+ // 占死甚至 OOM。文件体积不大但行极多(窄表)时只有这一道能拦。
435
+ if (isImportRowsOverLimit(that.dataSize, option)) {
436
+ that.clearImportTimer();
437
+ that.$baseAlert(
438
+ that.$t1(
439
+ "导入数据 {size} 行,超过单次上限 {limit} 行,请拆分后分批导入",
440
+ {
441
+ size: that.dataSize,
442
+ limit: getImportRowLimit(option),
443
+ }
444
+ )
445
+ );
446
+ that.handleClose2();
447
+ return false;
448
+ }
406
449
  let titles = [];
407
450
  let fields = [];
408
451
 
@@ -428,7 +471,7 @@ tmixins = {
428
471
  if (typeof nextCell === "undefined") {
429
472
  row.push(void 0);
430
473
  } else {
431
- row.push(nextCell.w.trim());
474
+ row.push(getImportCellText(nextCell));
432
475
  }
433
476
  }
434
477
  if (rowNum === 1) {
@@ -1483,6 +1526,22 @@ tmixins = {
1483
1526
  let range = configUtil.XLSX.utils.decode_range(sheet["!ref"]);
1484
1527
  let dataSize = range.e.r + 1; //行数
1485
1528
  that.dataSize = dataSize - 3 >= 0 ? dataSize - 3 : 0;
1529
+ // 行数闸门:下面逐格取值、建行对象、再整批发包全是同步的,行数失控时主线程会被
1530
+ // 占死甚至 OOM。文件体积不大但行极多(窄表)时只有这一道能拦。
1531
+ if (isImportRowsOverLimit(that.dataSize, option)) {
1532
+ that.clearImportTimer();
1533
+ that.$baseAlert(
1534
+ that.$t1(
1535
+ "导入数据 {size} 行,超过单次上限 {limit} 行,请拆分后分批导入",
1536
+ {
1537
+ size: that.dataSize,
1538
+ limit: getImportRowLimit(option),
1539
+ }
1540
+ )
1541
+ );
1542
+ that.handleClose2();
1543
+ return false;
1544
+ }
1486
1545
  let titles = [];
1487
1546
  let fields = [];
1488
1547
 
@@ -1508,7 +1567,7 @@ tmixins = {
1508
1567
  if (typeof nextCell === "undefined") {
1509
1568
  row.push(void 0);
1510
1569
  } else {
1511
- row.push(nextCell.w.trim());
1570
+ row.push(getImportCellText(nextCell));
1512
1571
  }
1513
1572
  }
1514
1573
  if (rowNum === 1) {
@@ -109,6 +109,9 @@ export default {
109
109
  exportItemColumns: this.field.options.exportItemColumns || null,
110
110
  exportItemScriptCode: this.field.options.exportItemScriptCode || null,
111
111
  exportItemParam: this.field.options.exportItemParam || null,
112
+ // 字段勾选记忆按按钮分组存放,组件名是唯一且稳定的分组标识(见 exportColumnMemory.js)。
113
+ // 同一张表挂多个明细导出按钮时,各按钮的勾选互不覆盖。
114
+ exportButtonName: this.field.options.name || null,
112
115
  };
113
116
  let tableExportParam = this.handleCustomEvent(this.field.options.tableExportParam);
114
117
  let options = { ...opt, ...tableExportParam, type: type };