cloud-web-corejs 1.0.54-dev.810 → 1.0.54-dev.812

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 (83) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +44 -2
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +247 -209
  6. package/src/components/baseTabs/mixins.js +181 -181
  7. package/src/components/mobile/wf/content.vue +1665 -1556
  8. package/src/components/table/config.js +78 -78
  9. package/src/components/table/index.js +1276 -1276
  10. package/src/components/table/tableForm.vue +330 -330
  11. package/src/components/table/tableFormMixin.js +318 -318
  12. package/src/components/table/vxeFilter/index.js +163 -163
  13. package/src/components/table/vxeFilter/mixin.js +316 -316
  14. package/src/components/wf/content.vue +1188 -1188
  15. package/src/components/wf/wf.js +29 -12
  16. package/src/components/wf/wfActionDropdown.vue +1 -1
  17. package/src/components/wf/wfActionItems.js +1 -1
  18. package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
  19. package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
  20. package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
  21. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
  22. package/src/components/xform/form-designer/designer.js +15 -0
  23. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  24. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  25. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  26. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  27. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  28. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  29. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  30. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  31. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  32. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  33. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +29 -1
  34. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  35. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  36. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  37. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  38. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  39. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  40. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  41. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -438
  42. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  43. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  44. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  45. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  46. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  47. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  48. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  49. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  50. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  51. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  52. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  53. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  54. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  55. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  56. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  57. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  58. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  59. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
  60. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +55 -3
  61. package/src/components/xform/form-render/container-item/data-table-mixin.js +33 -12
  62. package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
  63. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  64. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  65. package/src/components/xform/form-render/container-item/list-h5-item.vue +1642 -1700
  66. package/src/components/xform/form-render/index.vue +153 -147
  67. package/src/components/xform/form-render/indexMixin.js +12 -0
  68. package/src/components/xform/lang/en-US.js +10 -0
  69. package/src/components/xform/lang/zh-CN.js +12 -0
  70. package/src/components/xform/mixins/defaultHandle.js +707 -707
  71. package/src/components/xform/styles/h5.scss +1634 -0
  72. package/src/components/xform/utils/textMaskUtil.js +182 -182
  73. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  74. package/src/components/xform/utils/util.js +56 -11
  75. package/src/utils/pdfUtil.js +429 -429
  76. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  77. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  78. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  79. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  80. package/src/views/user/home/wjl/content.vue +394 -31
  81. package/src/views/user/role/edit.vue +632 -632
  82. package/src/views/user/role/list.vue +260 -260
  83. package/src/views/user/wf/wf_manage/list.vue +1116 -1116
