cloud-web-corejs 1.0.249 → 1.0.251

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 (60) hide show
  1. package/package.json +1 -1
  2. package/src/components/xform/form-designer/designer.js +1 -0
  3. package/src/components/xform/form-designer/setting-panel/form-setting.vue +3 -0
  4. package/src/components/xform/utils/util.js +1 -0
  5. package/src/views/bd/setting/formVersion/button.vue +55 -0
  6. package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
  7. package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
  8. package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
  9. package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
  10. package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
  11. package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
  12. package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
  13. package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
  14. package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
  15. package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +491 -0
  16. package/src/views/bd/setting/formVersion/link.vue +58 -0
  17. package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
  18. package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
  19. package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
  20. package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
  21. package/src/views/bd/setting/formVersion/textDiff.js +102 -0
  22. package/src/views/bd/setting/form_import_log/edit.vue +6 -3
  23. package/src/views/bd/setting/form_import_log/list.vue +5 -0
  24. package/src/views/bd/setting/form_script/edit.vue +196 -83
  25. package/src/views/bd/setting/form_script/edit1.vue +410 -220
  26. package/src/views/bd/setting/form_script/form_list.vue +19 -0
  27. package/src/views/bd/setting/form_script/list.vue +95 -21
  28. package/src/views/bd/setting/form_script/list1.vue +24 -0
  29. package/src/views/bd/setting/form_script/mixins/dialog.js +2 -2
  30. package/src/views/bd/setting/form_script/mixins/edit.js +265 -207
  31. package/src/views/bd/setting/form_script/mixins/edit1.js +259 -201
  32. package/src/views/bd/setting/form_script/mixins/form_list.js +322 -296
  33. package/src/views/bd/setting/form_script/mixins/list.js +163 -95
  34. package/src/views/bd/setting/form_script/mixins/list1.js +244 -155
  35. package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +1 -1
  36. package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +1 -1
  37. package/src/views/bd/setting/form_template/edit.vue +355 -205
  38. package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
  39. package/src/views/bd/setting/form_template/list.vue +49 -74
  40. package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +3 -3
  41. package/src/views/bd/setting/form_template/mixins/edit.js +51 -8
  42. package/src/views/bd/setting/form_template/mixins/itemList.js +1 -1
  43. package/src/views/bd/setting/form_template/mixins/list.js +114 -82
  44. package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
  45. package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +1 -1
  46. package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -7
  47. package/src/views/bd/setting/form_template/wf_list.vue +161 -127
  48. package/src/views/bd/setting/request_setting/list.vue +15 -25
  49. package/src/views/bd/setting/table_model/edit.vue +702 -498
  50. package/src/views/bd/setting/table_model/list.vue +28 -0
  51. package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
  52. package/src/views/bd/setting/table_model/mixins/edit.js +228 -121
  53. package/src/views/bd/setting/table_model/mixins/list.js +55 -20
  54. package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -1
  55. package/src/views/bd/setting/table_model/mixins/zdDialog.js +50 -46
  56. package/src/views/bd/setting/utils/index.js +15 -0
  57. package/src/views/user/form/vform/designer.vue +303 -287
  58. package/src/views/user/form/vform/formFieldMapping.js +2 -3
  59. package/src/views/user/form/vform/render.vue +8 -0
  60. package/src/views/user/form/view/list.vue +5 -1
