cloud-web-corejs 1.0.280 → 1.1.0-dev.4

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 (159) hide show
  1. package/package.json +6 -2
  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 +174 -34
  5. package/src/components/VabUpload/previewGroup.js +128 -0
  6. package/src/components/VabUpload/view.vue +247 -209
  7. package/src/components/baseTabs/mixins.js +181 -181
  8. package/src/components/bizTab/BizBillActions.vue +129 -0
  9. package/src/components/bizTab/BizTabListPage.vue +391 -0
  10. package/src/components/bizTab/README.md +378 -0
  11. package/src/components/bizTab/billTableUtil.js +48 -0
  12. package/src/components/bizTab/billValidators.js +136 -0
  13. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  14. package/src/components/bizTab/index.js +24 -0
  15. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  16. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  17. package/src/components/excelExport/mixins.js +3 -3
  18. package/src/components/mobile/statusTag/mixins.js +1 -61
  19. package/src/components/mobile/wf/content.vue +1662 -1556
  20. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  21. package/src/components/table/config.js +78 -78
  22. package/src/components/table/index.js +1276 -1276
  23. package/src/components/table/plugins/cell-area/index.js +1055 -0
  24. package/src/components/table/plugins/cell-area/index.scss +77 -0
  25. package/src/components/table/plugins/cell-area/util.js +224 -0
  26. package/src/components/table/tableForm.vue +330 -330
  27. package/src/components/table/tableFormMixin.js +318 -318
  28. package/src/components/table/vxeFilter/index.js +163 -163
  29. package/src/components/table/vxeFilter/mixin.js +316 -316
  30. package/src/components/wf/content.vue +1188 -1188
  31. package/src/components/wf/wf.js +40 -20
  32. package/src/components/wf/wfActionDropdown.vue +1 -1
  33. package/src/components/wf/wfActionItems.js +1 -1
  34. 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
  35. 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
  36. 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
  37. 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
  38. package/src/components/xform/form-designer/designer.js +15 -0
  39. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  40. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  41. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  42. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  43. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  44. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  45. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  46. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  47. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  48. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  49. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  50. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  51. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  52. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  53. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  54. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  55. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  56. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  57. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  58. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  59. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  60. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  61. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  62. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  63. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +19 -5
  64. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  65. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  66. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  67. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  68. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  69. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  70. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  71. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  72. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  73. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  74. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  75. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  76. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  77. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  78. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  79. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
  80. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +59 -3
  81. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  82. package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
  83. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  84. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  85. package/src/components/xform/form-render/container-item/list-h5-item.vue +1688 -1700
  86. package/src/components/xform/form-render/index.vue +153 -147
  87. package/src/components/xform/form-render/indexMixin.js +12 -0
  88. package/src/components/xform/lang/en-US.js +10 -0
  89. package/src/components/xform/lang/zh-CN.js +12 -0
  90. package/src/components/xform/mixins/defaultHandle.js +707 -707
  91. package/src/components/xform/styles/h5.scss +1992 -0
  92. package/src/components/xform/utils/textMaskUtil.js +182 -179
  93. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  94. package/src/components/xform/utils/util.js +56 -11
  95. package/src/index.js +9 -4
  96. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  97. package/src/router/index.js +21 -0
  98. package/src/router/modules/customer.js +71 -14
  99. package/src/store/modules/permission.js +17 -18
  100. package/src/utils/pdfUtil.js +429 -429
  101. package/src/utils/resolveViewComponent.js +142 -16
  102. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  103. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  104. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  105. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  106. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  107. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  108. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  109. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  110. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  111. package/src/views/bd/project/common/form_script/list.vue +16 -0
  112. package/src/views/bd/project/common/form_template/list.vue +15 -0
  113. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  114. package/src/views/bd/project/core/branchContext.js +100 -0
  115. package/src/views/bd/project/core/branchPage.js +78 -0
  116. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  117. package/src/views/bd/project/core/branchScope.js +44 -0
  118. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  119. package/src/views/bd/project/core/branchSelect.vue +85 -0
  120. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  121. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  122. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  123. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  124. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  125. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  126. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  127. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  128. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  129. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  130. package/src/views/demo/bizTab/bill/list.vue +288 -0
  131. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  132. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  133. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  134. package/src/views/demo/bizTab/simple/list.vue +217 -0
  135. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  136. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  137. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  138. package/src/views/demo/bizTab/wf/list.vue +242 -0
  139. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  140. package/src/views/support/form-dialog-demo/index.vue +537 -0
  141. package/src/views/user/file_view_ins/list.vue +3 -3
  142. package/src/views/user/home/index.vue +8 -6
  143. package/src/views/user/home/wjl/content.vue +1569 -0
  144. package/src/views/user/notify_message/dialog.vue +7 -5
  145. package/src/views/user/outLink/cc_form_view.vue +188 -0
  146. package/src/views/user/outLink/form_view.vue +2 -2
  147. package/src/views/user/outLink/index.vue +4 -4
  148. package/src/views/user/outLink/view.vue +3 -3
  149. package/src/views/user/role/edit.vue +632 -632
  150. package/src/views/user/role/list.vue +260 -260
  151. package/src/views/user/wf/iframe/index.vue +3 -3
  152. package/src/views/user/wf/iframe/index2.vue +3 -3
  153. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  154. package/src/views/user/wf/wf_manage/list2.vue +9 -13
  155. package/src/views/user/wf/wf_manage/wfContentDialog.vue +8 -5
  156. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  157. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  158. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  159. package/src/utils/wf.js +0 -766
