cloud-web-corejs 1.1.0-dev.5 → 1.1.0-dev.7

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 (52) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/index.vue +1 -1
  3. package/src/components/VabUpload/view.vue +27 -26
  4. package/src/components/excelImport/index.vue +156 -156
  5. package/src/components/jsonImport/index.vue +1 -1
  6. package/src/components/langImport/index.vue +1 -1
  7. package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
  8. package/src/components/mobile/wf/content.vue +110 -67
  9. package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
  10. package/src/components/mobile/wf/selectUserDialog.vue +122 -0
  11. package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
  12. package/src/components/mobile/wf/urgingDialog.vue +26 -3
  13. package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
  14. package/src/components/obsUpload/index.vue +1 -1
  15. package/src/components/xform/form-designer/designer.js +36 -52
  16. package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
  17. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
  18. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +2 -2
  19. package/src/components/xform/form-designer/indexMixin.js +33 -1
  20. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -860
  21. package/src/components/xform/form-designer/toolbar-panel/index.vue +874 -874
  22. package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -0
  23. package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
  24. package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
  25. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +53 -1
  26. package/src/components/xform/form-render/container-item/list-h5-item.vue +154 -27
  27. package/src/components/xform/form-render/indexMixin.js +23 -3
  28. package/src/components/xform/styles/h5.scss +774 -588
  29. package/src/directive/append-to-body/index.js +48 -0
  30. package/src/index.js +4 -0
  31. package/src/layout/components/Sidebar/default.vue +1655 -1655
  32. package/src/router/index.js +48 -48
  33. package/src/utils/assetUrl.js +19 -0
  34. package/src/utils/vab.js +1283 -1279
  35. package/src/views/bd/setting/form_template/edit.vue +378 -356
  36. package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
  37. package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
  38. package/src/views/bd/setting/form_template/list.vue +304 -303
  39. package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
  40. package/src/views/bd/setting/form_template/mixins/list.js +748 -721
  41. package/src/views/user/file_view_ins/list.vue +970 -970
  42. package/src/views/user/form/vform/designer.vue +823 -821
  43. package/src/views/user/home/default.vue +1117 -1117
  44. package/src/views/user/home/index.vue +103 -103
  45. package/src/views/user/notify_message/dialog.vue +139 -139
  46. package/src/views/user/outLink/form_view.vue +202 -202
  47. package/src/views/user/outLink/index.vue +110 -110
  48. package/src/views/user/wf/iframe/index.vue +51 -51
  49. package/src/views/user/wf/iframe/index2.vue +64 -64
  50. package/src/views/user/wf/wf_manage/list2.vue +871 -871
  51. package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -134
  52. package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
