cloud-web-corejs 1.0.250 → 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.
- package/package.json +1 -1
- package/src/views/bd/setting/formVersion/button.vue +55 -0
- package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
- package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
- package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
- package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
- package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
- package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
- package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -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/ftHistoryDialog.vue +491 -0
- package/src/views/bd/setting/formVersion/link.vue +58 -0
- package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
- package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
- package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
- package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
- package/src/views/bd/setting/formVersion/textDiff.js +102 -0
- package/src/views/bd/setting/form_import_log/edit.vue +6 -3
- package/src/views/bd/setting/form_import_log/list.vue +5 -0
- package/src/views/bd/setting/form_script/edit.vue +196 -83
- package/src/views/bd/setting/form_script/edit1.vue +410 -220
- package/src/views/bd/setting/form_script/form_list.vue +19 -0
- package/src/views/bd/setting/form_script/list.vue +95 -21
- package/src/views/bd/setting/form_script/list1.vue +24 -0
- package/src/views/bd/setting/form_script/mixins/dialog.js +2 -2
- package/src/views/bd/setting/form_script/mixins/edit.js +265 -207
- package/src/views/bd/setting/form_script/mixins/edit1.js +259 -201
- package/src/views/bd/setting/form_script/mixins/form_list.js +322 -296
- package/src/views/bd/setting/form_script/mixins/list.js +163 -95
- package/src/views/bd/setting/form_script/mixins/list1.js +244 -155
- 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/edit.vue +355 -205
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
- package/src/views/bd/setting/form_template/list.vue +49 -74
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +3 -3
- package/src/views/bd/setting/form_template/mixins/edit.js +51 -8
- package/src/views/bd/setting/form_template/mixins/itemList.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +114 -82
- 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 -7
- package/src/views/bd/setting/form_template/wf_list.vue +161 -127
- package/src/views/bd/setting/request_setting/list.vue +15 -25
- package/src/views/bd/setting/table_model/edit.vue +702 -498
- package/src/views/bd/setting/table_model/list.vue +28 -0
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +228 -121
- package/src/views/bd/setting/table_model/mixins/list.js +55 -20
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +50 -46
- package/src/views/bd/setting/utils/index.js +15 -0
- package/src/views/user/form/vform/designer.vue +303 -287
- package/src/views/user/form/vform/formFieldMapping.js +2 -3
- package/src/views/user/form/vform/render.vue +8 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-dialog
|
|
4
|
+
:title="$t1(title)"
|
|
5
|
+
:append-to-body="true"
|
|
6
|
+
:modal-append-to-body="true"
|
|
7
|
+
:close-on-click-modal="falseValue"
|
|
8
|
+
:visible.sync="showDialog"
|
|
9
|
+
:modal="falseValue"
|
|
10
|
+
custom-class="dialog-style list-dialog dialog-checkbox nopd0 form-version-compare-dialog"
|
|
11
|
+
width="1200px"
|
|
12
|
+
@close="dialogClose"
|
|
13
|
+
v-el-drag-dialog
|
|
14
|
+
v-el-dialog-center
|
|
15
|
+
:fullscreen="true"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="cont compare-dialog-cont"
|
|
19
|
+
style="height: calc(100vh - 48px); overflow: auto"
|
|
20
|
+
>
|
|
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
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
</el-dialog>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
export default {
|
|
38
|
+
name: "compareDialog",
|
|
39
|
+
props: ["visiable", "objType", "objCode", "relationCode", "preRow", "curRow"],
|
|
40
|
+
components: {
|
|
41
|
+
compareContent: () => import("./compareContent.vue"),
|
|
42
|
+
},
|
|
43
|
+
data() {
|
|
44
|
+
return {
|
|
45
|
+
showDialog: true,
|
|
46
|
+
falseValue: false,
|
|
47
|
+
title: "",
|
|
48
|
+
compareHData1: null,
|
|
49
|
+
compareHData2: null,
|
|
50
|
+
preVersion: null,
|
|
51
|
+
curVersion: null,
|
|
52
|
+
compareReady: false,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
created() {
|
|
56
|
+
this.initTitle();
|
|
57
|
+
this.initCompare();
|
|
58
|
+
},
|
|
59
|
+
methods: {
|
|
60
|
+
initCompare() {
|
|
61
|
+
if (!this.preRow?.content || !this.curRow?.content) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this.compareHData1 = JSON.parse(this.preRow.content);
|
|
65
|
+
this.compareHData2 = JSON.parse(this.curRow.content);
|
|
66
|
+
this.preVersion = this.preRow.version;
|
|
67
|
+
this.curVersion = this.curRow.version;
|
|
68
|
+
this.compareReady = true;
|
|
69
|
+
},
|
|
70
|
+
initTitle() {
|
|
71
|
+
const titleMap = {
|
|
72
|
+
FormTemplate: "表单模板历史版本对比",
|
|
73
|
+
FormScript: "逻辑脚本历史版本对比",
|
|
74
|
+
SzTaMb: "数据表历史版本对比",
|
|
75
|
+
};
|
|
76
|
+
this.title = titleMap[this.objType] || "历史版本对比";
|
|
77
|
+
},
|
|
78
|
+
reverCallback() {
|
|
79
|
+
this.$emit("reverCallback");
|
|
80
|
+
this.dialogClose();
|
|
81
|
+
},
|
|
82
|
+
dialogClose() {
|
|
83
|
+
this.$emit("close");
|
|
84
|
+
this.$emit("update:visiable", false);
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
</script>
|
|
@@ -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,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span :class="{ tipsOldVal: isCompare && hasChange() }">
|
|
3
|
+
<el-popover
|
|
4
|
+
placement="top-start"
|
|
5
|
+
width="200"
|
|
6
|
+
trigger="hover"
|
|
7
|
+
v-if="isCompare && hasChange()"
|
|
8
|
+
:disabled="!hasHData"
|
|
9
|
+
>
|
|
10
|
+
<div class="f12 d-txt">{{ $t1("变更前") }}:{{ oldVal }}</div>
|
|
11
|
+
<div slot="reference" class="icon">
|
|
12
|
+
<i class="el-icon-warning" :class="{ hasNoHData: !hasHData }"></i>
|
|
13
|
+
</div>
|
|
14
|
+
</el-popover>
|
|
15
|
+
<slot></slot>
|
|
16
|
+
</span>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: "fieldCompare",
|
|
22
|
+
props: {
|
|
23
|
+
oldVal: [String, Number, Boolean],
|
|
24
|
+
newVal: [String, Number, Boolean],
|
|
25
|
+
hasHData: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true,
|
|
28
|
+
},
|
|
29
|
+
isCompare: Boolean,
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
isNull(val) {
|
|
33
|
+
return val == null || val == "" || val == undefined;
|
|
34
|
+
},
|
|
35
|
+
hasChange() {
|
|
36
|
+
if (this.isNull(this.oldVal) && this.isNull(this.newVal)) return false;
|
|
37
|
+
return this.oldVal !== this.newVal;
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<style scoped>
|
|
44
|
+
.hasNoHData {
|
|
45
|
+
color: #30b08f !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.d-txt {
|
|
49
|
+
white-space: pre-line;
|
|
50
|
+
}
|
|
51
|
+
.el-icon-warning {
|
|
52
|
+
z-index: 5;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -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>
|