cloud-web-corejs 1.0.281 → 1.1.0-dev.11

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 (175) 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 +45 -3
  4. package/src/components/VabUpload/mixins.js +126 -19
  5. package/src/components/VabUpload/view.vue +248 -209
  6. package/src/components/baseTabs/mixins.js +181 -181
  7. package/src/components/bizTab/BizBillActions.vue +129 -0
  8. package/src/components/bizTab/BizTabListPage.vue +391 -0
  9. package/src/components/bizTab/README.md +378 -0
  10. package/src/components/bizTab/billTableUtil.js +48 -0
  11. package/src/components/bizTab/billValidators.js +136 -0
  12. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  13. package/src/components/bizTab/index.js +24 -0
  14. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  15. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  16. package/src/components/excelExport/mixins.js +3 -3
  17. package/src/components/excelImport/index.vue +156 -156
  18. package/src/components/jsonImport/index.vue +1 -1
  19. package/src/components/langImport/index.vue +1 -1
  20. package/src/components/mobile/statusTag/mixins.js +1 -61
  21. package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
  22. package/src/components/mobile/wf/content.vue +1705 -1556
  23. package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
  24. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  25. package/src/components/mobile/wf/selectUserDialog.vue +118 -0
  26. package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
  27. package/src/components/mobile/wf/urgingDialog.vue +26 -3
  28. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  29. package/src/components/obsUpload/index.vue +1 -1
  30. package/src/components/table/config.js +78 -78
  31. package/src/components/table/index.js +1276 -1276
  32. package/src/components/table/plugins/cell-area/index.js +1055 -0
  33. package/src/components/table/plugins/cell-area/index.scss +77 -0
  34. package/src/components/table/plugins/cell-area/util.js +224 -0
  35. package/src/components/table/tableForm.vue +330 -330
  36. package/src/components/table/tableFormMixin.js +318 -318
  37. package/src/components/table/vxeFilter/index.js +163 -163
  38. package/src/components/table/vxeFilter/mixin.js +316 -316
  39. package/src/components/wf/content.vue +1188 -1188
  40. package/src/components/wf/wf.js +40 -20
  41. package/src/components/wf/wfActionDropdown.vue +1 -1
  42. package/src/components/wf/wfActionItems.js +1 -1
  43. package/src/components/xform/form-designer/designer.js +51 -52
  44. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  45. package/src/components/xform/form-designer/form-widget/container-widget/detail-h5-widget.vue +18 -2
  46. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  47. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  48. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-pane-widget.vue +23 -2
  49. package/src/components/xform/form-designer/form-widget/container-widget/h5-card-widget.vue +30 -1
  50. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  51. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  52. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  53. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  54. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  55. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  56. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  57. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  58. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  59. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  60. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  61. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  62. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  63. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  64. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  65. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  66. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +3 -2
  67. package/src/components/xform/form-designer/indexMixin.js +35 -1
  68. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  69. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  70. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  71. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  72. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  73. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  74. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -846
  75. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  76. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  77. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  78. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  79. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  80. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  81. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  82. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  83. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  84. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  85. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  86. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  87. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  88. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  89. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  90. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +12 -0
  91. package/src/components/xform/form-designer/toolbar-panel/index.vue +884 -874
  92. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +14 -0
  93. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  94. package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
  95. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +112 -4
  96. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  97. package/src/components/xform/form-render/container-item/detail-h5-item.vue +204 -34
  98. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  99. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  100. package/src/components/xform/form-render/container-item/list-h5-item.vue +1913 -1699
  101. package/src/components/xform/form-render/index.vue +153 -147
  102. package/src/components/xform/form-render/indexMixin.js +35 -3
  103. package/src/components/xform/lang/en-US.js +14 -0
  104. package/src/components/xform/lang/zh-CN.js +17 -0
  105. package/src/components/xform/mixins/defaultHandle.js +707 -707
  106. package/src/components/xform/styles/h5.scss +2262 -0
  107. package/src/components/xform/utils/textMaskUtil.js +182 -179
  108. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  109. package/src/components/xform/utils/util.js +56 -11
  110. package/src/directive/append-to-body/index.js +48 -0
  111. package/src/index.js +13 -4
  112. package/src/layout/components/Sidebar/default.vue +1655 -1655
  113. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  114. package/src/router/index.js +48 -27
  115. package/src/router/modules/customer.js +71 -14
  116. package/src/store/modules/permission.js +17 -18
  117. package/src/utils/assetUrl.js +19 -0
  118. package/src/utils/pdfUtil.js +429 -429
  119. package/src/utils/resolveViewComponent.js +142 -16
  120. package/src/utils/vab.js +1283 -1279
  121. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  122. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  123. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  124. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  125. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  126. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  127. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  128. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  129. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  130. package/src/views/bd/project/common/form_script/list.vue +16 -0
  131. package/src/views/bd/project/common/form_template/list.vue +15 -0
  132. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  133. package/src/views/bd/project/core/branchContext.js +100 -0
  134. package/src/views/bd/project/core/branchPage.js +78 -0
  135. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  136. package/src/views/bd/project/core/branchScope.js +44 -0
  137. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  138. package/src/views/bd/project/core/branchSelect.vue +85 -0
  139. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  140. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  141. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  142. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  143. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  144. package/src/views/bd/setting/form_template/edit.vue +378 -356
  145. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  146. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  147. package/src/views/bd/setting/form_template/list.vue +304 -303
  148. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  149. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  150. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  151. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  152. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  153. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  154. package/src/views/support/form-dialog-demo/index.vue +537 -0
  155. package/src/views/user/file_view_ins/list.vue +970 -970
  156. package/src/views/user/form/vform/designer.vue +823 -821
  157. package/src/views/user/home/default.vue +1117 -1117
  158. package/src/views/user/home/default2.vue +1 -1
  159. package/src/views/user/home/index.vue +103 -101
  160. package/src/views/user/notify_message/dialog.vue +139 -137
  161. package/src/views/user/outLink/form_view.vue +202 -202
  162. package/src/views/user/outLink/index.vue +110 -110
  163. package/src/views/user/outLink/view.vue +3 -3
  164. package/src/views/user/role/edit.vue +632 -632
  165. package/src/views/user/role/list.vue +260 -260
  166. package/src/views/user/wf/iframe/index.vue +51 -51
  167. package/src/views/user/wf/iframe/index2.vue +64 -64
  168. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  169. package/src/views/user/wf/wf_manage/list2.vue +871 -875
  170. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -131
  171. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
  172. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  173. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  174. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  175. package/src/utils/wf.js +0 -766