@@ -1,207 +1,265 @@
1
- import formOplogTable from "@base/components/formOplog/index.vue";
2
- import preformDialog from "@base/views/bd/setting/form_script/preformDialog.vue";
3
- import projectTagView from "@base/components/projectTag/view.vue";
4
- import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
5
- import {getBdFlag} from "@base/api/user";
6
- import otherAuthDialog from "../otherAuthDialog.vue";
7
-
8
- let modules = {};
9
- modules = {
10
- name: 'user_form_scriptEdit',
11
- props: {
12
- _dataId: [String, Number],
13
- formCode: String,
14
- formTemplate: Object,
15
- currentFormType: Object,
16
- readonly: Boolean,
17
- otherFlag:Boolean,
18
- scriptType: {
19
- type: Number,
20
- default: 0
21
- },
22
- },
23
- components: {formOplogTable, preformDialog, projectTagView, MenuKindDialog,otherAuthDialog},
24
- data() {
25
- return {
26
- isEdit: false,
27
- tabIndex: 'first',
28
- dataId: '',
29
- formScript: {
30
- scriptType: 0,
31
- enabled: true,
32
- formCode: null,
33
- menuKindCode: null,
34
- menuKindName: null,
35
- serviceName: null,
36
- transactions: 1,
37
- formScriptTagDTOs: []
38
- },
39
- showCodeEditor: false,
40
- showMenuKindDialog: false,
41
- isDev: true,
42
- showPreformDialog: false,
43
- menuKindAuth: {
44
- editAuth: 0
45
- },
46
- sid: null,
47
- showOtherAuthDialog:false
48
- };
49
- },
50
- created() {
51
- if (this._dataId && !isNaN(this._dataId)) {
52
- this.dataId = this._dataId;
53
- } else {
54
- if (this.formTemplate) {
55
- this.formScript.scriptType = 1;
56
- this.formScript.formCode = this.formTemplate.formCode;
57
- this.formScript.menuKindCode = this.formTemplate.menuKindCode;
58
- this.formScript.menuKindName = this.formTemplate.menuKindName;
59
- this.formScript.serviceName = this.formTemplate.serviceName;
60
- } else {
61
- this.formScript.scriptType = this.scriptType;
62
- this.formScript.formCode = 'intf';
63
- this.formScript.menuKindName = this.currentFormType?.name || null;
64
- this.formScript.menuKindCode = this.currentFormType?.menuKindCode || null;
65
- this.formScript.serviceName = this.currentFormType?.serviceName || null;
66
- }
67
-
68
- }
69
- },
70
- mounted() {
71
- this.getBdEnv();
72
- this.getData();
73
- },
74
- methods: {
75
- getData() {
76
- if (this.dataId && !isNaN(this.dataId)) {
77
- this.isEdit = true;
78
- this.$commonHttp({
79
- aes: true,
80
- url: USER_PREFIX + `/formScript/get`,
81
- method: `post`,
82
- data: {
83
- id: this.dataId
84
- },
85
- isLoading: true,
86
- modalStrictly: true,
87
- success: res => {
88
- this.formScript = res.objx || {};
89
- this.showCodeEditor = true;
90
- this.getMenuKindAuth(this.formScript.menuKindCode);
91
- //获取操作日志数据
92
- this.$refs['oplogTable'].initData({
93
- param: () => {
94
- return {
95
- logType: "FormScript",
96
- logObjCode: this.formScript.sid
97
- };
98
- }
99
- });
100
- }
101
- });
102
- } else {
103
- this.getMenuKindAuth(this.formScript.menuKindCode);
104
- this.showCodeEditor = true;
105
- }
106
- },
107
- saveData() {
108
- this.$refs.editForm.$baseValidate(valid => {
109
- if (valid) {
110
- this.openPreformDialog();
111
- }
112
- });
113
- },
114
- saveDataHandle(preformData) {
115
- var url = USER_PREFIX + (this.isEdit ? `/formScript/update` : `/formScript/save`);
116
- let formData = {
117
- ...this.formScript,
118
- logContent: preformData.logContent,
119
- transactions: preformData.transactions
120
- };
121
- this.$http({
122
- aes: true,
123
- url: url,
124
- method: `post`,
125
- data: formData,
126
- isLoading: true,
127
- success: res => {
128
- this.$message({
129
- message: res.content,
130
- type: 'success',
131
- duration: 500,
132
- onClose: t => {
133
- if (this.isEdit) {
134
- this.$baseReload();
135
- } else {
136
- this.$baseReload({
137
- updateParam: {
138
- _dataId: res.objx
139
- }
140
- });
141
- }
142
- }
143
- });
144
- }
145
- });
146
- },
147
- openPreformDialog() {
148
- this.showPreformDialog = true;
149
- },
150
- confirmPreformDialog(preformData) {
151
- this.saveDataHandle(preformData);
152
- },
153
- confirmInsertMenuKind(rows) {
154
- if (rows.length > 0) {
155
- let row = rows[0];
156
- this.$set(this.formScript, 'menuKindCode', row.menuKindCode);
157
- this.$set(this.formScript, 'menuKindName', row.name);
158
- }
159
- },
160
- getBdEnv() {
161
- getBdFlag({
162
- success: res => {
163
- this.isDev = res.objx == 1
164
- }
165
- });
166
- },
167
- getMenuKindAuth(menuKindCode) {
168
- if(this.otherFlag){
169
- this.getOtherMenuKindAuth();
170
- }else if (menuKindCode) {
171
- this.$http({
172
- aes: true,
173
- url: USER_PREFIX + '/menu_kind_auth/getAuth',
174
- method: `post`,
175
- data: {stringOne: menuKindCode},
176
- isLoading: true,
177
- success: res => {
178
- this.menuKindAuth = res.objx || {}
179
- }
180
- });
181
- }
182
- },
183
-
184
- getOtherMenuKindAuth() {
185
- if (this.otherFlag && this.formScript.sid) {
186
- this.$http({
187
- aes: true,
188
- url: USER_PREFIX + "/form_script_auth/getAuth",
189
- method: `post`,
190
- data: {stringOne: this.formScript.sid},
191
- isLoading: true,
192
- success: (res) => {
193
- this.menuKindAuth = res.objx || {};
194
- },
195
- });
196
- }
197
- },
198
- openOtherAuthDialog(){
199
- this.sid = this.formScript.sid
200
- this.showOtherAuthDialog = true
201
- },
202
- confirmOtherAuthDialog(){
203
- this.$baseReload()
204
- },
205
- }
206
- };
207
- export default modules
1
+ import formOplogTable from "@base/components/formOplog/index.vue";
2
+ import preformDialog from "@base/views/bd/setting/form_script/preformDialog.vue";
3
+ import projectTagView from "@base/components/projectTag/view.vue";
4
+ import MenuKindDialog from "@base/views/bd/setting/menu_kind/dialog.vue";
5
+ import { getBdFlag } from "@base/api/user";
6
+ import otherAuthDialog from "../otherAuthDialog.vue";
7
+
8
+ let modules = {};
9
+ modules = {
10
+ name: "user_form_scriptEdit",
11
+ props: {
12
+ _dataId: [String, Number],
13
+ formCode: String,
14
+ formTemplate: Object,
15
+ currentFormType: Object,
16
+ // readonly: Boolean,
17
+ otherFlag: Boolean,
18
+ scriptType: {
19
+ type: Number,
20
+ default: 0,
21
+ },
22
+ hData: Object,
23
+ compareHData: Object,
24
+ extractedObj: Object,
25
+ },
26
+ components: {
27
+ formOplogTable,
28
+ preformDialog,
29
+ projectTagView,
30
+ MenuKindDialog,
31
+ otherAuthDialog,
32
+ },
33
+ data() {
34
+ return {
35
+ isEdit: false,
36
+ tabIndex: "first",
37
+ dataId: "",
38
+ formScript: {
39
+ scriptType: 0,
40
+ enabled: true,
41
+ formCode: null,
42
+ menuKindCode: null,
43
+ menuKindName: null,
44
+ serviceName: null,
45
+ transactions: 1,
46
+ formScriptTagDTOs: [],
47
+ },
48
+ oldFormScript: {
49
+ scriptType: 0,
50
+ enabled: true,
51
+ formCode: null,
52
+ menuKindCode: null,
53
+ menuKindName: null,
54
+ serviceName: null,
55
+ transactions: 1,
56
+ formScriptTagDTOs: [],
57
+ },
58
+ showCodeEditor: false,
59
+ showMenuKindDialog: false,
60
+ isDev: true,
61
+ showPreformDialog: false,
62
+ menuKindAuth: {
63
+ editAuth: 0,
64
+ },
65
+ sid: null,
66
+ showOtherAuthDialog: false,
67
+ readonly: false,
68
+ isCompare: false,
69
+ };
70
+ },
71
+ created() {
72
+ if (this.hData) {
73
+ this.readonly = true;
74
+ } else {
75
+ this.readonly = this.$attrs.readonly || false;
76
+ }
77
+ if (this._dataId && !isNaN(this._dataId)) {
78
+ this.dataId = this._dataId;
79
+ } else {
80
+ if (this.formTemplate) {
81
+ this.formScript.scriptType = 1;
82
+ this.formScript.formCode = this.formTemplate.formCode;
83
+ this.formScript.menuKindCode = this.formTemplate.menuKindCode;
84
+ this.formScript.menuKindName = this.formTemplate.menuKindName;
85
+ this.formScript.serviceName = this.formTemplate.serviceName;
86
+ } else {
87
+ this.formScript.scriptType = this.scriptType;
88
+ this.formScript.formCode = "intf";
89
+ this.formScript.menuKindName = this.currentFormType?.name || null;
90
+ this.formScript.menuKindCode =
91
+ this.currentFormType?.menuKindCode || null;
92
+ this.formScript.serviceName = this.currentFormType?.serviceName || null;
93
+ }
94
+ }
95
+ },
96
+ mounted() {
97
+ this.getBdEnv();
98
+ this.getData();
99
+ },
100
+ methods: {
101
+ initData(formData){
102
+ if(!!formData?.id)this.isEdit = true;
103
+ this.formScript = formData || {};
104
+ this.showCodeEditor = true;
105
+ this.getMenuKindAuth(this.formScript.menuKindCode);
106
+ },
107
+ getData() {
108
+ if(this.extractedObj){
109
+ this.dataId = this.extractedObj.id;
110
+ this.initData(this.extractedObj)
111
+ //获取操作日志数据
112
+ this.$refs["oplogTable"].initData({
113
+ param: () => {
114
+ return {
115
+ logType: "FormScript",
116
+ logObjCode: this.formScript.sid,
117
+ };
118
+ },
119
+ });
120
+ }else if (this.dataId && !isNaN(this.dataId)) {
121
+ this.isEdit = true;
122
+ this.$commonHttp({
123
+ aes: true,
124
+ url: USER_PREFIX + `/formScript/get`,
125
+ method: `post`,
126
+ data: {
127
+ id: this.dataId,
128
+ },
129
+ isLoading: true,
130
+ modalStrictly: true,
131
+ success: (res) => {
132
+ // this.formScript = res.objx || {};
133
+ // this.showCodeEditor = true;
134
+ // this.getMenuKindAuth(this.formScript.menuKindCode);
135
+ this.initData(res.objx)
136
+ //获取操作日志数据
137
+ this.$refs["oplogTable"].initData({
138
+ param: () => {
139
+ return {
140
+ logType: "FormScript",
141
+ logObjCode: this.formScript.sid,
142
+ };
143
+ },
144
+ });
145
+ },
146
+ });
147
+ } else if (this.hData) {
148
+ this.dataId = this.hData.id;
149
+ /* this.isEdit = true;
150
+ this.formScript = this.$baseLodash.cloneDeep(this.hData);
151
+ this.getMenuKindAuth(this.formScript.menuKindCode);
152
+ this.showCodeEditor = true; */
153
+ this.initData(this.$baseLodash.cloneDeep(this.hData))
154
+
155
+ if (this.compareHData && this.$attrs.isCompare) {
156
+ this.oldFormScript = this.$baseLodash.cloneDeep(this.compareHData);
157
+ this.isCompare = true;
158
+ }
159
+ } else {
160
+ this.getMenuKindAuth(this.formScript.menuKindCode);
161
+ this.showCodeEditor = true;
162
+ }
163
+ },
164
+ saveData() {
165
+ this.$refs.editForm.$baseValidate((valid) => {
166
+ if (valid) {
167
+ this.openPreformDialog();
168
+ }
169
+ });
170
+ },
171
+ saveDataHandle(preformData) {
172
+ var url =
173
+ USER_PREFIX + (this.isEdit ? `/formScript/update` : `/formScript/save`);
174
+ let formData = {
175
+ ...this.formScript,
176
+ logContent: preformData.logContent,
177
+ transactions: preformData.transactions,
178
+ };
179
+ this.$http({
180
+ aes: true,
181
+ url: url,
182
+ method: `post`,
183
+ data: formData,
184
+ isLoading: true,
185
+ success: (res) => {
186
+ this.$message({
187
+ message: res.content,
188
+ type: "success",
189
+ duration: 500,
190
+ onClose: (t) => {
191
+ if (this.isEdit) {
192
+ this.$baseReload();
193
+ } else {
194
+ this.$baseReload({
195
+ updateParam: {
196
+ _dataId: res.objx,
197
+ },
198
+ });
199
+ }
200
+ },
201
+ });
202
+ },
203
+ });
204
+ },
205
+ openPreformDialog() {
206
+ this.showPreformDialog = true;
207
+ },
208
+ confirmPreformDialog(preformData) {
209
+ this.saveDataHandle(preformData);
210
+ },
211
+ confirmInsertMenuKind(rows) {
212
+ if (rows.length > 0) {
213
+ let row = rows[0];
214
+ this.$set(this.formScript, "menuKindCode", row.menuKindCode);
215
+ this.$set(this.formScript, "menuKindName", row.name);
216
+ }
217
+ },
218
+ getBdEnv() {
219
+ getBdFlag({
220
+ success: (res) => {
221
+ this.isDev = res.objx === 1;
222
+ },
223
+ });
224
+ },
225
+ getMenuKindAuth(menuKindCode) {
226
+ if (this.otherFlag) {
227
+ this.getOtherMenuKindAuth();
228
+ } else if (menuKindCode) {
229
+ this.$http({
230
+ aes: true,
231
+ url: USER_PREFIX + "/menu_kind_auth/getAuth",
232
+ method: `post`,
233
+ data: { stringOne: menuKindCode },
234
+ isLoading: true,
235
+ success: (res) => {
236
+ this.menuKindAuth = res.objx || {};
237
+ },
238
+ });
239
+ }
240
+ },
241
+
242
+ getOtherMenuKindAuth() {
243
+ if (this.otherFlag && this.formScript.sid) {
244
+ this.$http({
245
+ aes: true,
246
+ url: USER_PREFIX + "/form_script_auth/getAuth",
247
+ method: `post`,
248
+ data: { stringOne: this.formScript.sid },
249
+ isLoading: true,
250
+ success: (res) => {
251
+ this.menuKindAuth = res.objx || {};
252
+ },
253
+ });
254
+ }
255
+ },
256
+ openOtherAuthDialog() {
257
+ this.sid = this.formScript.sid;
258
+ this.showOtherAuthDialog = true;
259
+ },
260
+ confirmOtherAuthDialog() {
261
+ this.$baseReload();
262
+ },
263
+ },
264
+ };
265
+ export default modules;