@@ -1,365 +1,365 @@
1
- <template>
2
- <el-dialog
3
- :visible.sync="showDialog"
4
- v-el-drag-dialog
5
- v-el-dialog-center
6
- v-bind="dialogConfig"
7
- @close="close"
8
- >
9
- <!-- host:"list" —— 承载列表宿主页(自带「常规(详情)/列表」页签),行点击进详情等行为与整页一致。
10
- list.vue 根节点自带 #containt,本分支不再套 id,避免嵌套重复。 -->
11
- <div
12
- class="cont designer-view fd-list-host"
13
- v-bind="bodyConfig"
14
- v-if="listHost"
15
- >
16
- <list-view-host :formCode="listFormCode" :param="dialogParam" />
17
- </div>
18
- <div class="cont designer-view" v-bind="bodyConfig" id="containt" v-else>
19
- <v-form-render
20
- :form-json.sync="formJson"
21
- :form-data="formData"
22
- :option-data="optionData"
23
- ref="vFormRef"
24
- :reportTemplate.sync="formTemplate"
25
- :conditionParam.sync="conditionParam"
26
- :formInsData.sync="formInsData"
27
- v-if="showRender"
28
- visible-key="showRender"
29
- :parent-target="_self"
30
- @reload="reload"
31
- v-bind="formConfig"
32
- :param="dialogParam"
33
- :dataTableOption="dialogDataTableOption"
34
- class="data-table_height"
35
- @hook:mounted="handleFormMounted"
36
- />
37
- </div>
38
- <span
39
- slot="footer"
40
- class="dialog-footer"
41
- v-if="option.showFooter !== false"
42
- v-bind="option.footerConfig"
43
- >
44
- <el-button type="primary" plain class="button-sty" @click="close">
45
- <i class="el-icon-close el-icon"></i>
46
- {{ $t2("取 消", "system.button.cancel2") }}
47
- </el-button>
48
- <!-- 模板配了 formConfig.actionButtons 时,用配置按钮替代「确定」(取消保持不变) -->
49
- <template v-if="visibleFooterButtons">
50
- <el-button
51
- v-for="btn in visibleFooterButtons"
52
- :key="btn.code"
53
- :type="btn.type || 'primary'"
54
- :plain="btn.plain === true"
55
- class="button-sty"
56
- :loading="!!btnLoadingMap[btn.code]"
57
- @click="handleActionButton(btn)"
58
- >
59
- <i v-if="btn.icon" :class="[btn.icon, 'el-icon']"></i>
60
- {{ btnLabel(btn) }}
61
- </el-button>
62
- </template>
63
- <el-button
64
- v-else-if="confirmButtonVisible"
65
- type="primary"
66
- @click="dialogSubmit"
67
- class="button-sty"
68
- >
69
- <i class="el-icon-check el-icon"></i>
70
- {{ $t2("确 定", "system.button.confirm2") }}
71
- </el-button>
72
- </span>
73
- </el-dialog>
74
- </template>
75
-
76
- <script>
77
- import VFormRender from "../../../../../components/xform/form-render/index.vue";
78
- import {
79
- resolveActionButtons,
80
- hasButtonPermission,
81
- isButtonVisible,
82
- runActionButton,
83
- } from "@base/components/formDialog/actionButtons";
84
-
85
- export default {
86
- components: {
87
- VFormRender,
88
- // 列表宿主页(x-tabs:常规/列表/其他页签/多标签编辑),仅 host:"list" 时加载
89
- ListViewHost: () =>
90
- import(
91
- /* webpackChunkName: "form-list-host" */ "@base/views/user/form/view/list.vue"
92
- ),
93
- },
94
- props: {
95
- visiable: Boolean,
96
- option: Object,
97
- },
98
- mixins: [],
99
- inject: ["getFormConfig"],
100
-
101
- mounted() {},
102
- data() {
103
- var that = this;
104
- return {
105
- showFormField: "_tt",
106
- showDialog: true,
107
- falseValue: false,
108
- selectMulti: true,
109
-
110
- formJson: {},
111
- formData: {},
112
- optionData: {},
113
- showRender: false,
114
- formTemplate: {},
115
- /* formCode: null,*/
116
- layoutType: null,
117
- conditionParam: null,
118
- formInsData: null,
119
- $grid: null,
120
- currentLayoutType: null,
121
- dataId: null,
122
- formConfig: {},
123
- confirmButtonVisible: true,
124
- // 模板 formConfig.actionButtons(权限过滤后);为空则底部保持默认「确定」
125
- customButtons: null,
126
- btnLoadingMap: {},
127
- formRefMounted: false,
128
- };
129
- },
130
- computed: {
131
- formCode() {
132
- return this.option.formCode;
133
- },
134
- dialogParam() {
135
- return this.option?.param;
136
- },
137
- /**
138
- * option.queryParam:强制合并进目标表单查询表格的请求参数
139
- * (data-table 从 formRef.$attrs.dataTableOption.queryParam 读取,优先级高于表单自身查询条件)。
140
- * 与 param 不是一回事:param 只是透传给模板脚本用的打开参数,不参与请求。
141
- */
142
- dialogDataTableOption() {
143
- return this.option?.queryParam
144
- ? { queryParam: this.option.queryParam }
145
- : undefined;
146
- },
147
- // host:"list" —— 用列表宿主页承载(带「常规/列表」页签),而非直接渲染单个表单
148
- listHost() {
149
- return this.option?.host === "list";
150
- },
151
- listFormCode() {
152
- return this.option?.formCode;
153
- },
154
- /* formConfig() {
155
- return this.option?.formConfig;
156
- }, */
157
- dialogConfig() {
158
- let customClass = "dialog-style list-dialog dialog-checkbox pd_0";
159
- if (this.option.dialogConfig?.customClass) {
160
- customClass = customClass + " " + this.option.dialogConfig.customClass;
161
- }
162
- let config = {
163
- title: this.formTemplate.formName,
164
- appendToBody: true,
165
- modalAppendToBody: true,
166
- closeOnClickModal: false,
167
- modal: false,
168
- width: "1200px",
169
- fullscreen: this.option.fullscreen,
170
- };
171
- config = Object.assign({}, config, this.option.dialogConfig, {
172
- customClass,
173
- });
174
- config.title = this.$t1(config.title);
175
- return config;
176
- },
177
- // 自定义按钮渲染列表:权限已在 initCustomButtons 过滤,此处按 visible 脚本过滤
178
- visibleFooterButtons() {
179
- if (!this.customButtons || !this.customButtons.length) return null;
180
- this.formRefMounted; // eslint-disable-line no-unused-expressions
181
- let buttons = this.customButtons.filter((btn) =>
182
- isButtonVisible(btn, this.$refs.vFormRef)
183
- );
184
- return buttons.length ? buttons : null;
185
- },
186
- bodyConfig() {
187
- let config = {};
188
- let classStr = this.currentLayoutType;
189
- if (this.option.bodyConfig?.class) {
190
- classStr = classStr + " " + this.option.bodyConfig.class;
191
- }
192
- if (this.option.showFooter == false) {
193
- classStr = classStr + " nfootBtn";
194
- }
195
- config = Object.assign({}, config, this.option.bodyConfig, {
196
- class: classStr,
197
- });
198
- return config;
199
- },
200
- },
201
- created() {
202
- /*let dataId = this.option?.formConfig?.dataId??null
203
- delete this.option?.formConfig?.dataId
204
- this.dataId = dataId;*/
205
- this.formConfig = this.option?.formConfig || {};
206
-
207
- let currentFormConfig = this.getFormConfig();
208
- this.currentLayoutType = currentFormConfig.layoutType;
209
-
210
- this.selectMulti = this.option.multiple ?? true;
211
- // 列表宿主页自己会加载模板;仅在未指定标题时补取一次模板名做弹框标题
212
- if (this.listHost && this.option.dialogConfig?.title) return;
213
- this.getReportTemplate();
214
- },
215
- methods: {
216
- reload(e, option) {
217
- let updateParam = option?.updateParam || {};
218
- if (this.formConfig) Object.assign(this.formConfig, updateParam);
219
- this.showRender = false;
220
- return this.getReportTemplate();
221
- },
222
- async getReportTemplate(callback) {
223
- let param = {
224
- objTypeCode: this.$attrs.objTypeCode,
225
- objId: this.$attrs.objId,
226
- taskId: this.$attrs.taskId,
227
- };
228
- this.conditionParam = param;
229
- let url, data;
230
- url = USER_PREFIX + `/formTemplate/getByFormCode`;
231
- data = { stringOne: this.formCode };
232
-
233
- let that = this;
234
- return this.$http({
235
- url: url,
236
- method: `post`,
237
- data: data,
238
- isLoading: true,
239
- loadingTarget: document.body,
240
- modalStrictly: true,
241
- success: (res) => {
242
- let formTemplate = res.objx || {};
243
- this.formTemplate = formTemplate;
244
- // 列表宿主模式:只借模板名做标题,渲染与按钮均由宿主页自己负责
245
- if (this.listHost) return;
246
- this.formJson = formTemplate.formViewContent
247
- ? JSON.parse(formTemplate.formViewContent)
248
- : {};
249
- this.layoutType = this.formJson.formConfig.layoutType;
250
- let formConfig = this.formJson.formConfig;
251
- if (formConfig.searchDialogUniqueField) {
252
- this.fieldKey = formConfig.searchDialogUniqueField;
253
- }
254
- this.initCustomButtons(formConfig);
255
-
256
- this.showRender = true;
257
- },
258
- });
259
- },
260
- // 模板 actionButtons:option.buttons 可覆盖;权限 formCode:authName 在此一次性过滤
261
- initCustomButtons(formConfig) {
262
- let buttons = resolveActionButtons(this.option?.buttons, formConfig);
263
- this.customButtons = buttons
264
- ? buttons.filter((btn) => hasButtonPermission(btn, this.formCode, this))
265
- : null;
266
- },
267
- handleFormMounted() {
268
- this.formRefMounted = true;
269
- },
270
- btnLabel(btn) {
271
- return this.$t1 ? this.$t1(btn.label) : btn.label;
272
- },
273
- /**
274
- * 自定义按钮点击:校验 → onClick 脚本 → done/closeAfter 收口。
275
- * 收口时优先回调 option.onAction(payload, formRef, vm);
276
- * 未提供则仅按 closeAfter 关闭(按钮自身脚本即业务处理,不再走 option.confirm)。
277
- */
278
- handleActionButton(btn) {
279
- let formRef = this.$refs.vFormRef;
280
- if (!formRef || this.btnLoadingMap[btn.code]) return;
281
- this.$set(this.btnLoadingMap, btn.code, true);
282
- let clearLoading = () => this.$set(this.btnLoadingMap, btn.code, false);
283
- runActionButton(btn, {
284
- formRef,
285
- host: this,
286
- getSelection: () => [],
287
- onSettle: (payload, close) => {
288
- if (typeof this.option.onAction === "function") {
289
- this.option.onAction(payload, formRef, this);
290
- }
291
- if (close) this.close();
292
- },
293
- }).then(clearLoading, clearLoading);
294
- },
295
- close() {
296
- let formRef = this.$refs.vFormRef;
297
- this.showDialog = false;
298
- this.$emit("update:visiable", false);
299
- this.option.close && this.option.close(formRef, this);
300
- },
301
- dialogSubmit() {
302
- let formRef = this.$refs.vFormRef;
303
- if (this.option.confirm) {
304
- if (this.option.confirm(formRef, this) !== false) {
305
- this.close();
306
- }
307
- } else {
308
- this.close();
309
- }
310
- },
311
- setConfirmButtonHidden(val) {
312
- this.confirmButtonVisible = val || false;
313
- },
314
- },
315
- };
316
- </script>
317
-
318
- <style lang="scss" scoped>
319
- ::v-deep .H5 .h5-fixed-bottom-btns {
320
- bottom: 95px;
321
- }
322
-
323
- .list-dialog {
324
- .el-dialog__body {
325
- height: calc(100% - 42px);
326
- // host:"list":.cont 已有确定高度,把它传给 list.vue 根节点 #containt,
327
- // .tab-box 自身是 height:100%,父链没高度页签内容区会塌成一条
328
- .cont.fd-list-host {
329
- padding: 0;
330
- ::v-deep > #containt {
331
- height: 100%;
332
- }
333
- }
334
- .cont {
335
- height: calc(100vh - 210px);
336
-
337
- &.nfootBtn {
338
- height: calc(100vh - 158px);
339
- }
340
- &#containt {
341
- padding: 0;
342
- ::v-deep .grid-container {
343
- outline: none;
344
- &.detail-wrap .d-cont {
345
- //height: calc(100vh - 150px);
346
- .title .field-wrapper {
347
- display: inline-block !important;
348
- }
349
- }
350
- }
351
- }
352
- }
353
- }
354
-
355
- &.is-fullscreen .el-dialog__body {
356
- .cont {
357
- height: calc(100vh - 110px);
358
-
359
- &.nfootBtn {
360
- height: calc(100vh - var(--xform-dialog-body-offset, 58px));
361
- }
362
- }
363
- }
364
- }
365
- </style>
1
+ <template>
2
+ <el-dialog
3
+ :visible.sync="showDialog"
4
+ v-el-drag-dialog
5
+ v-el-dialog-center
6
+ v-bind="dialogConfig"
7
+ @close="close"
8
+ >
9
+ <!-- host:"list" —— 承载列表宿主页(自带「常规(详情)/列表」页签),行点击进详情等行为与整页一致。
10
+ list.vue 根节点自带 #containt,本分支不再套 id,避免嵌套重复。 -->
11
+ <div
12
+ class="cont designer-view fd-list-host"
13
+ v-bind="bodyConfig"
14
+ v-if="listHost"
15
+ >
16
+ <list-view-host :formCode="listFormCode" :param="dialogParam" />
17
+ </div>
18
+ <div class="cont designer-view" v-bind="bodyConfig" id="containt" v-else>
19
+ <v-form-render
20
+ :form-json.sync="formJson"
21
+ :form-data="formData"
22
+ :option-data="optionData"
23
+ ref="vFormRef"
24
+ :reportTemplate.sync="formTemplate"
25
+ :conditionParam.sync="conditionParam"
26
+ :formInsData.sync="formInsData"
27
+ v-if="showRender"
28
+ visible-key="showRender"
29
+ :parent-target="_self"
30
+ @reload="reload"
31
+ v-bind="formConfig"
32
+ :param="dialogParam"
33
+ :dataTableOption="dialogDataTableOption"
34
+ class="data-table_height"
35
+ @hook:mounted="handleFormMounted"
36
+ />
37
+ </div>
38
+ <span
39
+ slot="footer"
40
+ class="dialog-footer"
41
+ v-if="option.showFooter !== false"
42
+ v-bind="option.footerConfig"
43
+ >
44
+ <el-button type="primary" plain class="button-sty" @click="close">
45
+ <i class="el-icon-close el-icon"></i>
46
+ {{ $t2("取 消", "system.button.cancel2") }}
47
+ </el-button>
48
+ <!-- 模板配了 formConfig.actionButtons 时,用配置按钮替代「确定」(取消保持不变) -->
49
+ <template v-if="visibleFooterButtons">
50
+ <el-button
51
+ v-for="btn in visibleFooterButtons"
52
+ :key="btn.code"
53
+ :type="btn.type || 'primary'"
54
+ :plain="btn.plain === true"
55
+ class="button-sty"
56
+ :loading="!!btnLoadingMap[btn.code]"
57
+ @click="handleActionButton(btn)"
58
+ >
59
+ <i v-if="btn.icon" :class="[btn.icon, 'el-icon']"></i>
60
+ {{ btnLabel(btn) }}
61
+ </el-button>
62
+ </template>
63
+ <el-button
64
+ v-else-if="confirmButtonVisible"
65
+ type="primary"
66
+ @click="dialogSubmit"
67
+ class="button-sty"
68
+ >
69
+ <i class="el-icon-check el-icon"></i>
70
+ {{ $t2("确 定", "system.button.confirm2") }}
71
+ </el-button>
72
+ </span>
73
+ </el-dialog>
74
+ </template>
75
+
76
+ <script>
77
+ import VFormRender from "../../../../../components/xform/form-render/index.vue";
78
+ import {
79
+ resolveActionButtons,
80
+ hasButtonPermission,
81
+ isButtonVisible,
82
+ runActionButton,
83
+ } from "@base/components/formDialog/actionButtons";
84
+
85
+ export default {
86
+ components: {
87
+ VFormRender,
88
+ // 列表宿主页(x-tabs:常规/列表/其他页签/多标签编辑),仅 host:"list" 时加载
89
+ ListViewHost: () =>
90
+ import(
91
+ /* webpackChunkName: "form-list-host" */ "@base/views/user/form/view/list.vue"
92
+ ),
93
+ },
94
+ props: {
95
+ visiable: Boolean,
96
+ option: Object,
97
+ },
98
+ mixins: [],
99
+ inject: ["getFormConfig"],
100
+
101
+ mounted() {},
102
+ data() {
103
+ var that = this;
104
+ return {
105
+ showFormField: "_tt",
106
+ showDialog: true,
107
+ falseValue: false,
108
+ selectMulti: true,
109
+
110
+ formJson: {},
111
+ formData: {},
112
+ optionData: {},
113
+ showRender: false,
114
+ formTemplate: {},
115
+ /* formCode: null,*/
116
+ layoutType: null,
117
+ conditionParam: null,
118
+ formInsData: null,
119
+ $grid: null,
120
+ currentLayoutType: null,
121
+ dataId: null,
122
+ formConfig: {},
123
+ confirmButtonVisible: true,
124
+ // 模板 formConfig.actionButtons(权限过滤后);为空则底部保持默认「确定」
125
+ customButtons: null,
126
+ btnLoadingMap: {},
127
+ formRefMounted: false,
128
+ };
129
+ },
130
+ computed: {
131
+ formCode() {
132
+ return this.option.formCode;
133
+ },
134
+ dialogParam() {
135
+ return this.option?.param;
136
+ },
137
+ /**
138
+ * option.queryParam:强制合并进目标表单查询表格的请求参数
139
+ * (data-table 从 formRef.$attrs.dataTableOption.queryParam 读取,优先级高于表单自身查询条件)。
140
+ * 与 param 不是一回事:param 只是透传给模板脚本用的打开参数,不参与请求。
141
+ */
142
+ dialogDataTableOption() {
143
+ return this.option?.queryParam
144
+ ? { queryParam: this.option.queryParam }
145
+ : undefined;
146
+ },
147
+ // host:"list" —— 用列表宿主页承载(带「常规/列表」页签),而非直接渲染单个表单
148
+ listHost() {
149
+ return this.option?.host === "list";
150
+ },
151
+ listFormCode() {
152
+ return this.option?.formCode;
153
+ },
154
+ /* formConfig() {
155
+ return this.option?.formConfig;
156
+ }, */
157
+ dialogConfig() {
158
+ let customClass = "dialog-style list-dialog dialog-checkbox pd_0";
159
+ if (this.option.dialogConfig?.customClass) {
160
+ customClass = customClass + " " + this.option.dialogConfig.customClass;
161
+ }
162
+ let config = {
163
+ title: this.formTemplate.formName,
164
+ appendToBody: true,
165
+ modalAppendToBody: true,
166
+ closeOnClickModal: false,
167
+ modal: false,
168
+ width: "1200px",
169
+ fullscreen: this.option.fullscreen,
170
+ };
171
+ config = Object.assign({}, config, this.option.dialogConfig, {
172
+ customClass,
173
+ });
174
+ config.title = this.$t1(config.title);
175
+ return config;
176
+ },
177
+ // 自定义按钮渲染列表:权限已在 initCustomButtons 过滤,此处按 visible 脚本过滤
178
+ visibleFooterButtons() {
179
+ if (!this.customButtons || !this.customButtons.length) return null;
180
+ this.formRefMounted; // eslint-disable-line no-unused-expressions
181
+ let buttons = this.customButtons.filter((btn) =>
182
+ isButtonVisible(btn, this.$refs.vFormRef)
183
+ );
184
+ return buttons.length ? buttons : null;
185
+ },
186
+ bodyConfig() {
187
+ let config = {};
188
+ let classStr = this.currentLayoutType;
189
+ if (this.option.bodyConfig?.class) {
190
+ classStr = classStr + " " + this.option.bodyConfig.class;
191
+ }
192
+ if (this.option.showFooter == false) {
193
+ classStr = classStr + " nfootBtn";
194
+ }
195
+ config = Object.assign({}, config, this.option.bodyConfig, {
196
+ class: classStr,
197
+ });
198
+ return config;
199
+ },
200
+ },
201
+ created() {
202
+ /*let dataId = this.option?.formConfig?.dataId??null
203
+ delete this.option?.formConfig?.dataId
204
+ this.dataId = dataId;*/
205
+ this.formConfig = this.option?.formConfig || {};
206
+
207
+ let currentFormConfig = this.getFormConfig();
208
+ this.currentLayoutType = currentFormConfig.layoutType;
209
+
210
+ this.selectMulti = this.option.multiple ?? true;
211
+ // 列表宿主页自己会加载模板;仅在未指定标题时补取一次模板名做弹框标题
212
+ if (this.listHost && this.option.dialogConfig?.title) return;
213
+ this.getReportTemplate();
214
+ },
215
+ methods: {
216
+ reload(e, option) {
217
+ let updateParam = option?.updateParam || {};
218
+ if (this.formConfig) Object.assign(this.formConfig, updateParam);
219
+ this.showRender = false;
220
+ return this.getReportTemplate();
221
+ },
222
+ async getReportTemplate(callback) {
223
+ let param = {
224
+ objTypeCode: this.$attrs.objTypeCode,
225
+ objId: this.$attrs.objId,
226
+ taskId: this.$attrs.taskId,
227
+ };
228
+ this.conditionParam = param;
229
+ let url, data;
230
+ url = USER_PREFIX + `/formTemplate/getByFormCode`;
231
+ data = { stringOne: this.formCode };
232
+
233
+ let that = this;
234
+ return this.$http({
235
+ url: url,
236
+ method: `post`,
237
+ data: data,
238
+ isLoading: true,
239
+ loadingTarget: document.body,
240
+ modalStrictly: true,
241
+ success: (res) => {
242
+ let formTemplate = res.objx || {};
243
+ this.formTemplate = formTemplate;
244
+ // 列表宿主模式:只借模板名做标题,渲染与按钮均由宿主页自己负责
245
+ if (this.listHost) return;
246
+ this.formJson = formTemplate.formViewContent
247
+ ? JSON.parse(formTemplate.formViewContent)
248
+ : {};
249
+ this.layoutType = this.formJson.formConfig.layoutType;
250
+ let formConfig = this.formJson.formConfig;
251
+ if (formConfig.searchDialogUniqueField) {
252
+ this.fieldKey = formConfig.searchDialogUniqueField;
253
+ }
254
+ this.initCustomButtons(formConfig);
255
+
256
+ this.showRender = true;
257
+ },
258
+ });
259
+ },
260
+ // 模板 actionButtons:option.buttons 可覆盖;权限 formCode:authName 在此一次性过滤
261
+ initCustomButtons(formConfig) {
262
+ let buttons = resolveActionButtons(this.option?.buttons, formConfig);
263
+ this.customButtons = buttons
264
+ ? buttons.filter((btn) => hasButtonPermission(btn, this.formCode, this))
265
+ : null;
266
+ },
267
+ handleFormMounted() {
268
+ this.formRefMounted = true;
269
+ },
270
+ btnLabel(btn) {
271
+ return this.$t1 ? this.$t1(btn.label) : btn.label;
272
+ },
273
+ /**
274
+ * 自定义按钮点击:校验 → onClick 脚本 → done/closeAfter 收口。
275
+ * 收口时优先回调 option.onAction(payload, formRef, vm);
276
+ * 未提供则仅按 closeAfter 关闭(按钮自身脚本即业务处理,不再走 option.confirm)。
277
+ */
278
+ handleActionButton(btn) {
279
+ let formRef = this.$refs.vFormRef;
280
+ if (!formRef || this.btnLoadingMap[btn.code]) return;
281
+ this.$set(this.btnLoadingMap, btn.code, true);
282
+ let clearLoading = () => this.$set(this.btnLoadingMap, btn.code, false);
283
+ runActionButton(btn, {
284
+ formRef,
285
+ host: this,
286
+ getSelection: () => [],
287
+ onSettle: (payload, close) => {
288
+ if (typeof this.option.onAction === "function") {
289
+ this.option.onAction(payload, formRef, this);
290
+ }
291
+ if (close) this.close();
292
+ },
293
+ }).then(clearLoading, clearLoading);
294
+ },
295
+ close() {
296
+ let formRef = this.$refs.vFormRef;
297
+ this.showDialog = false;
298
+ this.$emit("update:visiable", false);
299
+ this.option.close && this.option.close(formRef, this);
300
+ },
301
+ dialogSubmit() {
302
+ let formRef = this.$refs.vFormRef;
303
+ if (this.option.confirm) {
304
+ if (this.option.confirm(formRef, this) !== false) {
305
+ this.close();
306
+ }
307
+ } else {
308
+ this.close();
309
+ }
310
+ },
311
+ setConfirmButtonHidden(val) {
312
+ this.confirmButtonVisible = val || false;
313
+ },
314
+ },
315
+ };
316
+ </script>
317
+
318
+ <style lang="scss" scoped>
319
+ /* 原 ::v-deep .H5 .h5-fixed-bottom-btns{bottom:95px} 已删:本文件从未把 H5 类
320
+ 绑到任何元素上(layoutType 只存在 data 里),该选择器从来没生效过。
321
+ H5 底栏已改为流内布局(styles/h5.scss 块 G),自然贴弹框底部,无需此补丁。 */
322
+
323
+ .list-dialog {
324
+ .el-dialog__body {
325
+ height: calc(100% - 42px);
326
+ // host:"list":.cont 已有确定高度,把它传给 list.vue 根节点 #containt,
327
+ // .tab-box 自身是 height:100%,父链没高度页签内容区会塌成一条
328
+ .cont.fd-list-host {
329
+ padding: 0;
330
+ ::v-deep > #containt {
331
+ height: 100%;
332
+ }
333
+ }
334
+ .cont {
335
+ height: calc(100vh - 210px);
336
+
337
+ &.nfootBtn {
338
+ height: calc(100vh - 158px);
339
+ }
340
+ &#containt {
341
+ padding: 0;
342
+ ::v-deep .grid-container {
343
+ outline: none;
344
+ &.detail-wrap .d-cont {
345
+ //height: calc(100vh - 150px);
346
+ .title .field-wrapper {
347
+ display: inline-block !important;
348
+ }
349
+ }
350
+ }
351
+ }
352
+ }
353
+ }
354
+
355
+ &.is-fullscreen .el-dialog__body {
356
+ .cont {
357
+ height: calc(100vh - 110px);
358
+
359
+ &.nfootBtn {
360
+ height: calc(100vh - var(--xform-dialog-body-offset, 58px));
361
+ }
362
+ }
363
+ }
364
+ }
365
+ </style>