@@ -1,280 +1,344 @@
1
- import projectTagView from "@base/components/projectTag/view.vue";
2
- import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
3
- import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
4
- import formOplogTable from "@base/components/formOplog/index.vue";
5
- import { getBdFlag } from "@base/api/user";
6
- import otherAuthDialog from "../otherAuthDialog.vue";
7
-
8
- let modules = {};
9
- modules = {
10
- name: "bd_form_templateEdit",
11
- props: {
12
- _dataId: [String, Number],
13
- currentFormType: Object,
14
- // readonly: Boolean,
15
- otherFlag: Boolean,
16
- extractedObj: {
17
- type: Object,
18
- default: () => null,
19
- },
20
- hData: {
21
- type: Object,
22
- default: () => null,
23
- },
24
- compareHData: Object,
25
- },
26
- components: {
27
- projectTagView,
28
- MenuKindDialog,
29
- preformDialog,
30
- formOplogTable,
31
- otherAuthDialog,
32
- },
33
- data() {
34
- return {
35
- isEdit: false,
36
- tabIndex: "first",
37
- dataId: "",
38
- formTemplate: {
39
- enabled: true,
40
- history: false,
41
- serviceId: "user",
42
- formTypeCode: null,
43
- menuKindName: null,
44
- menuKindCode: null,
45
- serviceName: null,
46
- formTemplateTagDTOs: [],
47
- hasWf: false,
48
- },
49
- oldFormTemplate: {
50
- enabled: true,
51
- history: false,
52
- serviceId: "user",
53
- formTypeCode: null,
54
- menuKindName: null,
55
- menuKindCode: null,
56
- serviceName: null,
57
- formTemplateTagDTOs: [],
58
- hasWf: false,
59
- },
60
- isInited: false,
61
- serviceIds: ["user"],
62
- showMenuKindDialog: false,
63
- isDev: true,
64
- showPreformDialog: false,
65
- menuKindAuth: {
66
- editAuth: 0,
67
- },
68
- sid: null,
69
- showOtherAuthDialog: false,
70
- readonly: false,
71
- isCompare: false,
72
- };
73
- },
74
- created() {
75
- if (this.hData) {
76
- this.readonly = true;
77
- } else {
78
- this.readonly = this.$attrs.readonly || false;
79
- }
80
- if (this.extractedObj?.objx?.id) {
81
- this.dataId = this.extractedObj.obj.id;
82
- } else if (this._dataId) {
83
- this.dataId = this._dataId;
84
- } else {
85
- this.formTemplate.menuKindName = this.currentFormType?.name || null;
86
- this.formTemplate.menuKindCode =
87
- this.currentFormType?.menuKindCode || null;
88
- this.formTemplate.serviceName = this.currentFormType?.serviceName || null;
89
- }
90
- },
91
- mounted() {
92
- this.getBdEnv();
93
- this.getData();
94
- },
95
- methods: {
96
- initData(formData) {
97
- this.isEdit = true;
98
- this.formTemplate = formData || {};
99
- this.getMenuKindAuth(this.formTemplate.menuKindCode);
100
- this.$nextTick(() => {
101
- this.isInited = true;
102
- });
103
- },
104
- getData() {
105
- if (this.extractedObj) {
106
- this.dataId = this.extractedObj.id;
107
- this.initData(this.extractedObj);
108
- //获取操作日志数据
109
- this.$refs["oplogTable"].initData({
110
- param: () => {
111
- return {
112
- logType: "FormTemplate",
113
- logObjCode: this.formTemplate.formCode,
114
- };
115
- },
116
- });
117
- } else if (this.dataId) {
118
- this.$commonHttp({
119
- aes: true,
120
- url: USER_PREFIX + `/formTemplate/get`,
121
- method: `post`,
122
- data: {
123
- id: this.dataId,
124
- },
125
- isLoading: true,
126
- modalStrictly: true,
127
- success: (res) => {
128
- this.initData(res.objx);
129
- //获取操作日志数据
130
- this.$refs["oplogTable"].initData({
131
- param: () => {
132
- return {
133
- logType: "FormTemplate",
134
- logObjCode: this.formTemplate.formCode,
135
- };
136
- },
137
- });
138
- /* this.formTemplate = res.objx || {};
139
- this.getMenuKindAuth(this.formTemplate.menuKindCode);
140
- this.$nextTick(() => {
141
- this.isInited = true;
142
- });
143
- //获取操作日志数据
144
- this.$refs['oplogTable'].initData({
145
- param: () => {
146
- return {
147
- logType: "FormTemplate",
148
- logObjCode: this.formTemplate.formCode
149
- };
150
- }
151
- }); */
152
- },
153
- });
154
- } else if (this.hData) {
155
- this.isEdit = true;
156
- this.formTemplate = this.$baseLodash.cloneDeep(this.hData);
157
- this.dataId = this.hData.id;
158
- this.isInited = true;
159
- this.getMenuKindAuth(this.formTemplate.menuKindCode);
160
- if (this.compareHData && this.$attrs.isCompare) {
161
- this.oldFormTemplate = this.$baseLodash.cloneDeep(this.compareHData);
162
- this.isCompare = true;
163
- }
164
- } else {
165
- this.getMenuKindAuth(this.formTemplate.menuKindCode);
166
- this.isInited = true;
167
- }
168
- },
169
- saveData() {
170
- this.$refs.editForm.$baseValidate((valid) => {
171
- if (valid) {
172
- this.openPreformDialog();
173
- }
174
- });
175
- },
176
- saveDataHandle(preformData) {
177
- var url =
178
- USER_PREFIX +
179
- (this.isEdit ? `/formTemplate/update` : `/formTemplate/save`);
180
- let formData = {
181
- ...this.formTemplate,
182
- logContent: preformData.logContent,
183
- };
184
- this.$http({
185
- aes: true,
186
- url: url,
187
- method: `post`,
188
- data: formData,
189
- isLoading: true,
190
- success: (res) => {
191
- this.$message({
192
- message: res.content,
193
- type: "success",
194
- duration: 500,
195
- onClose: (t) => {
196
- if (this.isEdit) {
197
- this.$baseReload();
198
- } else {
199
- this.$baseReload({
200
- updateParam: {
201
- _dataId: res.objx.id || this.formTemplate.id,
202
- },
203
- });
204
- }
205
- },
206
- });
207
- },
208
- });
209
- },
210
- openPreformDialog() {
211
- this.showPreformDialog = true;
212
- },
213
- confirmPreformDialog(preformData) {
214
- this.saveDataHandle(preformData);
215
- },
216
- confirmInsertMenuKind(rows) {
217
- if (rows.length > 0) {
218
- let row = rows[0];
219
- this.$set(this.formTemplate, "menuKindCode", row.menuKindCode);
220
- this.$set(this.formTemplate, "menuKindName", row.name);
221
- }
222
- },
223
- getBdEnv() {
224
- getBdFlag({
225
- success: (res) => {
226
- this.isDev = res.objx === 1;
227
- },
228
- });
229
- },
230
- openDesignDialog() {
231
- let readonly = this.readonly || !this.menuKindAuth.editAuth;
232
- this.$emit("openDesignDialog", {
233
- row: this.formTemplate,
234
- readonly,
235
- callback: () => {
236
- this.$baseReload();
237
- },
238
- });
239
- },
240
- getMenuKindAuth(menuKindCode) {
241
- if (this.otherFlag) {
242
- this.getOtherMenuKindAuth();
243
- } else if (menuKindCode) {
244
- this.$http({
245
- // aes: true,
246
- url: USER_PREFIX + "/menu_kind_auth/getAuth",
247
- method: `post`,
248
- data: { stringOne: menuKindCode },
249
- isLoading: true,
250
- success: (res) => {
251
- this.menuKindAuth = res.objx || {};
252
- },
253
- });
254
- }
255
- },
256
-
257
- getOtherMenuKindAuth() {
258
- if (this.otherFlag && this.formTemplate.sid) {
259
- this.$http({
260
- aes: true,
261
- url: USER_PREFIX + "/form_template_auth/getAuth",
262
- method: `post`,
263
- data: { stringOne: this.formTemplate.sid },
264
- isLoading: true,
265
- success: (res) => {
266
- this.menuKindAuth = res.objx || {};
267
- },
268
- });
269
- }
270
- },
271
- openOtherAuthDialog() {
272
- this.sid = this.formTemplate.sid;
273
- this.showOtherAuthDialog = true;
274
- },
275
- confirmOtherAuthDialog() {
276
- this.$baseReload();
277
- },
278
- },
279
- };
280
- export default modules;
1
+ import projectTagView from "@base/components/projectTag/view.vue";
2
+ import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
3
+ import preformDialog from "@base/views/bd/setting/form_template/preformDialog.vue";
4
+ import formOplogTable from "@base/components/formOplog/index.vue";
5
+ import { getBdFlag } from "@base/api/user";
6
+ import otherAuthDialog from "../otherAuthDialog.vue";
7
+ import {
8
+ H5_FORM_CODE_PREFIX,
9
+ TEMPLATE_TYPE_PC,
10
+ applyTemplateTypeToFormCode,
11
+ getTemplateTypeByFormCode,
12
+ isH5FormTemplate,
13
+ stripH5Prefix,
14
+ } from "../formTemplateType.js";
15
+
16
+ let modules = {};
17
+ modules = {
18
+ name: "bd_form_templateEdit",
19
+ props: {
20
+ _dataId: [String, Number],
21
+ currentFormType: Object,
22
+ // readonly: Boolean,
23
+ otherFlag: Boolean,
24
+ extractedObj: {
25
+ type: Object,
26
+ default: () => null,
27
+ },
28
+ hData: {
29
+ type: Object,
30
+ default: () => null,
31
+ },
32
+ compareHData: Object,
33
+ },
34
+ components: {
35
+ projectTagView,
36
+ MenuKindDialog,
37
+ preformDialog,
38
+ formOplogTable,
39
+ otherAuthDialog,
40
+ },
41
+ data() {
42
+ return {
43
+ isEdit: false,
44
+ /* 模板类型不是数据库字段,只在新增时维护,不能挂到 formTemplate 上(保存会整体提交) */
45
+ templateType: TEMPLATE_TYPE_PC,
46
+ tabIndex: "first",
47
+ dataId: "",
48
+ formTemplate: {
49
+ enabled: true,
50
+ history: false,
51
+ serviceId: "user",
52
+ formTypeCode: null,
53
+ menuKindName: null,
54
+ menuKindCode: null,
55
+ serviceName: null,
56
+ formTemplateTagDTOs: [],
57
+ hasWf: false,
58
+ },
59
+ oldFormTemplate: {
60
+ enabled: true,
61
+ history: false,
62
+ serviceId: "user",
63
+ formTypeCode: null,
64
+ menuKindName: null,
65
+ menuKindCode: null,
66
+ serviceName: null,
67
+ formTemplateTagDTOs: [],
68
+ hasWf: false,
69
+ },
70
+ isInited: false,
71
+ serviceIds: ["user"],
72
+ showMenuKindDialog: false,
73
+ isDev: true,
74
+ showPreformDialog: false,
75
+ menuKindAuth: {
76
+ editAuth: 0,
77
+ },
78
+ sid: null,
79
+ showOtherAuthDialog: false,
80
+ readonly: false,
81
+ isCompare: false,
82
+ };
83
+ },
84
+ computed: {
85
+ h5FormCodePrefix() {
86
+ return H5_FORM_CODE_PREFIX;
87
+ },
88
+ isH5Template() {
89
+ return isH5FormTemplate(this.formTemplate.formCode);
90
+ },
91
+ templateTypeText() {
92
+ return this.isH5Template ? this.$t1("移动端") : this.$t1("PC端");
93
+ },
94
+ /* 移动端模板编码带固定前缀,输入框里只让用户维护前缀之后的部分 */
95
+ formCodeInput: {
96
+ get() {
97
+ return stripH5Prefix(this.formTemplate.formCode);
98
+ },
99
+ set(val) {
100
+ this.$set(
101
+ this.formTemplate,
102
+ "formCode",
103
+ applyTemplateTypeToFormCode(val, this.templateType)
104
+ );
105
+ },
106
+ },
107
+ formCodeRules() {
108
+ return [
109
+ {
110
+ required: true,
111
+ trigger: "blur",
112
+ validator: (rule, value, callback) => {
113
+ /* 带前缀时 value 恒非空,必须校验前缀之后的主体 */
114
+ if (!stripH5Prefix(value)) {
115
+ callback(new Error(this.$t1("模板编码不能为空")));
116
+ } else {
117
+ callback();
118
+ }
119
+ },
120
+ },
121
+ ];
122
+ },
123
+ },
124
+ watch: {
125
+ templateType(val) {
126
+ if (this.formTemplate.id) {
127
+ return;
128
+ }
129
+ this.$set(
130
+ this.formTemplate,
131
+ "formCode",
132
+ applyTemplateTypeToFormCode(this.formTemplate.formCode, val)
133
+ );
134
+ },
135
+ },
136
+ created() {
137
+ if (this.hData) {
138
+ this.readonly = true;
139
+ } else {
140
+ this.readonly = this.$attrs.readonly || false;
141
+ }
142
+ if (this.extractedObj?.objx?.id) {
143
+ this.dataId = this.extractedObj.obj.id;
144
+ } else if (this._dataId) {
145
+ this.dataId = this._dataId;
146
+ } else {
147
+ this.formTemplate.menuKindName = this.currentFormType?.name || null;
148
+ this.formTemplate.menuKindCode =
149
+ this.currentFormType?.menuKindCode || null;
150
+ this.formTemplate.serviceName = this.currentFormType?.serviceName || null;
151
+ }
152
+ },
153
+ mounted() {
154
+ this.getBdEnv();
155
+ this.getData();
156
+ },
157
+ methods: {
158
+ initData(formData) {
159
+ this.isEdit = true;
160
+ this.formTemplate = formData || {};
161
+ this.templateType = getTemplateTypeByFormCode(this.formTemplate.formCode);
162
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
163
+ this.$nextTick(() => {
164
+ this.isInited = true;
165
+ });
166
+ },
167
+ getData() {
168
+ if (this.extractedObj) {
169
+ this.dataId = this.extractedObj.id;
170
+ this.initData(this.extractedObj);
171
+ //获取操作日志数据
172
+ this.$refs["oplogTable"].initData({
173
+ param: () => {
174
+ return {
175
+ logType: "FormTemplate",
176
+ logObjCode: this.formTemplate.formCode,
177
+ };
178
+ },
179
+ });
180
+ } else if (this.dataId) {
181
+ this.$commonHttp({
182
+ aes: true,
183
+ url: USER_PREFIX + `/formTemplate/get`,
184
+ method: `post`,
185
+ data: {
186
+ id: this.dataId,
187
+ },
188
+ isLoading: true,
189
+ modalStrictly: true,
190
+ success: (res) => {
191
+ this.initData(res.objx);
192
+ //获取操作日志数据
193
+ this.$refs["oplogTable"].initData({
194
+ param: () => {
195
+ return {
196
+ logType: "FormTemplate",
197
+ logObjCode: this.formTemplate.formCode,
198
+ };
199
+ },
200
+ });
201
+ /* this.formTemplate = res.objx || {};
202
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
203
+ this.$nextTick(() => {
204
+ this.isInited = true;
205
+ });
206
+ //获取操作日志数据
207
+ this.$refs['oplogTable'].initData({
208
+ param: () => {
209
+ return {
210
+ logType: "FormTemplate",
211
+ logObjCode: this.formTemplate.formCode
212
+ };
213
+ }
214
+ }); */
215
+ },
216
+ });
217
+ } else if (this.hData) {
218
+ this.isEdit = true;
219
+ this.formTemplate = this.$baseLodash.cloneDeep(this.hData);
220
+ this.templateType = getTemplateTypeByFormCode(this.formTemplate.formCode);
221
+ this.dataId = this.hData.id;
222
+ this.isInited = true;
223
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
224
+ if (this.compareHData && this.$attrs.isCompare) {
225
+ this.oldFormTemplate = this.$baseLodash.cloneDeep(this.compareHData);
226
+ this.isCompare = true;
227
+ }
228
+ } else {
229
+ this.getMenuKindAuth(this.formTemplate.menuKindCode);
230
+ this.isInited = true;
231
+ }
232
+ },
233
+ saveData() {
234
+ this.$refs.editForm.$baseValidate((valid) => {
235
+ if (valid) {
236
+ this.openPreformDialog();
237
+ }
238
+ });
239
+ },
240
+ saveDataHandle(preformData) {
241
+ var url =
242
+ USER_PREFIX +
243
+ (this.isEdit ? `/formTemplate/update` : `/formTemplate/save`);
244
+ let formData = {
245
+ ...this.formTemplate,
246
+ logContent: preformData.logContent,
247
+ };
248
+ this.$http({
249
+ aes: true,
250
+ url: url,
251
+ method: `post`,
252
+ data: formData,
253
+ isLoading: true,
254
+ success: (res) => {
255
+ this.$message({
256
+ message: res.content,
257
+ type: "success",
258
+ duration: 500,
259
+ onClose: (t) => {
260
+ if (this.isEdit) {
261
+ this.$baseReload();
262
+ } else {
263
+ this.$baseReload({
264
+ updateParam: {
265
+ _dataId: res.objx.id || this.formTemplate.id,
266
+ },
267
+ });
268
+ }
269
+ },
270
+ });
271
+ },
272
+ });
273
+ },
274
+ openPreformDialog() {
275
+ this.showPreformDialog = true;
276
+ },
277
+ confirmPreformDialog(preformData) {
278
+ this.saveDataHandle(preformData);
279
+ },
280
+ confirmInsertMenuKind(rows) {
281
+ if (rows.length > 0) {
282
+ let row = rows[0];
283
+ this.$set(this.formTemplate, "menuKindCode", row.menuKindCode);
284
+ this.$set(this.formTemplate, "menuKindName", row.name);
285
+ }
286
+ },
287
+ getBdEnv() {
288
+ getBdFlag({
289
+ success: (res) => {
290
+ this.isDev = res.objx === 1;
291
+ },
292
+ });
293
+ },
294
+ openDesignDialog() {
295
+ let readonly = this.readonly || !this.menuKindAuth.editAuth;
296
+ this.$emit("openDesignDialog", {
297
+ row: this.formTemplate,
298
+ readonly,
299
+ callback: () => {
300
+ this.$baseReload();
301
+ },
302
+ });
303
+ },
304
+ getMenuKindAuth(menuKindCode) {
305
+ if (this.otherFlag) {
306
+ this.getOtherMenuKindAuth();
307
+ } else if (menuKindCode) {
308
+ this.$http({
309
+ // aes: true,
310
+ url: USER_PREFIX + "/menu_kind_auth/getAuth",
311
+ method: `post`,
312
+ data: { stringOne: menuKindCode },
313
+ isLoading: true,
314
+ success: (res) => {
315
+ this.menuKindAuth = res.objx || {};
316
+ },
317
+ });
318
+ }
319
+ },
320
+
321
+ getOtherMenuKindAuth() {
322
+ if (this.otherFlag && this.formTemplate.sid) {
323
+ this.$http({
324
+ aes: true,
325
+ url: USER_PREFIX + "/form_template_auth/getAuth",
326
+ method: `post`,
327
+ data: { stringOne: this.formTemplate.sid },
328
+ isLoading: true,
329
+ success: (res) => {
330
+ this.menuKindAuth = res.objx || {};
331
+ },
332
+ });
333
+ }
334
+ },
335
+ openOtherAuthDialog() {
336
+ this.sid = this.formTemplate.sid;
337
+ this.showOtherAuthDialog = true;
338
+ },
339
+ confirmOtherAuthDialog() {
340
+ this.$baseReload();
341
+ },
342
+ },
343
+ };
344
+ export default modules;