@@ -1,320 +1,319 @@
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
- <div class="cont designer-view" v-bind="bodyConfig" id="containt">
10
- <component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
11
- :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
12
- :parent-target="_self"
13
- @reload="$reloadHandle" v-bind="queryParam" v-on="listeners"></component>
14
- <micro-view-host
15
- v-else-if="showWfContent && remoteView"
16
- :owner="remoteView.owner"
17
- :target-path="remoteView.targetPath"
18
- :biz-params="remoteView.bizParams"
19
- :view-meta="remoteView.viewMeta"
20
- :initial-out-param="outParam"
21
- @reload="$reloadHandle"
22
- @update-out-param="outParam = $event"
23
- @bridge-emit="onBridgeEmit"
24
- @close="showWfContent = false"
25
- ></micro-view-host>
26
- </div>
27
- <span slot="footer" class="dialog-footer" v-if="option.showFooter!==false" v-bind="option.footerConfig">
28
- <el-button type="primary" plain class="button-sty" @click="close">
29
- <i class="el-icon-close el-icon"></i>
30
- {{ $t2('取 消', 'system.button.cancel2') }}
31
- </el-button>
32
- <el-button type="primary" @click="dialogSubmit" class="button-sty">
33
- <i class="el-icon-check el-icon"></i>
34
- {{ $t2('确 定', 'system.button.confirm2') }}
35
- </el-button>
36
- </span>
37
- </el-dialog>
38
- </template>
39
-
40
- <script>
41
- import { loadViewComponent } from "@base/utils/resolveViewComponent";
42
-
43
- export default {
44
- components: {},
45
- props: {
46
- visiable: Boolean,
47
- option: Object
48
- },
49
- mixins: [],
50
- inject: ["getFormConfig"],
51
-
52
- mounted() {
53
-
54
- },
55
- data() {
56
- var that = this;
57
- return {
58
- showFormField: "_tt",
59
- showDialog: true,
60
- falseValue: false,
61
- selectMulti: true,
62
-
63
- formJson: {},
64
- formData: {},
65
- optionData: {},
66
- showRender: false,
67
- formTemplate: {},
68
- /* formCode: null,*/
69
- layoutType: null,
70
- conditionParam: null,
71
- formInsData: null,
72
- $grid: null,
73
- currentLayoutType: null,
74
- dataId: null,
75
-
76
- showWfContent: true,
77
- wfContent: null,
78
- remoteView: null,
79
- outParam: null,
80
- // dataId: null,
81
- defaultShowWfContent: null,
82
- queryParam: {},
83
- listeners:null
84
- };
85
- },
86
- computed: {
87
- formCode() {
88
- return this.option.formCode;
89
- },
90
- dialogParam() {
91
- return this.option?.param;
92
- },
93
- formConfig() {
94
- return this.option?.formConfig;
95
- },
96
- dialogConfig() {
97
- let customClass = "dialog-style list-dialog dialog-checkbox pd_0";
98
- if (this.option.dialogConfig?.customClass) {
99
- customClass = customClass + " " + this.option.dialogConfig.customClass
100
- }
101
- let config = {
102
- title: this.formTemplate.formName,
103
- appendToBody: true,
104
- modalAppendToBody: true,
105
- closeOnClickModal: false,
106
- modal: false,
107
- width: "1200px",
108
- fullscreen: this.option.fullscreen,
109
- };
110
- config = Object.assign({}, config, this.option.dialogConfig, {customClass});
111
- config.title = this.$t1(config.title);
112
- return config;
113
- },
114
- bodyConfig() {
115
- let config = {};
116
- let classStr = this.currentLayoutType
117
- if (this.option.bodyConfig?.class) {
118
- classStr = classStr + " " + this.option.bodyConfig.class;
119
- }
120
- if (this.option.showFooter == false) {
121
- classStr = classStr + " nfootBtn";
122
- }
123
- config = Object.assign({}, config, this.option.bodyConfig, {class: classStr});
124
- return config;
125
- }
126
- },
127
- created() {
128
- /*let dataId = this.option?.formConfig?.dataId??null
129
- delete this.option?.formConfig?.dataId
130
- this.dataId = dataId;*/
131
-
132
- let currentFormConfig = this.getFormConfig();
133
- this.currentLayoutType = currentFormConfig.layoutType
134
-
135
- // this.selectMulti = this.option.multiple ?? true;
136
- this.initData();
137
- },
138
- methods: {
139
- initData() {
140
- const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
141
- let queryParam = this.$baseLodash.cloneDeep(this.dialogParam);
142
- let murl = queryParam.urlmobile;
143
- let purl = murl && isMobile ? murl : queryParam.url;
144
- let dataId = queryParam.dataId??null;
145
- if (purl == '/index') {
146
- location.hash = '/home';
147
- location.reload();
148
- return;
149
- }
150
-
151
- this.dataId = dataId;
152
- if (queryParam.showWfContent == 'true') {
153
- this.defaultShowWfContent = true;
154
- }
155
-
156
- delete queryParam.urlmobile;
157
- delete queryParam.url;
158
-
159
- if (purl.indexOf('.html') >= 0) {
160
- let eUrl = purl;
161
- let pstr = Object.keys(queryParam).map(key => {
162
- return key + "=" + queryParam[key]
163
- }).join("&")
164
-
165
- if (pstr) {
166
- if (purl.indexOf('.html?') >= 0) {
167
- eUrl = eUrl + '&' + pstr
168
- } else {
169
- eUrl = eUrl + '?' + pstr
170
- }
171
- }
172
-
173
- location.href = eUrl;
174
- return
175
- }
176
-
177
- delete queryParam.dataId;
178
- delete queryParam.showWfContent;
179
- delete queryParam.access_token;
180
- delete queryParam.tp;
181
- delete queryParam.thirdparty_info;
182
- delete queryParam.i18nLang;
183
-
184
- let url = purl + '.vue';
185
- this.queryParam = queryParam;
186
- let listeners= this.option?.on;
187
- this.listeners = listeners;
188
-
189
- this.showWfContent = true;
190
-
191
- let res = loadViewComponent(url);
192
- this.remoteView =
193
- res.kind === "remote"
194
- ? {
195
- owner: res.owner,
196
- targetPath: res.targetPath,
197
- bizParams: this.queryParam,
198
- viewMeta: {
199
- visibleKey: "showWfContent",
200
- defaultShowWfContent: this.defaultShowWfContent,
201
- _isOutLink: true,
202
- _dataId: this.dataId,
203
- },
204
- }
205
- : null;
206
- this.wfContent = res.component;
207
- },
208
-
209
- // remote 承载态下,把子应用桥接回来的任意事件按名字派回原 option.on 监听
210
- onBridgeEmit(name, args) {
211
- let fn = this.listeners && this.listeners[name];
212
- if (typeof fn === "function") fn.apply(null, args || []);
213
- },
214
-
215
- reload(e, option) {
216
- let updateParam = option?.updateParam || {};
217
- Object.assign(this.formConfig, updateParam)
218
- this.showRender = false;
219
- this.getReportTemplate();
220
- },
221
- async getReportTemplate(callback) {
222
- let param = {
223
- objTypeCode: this.$attrs.objTypeCode,
224
- objId: this.$attrs.objId,
225
- taskId: this.$attrs.taskId
226
- };
227
- this.conditionParam = param;
228
- let url, data;
229
- url = USER_PREFIX + `/formTemplate/getByFormCode`;
230
- data = {stringOne: this.formCode}
231
-
232
- let that = this;
233
- this.$http({
234
- url: url,
235
- method: `post`,
236
- data: data,
237
- isLoading: true,
238
- loadingTarget: document.body,
239
- modalStrictly: true,
240
- success: res => {
241
- let formTemplate = res.objx || {};
242
- this.formTemplate = formTemplate;
243
- this.formJson = formTemplate.formViewContent ? JSON.parse(formTemplate.formViewContent) : {};
244
- this.layoutType = this.formJson.formConfig.layoutType
245
- let formConfig = this.formJson.formConfig;
246
- if (formConfig.searchDialogUniqueField) {
247
- this.fieldKey = formConfig.searchDialogUniqueField;
248
- }
249
-
250
- this.showRender = true;
251
-
252
-
253
- }
254
- });
255
- },
256
- close() {
257
- let formRef = this.$refs.vFormRef;
258
- this.showDialog = false;
259
- this.$emit('update:visiable', false);
260
- this.option.close && this.option.close(formRef, this);
261
- },
262
- dialogSubmit() {
263
- let formRef = this.$refs.vFormRef;
264
- if (this.option.confirm) {
265
- if (this.option.confirm(formRef, this) !== false) {
266
- this.close();
267
- }
268
- } else {
269
- this.close();
270
- }
271
- }
272
- }
273
- }
274
- </script>
275
-
276
- <style lang="scss" scoped>
277
- ::v-deep .H5 .h5-fixed-bottom-btns {
278
- bottom: 95px;
279
- }
280
-
281
- .list-dialog {
282
- .el-dialog__body {
283
- height: calc(100% - 42px);
284
-
285
- .cont {
286
- height: calc(100vh - 210px);
287
-
288
- &.nfootBtn {
289
- height: calc(100vh - 158px)
290
- }
291
-
292
- &#containt {
293
- padding: 0;
294
-
295
- ::v-deep .grid-container {
296
- outline: none;
297
-
298
- &.detail-wrap .d-cont {
299
- //height: calc(100vh - 150px);
300
-
301
- .title .field-wrapper {
302
- display: inline-block !important
303
- }
304
- }
305
- }
306
- }
307
- }
308
- }
309
-
310
- &.is-fullscreen .el-dialog__body {
311
- .cont {
312
- height: calc(100vh - 110px);
313
-
314
- &.nfootBtn {
315
- height: calc(100vh - var(--xform-dialog-body-offset, 58px))
316
- }
317
- }
318
- }
319
- }
320
- </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
+ <div class="cont designer-view" v-bind="bodyConfig" id="containt">
10
+ <component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
11
+ :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
12
+ :parent-target="_self"
13
+ @reload="$reloadHandle" v-bind="queryParam" v-on="listeners"></component>
14
+ <micro-view-host
15
+ v-else-if="showWfContent && remoteView"
16
+ :owner="remoteView.owner"
17
+ :target-path="remoteView.targetPath"
18
+ :biz-params="remoteView.bizParams"
19
+ :view-meta="remoteView.viewMeta"
20
+ :initial-out-param="outParam"
21
+ @reload="$reloadHandle"
22
+ @update-out-param="outParam = $event"
23
+ @bridge-emit="onBridgeEmit"
24
+ @close="showWfContent = false"
25
+ ></micro-view-host>
26
+ </div>
27
+ <span slot="footer" class="dialog-footer" v-if="option.showFooter!==false" v-bind="option.footerConfig">
28
+ <el-button type="primary" plain class="button-sty" @click="close">
29
+ <i class="el-icon-close el-icon"></i>
30
+ {{ $t2('取 消', 'system.button.cancel2') }}
31
+ </el-button>
32
+ <el-button type="primary" @click="dialogSubmit" class="button-sty">
33
+ <i class="el-icon-check el-icon"></i>
34
+ {{ $t2('确 定', 'system.button.confirm2') }}
35
+ </el-button>
36
+ </span>
37
+ </el-dialog>
38
+ </template>
39
+
40
+ <script>
41
+ import { loadViewComponentAsync } from "@base/utils/resolveViewComponent";
42
+
43
+ export default {
44
+ components: {},
45
+ props: {
46
+ visiable: Boolean,
47
+ option: Object
48
+ },
49
+ mixins: [],
50
+ inject: ["getFormConfig"],
51
+
52
+ mounted() {
53
+
54
+ },
55
+ data() {
56
+ var that = this;
57
+ return {
58
+ showFormField: "_tt",
59
+ showDialog: true,
60
+ falseValue: false,
61
+ selectMulti: true,
62
+
63
+ formJson: {},
64
+ formData: {},
65
+ optionData: {},
66
+ showRender: false,
67
+ formTemplate: {},
68
+ /* formCode: null,*/
69
+ layoutType: null,
70
+ conditionParam: null,
71
+ formInsData: null,
72
+ $grid: null,
73
+ currentLayoutType: null,
74
+ dataId: null,
75
+
76
+ showWfContent: true,
77
+ wfContent: null,
78
+ remoteView: null,
79
+ outParam: null,
80
+ // dataId: null,
81
+ defaultShowWfContent: null,
82
+ queryParam: {},
83
+ listeners:null
84
+ };
85
+ },
86
+ computed: {
87
+ formCode() {
88
+ return this.option.formCode;
89
+ },
90
+ dialogParam() {
91
+ return this.option?.param;
92
+ },
93
+ formConfig() {
94
+ return this.option?.formConfig;
95
+ },
96
+ dialogConfig() {
97
+ let customClass = "dialog-style list-dialog dialog-checkbox pd_0";
98
+ if (this.option.dialogConfig?.customClass) {
99
+ customClass = customClass + " " + this.option.dialogConfig.customClass
100
+ }
101
+ let config = {
102
+ title: this.formTemplate.formName,
103
+ appendToBody: true,
104
+ modalAppendToBody: true,
105
+ closeOnClickModal: false,
106
+ modal: false,
107
+ width: "1200px",
108
+ fullscreen: this.option.fullscreen,
109
+ };
110
+ config = Object.assign({}, config, this.option.dialogConfig, {customClass});
111
+ config.title = this.$t1(config.title);
112
+ return config;
113
+ },
114
+ bodyConfig() {
115
+ let config = {};
116
+ let classStr = this.currentLayoutType
117
+ if (this.option.bodyConfig?.class) {
118
+ classStr = classStr + " " + this.option.bodyConfig.class;
119
+ }
120
+ if (this.option.showFooter == false) {
121
+ classStr = classStr + " nfootBtn";
122
+ }
123
+ config = Object.assign({}, config, this.option.bodyConfig, {class: classStr});
124
+ return config;
125
+ }
126
+ },
127
+ created() {
128
+ /*let dataId = this.option?.formConfig?.dataId??null
129
+ delete this.option?.formConfig?.dataId
130
+ this.dataId = dataId;*/
131
+
132
+ let currentFormConfig = this.getFormConfig();
133
+ this.currentLayoutType = currentFormConfig.layoutType
134
+
135
+ // this.selectMulti = this.option.multiple ?? true;
136
+ this.initData();
137
+ },
138
+ methods: {
139
+ async initData() {
140
+ const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
141
+ let queryParam = this.$baseLodash.cloneDeep(this.dialogParam);
142
+ let murl = queryParam.urlmobile;
143
+ let purl = murl && isMobile ? murl : queryParam.url;
144
+ let dataId = queryParam.dataId??null;
145
+ if (purl == '/index') {
146
+ location.hash = '/home';
147
+ location.reload();
148
+ return;
149
+ }
150
+
151
+ this.dataId = dataId;
152
+ if (queryParam.showWfContent == 'true') {
153
+ this.defaultShowWfContent = true;
154
+ }
155
+
156
+ delete queryParam.urlmobile;
157
+ delete queryParam.url;
158
+
159
+ if (purl.indexOf('.html') >= 0) {
160
+ let eUrl = purl;
161
+ let pstr = Object.keys(queryParam).map(key => {
162
+ return key + "=" + queryParam[key]
163
+ }).join("&")
164
+
165
+ if (pstr) {
166
+ if (purl.indexOf('.html?') >= 0) {
167
+ eUrl = eUrl + '&' + pstr
168
+ } else {
169
+ eUrl = eUrl + '?' + pstr
170
+ }
171
+ }
172
+
173
+ location.href = eUrl;
174
+ return
175
+ }
176
+
177
+ delete queryParam.dataId;
178
+ delete queryParam.showWfContent;
179
+ delete queryParam.access_token;
180
+ delete queryParam.tp;
181
+ delete queryParam.thirdparty_info;
182
+ delete queryParam.i18nLang;
183
+
184
+ let url = purl + '.vue';
185
+ this.queryParam = queryParam;
186
+ let listeners= this.option?.on;
187
+ this.listeners = listeners;
188
+
189
+ this.showWfContent = true;
190
+
191
+ const res = await loadViewComponentAsync(url);
192
+ this.remoteView =
193
+ res.kind === "remote"
194
+ ? {
195
+ owner: res.owner,
196
+ targetPath: res.targetPath,
197
+ bizParams: this.queryParam,
198
+ viewMeta: {
199
+ visibleKey: "showWfContent",
200
+ defaultShowWfContent: this.defaultShowWfContent,
201
+ _isOutLink: true,
202
+ _dataId: this.dataId,
203
+ },
204
+ }
205
+ : null;
206
+ this.wfContent = res.component;
207
+ },
208
+
209
+ // remote 承载态下,把子应用桥接回来的任意事件按名字派回原 option.on 监听
210
+ onBridgeEmit(name, args) {
211
+ let fn = this.listeners && this.listeners[name];
212
+ if (typeof fn === "function") fn.apply(null, args || []);
213
+ },
214
+
215
+ reload(e, option) {
216
+ let updateParam = option?.updateParam || {};
217
+ Object.assign(this.formConfig, updateParam)
218
+ this.showRender = false;
219
+ this.getReportTemplate();
220
+ },
221
+ async getReportTemplate(callback) {
222
+ let param = {
223
+ objTypeCode: this.$attrs.objTypeCode,
224
+ objId: this.$attrs.objId,
225
+ taskId: this.$attrs.taskId
226
+ };
227
+ this.conditionParam = param;
228
+ let url, data;
229
+ url = USER_PREFIX + `/formTemplate/getByFormCode`;
230
+ data = {stringOne: this.formCode}
231
+
232
+ let that = this;
233
+ this.$http({
234
+ url: url,
235
+ method: `post`,
236
+ data: data,
237
+ isLoading: true,
238
+ loadingTarget: document.body,
239
+ modalStrictly: true,
240
+ success: res => {
241
+ let formTemplate = res.objx || {};
242
+ this.formTemplate = formTemplate;
243
+ this.formJson = formTemplate.formViewContent ? JSON.parse(formTemplate.formViewContent) : {};
244
+ this.layoutType = this.formJson.formConfig.layoutType
245
+ let formConfig = this.formJson.formConfig;
246
+ if (formConfig.searchDialogUniqueField) {
247
+ this.fieldKey = formConfig.searchDialogUniqueField;
248
+ }
249
+
250
+ this.showRender = true;
251
+
252
+
253
+ }
254
+ });
255
+ },
256
+ close() {
257
+ let formRef = this.$refs.vFormRef;
258
+ this.showDialog = false;
259
+ this.$emit('update:visiable', false);
260
+ this.option.close && this.option.close(formRef, this);
261
+ },
262
+ dialogSubmit() {
263
+ let formRef = this.$refs.vFormRef;
264
+ if (this.option.confirm) {
265
+ if (this.option.confirm(formRef, this) !== false) {
266
+ this.close();
267
+ }
268
+ } else {
269
+ this.close();
270
+ }
271
+ }
272
+ }
273
+ }
274
+ </script>
275
+
276
+ <style lang="scss" scoped>
277
+ /* 原 ::v-deep .H5 .h5-fixed-bottom-btns{bottom:95px} 已删:本文件从未把 H5 类
278
+ 绑到任何元素上,该选择器从来没生效过。H5 底栏已改为流内布局。 */
279
+
280
+ .list-dialog {
281
+ .el-dialog__body {
282
+ height: calc(100% - 42px);
283
+
284
+ .cont {
285
+ height: calc(100vh - 210px);
286
+
287
+ &.nfootBtn {
288
+ height: calc(100vh - 158px)
289
+ }
290
+
291
+ &#containt {
292
+ padding: 0;
293
+
294
+ ::v-deep .grid-container {
295
+ outline: none;
296
+
297
+ &.detail-wrap .d-cont {
298
+ //height: calc(100vh - 150px);
299
+
300
+ .title .field-wrapper {
301
+ display: inline-block !important
302
+ }
303
+ }
304
+ }
305
+ }
306
+ }
307
+ }
308
+
309
+ &.is-fullscreen .el-dialog__body {
310
+ .cont {
311
+ height: calc(100vh - 110px);
312
+
313
+ &.nfootBtn {
314
+ height: calc(100vh - var(--xform-dialog-body-offset, 58px))
315
+ }
316
+ }
317
+ }
318
+ }
319
+ </style>