cloud-web-corejs 1.0.54-dev.657 → 1.0.54-dev.659
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.
- package/package.json +1 -1
- package/src/components/code-editor/index.vue +31 -2
- package/src/views/bd/setting/formVersion/compareBasicSection.vue +120 -0
- package/src/views/bd/setting/formVersion/compareCodeSection.vue +518 -0
- package/src/views/bd/setting/formVersion/compareContMixin.scss +55 -0
- package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
- package/src/views/bd/setting/formVersion/compareDialog.vue +30 -229
- package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
- package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
- package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
- package/src/views/bd/setting/formVersion/preformDialog.vue +5 -4
- package/src/views/bd/setting/formVersion/tableDetailDiff.js +78 -0
- package/src/views/bd/setting/formVersion/tableModelCompareView.vue +440 -0
- package/src/views/bd/setting/formVersion/textDiff.js +102 -0
- package/src/views/bd/setting/form_script/edit1.vue +4 -4
- package/src/views/bd/setting/form_script/mixins/dialog.js +2 -2
- package/src/views/bd/setting/form_script/mixins/edit.js +1 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +1 -1
- package/src/views/bd/setting/form_script/mixins/form_list.js +3 -3
- package/src/views/bd/setting/form_script/mixins/list.js +3 -3
- package/src/views/bd/setting/form_script/mixins/list1.js +4 -4
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +1 -1
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +1 -1
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +3 -3
- package/src/views/bd/setting/form_template/mixins/edit.js +1 -1
- package/src/views/bd/setting/form_template/mixins/itemList.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +4 -4
- package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -3
- package/src/views/bd/setting/request_setting/list.vue +15 -25
- package/src/views/bd/setting/table_model/edit.vue +1 -1
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/list.js +6 -6
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -1
- package/src/views/user/form/view/list.vue +29 -12
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@mixin compare-cont-shell {
|
|
2
|
+
position: relative;
|
|
3
|
+
margin: 12px 16px;
|
|
4
|
+
padding: 12px 16px 16px;
|
|
5
|
+
background: #fff;
|
|
6
|
+
border-radius: 4px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin compare-cont-title {
|
|
10
|
+
.title {
|
|
11
|
+
margin-bottom: 12px;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
color: #303133;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin compare-cont-full-link {
|
|
18
|
+
.is-full {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 12px;
|
|
21
|
+
right: 16px;
|
|
22
|
+
font-size: 16px;
|
|
23
|
+
color: #409eff;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin compare-version-label {
|
|
28
|
+
.version-blue,
|
|
29
|
+
.version-green {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
margin-bottom: 8px;
|
|
32
|
+
font-size: 13px;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.version-blue {
|
|
37
|
+
color: #409eff;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.version-green {
|
|
41
|
+
color: #67c23a;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@mixin compare-flex-row {
|
|
46
|
+
.flex {
|
|
47
|
+
display: flex;
|
|
48
|
+
gap: 12px;
|
|
49
|
+
|
|
50
|
+
.flex-1 {
|
|
51
|
+
flex: 1;
|
|
52
|
+
min-width: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<component
|
|
4
|
+
v-if="type"
|
|
5
|
+
:is="type"
|
|
6
|
+
:objType="objType"
|
|
7
|
+
:objCode="objCode"
|
|
8
|
+
:compareHData1="compareHData1"
|
|
9
|
+
:compareHData2="compareHData2"
|
|
10
|
+
:preVersion="preVersion"
|
|
11
|
+
:curVersion="curVersion"
|
|
12
|
+
@reverCallback="$emit('reverCallback')"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
import formTemplateCompareView from "./formTemplateCompareView.vue";
|
|
18
|
+
import formScriptCompareView from "./formScriptCompareView.vue";
|
|
19
|
+
import tableModelCompareView from "./tableModelCompareView.vue";
|
|
20
|
+
export default {
|
|
21
|
+
name: "compareContent",
|
|
22
|
+
components: {
|
|
23
|
+
formTemplateCompareView,
|
|
24
|
+
formScriptCompareView,
|
|
25
|
+
tableModelCompareView,
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
objType: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "",
|
|
31
|
+
},
|
|
32
|
+
objCode: String,
|
|
33
|
+
compareHData1: {
|
|
34
|
+
type: Object,
|
|
35
|
+
default: () => ({}),
|
|
36
|
+
},
|
|
37
|
+
compareHData2: {
|
|
38
|
+
type: Object,
|
|
39
|
+
default: () => ({}),
|
|
40
|
+
},
|
|
41
|
+
preVersion: [String, Number],
|
|
42
|
+
curVersion: [String, Number],
|
|
43
|
+
},
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
type: null,
|
|
47
|
+
};
|
|
48
|
+
},
|
|
49
|
+
created() {
|
|
50
|
+
this.initType();
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
initType() {
|
|
54
|
+
this.type =
|
|
55
|
+
this.objType === "FormTemplate"
|
|
56
|
+
? "formTemplateCompareView"
|
|
57
|
+
: this.objType === "FormScript"
|
|
58
|
+
? "formScriptCompareView"
|
|
59
|
+
: "tableModelCompareView";
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
</script>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:close-on-click-modal="falseValue"
|
|
8
8
|
:visible.sync="showDialog"
|
|
9
9
|
:modal="falseValue"
|
|
10
|
-
custom-class="dialog-style list-dialog dialog-checkbox pd_0"
|
|
10
|
+
custom-class="dialog-style list-dialog dialog-checkbox pd_0 form-version-compare-dialog"
|
|
11
11
|
width="1200px"
|
|
12
12
|
@close="dialogClose"
|
|
13
13
|
v-el-drag-dialog
|
|
@@ -15,62 +15,20 @@
|
|
|
15
15
|
:fullscreen="true"
|
|
16
16
|
>
|
|
17
17
|
<div
|
|
18
|
-
class="cont"
|
|
19
|
-
|
|
20
|
-
style="height: calc(100vh - 58px); overflow: hidden"
|
|
18
|
+
class="cont compare-dialog-cont"
|
|
19
|
+
style="height: calc(100vh - 58px); overflow: auto"
|
|
21
20
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
:parent-target="_self"
|
|
33
|
-
@reload="$reloadHandle"
|
|
34
|
-
@openDesignDialog="openDesingerDialogByChild"
|
|
35
|
-
@reverCallback="reverCallback"
|
|
36
|
-
></component>
|
|
37
|
-
</el-main>
|
|
38
|
-
</el-container>
|
|
39
|
-
</el-col>
|
|
40
|
-
<el-col :span="12">
|
|
41
|
-
<el-container>
|
|
42
|
-
<el-header>版本号:{{ curRow.version }}</el-header>
|
|
43
|
-
<el-main>
|
|
44
|
-
<component
|
|
45
|
-
:is="compareContent"
|
|
46
|
-
v-if="showCompareContent2"
|
|
47
|
-
visible-key="showCompareContent2"
|
|
48
|
-
:hData="compareHData2"
|
|
49
|
-
:parent-target="_self"
|
|
50
|
-
@reload="$reloadHandle"
|
|
51
|
-
@openDesignDialog="openDesingerDialogByChild"
|
|
52
|
-
:isCompare="true"
|
|
53
|
-
:compareHData="compareHData1"
|
|
54
|
-
@reverCallback="reverCallback"
|
|
55
|
-
></component>
|
|
56
|
-
</el-main>
|
|
57
|
-
</el-container>
|
|
58
|
-
</el-col>
|
|
59
|
-
</el-row>
|
|
21
|
+
<compareContent
|
|
22
|
+
v-if="compareReady"
|
|
23
|
+
:objType="objType"
|
|
24
|
+
:objCode="objCode"
|
|
25
|
+
:compareHData1="compareHData1"
|
|
26
|
+
:compareHData2="compareHData2"
|
|
27
|
+
:preVersion="preVersion"
|
|
28
|
+
:curVersion="curVersion"
|
|
29
|
+
@reverCallback="reverCallback"
|
|
30
|
+
/>
|
|
60
31
|
</div>
|
|
61
|
-
<formDesignerDialog
|
|
62
|
-
ref="formDesignerDialog"
|
|
63
|
-
v-if="showDesingerDialog"
|
|
64
|
-
:visiable.sync="showDesingerDialog"
|
|
65
|
-
:formName="formName"
|
|
66
|
-
:formCode="formCode"
|
|
67
|
-
@reflushTemplateList="reflushTemplateList"
|
|
68
|
-
:readonly="designerReadonly"
|
|
69
|
-
:showFormScript="false"
|
|
70
|
-
:historyFlag="true"
|
|
71
|
-
:jsonFlag="true"
|
|
72
|
-
:formTemplate="currentFormTemplate"
|
|
73
|
-
></formDesignerDialog>
|
|
74
32
|
</el-dialog>
|
|
75
33
|
</div>
|
|
76
34
|
</template>
|
|
@@ -80,208 +38,51 @@ export default {
|
|
|
80
38
|
name: "compareDialog",
|
|
81
39
|
props: ["visiable", "objType", "objCode", "relationCode", "preRow", "curRow"],
|
|
82
40
|
components: {
|
|
83
|
-
|
|
84
|
-
import("@base/views/bd/setting/form_template/formDesignerDialog.vue"),
|
|
85
|
-
FormTemplateEdit: () => import("@base/views/bd/setting/form_template/edit.vue"),
|
|
86
|
-
FormScriptEdit: () => import("@base/views/bd/setting/form_script/edit.vue"),
|
|
87
|
-
FormScriptEdit1: () => import("@base/views/bd/setting/form_script/edit1.vue"),
|
|
88
|
-
SzTaMbEdit: () => import("@base/views/bd/setting/table_model/edit.vue"),
|
|
41
|
+
compareContent: () => import("./compareContent.vue"),
|
|
89
42
|
},
|
|
90
|
-
created() {
|
|
91
|
-
// this.initSetting();
|
|
92
|
-
this.initTitle();
|
|
93
|
-
this.compare();
|
|
94
|
-
},
|
|
95
|
-
mounted() {},
|
|
96
43
|
data() {
|
|
97
44
|
return {
|
|
98
|
-
showEdit: false,
|
|
99
45
|
showDialog: true,
|
|
100
46
|
falseValue: false,
|
|
101
|
-
|
|
102
|
-
formData: {},
|
|
103
|
-
vxeOption: {},
|
|
104
|
-
showSaleOrgDialog: false,
|
|
105
|
-
activeName: "second",
|
|
106
|
-
|
|
107
|
-
editContent: null,
|
|
108
|
-
hData: null,
|
|
109
|
-
|
|
110
|
-
formCode: null,
|
|
111
|
-
formName: null,
|
|
112
|
-
currentFormTemplate: null,
|
|
113
|
-
isFullscreen: false,
|
|
114
|
-
designerReadonly: false,
|
|
115
|
-
showDesingerDialog: false,
|
|
116
|
-
|
|
117
|
-
showFormScriptList: false,
|
|
118
|
-
formDesTabs: "first",
|
|
119
|
-
title: "历史列表",
|
|
120
|
-
|
|
121
|
-
showCompareDialog: false,
|
|
122
|
-
compareContent: null,
|
|
123
|
-
showCompareContent1: false,
|
|
124
|
-
showCompareContent2: false,
|
|
47
|
+
title: "",
|
|
125
48
|
compareHData1: null,
|
|
126
49
|
compareHData2: null,
|
|
50
|
+
preVersion: null,
|
|
51
|
+
curVersion: null,
|
|
52
|
+
compareReady: false,
|
|
127
53
|
};
|
|
128
54
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
this.showFormScriptList = true;
|
|
133
|
-
}
|
|
134
|
-
},
|
|
55
|
+
created() {
|
|
56
|
+
this.initTitle();
|
|
57
|
+
this.initCompare();
|
|
135
58
|
},
|
|
136
59
|
methods: {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
SzTaMb: "SzTaMbEdit",
|
|
142
|
-
};
|
|
143
|
-
let scriptTypeMap = {
|
|
144
|
-
0: "FormScriptEdit",
|
|
145
|
-
1: "FormScriptEdit1",
|
|
146
|
-
};
|
|
147
|
-
|
|
60
|
+
initCompare() {
|
|
61
|
+
if (!this.preRow?.content || !this.curRow?.content) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
148
64
|
this.compareHData1 = JSON.parse(this.preRow.content);
|
|
149
65
|
this.compareHData2 = JSON.parse(this.curRow.content);
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this.compareContent = map[this.objType];
|
|
154
|
-
}
|
|
155
|
-
this.showCompareContent1 = true;
|
|
156
|
-
this.showCompareContent2 = true;
|
|
66
|
+
this.preVersion = this.preRow.version;
|
|
67
|
+
this.curVersion = this.curRow.version;
|
|
68
|
+
this.compareReady = true;
|
|
157
69
|
},
|
|
158
70
|
initTitle() {
|
|
159
|
-
|
|
71
|
+
const titleMap = {
|
|
160
72
|
FormTemplate: "表单模板历史版本对比",
|
|
161
73
|
FormScript: "逻辑脚本历史版本对比",
|
|
162
74
|
SzTaMb: "数据表历史版本对比",
|
|
163
75
|
};
|
|
164
|
-
this.title = titleMap[this.objType];
|
|
165
|
-
},
|
|
166
|
-
openEditView(row) {
|
|
167
|
-
this.$http({
|
|
168
|
-
url: USER_PREFIX + "/formVersion/get",
|
|
169
|
-
method: "post",
|
|
170
|
-
data: {
|
|
171
|
-
id: row.id,
|
|
172
|
-
},
|
|
173
|
-
success: (res) => {
|
|
174
|
-
let objx = res.objx;
|
|
175
|
-
let hData = JSON.parse(objx.content);
|
|
176
|
-
this.hData = hData;
|
|
177
|
-
let map = {
|
|
178
|
-
FormTemplate: FormTemplateEdit,
|
|
179
|
-
FormScript: FormScriptEdit,
|
|
180
|
-
SzTaMb: SzTaMbEdit,
|
|
181
|
-
};
|
|
182
|
-
let scriptTypeMap = {
|
|
183
|
-
0: FormScriptEdit,
|
|
184
|
-
1: FormScriptEdit1,
|
|
185
|
-
};
|
|
186
|
-
if (row.objType === "FormScript") {
|
|
187
|
-
this.editContent = scriptTypeMap[hData.scriptType];
|
|
188
|
-
} else {
|
|
189
|
-
this.editContent = map[row.objType];
|
|
190
|
-
}
|
|
191
|
-
this.activeName = "first";
|
|
192
|
-
this.$openEditView("showEdit");
|
|
193
|
-
},
|
|
194
|
-
});
|
|
195
|
-
},
|
|
196
|
-
rever(row) {},
|
|
197
|
-
openDesingerDialog(row, callback, readonly = false) {
|
|
198
|
-
this.formCode = row.formCode;
|
|
199
|
-
this.formName = row.formName + " - " + row.version;
|
|
200
|
-
this.currentFormTemplate = row;
|
|
201
|
-
this.isFullscreen = false;
|
|
202
|
-
|
|
203
|
-
this.designerReadonly = readonly;
|
|
204
|
-
this.showDesingerDialog = true;
|
|
205
|
-
this.designerSaveCallback = callback ?? null;
|
|
206
|
-
},
|
|
207
|
-
openDesingerDialogByChild({ row, readonly, callback }) {
|
|
208
|
-
this.openDesingerDialog(row, callback, readonly);
|
|
209
|
-
},
|
|
210
|
-
reflushTemplateList() {
|
|
211
|
-
this.searchEvent();
|
|
212
|
-
this.designerSaveCallback && this.designerSaveCallback();
|
|
213
|
-
},
|
|
214
|
-
handleFullscreen() {
|
|
215
|
-
let isFullscreen = this.isFullscreen;
|
|
216
|
-
if (!isFullscreen) {
|
|
217
|
-
indexUtil.addClass(document.body, "hideMenu");
|
|
218
|
-
} else {
|
|
219
|
-
indexUtil.removeClass(document.body, "hideMenu");
|
|
220
|
-
}
|
|
221
|
-
this.isFullscreen = !isFullscreen;
|
|
222
|
-
},
|
|
223
|
-
handleFormDesignClose() {
|
|
224
|
-
this.formDesTabs = "first";
|
|
225
|
-
this.showFormScriptList = false;
|
|
76
|
+
this.title = titleMap[this.objType] || "历史版本对比";
|
|
226
77
|
},
|
|
227
78
|
reverCallback() {
|
|
228
79
|
this.$emit("reverCallback");
|
|
229
80
|
this.dialogClose();
|
|
230
81
|
},
|
|
231
82
|
dialogClose() {
|
|
232
|
-
this.showCompareDialog = false;
|
|
233
83
|
this.$emit("close");
|
|
234
84
|
this.$emit("update:visiable", false);
|
|
235
85
|
},
|
|
236
86
|
},
|
|
237
87
|
};
|
|
238
88
|
</script>
|
|
239
|
-
<style scoped lang="scss">
|
|
240
|
-
.grid-height {
|
|
241
|
-
height: calc(100vh - 162px) !important;
|
|
242
|
-
}
|
|
243
|
-
::v-deep .tab-boxOnly > .el-tabs__header {
|
|
244
|
-
position: absolute;
|
|
245
|
-
right: 130px;
|
|
246
|
-
top: 0;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
::v-deep .tab-boxOnly > .el-tabs__content .el-tab-pane .el-tab-pane {
|
|
250
|
-
.detail-wrap .d-cont {
|
|
251
|
-
height: calc(100vh - 158px) !important;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.grid-height {
|
|
255
|
-
height: calc(100vh - 126px) !important;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
::v-deep
|
|
260
|
-
.designer-drawer.is-fullscreen
|
|
261
|
-
.tab-boxOnly
|
|
262
|
-
> .el-tabs__content
|
|
263
|
-
.el-tab-pane
|
|
264
|
-
.el-tab-pane {
|
|
265
|
-
.detail-wrap .d-cont {
|
|
266
|
-
height: calc(100vh - 116px) !important;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.grid-height {
|
|
270
|
-
height: calc(100vh - 84px) !important;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
.el-header {
|
|
274
|
-
background-color: #b3c0d1;
|
|
275
|
-
color: #333;
|
|
276
|
-
text-align: center;
|
|
277
|
-
line-height: 30px;
|
|
278
|
-
font-size: 15px;
|
|
279
|
-
height: 30px !important;
|
|
280
|
-
}
|
|
281
|
-
.el-main {
|
|
282
|
-
padding-bottom: 0px;
|
|
283
|
-
}
|
|
284
|
-
::v-deep .detail-wrap .d-cont {
|
|
285
|
-
height: calc(100vh - 158px) !important;
|
|
286
|
-
}
|
|
287
|
-
</style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
compareHData1: {
|
|
4
|
+
type: Object,
|
|
5
|
+
default: () => ({}),
|
|
6
|
+
},
|
|
7
|
+
compareHData2: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: () => ({}),
|
|
10
|
+
},
|
|
11
|
+
preVersion: [String, Number],
|
|
12
|
+
curVersion: [String, Number],
|
|
13
|
+
objType: String,
|
|
14
|
+
objCode: String,
|
|
15
|
+
},
|
|
16
|
+
methods: {
|
|
17
|
+
isNull(val) {
|
|
18
|
+
return val == null || val === "" || val === undefined;
|
|
19
|
+
},
|
|
20
|
+
isDiff(val1, val2) {
|
|
21
|
+
if (this.isNull(val1) && this.isNull(val2)) return false;
|
|
22
|
+
return val1 !== val2;
|
|
23
|
+
},
|
|
24
|
+
rowDiffClass(val1, val2) {
|
|
25
|
+
return this.isDiff(val1, val2) ? "id-difference" : "";
|
|
26
|
+
},
|
|
27
|
+
formatBool(val, trueText = "是", falseText = "否") {
|
|
28
|
+
if (val === true || val === 1) return this.$t1(trueText);
|
|
29
|
+
if (val === false || val === 0) return this.$t1(falseText);
|
|
30
|
+
return val ?? "";
|
|
31
|
+
},
|
|
32
|
+
formatTags(tags) {
|
|
33
|
+
if (!tags || !tags.length) return "";
|
|
34
|
+
return tags
|
|
35
|
+
.map((item) => item.tagName)
|
|
36
|
+
.filter(Boolean)
|
|
37
|
+
.join(", ");
|
|
38
|
+
},
|
|
39
|
+
formatDataRange(val) {
|
|
40
|
+
if (val === 1) return this.$t1("集团");
|
|
41
|
+
if (val === 0) return this.$t1("当前组织");
|
|
42
|
+
return val ?? "";
|
|
43
|
+
},
|
|
44
|
+
formatFormCode(val) {
|
|
45
|
+
if (val === "intf") return this.$t1("intf(接口)");
|
|
46
|
+
if (val === "busgeneral") return this.$t1("busgeneral(业务通用)");
|
|
47
|
+
return val ?? "";
|
|
48
|
+
},
|
|
49
|
+
formatScriptUrlPath(val, data) {
|
|
50
|
+
if (!data) return "";
|
|
51
|
+
return `${data.formCode || ""}/${data.scriptCode || ""}`;
|
|
52
|
+
},
|
|
53
|
+
formatJson(content) {
|
|
54
|
+
if (this.isNull(content)) return "";
|
|
55
|
+
if (typeof content === "object") {
|
|
56
|
+
try {
|
|
57
|
+
return JSON.stringify(content, null, 2);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
return String(content);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const text = String(content).trim();
|
|
63
|
+
if (!text) return "";
|
|
64
|
+
try {
|
|
65
|
+
return JSON.stringify(JSON.parse(text), null, 2);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
return text;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
auditFields() {
|
|
71
|
+
return [
|
|
72
|
+
{ key: "createBy", label: "创建人" },
|
|
73
|
+
{ key: "createDate", label: "创建时间" },
|
|
74
|
+
{ key: "modifyBy", label: "更新人" },
|
|
75
|
+
{ key: "modifyDate", label: "更新时间" },
|
|
76
|
+
];
|
|
77
|
+
},
|
|
78
|
+
getFieldVal(data, field) {
|
|
79
|
+
if (!data) return "";
|
|
80
|
+
let val = data[field.key];
|
|
81
|
+
if (field.formatter) {
|
|
82
|
+
return field.formatter(val, data);
|
|
83
|
+
}
|
|
84
|
+
return val ?? "";
|
|
85
|
+
},
|
|
86
|
+
fieldDiffClass(field) {
|
|
87
|
+
return this.rowDiffClass(
|
|
88
|
+
this.getFieldVal(this.compareHData1, field),
|
|
89
|
+
this.getFieldVal(this.compareHData2, field)
|
|
90
|
+
);
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="compare-view-wrap">
|
|
3
|
+
<compareBasicSection
|
|
4
|
+
sectionTitle="基础信息"
|
|
5
|
+
headerLabel="查看表单脚本"
|
|
6
|
+
:objType="objType"
|
|
7
|
+
:objCode="objCode"
|
|
8
|
+
:compareHData1="compareHData1"
|
|
9
|
+
:compareHData2="compareHData2"
|
|
10
|
+
:preVersion="preVersion"
|
|
11
|
+
:curVersion="curVersion"
|
|
12
|
+
:fields="basicFields"
|
|
13
|
+
@reverCallback="$emit('reverCallback')"
|
|
14
|
+
/>
|
|
15
|
+
<compareCodeSection
|
|
16
|
+
sectionTitle="脚本"
|
|
17
|
+
:preVersion="preVersion"
|
|
18
|
+
:curVersion="curVersion"
|
|
19
|
+
:leftCode="compareHData1.script || ''"
|
|
20
|
+
:rightCode="compareHData2.script || ''"
|
|
21
|
+
mode="java"
|
|
22
|
+
enableDiff
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import compareMixin from "./compareMixin";
|
|
29
|
+
import compareBasicSection from "./compareBasicSection.vue";
|
|
30
|
+
import compareCodeSection from "./compareCodeSection.vue";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: "formScriptCompareView",
|
|
34
|
+
mixins: [compareMixin],
|
|
35
|
+
components: {
|
|
36
|
+
compareBasicSection,
|
|
37
|
+
compareCodeSection,
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
isFormScriptType1() {
|
|
41
|
+
return this.compareHData1?.scriptType === 1 || this.compareHData2?.scriptType === 1;
|
|
42
|
+
},
|
|
43
|
+
basicFields() {
|
|
44
|
+
const commonFields = [
|
|
45
|
+
{ key: "scriptName", label: "脚本名称" },
|
|
46
|
+
{ key: "scriptCode", label: "脚本编码" },
|
|
47
|
+
];
|
|
48
|
+
const type1Fields = this.isFormScriptType1
|
|
49
|
+
? [
|
|
50
|
+
{ key: "menuKindName", label: "表单分类" },
|
|
51
|
+
{
|
|
52
|
+
key: "formCode",
|
|
53
|
+
label: "表单模板编码",
|
|
54
|
+
formatter: (val) => this.formatFormCode(val),
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
key: "urlPath",
|
|
58
|
+
label: "Url路径",
|
|
59
|
+
formatter: (val, data) => this.formatScriptUrlPath(val, data),
|
|
60
|
+
},
|
|
61
|
+
]
|
|
62
|
+
: [];
|
|
63
|
+
return [
|
|
64
|
+
...commonFields,
|
|
65
|
+
...type1Fields,
|
|
66
|
+
{
|
|
67
|
+
key: "enabled",
|
|
68
|
+
label: "是否启用",
|
|
69
|
+
formatter: (val) => this.formatBool(val, "启用", "禁用"),
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
key: "transactions",
|
|
73
|
+
label: "开启事务",
|
|
74
|
+
formatter: (val) => this.formatBool(val),
|
|
75
|
+
},
|
|
76
|
+
...(this.isFormScriptType1
|
|
77
|
+
? [
|
|
78
|
+
{ key: "serviceName", label: "服务名" },
|
|
79
|
+
{ key: "uri", label: "自定义URL" },
|
|
80
|
+
{
|
|
81
|
+
key: "formScriptTagDTOs",
|
|
82
|
+
label: "项目标签",
|
|
83
|
+
formatter: (val) => this.formatTags(val),
|
|
84
|
+
},
|
|
85
|
+
]
|
|
86
|
+
: []),
|
|
87
|
+
{ key: "scriptRemark", label: "脚本说明" },
|
|
88
|
+
{ key: "sid", label: "唯一标识" },
|
|
89
|
+
...this.auditFields(),
|
|
90
|
+
];
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
</script>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="compare-view-wrap">
|
|
3
|
+
<compareBasicSection
|
|
4
|
+
sectionTitle="基础信息"
|
|
5
|
+
headerLabel="查看表单模板"
|
|
6
|
+
:objType="objType"
|
|
7
|
+
:objCode="objCode"
|
|
8
|
+
:compareHData1="compareHData1"
|
|
9
|
+
:compareHData2="compareHData2"
|
|
10
|
+
:preVersion="preVersion"
|
|
11
|
+
:curVersion="curVersion"
|
|
12
|
+
:fields="basicFields"
|
|
13
|
+
@reverCallback="$emit('reverCallback')"
|
|
14
|
+
/>
|
|
15
|
+
<compareCodeSection
|
|
16
|
+
sectionTitle="表单模板JSON"
|
|
17
|
+
:preVersion="preVersion"
|
|
18
|
+
:curVersion="curVersion"
|
|
19
|
+
:leftCode="leftFormViewContent"
|
|
20
|
+
:rightCode="rightFormViewContent"
|
|
21
|
+
mode="json"
|
|
22
|
+
enableDiff
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import compareMixin from "./compareMixin";
|
|
29
|
+
import compareBasicSection from "./compareBasicSection.vue";
|
|
30
|
+
import compareCodeSection from "./compareCodeSection.vue";
|
|
31
|
+
|
|
32
|
+
export default {
|
|
33
|
+
name: "formTemplateCompareView",
|
|
34
|
+
mixins: [compareMixin],
|
|
35
|
+
components: {
|
|
36
|
+
compareBasicSection,
|
|
37
|
+
compareCodeSection,
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
leftFormViewContent() {
|
|
41
|
+
return this.formatJson(this.compareHData1?.formViewContent);
|
|
42
|
+
},
|
|
43
|
+
rightFormViewContent() {
|
|
44
|
+
return this.formatJson(this.compareHData2?.formViewContent);
|
|
45
|
+
},
|
|
46
|
+
basicFields() {
|
|
47
|
+
return [
|
|
48
|
+
{ key: "formName", label: "模板名称" },
|
|
49
|
+
{ key: "formCode", label: "模板编码" },
|
|
50
|
+
{
|
|
51
|
+
key: "enabled",
|
|
52
|
+
label: "是否启用",
|
|
53
|
+
formatter: (val) => this.formatBool(val, "启用", "禁用"),
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
key: "hasWf",
|
|
57
|
+
label: "启用流程",
|
|
58
|
+
formatter: (val) => this.formatBool(val),
|
|
59
|
+
},
|
|
60
|
+
{ key: "menuKindName", label: "表单分类" },
|
|
61
|
+
{ key: "remark", label: "备注" },
|
|
62
|
+
{
|
|
63
|
+
key: "formTemplateTagDTOs",
|
|
64
|
+
label: "项目标签",
|
|
65
|
+
formatter: (val) => this.formatTags(val),
|
|
66
|
+
},
|
|
67
|
+
{ key: "serviceName", label: "服务名" },
|
|
68
|
+
{ key: "sid", label: "唯一标识" },
|
|
69
|
+
...this.auditFields(),
|
|
70
|
+
];
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
</script>
|
|
@@ -78,9 +78,10 @@ export default {
|
|
|
78
78
|
},
|
|
79
79
|
};
|
|
80
80
|
</script>
|
|
81
|
-
<style scoped
|
|
82
|
-
|
|
83
|
-
.
|
|
84
|
-
|
|
81
|
+
<style scoped lang="scss">
|
|
82
|
+
::v-deep .formVersion-preform-dialog {
|
|
83
|
+
.el-dialog__header {
|
|
84
|
+
text-align: left;
|
|
85
|
+
}
|
|
85
86
|
}
|
|
86
87
|
</style>
|