@@ -1,721 +1,748 @@
1
- import projectTagView from "@base/components/projectTag/view.vue";
2
- import projectTagAddButton from "@base/components/projectTag/addButton.vue";
3
- import projectTagDeleteButton from "@base/components/projectTag/deleteButton.vue";
4
- import tableForm from "@base/components/table/tableForm.vue";
5
- import editView from "@base/views/bd/setting/form_template/edit.vue";
6
- import userDialog from "@base/views/user/user/dialog.vue";
7
- import positionDialog from "@base/views/user/position/dialog.vue";
8
- import scriptDescriptionDialog from "@base/components/scriptDescription/dialog.vue";
9
- import ftHistoryDialog from "@base/views/bd/setting/form_template/ftHistoryDialog.vue";
10
- import itemList from "@base/views/bd/setting/form_template/itemList.vue";
11
- import formTypeEditDialog from "@base/views/user/form/form_type/editDialog.vue";
12
- import projectTagDialog from "@base/views/user/project_tag/dialog.vue";
13
- import { treeScollx } from "@base/utils/global";
14
- import indexUtil from "@base/utils";
15
- import { getBdFlag } from "@base/api/user";
16
- import {
17
- getJsxBtnList,
18
- getJsxEditLink,
19
- getJsxStatus,
20
- } from "@base/views/bd/setting/utils/index";
21
- import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
22
- import settingConfig from "@/settings";
23
-
24
- let modules = {};
25
- modules = {
26
- name: "bd_form_template:list",
27
- components: {
28
- projectTagView,
29
- projectTagAddButton,
30
- projectTagDeleteButton,
31
- tableForm,
32
- editView,
33
- userDialog,
34
- positionDialog,
35
- scriptDescriptionDialog,
36
- ftHistoryDialog,
37
- itemList,
38
- formTypeEditDialog,
39
- projectTagDialog,
40
- formDesignerDialog: () =>
41
- import("@base/views/bd/setting/form_template/formDesignerDialog.vue"),
42
- formVersionButton,
43
- },
44
- data() {
45
- return {
46
- isFullscreen: false,
47
- formDesTabs: "first",
48
- activeName: "second",
49
- dataId: 0,
50
- showEdit: false,
51
- vxeOption: {},
52
- formData: {},
53
- showDesingerDialog: false,
54
- formCode: null,
55
- formName: null,
56
- templateId: null,
57
- currentFormTemplate: null,
58
-
59
- showItemEdit: false,
60
- showParamEdit: false,
61
- vxeOption1: {},
62
- editId: "",
63
- itemEditId: "",
64
- pRow: null,
65
- currentRow: {},
66
- serviceId: null,
67
- itemServiceId: null,
68
-
69
- showWfDialog: false,
70
- wfUrl: "",
71
- ph: "",
72
- dialogActiveName: "first",
73
- showFunctionScriptList: false,
74
- showUserDialog: false,
75
- wfAssignData: [],
76
- wfAssignCallback: null,
77
- wfAssignMulti: true,
78
-
79
- showPositionDialog: false,
80
- wfAssignPositionData: [],
81
- wfAssignPositionCallback: null,
82
-
83
- showFormTemplateDialog: false,
84
- wfAssignFormTemplateCallback: null,
85
-
86
- showScriptDescriptionDialog: false,
87
- showWfDiyAttributeEdit: false,
88
-
89
- showFtHistoryDialog: false,
90
- operateFtHistory: null,
91
-
92
- defaultProps: {
93
- label: "name", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
94
- children: [],
95
- isLeaf: "leaf",
96
- },
97
- showItemView: false,
98
-
99
- currentFormType: {},
100
- editFormTypeId: null,
101
- showFormTypeDialog: false,
102
- showFormScriptList: false,
103
- addProjectTagOption: {
104
- url: USER_PREFIX + `/formTemplate/saveTag`,
105
- tableDatas: () => {
106
- return this.$refs["table-m1"].getCheckboxRecords(true);
107
- },
108
- reqData: (tagDatas, tableDatas) => {
109
- let sids = tableDatas.map((item) => item.sid);
110
- let tagCodes = tagDatas.map((item) => item.tagCode);
111
- let reqData = {
112
- tagCodes,
113
- sids,
114
- };
115
- return reqData;
116
- },
117
- callback: () => {
118
- this.searchEvent();
119
- },
120
- },
121
- deleteProjectTagOption: {
122
- url: USER_PREFIX + `/formTemplate/deleteTag`,
123
- tableDatas: () => {
124
- return this.$refs["table-m1"].getCheckboxRecords(true);
125
- },
126
- reqData: (tagDatas, tableDatas) => {
127
- let sids = tableDatas.map((item) => item.sid);
128
- let tagCodes = tagDatas.map((item) => item.tagCode);
129
- let reqData = {
130
- tagCodes,
131
- sids,
132
- };
133
- return reqData;
134
- },
135
- callback: () => {
136
- this.searchEvent();
137
- },
138
- },
139
- showProjectTagDialog3: false,
140
- checkTags: [],
141
- isDev: true,
142
- menuKindAuth: {},
143
- showTree: false,
144
- designerReadonly: false,
145
- };
146
- },
147
- computed: {
148
- currentMenuKindId() {
149
- return this.currentFormType?.id || null;
150
- },
151
- currentMenuKindName() {
152
- return this.currentFormType?.name || null;
153
- },
154
- otherFlag() {
155
- return this.currentFormType?.menuKindCode === "other";
156
- },
157
- exportArchiveEnabled() {
158
- return settingConfig.exportArchiveEnabled === true;
159
- },
160
- operationColumnWidth() {
161
- const btnWidth = 47;
162
- return this.exportArchiveEnabled ? btnWidth * 3 : btnWidth * 2;
163
- },
164
- },
165
- watch: {
166
- formDesTabs(val) {
167
- if (this.showFormScriptList === false && val === "second") {
168
- this.showFormScriptList = true;
169
- }
170
- },
171
- },
172
- mounted() {
173
- treeScollx({ target: this, type: "default" });
174
- this.getBdEnv();
175
- this.initTableList();
176
- this.initWfWinParam();
177
- },
178
- methods: {
179
- searchEvent() {
180
- this.$refs["table-m1"].commitProxy("reload");
181
- },
182
- resetEvent() {
183
- this.formData = {};
184
- this.checkTags = [];
185
- this.$refs["table-m1"].commitProxy("reload");
186
- },
187
- openEditDialog(row) {
188
- let dataId = row?.id || 0;
189
- /*this.dataId = !id || typeof id === 'object' ? 0 : id;
190
- this.activeName = 'first';
191
- this.showItemEdit = false;
192
- this.$openEditView('showEdit');*/
193
- if (!dataId) {
194
- this.dataId = dataId;
195
- this.activeName = "first";
196
- this.$openEditView("showEdit");
197
- } else {
198
- this.$refs.xTabs.openEditTab(row);
199
- }
200
- },
201
- openDesingerDialogByAuth(row) {
202
- if (!this.otherFlag) {
203
- this.openDesingerDialog(row);
204
- } else {
205
- this.getOtherMenuKindAuth(row, (editAuth) => {
206
- this.openDesingerDialog(row, null, !editAuth);
207
- });
208
- }
209
- },
210
- getOtherMenuKindAuth(row, callback) {
211
- if (row.sid) {
212
- this.$http({
213
- aes: true,
214
- url: USER_PREFIX + "/form_template_auth/getAuth",
215
- method: `post`,
216
- data: { stringOne: row.sid },
217
- isLoading: true,
218
- success: (res) => {
219
- let menuKindAuth = res.objx || {};
220
- callback(!!menuKindAuth.editAuth);
221
- },
222
- });
223
- }
224
- },
225
- openDesingerDialog(row, callback, readonly = false) {
226
- this.formCode = row.formCode;
227
- this.formName = row.formName;
228
- this.currentFormTemplate = row;
229
- this.isFullscreen = false;
230
-
231
- this.designerReadonly = readonly;
232
- this.showDesingerDialog = true;
233
- this.designerSaveCallback = callback ?? null;
234
- },
235
- openDesingerDialogByChild({ row, readonly, callback }) {
236
- this.openDesingerDialog(row, callback, readonly);
237
- },
238
- reflushTemplateList() {
239
- this.searchEvent();
240
- this.designerSaveCallback && this.designerSaveCallback();
241
- },
242
- handleFullscreen() {
243
- let isFullscreen = this.isFullscreen;
244
- if (!isFullscreen) {
245
- indexUtil.addClass(document.body, "hideMenu");
246
- } else {
247
- indexUtil.removeClass(document.body, "hideMenu");
248
- }
249
- this.isFullscreen = !isFullscreen;
250
- },
251
- openFtHistoryDialog(row) {
252
- this.operateFtHistory = row;
253
- this.showFtHistoryDialog = true;
254
- },
255
- confirmFtHistoryDialog(row) {
256
- this.searchEvent();
257
- },
258
- closeFormDesignwinEvent(done) {
259
- this.$baseConfirm(
260
- this.$t1('请确认"已保存"报表模板,是否继续关闭?')
261
- ).then(() => {
262
- indexUtil.removeClass(document.body, "hideMenu");
263
- done && done();
264
- });
265
- },
266
- getSearchParam() {
267
- let tagCodes = null;
268
- if (this.checkTags.length) {
269
- tagCodes = this.checkTags.map((item) => item.tagCode);
270
- }
271
- let currentFormType = this.currentFormType || {};
272
- let menuKindCode =
273
- currentFormType.menuKindCode && !this.otherFlag
274
- ? currentFormType.menuKindCode
275
- : null;
276
- return {
277
- ...this.formData,
278
- tagCodes,
279
- menuKindCode,
280
- history: false,
281
- };
282
- },
283
- initTableList() {
284
- let that = this;
285
- let tableOption = {
286
- vue: this,
287
- tableRef: "table-m1",
288
- tableName: "bd_form_template_list-m1",
289
- path: () => {
290
- let url = USER_PREFIX + "/formTemplate/listPage";
291
- if (this.otherFlag) {
292
- url = USER_PREFIX + "/formTemplate/listOtherPage";
293
- }
294
- return url;
295
- },
296
- param: () => {
297
- return this.getSearchParam();
298
- },
299
- columns: [
300
- { type: "checkbox", width: 48, resizable: false, fixed: "left" },
301
- {
302
- title: this.$t1("模板名称"),
303
- field: "formName",
304
- width: 150,
305
- fixed: "left",
306
- slots: {
307
- default: ({ row }) => {
308
- return getJsxEditLink({
309
- content: row.formName,
310
- onclick: () => {
311
- this.openEditDialog(row);
312
- },
313
- });
314
- },
315
- },
316
- },
317
- {
318
- title: this.$t1("项目标签"),
319
- field: "tag",
320
- width: 250,
321
- slots: { default: "tag" },
322
- params: {
323
- exportVal: ({ row }) => {
324
- if (row.formTemplateTagDTOs) {
325
- return row.formTemplateTagDTOs
326
- .map((item) => item.tagName)
327
- .join(",");
328
- }
329
- },
330
- },
331
- },
332
- {
333
- title: this.$t1("模板编码"),
334
- field: "formCode",
335
- width: 150,
336
- },
337
- {
338
- title: this.$t1("表单分类"),
339
- field: "menuKindName",
340
- width: 150,
341
- },
342
- {
343
- title: this.$t1("是否启用"),
344
- field: "enabled",
345
- width: 150,
346
- slots: {
347
- default: ({ row }) => {
348
- if (row.enabled) {
349
- return getJsxStatus(null, this.$t1("启用"));
350
- } else {
351
- return getJsxStatus("s-3", this.$t1("禁用"));
352
- }
353
- },
354
- },
355
- },
356
- {
357
- title: this.$t1("启用流程"),
358
- field: "hasWf",
359
- width: 150,
360
- slots: {
361
- default: ({ row }) => {
362
- if (row.hasWf) {
363
- return getJsxStatus(null, this.$t1("是"));
364
- } else {
365
- return getJsxStatus("s-3", this.$t1(""));
366
- }
367
- },
368
- },
369
- },
370
- {
371
- title: this.$t1("默认流程单据类型名称"),
372
- field: "objTypeName",
373
- width: 200,
374
- },
375
- {
376
- title: this.$t1("引用流程的表单编码"),
377
- field: "fromWfFormCode",
378
- width: 200,
379
- },
380
- {
381
- title: this.$t1("备注"),
382
- field: "remark",
383
- width: 150,
384
- },
385
- { field: "serviceName", title: this.$t1("服务名"), width: 150 },
386
- {
387
- title: this.$t1("版本号"),
388
- field: "version",
389
- width: 150,
390
- },
391
- { title: this.$t1("唯一标识"), field: "sid", width: 280 },
392
- {
393
- field: "createBy",
394
- title: this.$t1("创建人"),
395
- width: 150,
396
- },
397
- {
398
- field: "createDate",
399
- title: this.$t1("创建时间"),
400
- width: 150,
401
- },
402
- {
403
- field: "modifyBy",
404
- title: this.$t1("更新人"),
405
- width: 150,
406
- },
407
- {
408
- field: "modifyDate",
409
- title: this.$t1("更新时间"),
410
- width: 150,
411
- },
412
- {
413
- width: this.operationColumnWidth,
414
- fixed: "right",
415
- title: "",
416
- sortable: false,
417
- slots: {
418
- default: "operation",
419
- },
420
- },
421
- ],
422
- searchColumns: [
423
- {
424
- title: this.$t1("表单分类"),
425
- field: "menuKindName",
426
- type: "input",
427
- common: true,
428
- disabled: true,
429
- defaultValueEnabled: false,
430
- slot: "menuKindName",
431
- },
432
- {
433
- title: this.$t1("模板名称"),
434
- field: "formName",
435
- type: "input",
436
- common: true,
437
- },
438
- {
439
- title: this.$t1("模板编码"),
440
- field: "formCode",
441
- type: "input",
442
- common: true,
443
- },
444
- {
445
- title: this.$t1("是否启用"),
446
- field: "enabled",
447
- type: "select",
448
- common: true,
449
- itemOption: [
450
- { label: this.$t1("启用"), value: true },
451
- { label: this.$t1("禁用"), value: false },
452
- ],
453
- },
454
- {
455
- title: this.$t1("项目标签"),
456
- field: "tag",
457
- type: "input",
458
- common: true,
459
- slot: "tag",
460
- },
461
- {
462
- title: this.$t1("模板JSON"),
463
- field: "formViewContent",
464
- type: "input",
465
- common: false,
466
- },
467
- {
468
- title: this.$t1("创建人"),
469
- field: "createBy",
470
- type: "input",
471
- common: false,
472
- },
473
- {
474
- title: this.$t1("更新人"),
475
- field: "modifyBy",
476
- type: "input",
477
- common: false,
478
- },
479
- {
480
- title: this.$t1("操作日志"),
481
- field: "logContent",
482
- type: "input",
483
- common: false,
484
- },
485
- {
486
- title: this.$t1("创建时间"),
487
- field: "startCreateDate",
488
- field2: "endCreateDate",
489
- type: "dateRange",
490
- common: false,
491
- widgetType: "datetime",
492
- valueFormat: "yyyy-MM-dd HH:mm:ss",
493
- },
494
- {
495
- title: this.$t1("更新时间"),
496
- field: "startModifyDate",
497
- field2: "endModifyDate",
498
- type: "dateRange",
499
- common: false,
500
- widgetType: "datetime",
501
- valueFormat: "yyyy-MM-dd HH:mm:ss",
502
- },
503
- ],
504
- config: {
505
- proxyConfig: {
506
- autoLoad: false,
507
- },
508
- },
509
- };
510
- this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
511
- this.vxeOption = opts;
512
- this.showTree = true;
513
- });
514
- },
515
- chooseCellM1(row) {
516
- this.currentRow = row;
517
- this.showItemView = true;
518
- },
519
- openWfDesignDialog(actModelId) {
520
- //wfType 0:单据流程,1:场景流程
521
- let serviceId = this.currentRow.serviceName;
522
- this.wfUrl =
523
- WEB_PREFIX +
524
- "/activiti-explorer/modeler.html?wfType=0&serviceId=" +
525
- serviceId +
526
- "&modelId=" +
527
- actModelId;
528
- this.dialogActiveName = "first";
529
- this.showWfDialog = true;
530
- },
531
- closeDesignwinEvent(done) {
532
- this.$baseConfirm(
533
- this.$t1('请确认"已保存"流程模板,是否继续关闭?')
534
- ).then(() => {
535
- this.showWfDialog = false;
536
- // this.showDesingerDialog = false;
537
- });
538
- },
539
- initWfWinParam() {
540
- this.initCloseWfDesignWin();
541
- this.initWinUserDialog();
542
- this.initWinPositionDialog();
543
- this.initSysParamForWf();
544
- this.initWinFormTemplateDialog();
545
- this.initWinScriptDescriptionDialog();
546
- },
547
- initCloseWfDesignWin() {
548
- window.closeWfDesignWin = () => {
549
- this.showWfDialog = false;
550
- };
551
- },
552
- initWinUserDialog() {
553
- window.openAssignUserDialog = (opts) => {
554
- this.wfAssignMulti = opts.multi;
555
- this.wfAssignData = opts.data || [];
556
- this.wfAssignCallback = opts.callback;
557
- this.showUserDialog = true;
558
- };
559
- },
560
- confirmUser(rows) {
561
- this.wfAssignCallback(rows);
562
- },
563
- initWinPositionDialog() {
564
- window.openAssignPositionDialog = (opts) => {
565
- this.wfAssignPositionData = opts.data || [];
566
- this.wfAssignPositionCallback = opts.callback;
567
- this.showPositionDialog = true;
568
- };
569
- },
570
- initSysParamForWf() {
571
- let webPrefix = WEB_PREFIX;
572
- let baseApi = process.env.VUE_APP_BASE_API;
573
- window.sysParamForWf = {
574
- webPrefix,
575
- baseApi,
576
- };
577
- },
578
- confirmPosition(rows) {
579
- this.wfAssignPositionCallback(rows);
580
- },
581
- initWinFormTemplateDialog() {
582
- window.openAssignFormTemplateDialog = (opts) => {
583
- this.wfAssignFormTemplateCallback = opts.callback;
584
- this.showFormTemplateDialog = true;
585
- };
586
- },
587
- confirmFormTemplate(rows) {
588
- this.wfAssignFormTemplateCallback(rows);
589
- },
590
- initWinScriptDescriptionDialog() {
591
- window.openScriptDescriptionDialog = (opts) => {
592
- this.showScriptDescriptionDialog = true;
593
- };
594
- },
595
- handleNodeClick(data, node, v) {
596
- this.handleNodeData(node);
597
- this.$forceUpdate();
598
- this.searchEvent();
599
- },
600
- // 异步树叶子节点懒加载逻辑
601
- loadNode(node, resolve) {
602
- let id = node && node.data && node.data.id ? node.data.id || "" : 0;
603
- let param = { enabled: true };
604
- let url = !id
605
- ? USER_PREFIX + "/menuKind/getAllList"
606
- : USER_PREFIX + "/menuKind/getChildren";
607
- this.$http({
608
- aes: true,
609
- url: url,
610
- method: "post",
611
- data: {
612
- parent: id,
613
- enabled: true,
614
- dataType: 2,
615
- },
616
- success: (res) => {
617
- let rows = res.objx || [];
618
- rows.forEach((value) => {
619
- value.leaf = !value.hasChild;
620
- });
621
- if (node.level === 0) {
622
- rows.push({
623
- id: "other",
624
- menuKindCode: "other",
625
- name: "其他分类",
626
- leaf: true,
627
- });
628
- if (rows.length > 0) {
629
- this.$nextTick(() => {
630
- let firstNode = node.childNodes[0];
631
- if (rows[0].hasChild) {
632
- firstNode.expand();
633
- }
634
- this.$refs.tree.setCurrentKey(firstNode.data);
635
- this.handleNodeClick(firstNode.data, firstNode, this);
636
- });
637
- }
638
- }
639
- resolve(rows);
640
- },
641
- });
642
- },
643
- handleNodeData(node) {
644
- this.currentFormType = node ? node.data : null;
645
- this.currentNode = node;
646
- },
647
- handleFormDesignClose() {
648
- this.formDesTabs = "first";
649
- this.showFormScriptList = false;
650
- },
651
- openProjectTagDialog3() {
652
- this.showProjectTagDialog3 = true;
653
- },
654
- confirmProjectTagDialog3(rows) {
655
- this.checkTags = rows;
656
- },
657
- getTabNames() {
658
- return this.checkTags.map((item) => item.tagName).join(",");
659
- },
660
- jsonImport() {
661
- this.$jsonImport({
662
- saveUrl: USER_PREFIX + "/form_develop/importFormTemplate",
663
- showResult: true,
664
- resultColumns: [
665
- { title: this.$t1("模板名称"), field: "formName", width: 200 },
666
- { title: this.$t1("模板编码"), field: "formCode", width: 200 },
667
- {
668
- title: this.$t1("结果信息"),
669
- field: "impReturnMsg",
670
- width: 300,
671
- showOverflow: false,
672
- slots: {
673
- default: ({ row }, h) => {
674
- let impReturnMsg = row.impReturnMsg;
675
- let items = impReturnMsg
676
- .split(";")
677
- .filter((item) => !!item && !!item.trim())
678
- .map((item) => {
679
- return h("p", {}, `${item.trim()};`);
680
- });
681
- return h("div", {}, items);
682
- },
683
- },
684
- },
685
- ],
686
- callback: () => {
687
- this.searchEvent();
688
- },
689
- });
690
- },
691
- jsonExport() {
692
- this.$jsonExport({
693
- title: "表单模板",
694
- targetRef: "table-m1",
695
- url: USER_PREFIX + "/form_develop/exportFormTemplate",
696
- abcEnabled: true,
697
- editAuth: this.currentFormType.editAuth,
698
- selectTypeAuth: this.currentFormType.selectTypeAuth,
699
- });
700
- },
701
- jsonExportArchive(row) {
702
- this.$jsonExport({
703
- title: "表单模板",
704
- data: [row.id],
705
- url: USER_PREFIX + "/form_develop/exportFormTemplate",
706
- plaintext: 1,
707
- abcEnabled: true,
708
- editAuth: this.currentFormType.editAuth,
709
- selectTypeAuth: this.currentFormType.selectTypeAuth,
710
- });
711
- },
712
- getBdEnv() {
713
- getBdFlag({
714
- success: (res) => {
715
- this.isDev = res.objx === 1;
716
- },
717
- });
718
- },
719
- },
720
- };
721
- export default modules;
1
+ import projectTagView from "@base/components/projectTag/view.vue";
2
+ import projectTagAddButton from "@base/components/projectTag/addButton.vue";
3
+ import projectTagDeleteButton from "@base/components/projectTag/deleteButton.vue";
4
+ import tableForm from "@base/components/table/tableForm.vue";
5
+ import editView from "@base/views/bd/setting/form_template/edit.vue";
6
+ import userDialog from "@base/views/user/user/dialog.vue";
7
+ import positionDialog from "@base/views/user/position/dialog.vue";
8
+ import scriptDescriptionDialog from "@base/components/scriptDescription/dialog.vue";
9
+ import ftHistoryDialog from "@base/views/bd/setting/form_template/ftHistoryDialog.vue";
10
+ import itemList from "@base/views/bd/setting/form_template/itemList.vue";
11
+ import formTypeEditDialog from "@base/views/user/form/form_type/editDialog.vue";
12
+ import projectTagDialog from "@base/views/user/project_tag/dialog.vue";
13
+ import { treeScollx } from "@base/utils/global";
14
+ import indexUtil from "@base/utils";
15
+ import { getBdFlag } from "@base/api/user";
16
+ import {
17
+ getJsxBtnList,
18
+ getJsxEditLink,
19
+ getJsxStatus,
20
+ } from "@base/views/bd/setting/utils/index";
21
+ import formVersionButton from "@base/views/bd/setting/formVersion/link.vue";
22
+ import settingConfig from "@/settings";
23
+ import {
24
+ getDesignerLayoutType,
25
+ isH5FormTemplate,
26
+ } from "@base/views/bd/setting/form_template/formTemplateType.js";
27
+
28
+ let modules = {};
29
+ modules = {
30
+ name: "bd_form_template:list",
31
+ components: {
32
+ projectTagView,
33
+ projectTagAddButton,
34
+ projectTagDeleteButton,
35
+ tableForm,
36
+ editView,
37
+ userDialog,
38
+ positionDialog,
39
+ scriptDescriptionDialog,
40
+ ftHistoryDialog,
41
+ itemList,
42
+ formTypeEditDialog,
43
+ projectTagDialog,
44
+ formDesignerDialog: () =>
45
+ import("@base/views/bd/setting/form_template/formDesignerDialog.vue"),
46
+ formVersionButton,
47
+ },
48
+ data() {
49
+ return {
50
+ isFullscreen: false,
51
+ formDesTabs: "first",
52
+ activeName: "second",
53
+ dataId: 0,
54
+ showEdit: false,
55
+ vxeOption: {},
56
+ formData: {},
57
+ showDesingerDialog: false,
58
+ formCode: null,
59
+ formName: null,
60
+ templateId: null,
61
+ currentFormTemplate: null,
62
+
63
+ showItemEdit: false,
64
+ showParamEdit: false,
65
+ vxeOption1: {},
66
+ editId: "",
67
+ itemEditId: "",
68
+ pRow: null,
69
+ currentRow: {},
70
+ serviceId: null,
71
+ itemServiceId: null,
72
+
73
+ showWfDialog: false,
74
+ wfUrl: "",
75
+ ph: "",
76
+ dialogActiveName: "first",
77
+ showFunctionScriptList: false,
78
+ showUserDialog: false,
79
+ wfAssignData: [],
80
+ wfAssignCallback: null,
81
+ wfAssignMulti: true,
82
+
83
+ showPositionDialog: false,
84
+ wfAssignPositionData: [],
85
+ wfAssignPositionCallback: null,
86
+
87
+ showFormTemplateDialog: false,
88
+ wfAssignFormTemplateCallback: null,
89
+
90
+ showScriptDescriptionDialog: false,
91
+ showWfDiyAttributeEdit: false,
92
+
93
+ showFtHistoryDialog: false,
94
+ operateFtHistory: null,
95
+
96
+ defaultProps: {
97
+ label: "name", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
98
+ children: [],
99
+ isLeaf: "leaf",
100
+ },
101
+ showItemView: false,
102
+
103
+ currentFormType: {},
104
+ editFormTypeId: null,
105
+ showFormTypeDialog: false,
106
+ showFormScriptList: false,
107
+ addProjectTagOption: {
108
+ url: USER_PREFIX + `/formTemplate/saveTag`,
109
+ tableDatas: () => {
110
+ return this.$refs["table-m1"].getCheckboxRecords(true);
111
+ },
112
+ reqData: (tagDatas, tableDatas) => {
113
+ let sids = tableDatas.map((item) => item.sid);
114
+ let tagCodes = tagDatas.map((item) => item.tagCode);
115
+ let reqData = {
116
+ tagCodes,
117
+ sids,
118
+ };
119
+ return reqData;
120
+ },
121
+ callback: () => {
122
+ this.searchEvent();
123
+ },
124
+ },
125
+ deleteProjectTagOption: {
126
+ url: USER_PREFIX + `/formTemplate/deleteTag`,
127
+ tableDatas: () => {
128
+ return this.$refs["table-m1"].getCheckboxRecords(true);
129
+ },
130
+ reqData: (tagDatas, tableDatas) => {
131
+ let sids = tableDatas.map((item) => item.sid);
132
+ let tagCodes = tagDatas.map((item) => item.tagCode);
133
+ let reqData = {
134
+ tagCodes,
135
+ sids,
136
+ };
137
+ return reqData;
138
+ },
139
+ callback: () => {
140
+ this.searchEvent();
141
+ },
142
+ },
143
+ showProjectTagDialog3: false,
144
+ checkTags: [],
145
+ isDev: true,
146
+ menuKindAuth: {},
147
+ showTree: false,
148
+ designerReadonly: false,
149
+ designerLayoutType: "PC",
150
+ };
151
+ },
152
+ computed: {
153
+ currentMenuKindId() {
154
+ return this.currentFormType?.id || null;
155
+ },
156
+ currentMenuKindName() {
157
+ return this.currentFormType?.name || null;
158
+ },
159
+ otherFlag() {
160
+ return this.currentFormType?.menuKindCode === "other";
161
+ },
162
+ exportArchiveEnabled() {
163
+ return settingConfig.exportArchiveEnabled === true;
164
+ },
165
+ operationColumnWidth() {
166
+ const btnWidth = 47;
167
+ return this.exportArchiveEnabled ? btnWidth * 3 : btnWidth * 2;
168
+ },
169
+ },
170
+ watch: {
171
+ formDesTabs(val) {
172
+ if (this.showFormScriptList === false && val === "second") {
173
+ this.showFormScriptList = true;
174
+ }
175
+ },
176
+ },
177
+ mounted() {
178
+ treeScollx({ target: this, type: "default" });
179
+ this.getBdEnv();
180
+ this.initTableList();
181
+ this.initWfWinParam();
182
+ },
183
+ methods: {
184
+ searchEvent() {
185
+ this.$refs["table-m1"].commitProxy("reload");
186
+ },
187
+ resetEvent() {
188
+ this.formData = {};
189
+ this.checkTags = [];
190
+ this.$refs["table-m1"].commitProxy("reload");
191
+ },
192
+ openEditDialog(row) {
193
+ let dataId = row?.id || 0;
194
+ /*this.dataId = !id || typeof id === 'object' ? 0 : id;
195
+ this.activeName = 'first';
196
+ this.showItemEdit = false;
197
+ this.$openEditView('showEdit');*/
198
+ if (!dataId) {
199
+ this.dataId = dataId;
200
+ this.activeName = "first";
201
+ this.$openEditView("showEdit");
202
+ } else {
203
+ this.$refs.xTabs.openEditTab(row);
204
+ }
205
+ },
206
+ openDesingerDialogByAuth(row) {
207
+ if (!this.otherFlag) {
208
+ this.openDesingerDialog(row);
209
+ } else {
210
+ this.getOtherMenuKindAuth(row, (editAuth) => {
211
+ this.openDesingerDialog(row, null, !editAuth);
212
+ });
213
+ }
214
+ },
215
+ getOtherMenuKindAuth(row, callback) {
216
+ if (row.sid) {
217
+ this.$http({
218
+ aes: true,
219
+ url: USER_PREFIX + "/form_template_auth/getAuth",
220
+ method: `post`,
221
+ data: { stringOne: row.sid },
222
+ isLoading: true,
223
+ success: (res) => {
224
+ let menuKindAuth = res.objx || {};
225
+ callback(!!menuKindAuth.editAuth);
226
+ },
227
+ });
228
+ }
229
+ },
230
+ openDesingerDialog(row, callback, readonly = false) {
231
+ /* 布局模式跟随模板类型,移动端模板进设计器为 H5,且工具栏不可切换 */
232
+ this.designerLayoutType = getDesignerLayoutType(row.formCode);
233
+ this.formCode = row.formCode;
234
+ this.formName = row.formName;
235
+ this.currentFormTemplate = row;
236
+ this.isFullscreen = false;
237
+
238
+ this.designerReadonly = readonly;
239
+ this.showDesingerDialog = true;
240
+ this.designerSaveCallback = callback ?? null;
241
+ },
242
+ openDesingerDialogByChild({ row, readonly, callback }) {
243
+ this.openDesingerDialog(row, callback, readonly);
244
+ },
245
+ reflushTemplateList() {
246
+ this.searchEvent();
247
+ this.designerSaveCallback && this.designerSaveCallback();
248
+ },
249
+ handleFullscreen() {
250
+ let isFullscreen = this.isFullscreen;
251
+ if (!isFullscreen) {
252
+ indexUtil.addClass(document.body, "hideMenu");
253
+ } else {
254
+ indexUtil.removeClass(document.body, "hideMenu");
255
+ }
256
+ this.isFullscreen = !isFullscreen;
257
+ },
258
+ openFtHistoryDialog(row) {
259
+ this.operateFtHistory = row;
260
+ this.showFtHistoryDialog = true;
261
+ },
262
+ confirmFtHistoryDialog(row) {
263
+ this.searchEvent();
264
+ },
265
+ closeFormDesignwinEvent(done) {
266
+ this.$baseConfirm(
267
+ this.$t1('请确认"已保存"报表模板,是否继续关闭?')
268
+ ).then(() => {
269
+ indexUtil.removeClass(document.body, "hideMenu");
270
+ done && done();
271
+ });
272
+ },
273
+ getSearchParam() {
274
+ let tagCodes = null;
275
+ if (this.checkTags.length) {
276
+ tagCodes = this.checkTags.map((item) => item.tagCode);
277
+ }
278
+ let currentFormType = this.currentFormType || {};
279
+ let menuKindCode =
280
+ currentFormType.menuKindCode && !this.otherFlag
281
+ ? currentFormType.menuKindCode
282
+ : null;
283
+ return {
284
+ ...this.formData,
285
+ tagCodes,
286
+ menuKindCode,
287
+ history: false,
288
+ };
289
+ },
290
+ initTableList() {
291
+ let that = this;
292
+ let tableOption = {
293
+ vue: this,
294
+ tableRef: "table-m1",
295
+ tableName: "bd_form_template_list-m1",
296
+ path: () => {
297
+ let url = USER_PREFIX + "/formTemplate/listPage";
298
+ if (this.otherFlag) {
299
+ url = USER_PREFIX + "/formTemplate/listOtherPage";
300
+ }
301
+ return url;
302
+ },
303
+ param: () => {
304
+ return this.getSearchParam();
305
+ },
306
+ columns: [
307
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
308
+ {
309
+ title: this.$t1("模板名称"),
310
+ field: "formName",
311
+ width: 150,
312
+ fixed: "left",
313
+ slots: {
314
+ default: ({ row }) => {
315
+ return getJsxEditLink({
316
+ content: row.formName,
317
+ onclick: () => {
318
+ this.openEditDialog(row);
319
+ },
320
+ });
321
+ },
322
+ },
323
+ },
324
+ {
325
+ title: this.$t1("项目标签"),
326
+ field: "tag",
327
+ width: 250,
328
+ slots: { default: "tag" },
329
+ params: {
330
+ exportVal: ({ row }) => {
331
+ if (row.formTemplateTagDTOs) {
332
+ return row.formTemplateTagDTOs
333
+ .map((item) => item.tagName)
334
+ .join(",");
335
+ }
336
+ },
337
+ },
338
+ },
339
+ {
340
+ title: this.$t1("模板编码"),
341
+ field: "formCode",
342
+ width: 150,
343
+ },
344
+ {
345
+ /* 模板类型非数据库字段,由模板编码前缀派生,不参与后端查询 */
346
+ title: this.$t1("模板类型"),
347
+ field: "templateType",
348
+ width: 120,
349
+ slots: {
350
+ default: ({ row }) => {
351
+ return isH5FormTemplate(row.formCode)
352
+ ? this.$t1("移动端")
353
+ : this.$t1("PC端");
354
+ },
355
+ },
356
+ params: {
357
+ exportVal: ({ row }) => {
358
+ return isH5FormTemplate(row.formCode)
359
+ ? this.$t1("移动端")
360
+ : this.$t1("PC端");
361
+ },
362
+ },
363
+ },
364
+ {
365
+ title: this.$t1("表单分类"),
366
+ field: "menuKindName",
367
+ width: 150,
368
+ },
369
+ {
370
+ title: this.$t1("是否启用"),
371
+ field: "enabled",
372
+ width: 150,
373
+ slots: {
374
+ default: ({ row }) => {
375
+ if (row.enabled) {
376
+ return getJsxStatus(null, this.$t1("启用"));
377
+ } else {
378
+ return getJsxStatus("s-3", this.$t1("禁用"));
379
+ }
380
+ },
381
+ },
382
+ },
383
+ {
384
+ title: this.$t1("启用流程"),
385
+ field: "hasWf",
386
+ width: 150,
387
+ slots: {
388
+ default: ({ row }) => {
389
+ if (row.hasWf) {
390
+ return getJsxStatus(null, this.$t1("是"));
391
+ } else {
392
+ return getJsxStatus("s-3", this.$t1("否"));
393
+ }
394
+ },
395
+ },
396
+ },
397
+ {
398
+ title: this.$t1("默认流程单据类型名称"),
399
+ field: "objTypeName",
400
+ width: 200,
401
+ },
402
+ {
403
+ title: this.$t1("引用流程的表单编码"),
404
+ field: "fromWfFormCode",
405
+ width: 200,
406
+ },
407
+ {
408
+ title: this.$t1("备注"),
409
+ field: "remark",
410
+ width: 150,
411
+ },
412
+ { field: "serviceName", title: this.$t1("服务名"), width: 150 },
413
+ {
414
+ title: this.$t1("版本号"),
415
+ field: "version",
416
+ width: 150,
417
+ },
418
+ { title: this.$t1("唯一标识"), field: "sid", width: 280 },
419
+ {
420
+ field: "createBy",
421
+ title: this.$t1("创建人"),
422
+ width: 150,
423
+ },
424
+ {
425
+ field: "createDate",
426
+ title: this.$t1("创建时间"),
427
+ width: 150,
428
+ },
429
+ {
430
+ field: "modifyBy",
431
+ title: this.$t1("更新人"),
432
+ width: 150,
433
+ },
434
+ {
435
+ field: "modifyDate",
436
+ title: this.$t1("更新时间"),
437
+ width: 150,
438
+ },
439
+ {
440
+ width: this.operationColumnWidth,
441
+ fixed: "right",
442
+ title: "",
443
+ sortable: false,
444
+ slots: {
445
+ default: "operation",
446
+ },
447
+ },
448
+ ],
449
+ searchColumns: [
450
+ {
451
+ title: this.$t1("表单分类"),
452
+ field: "menuKindName",
453
+ type: "input",
454
+ common: true,
455
+ disabled: true,
456
+ defaultValueEnabled: false,
457
+ slot: "menuKindName",
458
+ },
459
+ {
460
+ title: this.$t1("模板名称"),
461
+ field: "formName",
462
+ type: "input",
463
+ common: true,
464
+ },
465
+ {
466
+ title: this.$t1("模板编码"),
467
+ field: "formCode",
468
+ type: "input",
469
+ common: true,
470
+ },
471
+ {
472
+ title: this.$t1("是否启用"),
473
+ field: "enabled",
474
+ type: "select",
475
+ common: true,
476
+ itemOption: [
477
+ { label: this.$t1("启用"), value: true },
478
+ { label: this.$t1("禁用"), value: false },
479
+ ],
480
+ },
481
+ {
482
+ title: this.$t1("项目标签"),
483
+ field: "tag",
484
+ type: "input",
485
+ common: true,
486
+ slot: "tag",
487
+ },
488
+ {
489
+ title: this.$t1("模板JSON"),
490
+ field: "formViewContent",
491
+ type: "input",
492
+ common: false,
493
+ },
494
+ {
495
+ title: this.$t1("创建人"),
496
+ field: "createBy",
497
+ type: "input",
498
+ common: false,
499
+ },
500
+ {
501
+ title: this.$t1("更新人"),
502
+ field: "modifyBy",
503
+ type: "input",
504
+ common: false,
505
+ },
506
+ {
507
+ title: this.$t1("操作日志"),
508
+ field: "logContent",
509
+ type: "input",
510
+ common: false,
511
+ },
512
+ {
513
+ title: this.$t1("创建时间"),
514
+ field: "startCreateDate",
515
+ field2: "endCreateDate",
516
+ type: "dateRange",
517
+ common: false,
518
+ widgetType: "datetime",
519
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
520
+ },
521
+ {
522
+ title: this.$t1("更新时间"),
523
+ field: "startModifyDate",
524
+ field2: "endModifyDate",
525
+ type: "dateRange",
526
+ common: false,
527
+ widgetType: "datetime",
528
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
529
+ },
530
+ ],
531
+ config: {
532
+ proxyConfig: {
533
+ autoLoad: false,
534
+ },
535
+ },
536
+ };
537
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
538
+ this.vxeOption = opts;
539
+ this.showTree = true;
540
+ });
541
+ },
542
+ chooseCellM1(row) {
543
+ this.currentRow = row;
544
+ this.showItemView = true;
545
+ },
546
+ openWfDesignDialog(actModelId) {
547
+ //wfType 0:单据流程,1:场景流程
548
+ let serviceId = this.currentRow.serviceName;
549
+ this.wfUrl =
550
+ WEB_PREFIX +
551
+ "/activiti-explorer/modeler.html?wfType=0&serviceId=" +
552
+ serviceId +
553
+ "&modelId=" +
554
+ actModelId;
555
+ this.dialogActiveName = "first";
556
+ this.showWfDialog = true;
557
+ },
558
+ closeDesignwinEvent(done) {
559
+ this.$baseConfirm(
560
+ this.$t1('请确认"已保存"流程模板,是否继续关闭?')
561
+ ).then(() => {
562
+ this.showWfDialog = false;
563
+ // this.showDesingerDialog = false;
564
+ });
565
+ },
566
+ initWfWinParam() {
567
+ this.initCloseWfDesignWin();
568
+ this.initWinUserDialog();
569
+ this.initWinPositionDialog();
570
+ this.initSysParamForWf();
571
+ this.initWinFormTemplateDialog();
572
+ this.initWinScriptDescriptionDialog();
573
+ },
574
+ initCloseWfDesignWin() {
575
+ window.closeWfDesignWin = () => {
576
+ this.showWfDialog = false;
577
+ };
578
+ },
579
+ initWinUserDialog() {
580
+ window.openAssignUserDialog = (opts) => {
581
+ this.wfAssignMulti = opts.multi;
582
+ this.wfAssignData = opts.data || [];
583
+ this.wfAssignCallback = opts.callback;
584
+ this.showUserDialog = true;
585
+ };
586
+ },
587
+ confirmUser(rows) {
588
+ this.wfAssignCallback(rows);
589
+ },
590
+ initWinPositionDialog() {
591
+ window.openAssignPositionDialog = (opts) => {
592
+ this.wfAssignPositionData = opts.data || [];
593
+ this.wfAssignPositionCallback = opts.callback;
594
+ this.showPositionDialog = true;
595
+ };
596
+ },
597
+ initSysParamForWf() {
598
+ let webPrefix = WEB_PREFIX;
599
+ let baseApi = process.env.VUE_APP_BASE_API;
600
+ window.sysParamForWf = {
601
+ webPrefix,
602
+ baseApi,
603
+ };
604
+ },
605
+ confirmPosition(rows) {
606
+ this.wfAssignPositionCallback(rows);
607
+ },
608
+ initWinFormTemplateDialog() {
609
+ window.openAssignFormTemplateDialog = (opts) => {
610
+ this.wfAssignFormTemplateCallback = opts.callback;
611
+ this.showFormTemplateDialog = true;
612
+ };
613
+ },
614
+ confirmFormTemplate(rows) {
615
+ this.wfAssignFormTemplateCallback(rows);
616
+ },
617
+ initWinScriptDescriptionDialog() {
618
+ window.openScriptDescriptionDialog = (opts) => {
619
+ this.showScriptDescriptionDialog = true;
620
+ };
621
+ },
622
+ handleNodeClick(data, node, v) {
623
+ this.handleNodeData(node);
624
+ this.$forceUpdate();
625
+ this.searchEvent();
626
+ },
627
+ // 异步树叶子节点懒加载逻辑
628
+ loadNode(node, resolve) {
629
+ let id = node && node.data && node.data.id ? node.data.id || "" : 0;
630
+ let param = { enabled: true };
631
+ let url = !id
632
+ ? USER_PREFIX + "/menuKind/getAllList"
633
+ : USER_PREFIX + "/menuKind/getChildren";
634
+ this.$http({
635
+ aes: true,
636
+ url: url,
637
+ method: "post",
638
+ data: {
639
+ parent: id,
640
+ enabled: true,
641
+ dataType: 2,
642
+ },
643
+ success: (res) => {
644
+ let rows = res.objx || [];
645
+ rows.forEach((value) => {
646
+ value.leaf = !value.hasChild;
647
+ });
648
+ if (node.level === 0) {
649
+ rows.push({
650
+ id: "other",
651
+ menuKindCode: "other",
652
+ name: "其他分类",
653
+ leaf: true,
654
+ });
655
+ if (rows.length > 0) {
656
+ this.$nextTick(() => {
657
+ let firstNode = node.childNodes[0];
658
+ if (rows[0].hasChild) {
659
+ firstNode.expand();
660
+ }
661
+ this.$refs.tree.setCurrentKey(firstNode.data);
662
+ this.handleNodeClick(firstNode.data, firstNode, this);
663
+ });
664
+ }
665
+ }
666
+ resolve(rows);
667
+ },
668
+ });
669
+ },
670
+ handleNodeData(node) {
671
+ this.currentFormType = node ? node.data : null;
672
+ this.currentNode = node;
673
+ },
674
+ handleFormDesignClose() {
675
+ this.formDesTabs = "first";
676
+ this.showFormScriptList = false;
677
+ },
678
+ openProjectTagDialog3() {
679
+ this.showProjectTagDialog3 = true;
680
+ },
681
+ confirmProjectTagDialog3(rows) {
682
+ this.checkTags = rows;
683
+ },
684
+ getTabNames() {
685
+ return this.checkTags.map((item) => item.tagName).join(",");
686
+ },
687
+ jsonImport() {
688
+ this.$jsonImport({
689
+ saveUrl: USER_PREFIX + "/form_develop/importFormTemplate",
690
+ showResult: true,
691
+ resultColumns: [
692
+ { title: this.$t1("模板名称"), field: "formName", width: 200 },
693
+ { title: this.$t1("模板编码"), field: "formCode", width: 200 },
694
+ {
695
+ title: this.$t1("结果信息"),
696
+ field: "impReturnMsg",
697
+ width: 300,
698
+ showOverflow: false,
699
+ slots: {
700
+ default: ({ row }, h) => {
701
+ let impReturnMsg = row.impReturnMsg;
702
+ let items = impReturnMsg
703
+ .split(";")
704
+ .filter((item) => !!item && !!item.trim())
705
+ .map((item) => {
706
+ return h("p", {}, `${item.trim()};`);
707
+ });
708
+ return h("div", {}, items);
709
+ },
710
+ },
711
+ },
712
+ ],
713
+ callback: () => {
714
+ this.searchEvent();
715
+ },
716
+ });
717
+ },
718
+ jsonExport() {
719
+ this.$jsonExport({
720
+ title: "表单模板",
721
+ targetRef: "table-m1",
722
+ url: USER_PREFIX + "/form_develop/exportFormTemplate",
723
+ abcEnabled: true,
724
+ editAuth: this.currentFormType.editAuth,
725
+ selectTypeAuth: this.currentFormType.selectTypeAuth,
726
+ });
727
+ },
728
+ jsonExportArchive(row) {
729
+ this.$jsonExport({
730
+ title: "表单模板",
731
+ data: [row.id],
732
+ url: USER_PREFIX + "/form_develop/exportFormTemplate",
733
+ plaintext: 1,
734
+ abcEnabled: true,
735
+ editAuth: this.currentFormType.editAuth,
736
+ selectTypeAuth: this.currentFormType.selectTypeAuth,
737
+ });
738
+ },
739
+ getBdEnv() {
740
+ getBdFlag({
741
+ success: (res) => {
742
+ this.isDev = res.objx === 1;
743
+ },
744
+ });
745
+ },
746
+ },
747
+ };
748
+ export default modules;