gds-plus-design-vue 1.1.64 → 1.1.71
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/lib/chartbi.48631362.mjs +44076 -0
- package/lib/chartbi.afd83839.js +80 -0
- package/lib/element-theme-chalk.ae828c17.js +2 -0
- package/lib/gd-initial.js +34 -0
- package/lib/gd-initial.mjs +80343 -101
- package/lib/main.03b24a05.js +1 -0
- package/lib/{main.665d9127.mjs → main.3cd24320.mjs} +27 -18
- package/lib/main.4cafc3eb.mjs +68 -0
- package/lib/main.eea30a23.js +1 -0
- package/lib/main.efd6b228.mjs +87 -0
- package/lib/main.f1e3ba71.js +1 -0
- package/lib/messages.083c4ede.js +9 -0
- package/lib/messages.7e85146d.mjs +5802 -0
- package/lib/style.css +2 -2
- package/lib/system.account.78b852cd.js +216 -0
- package/lib/system.account.ae0822f1.mjs +2552 -0
- package/lib/system.config.327aded6.js +1 -0
- package/lib/system.config.9c46f279.mjs +373 -0
- package/lib/system.datasource.4b0951ba.mjs +511 -0
- package/lib/system.datasource.8a0c7e0f.js +1 -0
- package/lib/system.dict.65f25e4e.mjs +996 -0
- package/lib/system.dict.72594c98.js +1 -0
- package/lib/system.duplicatechecking.2e9b8df8.js +1 -0
- package/lib/system.duplicatechecking.b05f1617.mjs +2130 -0
- package/lib/system.email.0899621c.js +41 -0
- package/lib/system.email.a4d6d622.mjs +7432 -0
- package/lib/system.fieldsecurity.7de4ee1d.mjs +1745 -0
- package/lib/system.fieldsecurity.d57edb47.js +1 -0
- package/lib/system.file.b3558a8b.js +1 -0
- package/lib/system.file.f152d4fe.mjs +489 -0
- package/lib/system.log.30e5157c.mjs +1450 -0
- package/lib/system.log.f243e7d0.js +1 -0
- package/lib/system.machine.325b256e.mjs +94 -0
- package/lib/system.machine.332fb31c.js +1 -0
- package/lib/system.notice.234d5e47.mjs +636 -0
- package/lib/system.notice.540e97ca.js +1 -0
- package/lib/system.noticereceived.1fb75290.js +1 -0
- package/lib/system.noticereceived.c22372df.mjs +158 -0
- package/lib/system.onlineuser.90c08aef.mjs +184 -0
- package/lib/system.onlineuser.e0c261ed.js +1 -0
- package/lib/system.org.65452f67.js +1 -0
- package/lib/system.org.b8d59e5d.mjs +421 -0
- package/lib/system.permissions.8b0d3c8c.js +9 -0
- package/lib/system.permissions.cba8bd58.mjs +212 -0
- package/lib/system.plugin.07b3c38e.js +1 -0
- package/lib/system.plugin.4911a33d.mjs +946 -0
- package/lib/system.pos.6ed35c39.js +1 -0
- package/lib/system.pos.c274f13c.mjs +312 -0
- package/lib/system.promptmanagement.8ae0e757.js +1 -0
- package/lib/system.promptmanagement.b07ba7b6.mjs +801 -0
- package/lib/system.role.53778e38.mjs +1509 -0
- package/lib/system.role.c3d74603.js +1 -0
- package/lib/system.timers.69f1792a.mjs +3160 -0
- package/lib/system.timers.ef6b6796.js +38 -0
- package/lib/system.translation.0109917e.js +1 -0
- package/lib/system.translation.f79a5244.mjs +665 -0
- package/lib/system.user.01a55993.mjs +1425 -0
- package/lib/system.user.ea18a84c.js +14 -0
- package/lib/system.useraffiliation.1e74fa9e.mjs +1025 -0
- package/lib/system.useraffiliation.f3c88a51.js +1 -0
- package/lib/system.webresource.5049d97b.js +1 -0
- package/lib/system.webresource.e9518d87.mjs +723 -0
- package/lib/system.welcome.3f1cce96.mjs +45 -0
- package/lib/system.welcome.b109df88.js +1 -0
- package/locale/en_US.js +67 -9
- package/locale/id_ID.js +66 -8
- package/locale/vi_VN.js +66 -8
- package/locale/zh_CN.js +65 -8
- package/package.json +105 -105
- package/lib/gd-initial.umd.js +0 -435
- package/lib/index.32120001.mjs +0 -157708
|
@@ -0,0 +1,2130 @@
|
|
|
1
|
+
import { m as f, u as h, n as u } from "./chartbi.48631362.mjs";
|
|
2
|
+
import { E as b, f as $, o as p, g as _, h as y, t as D } from "./messages.7e85146d.mjs";
|
|
3
|
+
function oe(i) {
|
|
4
|
+
return window.axios({
|
|
5
|
+
url: "/sysUserAffiliation/page",
|
|
6
|
+
method: "get",
|
|
7
|
+
params: i
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function ce(i) {
|
|
11
|
+
return window.axios({
|
|
12
|
+
url: "/sysUserAffiliation/add",
|
|
13
|
+
method: "post",
|
|
14
|
+
data: i
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function de(i) {
|
|
18
|
+
return window.axios({
|
|
19
|
+
url: "/sysUserAffiliation/edit",
|
|
20
|
+
method: "post",
|
|
21
|
+
data: i
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function ue(i) {
|
|
25
|
+
return window.axios({
|
|
26
|
+
url: "/sysUserAffiliation/delete",
|
|
27
|
+
method: "post",
|
|
28
|
+
data: i
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function he(i) {
|
|
32
|
+
return window.axios({
|
|
33
|
+
url: "/sysUserAffiliationRelation/batchAdd",
|
|
34
|
+
method: "post",
|
|
35
|
+
data: i
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function fe(i) {
|
|
39
|
+
return window.axios({
|
|
40
|
+
url: "/sysUserAffiliationRelation/batchDelete",
|
|
41
|
+
method: "post",
|
|
42
|
+
data: i
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function pe(i) {
|
|
46
|
+
return window.axios({
|
|
47
|
+
url: "/sysUserAffiliationRelation/byUserAffiliationId",
|
|
48
|
+
method: "get",
|
|
49
|
+
params: i
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function C(i) {
|
|
53
|
+
return window.axios({
|
|
54
|
+
url: "/sysUserAffiliationType/page",
|
|
55
|
+
method: "get",
|
|
56
|
+
params: i
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function me(i) {
|
|
60
|
+
return window.axios({
|
|
61
|
+
url: "/sysUserAffiliationType/add",
|
|
62
|
+
method: "post",
|
|
63
|
+
data: i
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function ge(i) {
|
|
67
|
+
return window.axios({
|
|
68
|
+
url: "/sysUserAffiliationType/edit",
|
|
69
|
+
method: "post",
|
|
70
|
+
data: i
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function be(i) {
|
|
74
|
+
return window.axios({
|
|
75
|
+
url: "/sysUserAffiliationType/delete",
|
|
76
|
+
method: "post",
|
|
77
|
+
data: i
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const S = {
|
|
81
|
+
name: "composeFilter",
|
|
82
|
+
props: {
|
|
83
|
+
record: {
|
|
84
|
+
type: Object,
|
|
85
|
+
required: !0
|
|
86
|
+
},
|
|
87
|
+
rulesList: {
|
|
88
|
+
type: Array,
|
|
89
|
+
default: () => []
|
|
90
|
+
},
|
|
91
|
+
loadData: {
|
|
92
|
+
type: Array,
|
|
93
|
+
default: () => []
|
|
94
|
+
},
|
|
95
|
+
fkTableList: {
|
|
96
|
+
type: Array,
|
|
97
|
+
default: () => []
|
|
98
|
+
},
|
|
99
|
+
choiceDisabled: {
|
|
100
|
+
type: Boolean,
|
|
101
|
+
default: !1
|
|
102
|
+
},
|
|
103
|
+
type: {
|
|
104
|
+
type: [Number, String],
|
|
105
|
+
default: "1"
|
|
106
|
+
},
|
|
107
|
+
disableContain: {
|
|
108
|
+
type: Boolean,
|
|
109
|
+
default: !1
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
data() {
|
|
113
|
+
return {
|
|
114
|
+
fetching: !1,
|
|
115
|
+
fieldFormat: [],
|
|
116
|
+
fkData: [],
|
|
117
|
+
lookupItem: {},
|
|
118
|
+
UserAffiliationType: []
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
computed: {
|
|
122
|
+
hasTimePicker() {
|
|
123
|
+
const i = this.record.fieldformat ? this.record.fieldformat : "yyyy-MM-dd";
|
|
124
|
+
return ["hh:mm:ss", "hh:mm", "mm:ss", "HH:mm:ss", "HH:mm"].includes(i);
|
|
125
|
+
},
|
|
126
|
+
pickerType() {
|
|
127
|
+
const i = this.record.fieldformat ? this.record.fieldformat : "yyyy-MM-dd";
|
|
128
|
+
let e = "date";
|
|
129
|
+
return i === "yyyy-MM-dd hh:mm:ss" || i === "yyyy-MM-dd HH:mm:ss" ? e = "datetime" : i === "yyyy-MM" ? e = "month" : i === "yyyy" && (e = "year"), e;
|
|
130
|
+
},
|
|
131
|
+
precision() {
|
|
132
|
+
const i = this.loadData.filter((e) => e.id === this.record.columnid)[0];
|
|
133
|
+
return i ? i.effecttype === "inputnumber" ? 0 : i.filedsize : 0;
|
|
134
|
+
},
|
|
135
|
+
getDatepickerShow() {
|
|
136
|
+
if (typeof this.record.ruleslist == "string")
|
|
137
|
+
return;
|
|
138
|
+
let i = this.record.ruleslist.filter((t) => t.code == this.record.operators)[0], e = i.name.indexOf("*") != -1 || i.name.indexOf("X") != -1 || i.name.indexOf("x") != -1 ? 3 : 2;
|
|
139
|
+
return this.record.operators < 12 && (e = 1), e;
|
|
140
|
+
},
|
|
141
|
+
showTime() {
|
|
142
|
+
return this.record.fieldformat.length > 10;
|
|
143
|
+
},
|
|
144
|
+
getDict() {
|
|
145
|
+
const i = this.loadData.filter((e) => e.id === this.record.columnid)[0];
|
|
146
|
+
return i === void 0 ? [] : i.dicttypecode === null ? [] : this.getDictionary(i.dicttypecode);
|
|
147
|
+
},
|
|
148
|
+
styled() {
|
|
149
|
+
return `padding-left:4px;color:${this.primaryColor};`;
|
|
150
|
+
},
|
|
151
|
+
...f(["primaryColor", "tableLists"])
|
|
152
|
+
},
|
|
153
|
+
components: {
|
|
154
|
+
EffectTypeIcon: b
|
|
155
|
+
},
|
|
156
|
+
methods: {
|
|
157
|
+
selectDataMore(i) {
|
|
158
|
+
this.$nextTick(() => {
|
|
159
|
+
setTimeout(() => {
|
|
160
|
+
let e = this.fkData.filter((t) => i.includes(t.id)).filter((t) => !this.record.fkdata.filter((a) => a.id === t.id)[0]);
|
|
161
|
+
this.record.fkdata = this.record.fkdata.concat(e);
|
|
162
|
+
}, 10);
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
selectData(i) {
|
|
166
|
+
let e = this.fkData.filter((t) => t.id === i);
|
|
167
|
+
this.record.fkdata = e;
|
|
168
|
+
},
|
|
169
|
+
searchData(i) {
|
|
170
|
+
let t = this.loadData.filter((s) => s.id === this.record.columnid)[0].fkentityname.split(",")[0];
|
|
171
|
+
this.fetching = !0, this.fkData = [], $({
|
|
172
|
+
name: i,
|
|
173
|
+
fkEntityName: t
|
|
174
|
+
}).then((s) => {
|
|
175
|
+
if (s.success) {
|
|
176
|
+
let a = s.data.filter((l) => (l.fkEntityName = t, !this.record.fkdata.filter((r) => r.id === l.id)[0]));
|
|
177
|
+
this.fkData = this.record.fkdata.concat(a);
|
|
178
|
+
}
|
|
179
|
+
this.fetching = !1;
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
lookup() {
|
|
183
|
+
let i = this.loadData.filter((s) => s.id == this.record.columnid)[0];
|
|
184
|
+
i.options === void 0 && (i = Object.assign(i, {
|
|
185
|
+
options: {}
|
|
186
|
+
})), this.lookupItem = i;
|
|
187
|
+
let e = ["3", "4"].includes(this.record.operators) ? this.record.values : this.record.value, t = ["3", "4"].includes(this.record.operators) ? "participants" : i.effecttype;
|
|
188
|
+
i.effecttype === "user" && ["11", "12"].includes(this.record.operators) && (t = "participants"), this.$refs.engineSearch.open(
|
|
189
|
+
Object.assign(
|
|
190
|
+
{
|
|
191
|
+
...i
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
fkData: this.record.fkdata,
|
|
195
|
+
val: e,
|
|
196
|
+
effectType: t
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
);
|
|
200
|
+
},
|
|
201
|
+
lookupSeled(i) {
|
|
202
|
+
let e = String(this.record.operators);
|
|
203
|
+
if (this.lookupItem.effecttype == "fk") {
|
|
204
|
+
this.record.value = ["3", "4"].includes(e) ? "" : i.data[0], this.record.values = ["3", "4"].includes(e) ? [...i.data] : [];
|
|
205
|
+
let t = ["3", "4"].includes(e) ? [...i.fkData] : this.isChecked(i.data[0]) ? this.fkData.concat([...i.fkData]) : this.fkData;
|
|
206
|
+
this.fkData = t, this.record.fkdata = t;
|
|
207
|
+
}
|
|
208
|
+
if (this.lookupItem.effecttype == "about") {
|
|
209
|
+
this.record.value = ["3", "4"].includes(e) ? "" : i.data[0], this.record.values = ["3", "4"].includes(e) ? [...i.data] : [];
|
|
210
|
+
let t = ["3", "4"].includes(e) ? [...i.fkData] : this.isChecked(i.data[0]) ? this.fkData.concat([...i.fkData]) : this.fkData;
|
|
211
|
+
this.fkData = t, this.record.fkdata = t;
|
|
212
|
+
}
|
|
213
|
+
if (this.lookupItem.effecttype == "user") {
|
|
214
|
+
this.record.value = ["3", "4", "11", "12"].includes(e) ? "" : i.data[0], this.record.values = ["3", "4", "11", "12"].includes(e) ? [...i.data] : [];
|
|
215
|
+
let t = ["3", "4", "11", "12"].includes(e) ? [...i.fkData] : this.isChecked(i.data[0]) ? this.fkData.concat([...i.fkData]) : this.fkData;
|
|
216
|
+
this.fkData = t, this.record.fkdata = t;
|
|
217
|
+
}
|
|
218
|
+
if (this.lookupItem.effecttype == "participants") {
|
|
219
|
+
this.record.value = ["3", "4", "41", "42"].includes(e) ? "" : i.data[0], this.record.values = ["3", "4", "41", "42"].includes(e) ? [...i.data] : [];
|
|
220
|
+
let t = ["3", "4", "41", "42"].includes(e) ? [...i.fkData] : this.isChecked(i.data[0]) ? this.fkData.concat([...i.fkData]) : this.fkData;
|
|
221
|
+
this.fkData = t, this.record.fkdata = t;
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
isChecked(i) {
|
|
225
|
+
return this.fkData.every((e, t, s) => e.id !== i);
|
|
226
|
+
},
|
|
227
|
+
changeColumn(i) {
|
|
228
|
+
const e = this.loadData.filter((t) => t.id === i)[0];
|
|
229
|
+
this.conditionColumn(this.record, e);
|
|
230
|
+
},
|
|
231
|
+
conditionColumn(i, e) {
|
|
232
|
+
this.$nextTick(() => {
|
|
233
|
+
setTimeout(() => {
|
|
234
|
+
let t = this.loadData.filter((r) => r.id == i.columnid)[0], s = this.rulesList.filter((r) => r.remark.split(",").includes(e.effecttype));
|
|
235
|
+
if (t.fieldformat) {
|
|
236
|
+
const r = this.fieldFormat.filter((o) => String(o.code) === String(this.record.fieldformat))[0];
|
|
237
|
+
i.fieldformat = r ? r.name : "yyyy-MM-dd HH:mm:ss";
|
|
238
|
+
}
|
|
239
|
+
let a = this.tableLists.filter((r) => r.id == t.codegenid)[0];
|
|
240
|
+
const n = (a.isvirtualtable !== void 0 ? a.isvirtualtable : 0) == 1 && t.virtualcolumn !== void 0 ? t.virtualcolumn : t.columnname;
|
|
241
|
+
i.columntype = t.effecttype, i.columnname = n, i.value = "", i.values = [], i.ruleslist = [...s], i.operators = s[0].code, i.fkdata = [], ["fk", "about", "user", "participants"].includes(t.effecttype) && this.searchData("");
|
|
242
|
+
}, 0);
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
selectRules(i) {
|
|
246
|
+
this.record.fkdata = [], this.fkData = [], this.record.columntype == "datepicker" ? this.record.value = "" : ["fk", "user", "about", "participants"].includes(this.record.columntype) && (this.record.value = "", this.record.values = [], this.searchData("")), i == 45 && (this.getSysUserAffiliationType(), this.record.value = "", this.record.values = []);
|
|
247
|
+
},
|
|
248
|
+
delList(i) {
|
|
249
|
+
this.$emit("delList", i);
|
|
250
|
+
},
|
|
251
|
+
addItem() {
|
|
252
|
+
let i = [
|
|
253
|
+
{
|
|
254
|
+
type: "1",
|
|
255
|
+
operators: "1",
|
|
256
|
+
columnid: "",
|
|
257
|
+
columnname: "",
|
|
258
|
+
value: "",
|
|
259
|
+
values: [],
|
|
260
|
+
columntype: "input",
|
|
261
|
+
ruleslist: [...this.rulesList],
|
|
262
|
+
fkData: [],
|
|
263
|
+
id: h(),
|
|
264
|
+
fieldformat: null,
|
|
265
|
+
list: [],
|
|
266
|
+
checked: !1,
|
|
267
|
+
pid: this.record.id
|
|
268
|
+
}
|
|
269
|
+
];
|
|
270
|
+
this.record.list = this.record.list.concat(i);
|
|
271
|
+
},
|
|
272
|
+
getSysUserAffiliationType() {
|
|
273
|
+
C().then((i) => {
|
|
274
|
+
i.code === 200 && (this.UserAffiliationType = i.data.rows);
|
|
275
|
+
});
|
|
276
|
+
},
|
|
277
|
+
cancelItem(i) {
|
|
278
|
+
this.$emit("cancelItem", i);
|
|
279
|
+
},
|
|
280
|
+
getDictionary(i) {
|
|
281
|
+
return this.$options.filters.dictData(i);
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
created() {
|
|
285
|
+
this.fieldFormat = this.getDictionary("time_longshort"), this.fkData = [], this.fkData = [...this.record.fkdata], ["fk", "about", "user", "participants"].includes(this.record.columntype) && this.record.fkdata.length == 0 ? this.searchData("") : ["select", "radio", "checkbox", "switch"].includes(this.record.columntype) && this.record.operators == 45 && this.getSysUserAffiliationType("");
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
var L = function() {
|
|
289
|
+
var e = this, t = e._self._c;
|
|
290
|
+
return t("div", [t("div", { staticClass: "lists" }, [e.choiceDisabled ? e._e() : t("div", { staticClass: "rg" }, [t("el-checkbox", { attrs: { disabled: e.choiceDisabled }, model: { value: e.record.checked, callback: function(s) {
|
|
291
|
+
e.$set(e.record, "checked", s);
|
|
292
|
+
}, expression: "record.checked" } })], 1), t("div", { staticClass: "zd" }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), filterable: "", disabled: e.choiceDisabled, clearable: "" }, on: { change: e.changeColumn }, model: { value: e.record.columnid, callback: function(s) {
|
|
293
|
+
e.$set(e.record, "columnid", s);
|
|
294
|
+
}, expression: "record.columnid" } }, [e._l(e.loadData, function(s, a) {
|
|
295
|
+
return [t("el-option", { attrs: { value: s.id, label: e.$i18nt(`Dynamics.${s.transkey}`, s.columncomment) } }, [t("EffectTypeIcon", { attrs: { effectType: s.effecttype } }), t("span", { staticStyle: { "padding-left": "2px" } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${s.transkey}`, s.columncomment)) + " (" + e._s(s.columnname) + ") ")])], 1)];
|
|
296
|
+
})], 2)], 1), t("div", { staticClass: "tj" }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { disabled: e.choiceDisabled }, on: { change: e.selectRules }, model: { value: e.record.operators, callback: function(s) {
|
|
297
|
+
e.$set(e.record, "operators", s);
|
|
298
|
+
}, expression: "record.operators" } }, [e._l(e.record.ruleslist, function(s) {
|
|
299
|
+
return [!e.disableContain || s.code != 43 && s.code != 44 ? t("el-option", { attrs: { value: s.code, label: e.$i18nt(`Dynamics.${s.transkey}`, s.name) } }) : e._e()];
|
|
300
|
+
})], 2)], 1), t("div", { staticClass: "jg" }, [e.record.operators == 5 || e.record.operators == 6 || e.record.operators == 43 || e.record.operators == 44 ? t("div") : e.record.operators == 45 ? t("div", [t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled, clearable: "" }, model: { value: e.record.value, callback: function(s) {
|
|
301
|
+
e.$set(e.record, "value", s);
|
|
302
|
+
}, expression: "record.value" } }, e._l(e.UserAffiliationType, function(s) {
|
|
303
|
+
return t("el-option", { key: s.id, attrs: { value: s.id, label: e.$i18nt(`Dynamics.${s.transkey}`, s.name) } });
|
|
304
|
+
}), 1)], 1) : t("div", { staticStyle: { width: "100%" } }, [["input", "textarea"].includes(e.record.columntype) ? t("el-input", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), disabled: e.choiceDisabled, clearable: "" }, model: { value: e.record.value, callback: function(s) {
|
|
305
|
+
e.$set(e.record, "value", s);
|
|
306
|
+
}, expression: "record.value" } }) : ["select", "radio", "checkbox", "switch"].includes(e.record.columntype) ? t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled, clearable: "" }, model: { value: e.record.value, callback: function(s) {
|
|
307
|
+
e.$set(e.record, "value", s);
|
|
308
|
+
}, expression: "record.value" } }, e._l(e.getDict, function(s) {
|
|
309
|
+
return t("el-option", { key: s.code, attrs: { value: s.code, label: e.$i18nt(`Dynamics.${s.transkey}`, s.name) } });
|
|
310
|
+
}), 1) : ["inputnumber", "double", "currency"].includes(e.record.columntype) ? t("el-input-number", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), "controls-position": "right", step: 1, min: e.record.columntype === "currency" ? 0 : -1 / 0, precision: e.precision, disabled: e.choiceDisabled }, model: { value: e.record.value, callback: function(s) {
|
|
311
|
+
e.$set(e.record, "value", s);
|
|
312
|
+
}, expression: "record.value" } }) : e.record.columntype == "datepicker" ? [e.getDatepickerShow === 3 ? t("el-input-number", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), step: 1, min: 1, max: 999, "controls-position": "right", disabled: e.choiceDisabled, clearable: "" }, model: { value: e.record.value, callback: function(s) {
|
|
313
|
+
e.$set(e.record, "value", s);
|
|
314
|
+
}, expression: "record.value" } }) : e._e(), e.getDatepickerShow === 1 ? [e.hasTimePicker ? t("el-time-picker", { staticStyle: { width: "100%" }, attrs: { "value-format": e.record.fieldformat, format: e.record.fieldformat, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled, clearable: "" }, model: { value: e.record.value, callback: function(s) {
|
|
315
|
+
e.$set(e.record, "value", s);
|
|
316
|
+
}, expression: "record.value" } }) : t("el-date-picker", { staticStyle: { width: "100%" }, attrs: { type: e.pickerType, "value-format": e.record.fieldformat, format: e.record.fieldformat, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled, clearable: "" }, model: { value: e.record.value, callback: function(s) {
|
|
317
|
+
e.$set(e.record, "value", s);
|
|
318
|
+
}, expression: "record.value" } })] : e._e()] : ["fk", "about"].includes(e.record.columntype) ? [e.record.operators != 11 && e.record.operators != 12 ? t("div", { staticClass: "cao_about" }, [t("el-select", { directives: [{ name: "show", rawName: "v-show", value: e.record.operators != 3 && e.record.operators != 4, expression: "record.operators != 3 && record.operators != 4" }], staticStyle: { flex: "1", overflow: "hidden" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), "remote-method": e.searchData, loading: e.fetching, disabled: e.choiceDisabled, clearable: "", filterable: "", remote: "", "reserve-keyword": "" }, on: { change: e.selectData }, model: { value: e.record.value, callback: function(s) {
|
|
319
|
+
e.$set(e.record, "value", s);
|
|
320
|
+
}, expression: "record.value" } }, [e._l(e.fkData, function(s, a) {
|
|
321
|
+
return [t("el-option", { attrs: { value: s.id, label: e.$i18nt(`Dynamics.${s.transkey}`, s.name) } })];
|
|
322
|
+
})], 2), t("el-select", { directives: [{ name: "show", rawName: "v-show", value: e.record.operators == 3 || e.record.operators == 4, expression: "record.operators == 3 || record.operators == 4" }], staticStyle: { flex: "1", overflow: "hidden" }, attrs: { multiple: "", disabled: e.choiceDisabled, "multiple-limit": 8, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), loading: e.fetching, "remote-method": e.searchData, filterable: "", remote: "", clearable: "", "collapse-tags": "", "reserve-keyword": "" }, on: { change: e.selectDataMore }, model: { value: e.record.values, callback: function(s) {
|
|
323
|
+
e.$set(e.record, "values", s);
|
|
324
|
+
}, expression: "record.values" } }, [e._l(e.fkData, function(s, a) {
|
|
325
|
+
return [t("el-option", { attrs: { value: s.id, label: e.$i18nt(`Dynamics.${s.transKey}`, s.name) } })];
|
|
326
|
+
})], 2), e.choiceDisabled ? e._e() : t("i", { staticClass: "el-icon-search cao_setting", on: { click: function(s) {
|
|
327
|
+
return e.lookup(e.record);
|
|
328
|
+
} } })], 1) : e._e()] : e.record.columntype === "user" ? [e.record.operators != 11 && e.record.operators != 12 ? t("div", { staticClass: "cao_about" }, [t("el-select", { directives: [{ name: "show", rawName: "v-show", value: e.record.operators != 3 && e.record.operators != 4, expression: "record.operators != 3 && record.operators != 4" }], staticStyle: { flex: "1", overflow: "hidden" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled, "remote-method": e.searchData, loading: e.fetching, clearable: "", filterable: "", remote: "", "reserve-keyword": "" }, on: { change: e.selectData }, model: { value: e.record.value, callback: function(s) {
|
|
329
|
+
e.$set(e.record, "value", s);
|
|
330
|
+
}, expression: "record.value" } }, [e._l(e.fkData, function(s, a) {
|
|
331
|
+
return [t("el-option", { attrs: { value: s.id, label: e.$i18nt(`Dynamics.${s.transKey}`, s.name) } })];
|
|
332
|
+
})], 2), t("el-select", { directives: [{ name: "show", rawName: "v-show", value: e.record.operators == 3 || e.record.operators == 4, expression: "record.operators == 3 || record.operators == 4" }], staticStyle: { flex: "1", overflow: "hidden" }, attrs: { multiple: "", "multiple-limit": 8, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled, "remote-method": e.searchData, loading: e.fetching, clearable: "", filterable: "", remote: "", "collapse-tags": "", "reserve-keyword": "" }, on: { change: e.selectDataMore }, model: { value: e.record.values, callback: function(s) {
|
|
333
|
+
e.$set(e.record, "values", s);
|
|
334
|
+
}, expression: "record.values" } }, [e._l(e.fkData, function(s, a) {
|
|
335
|
+
return [t("el-option", { key: a, attrs: { value: s.id, label: e.$i18nt(`Dynamics.${s.transKey}`, s.name) } })];
|
|
336
|
+
})], 2), e.choiceDisabled ? e._e() : t("i", { staticClass: "el-icon-search cao_setting", on: { click: function(s) {
|
|
337
|
+
return e.lookup(e.record);
|
|
338
|
+
} } })], 1) : e._e()] : e.record.columntype === "participants" ? [e.record.operators != 41 && e.record.operators != 42 ? t("div", { staticClass: "cao_about" }, [t("el-select", { staticStyle: { flex: "1", overflow: "hidden" }, attrs: { multiple: "", "multiple-limit": 8, placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), "remote-method": e.searchData, loading: e.fetching, clearable: "", filterable: "", remote: "", "collapse-tags": "", "reserve-keyword": "", disabled: e.choiceDisabled }, on: { change: e.selectDataMore }, model: { value: e.record.values, callback: function(s) {
|
|
339
|
+
e.$set(e.record, "values", s);
|
|
340
|
+
}, expression: "record.values" } }, [e._l(e.fkData, function(s, a) {
|
|
341
|
+
return [t("el-option", { attrs: { value: s.id, label: s.name } })];
|
|
342
|
+
})], 2), e.choiceDisabled ? e._e() : t("i", { staticClass: "el-icon-search cao_setting", on: { click: e.lookup } })], 1) : e._e()] : e._e()], 2)]), t("div", { staticClass: "sc" }, [e.choiceDisabled ? e._e() : t("i", { staticClass: "el-icon-delete", staticStyle: { "font-size": "16px", color: "#ff4d4f" }, on: { click: function(s) {
|
|
343
|
+
return e.delList(e.record);
|
|
344
|
+
} } })])]), t("gd-search", { ref: "engineSearch", attrs: { appendToBody: !0 }, on: { lookupSeled: e.lookupSeled } })], 1);
|
|
345
|
+
}, x = [], T = /* @__PURE__ */ u(
|
|
346
|
+
S,
|
|
347
|
+
L,
|
|
348
|
+
x,
|
|
349
|
+
!1,
|
|
350
|
+
null,
|
|
351
|
+
"30c8cccf",
|
|
352
|
+
null,
|
|
353
|
+
null
|
|
354
|
+
);
|
|
355
|
+
const F = T.exports;
|
|
356
|
+
const N = {
|
|
357
|
+
props: {
|
|
358
|
+
record: {
|
|
359
|
+
type: Object,
|
|
360
|
+
required: !0
|
|
361
|
+
},
|
|
362
|
+
relevantList: {
|
|
363
|
+
type: Array,
|
|
364
|
+
default: () => []
|
|
365
|
+
},
|
|
366
|
+
tableLists: {
|
|
367
|
+
type: Array,
|
|
368
|
+
default: () => []
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
data() {
|
|
372
|
+
return {
|
|
373
|
+
loadOptions: [],
|
|
374
|
+
options: [],
|
|
375
|
+
loadOptionsOld: [],
|
|
376
|
+
cascaderValue: [],
|
|
377
|
+
isLoad: !1
|
|
378
|
+
};
|
|
379
|
+
},
|
|
380
|
+
watch: {
|
|
381
|
+
record: {
|
|
382
|
+
handler(i, e) {
|
|
383
|
+
if (e !== void 0) {
|
|
384
|
+
if (i.dynamicreferencefield === "" && i.dynamicreferencetable === "") {
|
|
385
|
+
this.$refs.cascader.checkedValue = "", this.options = JSON.parse(this.loadOptionsOld);
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
i.dynamicreferencefield !== "" && i.dynamicreferencetable !== "" && !this.isLoad && (this.isLoad = !0, this.onlineFormGetCodeGenerateList(i.dynamicreferencetable).then((t) => {
|
|
389
|
+
const s = JSON.parse(this.loadOptionsOld);
|
|
390
|
+
s.map((a) => (a.children = null, a.tablename === i.dynamicreferencetable && (a.children = t), a)), this.options = [...s], this.cascaderValue = [i.dynamicreferencetable, i.dynamicreferencefield], this.$refs.cascader.checkedValue = this.cascaderValue;
|
|
391
|
+
}));
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
deep: !0,
|
|
395
|
+
immediate: !0
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
methods: {
|
|
399
|
+
change(i) {
|
|
400
|
+
let e = "";
|
|
401
|
+
this.record.referencetable = i[0] ? i[0] : "", this.record.dynamicreferencetable = i[0] ? i[0] : "", this.record.dynamicreferencefield = i[1] ? i[1] : "", i[0] && (e = this.loadOptions.filter((s) => s.value === i[0])[0].referencefiled), this.record.referencefiled = e, i[1] && (this.record.list = []), this.record.show = i.length === 2;
|
|
402
|
+
},
|
|
403
|
+
lazyLoad(i, e) {
|
|
404
|
+
const { level: t, value: s } = i;
|
|
405
|
+
if (this.loadOptions.length === 0) {
|
|
406
|
+
this.getLoadOptions().then(() => {
|
|
407
|
+
e(this.loadOptions);
|
|
408
|
+
});
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
this.onlineFormGetCodeGenerateList(s).then((a) => {
|
|
412
|
+
e(a);
|
|
413
|
+
});
|
|
414
|
+
},
|
|
415
|
+
onlineFormGetCodeGenerateList(i) {
|
|
416
|
+
const e = this.tableLists.filter((t) => t.tablename === i)[0];
|
|
417
|
+
return p({
|
|
418
|
+
codeGenId: e.id
|
|
419
|
+
}).then((t) => {
|
|
420
|
+
if (t.code == 200) {
|
|
421
|
+
let s = [];
|
|
422
|
+
return t.data.map((a) => {
|
|
423
|
+
let l = this.$i18nt(`Dynamics.${a.transkey}`, a.columncomment);
|
|
424
|
+
return a.effecttype === this.record.columntype && s.push({
|
|
425
|
+
value: a.columnname,
|
|
426
|
+
label: `${l} (${a.effecttype})`,
|
|
427
|
+
leaf: !0
|
|
428
|
+
}), a;
|
|
429
|
+
}), s;
|
|
430
|
+
}
|
|
431
|
+
});
|
|
432
|
+
},
|
|
433
|
+
getLoadOptions() {
|
|
434
|
+
let i = [];
|
|
435
|
+
this.relevantList.map((t) => {
|
|
436
|
+
t.item7 === "parental" && i.push(t.item2);
|
|
437
|
+
});
|
|
438
|
+
let e = [...this.tableLists].filter((t) => i.includes(t.tablename));
|
|
439
|
+
return e.map((t) => {
|
|
440
|
+
let s = this.relevantList.filter((a) => a.item2 === t.tablename)[0];
|
|
441
|
+
return t.referencefiled = s.item5, t.leaf = !1, t.value = t.tablename, t.label = this.$i18nt(`Dynamics.${t.transkey}`, t.busname), t.loading = !1, t;
|
|
442
|
+
}), this.loadOptions = [...e], this.loadOptionsOld = JSON.stringify(e), new Promise((t) => {
|
|
443
|
+
t();
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
var O = function() {
|
|
449
|
+
var e = this, t = e._self._c;
|
|
450
|
+
return t("el-cascader", { ref: "cascader", staticStyle: { width: "280px" }, attrs: { options: e.options, props: { lazy: !0, lazyLoad: e.lazyLoad } }, on: { change: e.change }, model: { value: e.cascaderValue, callback: function(s) {
|
|
451
|
+
e.cascaderValue = s;
|
|
452
|
+
}, expression: "cascaderValue" } });
|
|
453
|
+
}, R = [], B = /* @__PURE__ */ u(
|
|
454
|
+
N,
|
|
455
|
+
O,
|
|
456
|
+
R,
|
|
457
|
+
!1,
|
|
458
|
+
null,
|
|
459
|
+
"32a973af",
|
|
460
|
+
null,
|
|
461
|
+
null
|
|
462
|
+
);
|
|
463
|
+
const A = B.exports;
|
|
464
|
+
const I = {
|
|
465
|
+
name: "composeMiddle",
|
|
466
|
+
props: {
|
|
467
|
+
source: {
|
|
468
|
+
type: String,
|
|
469
|
+
default: "none"
|
|
470
|
+
},
|
|
471
|
+
record: {
|
|
472
|
+
type: Object,
|
|
473
|
+
required: !0
|
|
474
|
+
},
|
|
475
|
+
tableNameAllData: {
|
|
476
|
+
type: Array,
|
|
477
|
+
default: () => []
|
|
478
|
+
},
|
|
479
|
+
type: {
|
|
480
|
+
type: [Number, String],
|
|
481
|
+
default: "1"
|
|
482
|
+
},
|
|
483
|
+
choiceDisabled: {
|
|
484
|
+
type: Boolean,
|
|
485
|
+
default: !1
|
|
486
|
+
},
|
|
487
|
+
disableContain: {
|
|
488
|
+
type: Boolean,
|
|
489
|
+
default: !1
|
|
490
|
+
},
|
|
491
|
+
rulesListed: {
|
|
492
|
+
type: Array,
|
|
493
|
+
default: () => []
|
|
494
|
+
},
|
|
495
|
+
loadDataed: {
|
|
496
|
+
type: Array,
|
|
497
|
+
default: () => []
|
|
498
|
+
},
|
|
499
|
+
fkTableListed: {
|
|
500
|
+
type: Array,
|
|
501
|
+
default: () => []
|
|
502
|
+
},
|
|
503
|
+
relevantListed: {
|
|
504
|
+
type: Array,
|
|
505
|
+
default: () => []
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
data() {
|
|
509
|
+
return {
|
|
510
|
+
fieldFormat: [],
|
|
511
|
+
visible: !1,
|
|
512
|
+
spinning: !1,
|
|
513
|
+
confirmLoading: !1,
|
|
514
|
+
loadData: [],
|
|
515
|
+
rulesList: [],
|
|
516
|
+
list: [],
|
|
517
|
+
fkTableList: [],
|
|
518
|
+
relevantList: [],
|
|
519
|
+
show: !0,
|
|
520
|
+
selShow: !0,
|
|
521
|
+
relevant: "",
|
|
522
|
+
fetching: !1,
|
|
523
|
+
loadOptions: [],
|
|
524
|
+
itemReselect: {}
|
|
525
|
+
};
|
|
526
|
+
},
|
|
527
|
+
computed: {
|
|
528
|
+
styled() {
|
|
529
|
+
return `padding-left:4px;color:${this.primaryColor};`;
|
|
530
|
+
},
|
|
531
|
+
...f(["primaryColor", "tableLists"])
|
|
532
|
+
},
|
|
533
|
+
components: {
|
|
534
|
+
ComposeFilter: F,
|
|
535
|
+
EffectTypeIcon: b,
|
|
536
|
+
ChildCascader: A
|
|
537
|
+
},
|
|
538
|
+
methods: {
|
|
539
|
+
sbumitDel(i) {
|
|
540
|
+
let e = null;
|
|
541
|
+
const t = (a) => (a = a.filter((l, n) => (l.list.length > 0 && (l.list = t(l.list)), l.id == i.pid && (e = l), l.id != i.id)), a);
|
|
542
|
+
let s = t([...this.record.list]);
|
|
543
|
+
if (e && e.list.length == 1) {
|
|
544
|
+
let a = e.pid, l = e.list[0];
|
|
545
|
+
e.list = [], e = Object.assign(e, l, {
|
|
546
|
+
pid: a
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
this.record.list = [...s];
|
|
550
|
+
},
|
|
551
|
+
delList(i) {
|
|
552
|
+
this.$emit("change");
|
|
553
|
+
let e = this;
|
|
554
|
+
if (i.list.length < 2) {
|
|
555
|
+
e.sbumitDel(i);
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
this.$confirm(this.$i18nt("gd.filter.mergeDelTip", "\u662F\u5426\u5220\u9664\u8BE5\u5B50\u53E5?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
559
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
560
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
561
|
+
showClose: !1,
|
|
562
|
+
confirmButtonLoading: !1,
|
|
563
|
+
cancelButtonLoading: !1,
|
|
564
|
+
closeOnClickModal: !1,
|
|
565
|
+
type: "warning",
|
|
566
|
+
confirmButtonClass: "el-button--danger",
|
|
567
|
+
customClass: "custom-alert",
|
|
568
|
+
callback: () => {
|
|
569
|
+
},
|
|
570
|
+
beforeClose: (t, s, a) => {
|
|
571
|
+
if (t !== "confirm") {
|
|
572
|
+
a();
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
e.sbumitDel(i), a();
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
},
|
|
579
|
+
addItem() {
|
|
580
|
+
let i = [
|
|
581
|
+
{
|
|
582
|
+
referencefiled: "",
|
|
583
|
+
referencetable: "",
|
|
584
|
+
checked: !1,
|
|
585
|
+
columnid: "",
|
|
586
|
+
columnname: "",
|
|
587
|
+
columntype: "input",
|
|
588
|
+
dynamicreferencefield: "",
|
|
589
|
+
dynamicreferencetable: "",
|
|
590
|
+
fieldformat: null,
|
|
591
|
+
fkdata: [],
|
|
592
|
+
id: h(),
|
|
593
|
+
operators: "1",
|
|
594
|
+
optionsdata: [],
|
|
595
|
+
pid: this.record.id,
|
|
596
|
+
recordid: null,
|
|
597
|
+
ruleslist: [...this.rulesList],
|
|
598
|
+
show: !0,
|
|
599
|
+
tablename: "",
|
|
600
|
+
type: "1",
|
|
601
|
+
value: "",
|
|
602
|
+
values: [],
|
|
603
|
+
list: []
|
|
604
|
+
}
|
|
605
|
+
];
|
|
606
|
+
this.record.list = this.record.list.concat(i);
|
|
607
|
+
},
|
|
608
|
+
cancelItem(i) {
|
|
609
|
+
this.$emit("cancelItem", i);
|
|
610
|
+
},
|
|
611
|
+
changeCascader(i, e) {
|
|
612
|
+
const t = this.loadData.filter((s) => s.id === i)[0];
|
|
613
|
+
e.columnname = t.columnname, e.columntype = t.effecttype, e.list = [], e.recordid = t.id, e.referencetable = "", e.dynamicreferencetable = "", e.dynamicreferencefield = "", e.referencefiled = "", e.show = !1;
|
|
614
|
+
},
|
|
615
|
+
changeRelevant(i) {
|
|
616
|
+
const e = this.relevantList.filter((s) => `${s.item4}@${s.item7}` === i)[0], t = this.loadData.filter((s) => s.id === i)[0];
|
|
617
|
+
if (t) {
|
|
618
|
+
this.conditionColumn(t);
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
this.conditionRelevant(e);
|
|
622
|
+
},
|
|
623
|
+
conditionColumn(i) {
|
|
624
|
+
this.$emit("change");
|
|
625
|
+
let e = this.loadData.filter((c) => c.id === i.id)[0], t = this.rulesList.filter((c) => c.remark.split(",").includes(i.effecttype)), s = null;
|
|
626
|
+
e.fieldformat && (s = this.fieldFormat.filter((c) => c.code == e.fieldformat)[0].name);
|
|
627
|
+
let a = this.tableNameAllData.filter((c) => c.id == e.codegenid)[0];
|
|
628
|
+
const n = (a.isvirtualtable !== void 0 ? a.isvirtualtable : 0) == 1 && e.virtualcolumn !== void 0 ? e.virtualcolumn : e.columnname;
|
|
629
|
+
let r = [
|
|
630
|
+
{
|
|
631
|
+
type: "1",
|
|
632
|
+
operators: t[0].code,
|
|
633
|
+
columnid: e.id,
|
|
634
|
+
columnname: n,
|
|
635
|
+
value: "",
|
|
636
|
+
values: [],
|
|
637
|
+
columntype: e.effecttype,
|
|
638
|
+
ruleslist: [...t],
|
|
639
|
+
fkdata: [],
|
|
640
|
+
id: h(),
|
|
641
|
+
fieldformat: s,
|
|
642
|
+
list: [],
|
|
643
|
+
checked: !1,
|
|
644
|
+
pid: this.record.id,
|
|
645
|
+
referencefiled: "",
|
|
646
|
+
referencetable: "",
|
|
647
|
+
show: !0,
|
|
648
|
+
tablename: a.tablename,
|
|
649
|
+
recordid: e.id,
|
|
650
|
+
dynamicreferencetable: "",
|
|
651
|
+
dynamicreferencefield: "",
|
|
652
|
+
optionsdata: []
|
|
653
|
+
}
|
|
654
|
+
], o = this.record.list.filter((c) => !["relevant", "parental"].includes(c.columntype)), d = this.record.list.filter((c) => ["relevant", "parental"].includes(c.columntype));
|
|
655
|
+
o = o.concat(r), this.record.list = o.concat(d), this.selShow = !0, this.$nextTick(() => {
|
|
656
|
+
setTimeout(() => {
|
|
657
|
+
this.relevant = "";
|
|
658
|
+
}, 0);
|
|
659
|
+
});
|
|
660
|
+
},
|
|
661
|
+
conditionRelevant(i) {
|
|
662
|
+
this.$emit("change");
|
|
663
|
+
let e = this.rulesList.filter((r) => ["5", "6"].includes(String(r.code))), t = this.record.list.filter((r) => !["relevant", "parental"].includes(r.columntype)), s = this.record.list.filter((r) => ["relevant", "parental"].includes(r.columntype));
|
|
664
|
+
s.filter((r) => r.recordid == i.item4 + "@" + i.item7)[0];
|
|
665
|
+
let a = this.record.referencetable || this.record.tablename, l = this.tableNameAllData.filter((r) => r.tablename == a)[0], n = [
|
|
666
|
+
{
|
|
667
|
+
type: "1",
|
|
668
|
+
operators: "5",
|
|
669
|
+
columnid: i.item4,
|
|
670
|
+
columnname: `${i.item5}`,
|
|
671
|
+
value: "",
|
|
672
|
+
values: [],
|
|
673
|
+
columntype: i.item7 ? i.item7 : "relevant",
|
|
674
|
+
ruleslist: [...e],
|
|
675
|
+
fkdata: [],
|
|
676
|
+
id: h(),
|
|
677
|
+
fieldformat: null,
|
|
678
|
+
list: [],
|
|
679
|
+
checked: !1,
|
|
680
|
+
pid: this.record.id,
|
|
681
|
+
referencefiled: i.item5,
|
|
682
|
+
referencetable: i.item2,
|
|
683
|
+
show: !0,
|
|
684
|
+
tablename: l.tablename,
|
|
685
|
+
recordid: i.item4 + "@" + i.item7,
|
|
686
|
+
dynamicreferencetable: "",
|
|
687
|
+
dynamicreferencefield: "",
|
|
688
|
+
optionsdata: []
|
|
689
|
+
}
|
|
690
|
+
];
|
|
691
|
+
s = s.concat(n), this.record.list = t.concat(s), this.selShow = !0, this.$nextTick(() => {
|
|
692
|
+
setTimeout(() => {
|
|
693
|
+
this.relevant = "";
|
|
694
|
+
}, 0);
|
|
695
|
+
});
|
|
696
|
+
},
|
|
697
|
+
visibleReselect(i, e) {
|
|
698
|
+
this.itemReselect = i ? JSON.parse(JSON.stringify(e)) : {};
|
|
699
|
+
},
|
|
700
|
+
changeReselect(i, e, t) {
|
|
701
|
+
const s = this.relevantList.filter((a) => `${a.item4}@${a.item7}` === i)[0];
|
|
702
|
+
this.reselectRelevant(s, e, this.itemReselect.recordid, this.itemReselect.columnid);
|
|
703
|
+
},
|
|
704
|
+
reselectRelevant(i, e, t, s) {
|
|
705
|
+
this.$emit("change");
|
|
706
|
+
let a = this, l = t, n = [...this.record.list];
|
|
707
|
+
this.$confirm(
|
|
708
|
+
this.$i18nt("gd.filter.cleanAllTip", "\u6240\u6709\u5B57\u6BB5\u53CA\u8BE5\u5B9E\u4F53\u7684\u76F8\u5173\u5B9E\u4F53\u5C06\u4F1A\u6E05\u9664,\u662F\u5426\u7EE7\u7EED?"),
|
|
709
|
+
this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"),
|
|
710
|
+
{
|
|
711
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
712
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
713
|
+
showClose: !1,
|
|
714
|
+
confirmButtonLoading: !1,
|
|
715
|
+
cancelButtonLoading: !1,
|
|
716
|
+
closeOnClickModal: !1,
|
|
717
|
+
type: "warning",
|
|
718
|
+
confirmButtonClass: "el-button--danger",
|
|
719
|
+
customClass: "custom-alert",
|
|
720
|
+
callback: () => {
|
|
721
|
+
},
|
|
722
|
+
beforeClose: (r, o, d) => {
|
|
723
|
+
if (r !== "confirm") {
|
|
724
|
+
a.$nextTick(() => {
|
|
725
|
+
setTimeout(() => {
|
|
726
|
+
n[e].columnid = s, n[e].recordid = l, a.record.list = [...n];
|
|
727
|
+
}, 0);
|
|
728
|
+
}), d();
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
let c = a.record.referencetable || a.record.tablename, m = a.tableNameAllData.filter((w) => w.tablename == c)[0], k = n[e].type;
|
|
732
|
+
n[e].operators = "5", n[e].columnid = i.item4, n[e].recordid = i.item4 + "@" + i.item7, n[e].columnname = `${i.item5}`, n[e].columntype = `${i.item7}`, n[e].referencefiled = i.item5, n[e].referencetable = i.item2, n[e].list = [], n[e].type = "-1", n[e].tablename = m.tablename, a.$nextTick(() => {
|
|
733
|
+
setTimeout(() => {
|
|
734
|
+
a.record.list = [...n];
|
|
735
|
+
}, 0), setTimeout(() => {
|
|
736
|
+
n[e].type = k, a.record.list = [...n];
|
|
737
|
+
}, 10);
|
|
738
|
+
}), d();
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
);
|
|
742
|
+
},
|
|
743
|
+
mouseover() {
|
|
744
|
+
this.selShow = !1;
|
|
745
|
+
},
|
|
746
|
+
delItem(i) {
|
|
747
|
+
this.$emit("change");
|
|
748
|
+
let e = this;
|
|
749
|
+
this.$confirm(
|
|
750
|
+
this.$i18nt("gd.filter.delSubClause", "\u662F\u5426\u5220\u9664\u76F8\u5173\u5B9E\u4F53\u53CA\u5176\u6240\u6709\u5B50\u4ECE\u53E5?"),
|
|
751
|
+
this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"),
|
|
752
|
+
{
|
|
753
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
754
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
755
|
+
showClose: !1,
|
|
756
|
+
confirmButtonLoading: !1,
|
|
757
|
+
cancelButtonLoading: !1,
|
|
758
|
+
closeOnClickModal: !1,
|
|
759
|
+
type: "warning",
|
|
760
|
+
confirmButtonClass: "el-button--danger",
|
|
761
|
+
customClass: "custom-alert",
|
|
762
|
+
callback: () => {
|
|
763
|
+
},
|
|
764
|
+
beforeClose: (t, s, a) => {
|
|
765
|
+
if (t !== "confirm") {
|
|
766
|
+
a();
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
let l = e.record.list.filter((n) => n.id !== i.id);
|
|
770
|
+
e.record.list = [...l], a();
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
);
|
|
774
|
+
},
|
|
775
|
+
selectRules(i, e) {
|
|
776
|
+
this.$emit("change");
|
|
777
|
+
let t = this;
|
|
778
|
+
if (i == 5) {
|
|
779
|
+
let s = this.record.list;
|
|
780
|
+
s[e].list = [], this.record.list = [...s];
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
this.$confirm(
|
|
784
|
+
this.$i18nt("gd.filter.delCondition", "\u6B64\u64CD\u4F5C\u5C06\u5220\u9664\u4E0E\u8BE5\u5B9E\u4F53\u76F8\u5173\u7684\u6240\u6709\u7B5B\u9009\u6761\u4EF6?"),
|
|
785
|
+
this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"),
|
|
786
|
+
{
|
|
787
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
788
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
789
|
+
showClose: !1,
|
|
790
|
+
confirmButtonLoading: !1,
|
|
791
|
+
cancelButtonLoading: !1,
|
|
792
|
+
closeOnClickModal: !1,
|
|
793
|
+
type: "warning",
|
|
794
|
+
confirmButtonClass: "el-button--danger",
|
|
795
|
+
customClass: "custom-alert",
|
|
796
|
+
callback: () => {
|
|
797
|
+
},
|
|
798
|
+
beforeClose: (s, a, l) => {
|
|
799
|
+
if (s !== "confirm") {
|
|
800
|
+
let r = t.record.list;
|
|
801
|
+
r[e].operators = "5", t.record.list = [...r], l();
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
let n = t.record.list;
|
|
805
|
+
n[e].list = [], t.record.list = [...n], l();
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
);
|
|
809
|
+
},
|
|
810
|
+
async init(i) {
|
|
811
|
+
const e = (s) => (s = s.filter((a, l) => {
|
|
812
|
+
if (a.type = String(a.type), a.operators = String(a.operators), a.list.length > 0)
|
|
813
|
+
a.list = e(a.list);
|
|
814
|
+
else {
|
|
815
|
+
let n = this.getItemVal(a, 2);
|
|
816
|
+
a.value = typeof n == "number" ? n : a.value, a.values = typeof n == "object" ? n.map((r) => Number(r)) : [];
|
|
817
|
+
}
|
|
818
|
+
return a.fkdata !== void 0 && typeof a.fkdata == "string" && (a.fkdata = JSON.parse(a.fkdata)), a.ruleslist !== void 0 && typeof a.ruleslist == "string" && (a.ruleslist = JSON.parse(a.ruleslist)), !0;
|
|
819
|
+
}), s);
|
|
820
|
+
let t = await e(this.record.list);
|
|
821
|
+
this.record.list = t, this.visible = !0;
|
|
822
|
+
},
|
|
823
|
+
getList() {
|
|
824
|
+
const i = this.record.dynamicreferencetable ? this.record.dynamicreferencetable : this.record.referencetable, e = this.tableNameAllData.filter((t) => t.tablename == i)[0];
|
|
825
|
+
return p({
|
|
826
|
+
codeGenId: e.id
|
|
827
|
+
}).then((t) => {
|
|
828
|
+
let s = t.data.filter((a) => a.effecttype == "about" && a.columnname == (a.relations + "_AboutTable").toLowerCase() || a.effecttype == "currency" && a.columnname == (a.relations + "_Currency_Base").toLowerCase() ? !1 : a.effecttype != "editor");
|
|
829
|
+
return this.loadData = [...s], t;
|
|
830
|
+
});
|
|
831
|
+
},
|
|
832
|
+
baseReference() {
|
|
833
|
+
let i = this.tableNameAllData.filter((e) => e.tablename == this.record.referencetable)[0];
|
|
834
|
+
return _({
|
|
835
|
+
tableId: i.id
|
|
836
|
+
}).then((e) => (e.code == 200 && (this.relevantList = e.data.map((t) => {
|
|
837
|
+
const s = this.tableLists.filter((a) => a.tablename === t.item2)[0];
|
|
838
|
+
return t.tableTranskey = s ? `Dynamics.${s.transkey}` : null, t.columnnameTranskey = t.rest && t.rest.item1 ? `Dynamics.${t.rest.item1}` : null, t;
|
|
839
|
+
}), this.getLoadOptions()), e.data));
|
|
840
|
+
},
|
|
841
|
+
fkListOnView() {
|
|
842
|
+
const i = this.tableNameAllData.filter((e) => e.tablename == this.record.referencetable)[0];
|
|
843
|
+
y({
|
|
844
|
+
codeGenId: i.id
|
|
845
|
+
}).then((e) => {
|
|
846
|
+
this.fkTableList = e.data;
|
|
847
|
+
});
|
|
848
|
+
},
|
|
849
|
+
getLoadOptions() {
|
|
850
|
+
let i = [];
|
|
851
|
+
this.relevantList.map((t) => {
|
|
852
|
+
t.item7 === "parental" && i.push(t.item2);
|
|
853
|
+
});
|
|
854
|
+
let e = [...this.tableLists].filter((t) => i.includes(t.tablename));
|
|
855
|
+
e.map((t) => {
|
|
856
|
+
let s = this.$i18nt(`Dynamics.${t.transkey}`, t.name), a = this.relevantList.filter((l) => l.item2 === t.tablename)[0];
|
|
857
|
+
return t.referencefiled = a.item5, t.isleaf = !1, t.value = t.tablename, t.label = s, t.loading = !1, t;
|
|
858
|
+
}), this.loadOptions = [...e];
|
|
859
|
+
},
|
|
860
|
+
async sbumitCancelItem(i) {
|
|
861
|
+
let e = null;
|
|
862
|
+
const t = (a) => (a = a.filter((l, n) => (l.list.length > 0 && (l.list = t(l.list)), l.id == i.pid && (e = l), !0)), a);
|
|
863
|
+
let s = await t([...this.record.list]);
|
|
864
|
+
if (e)
|
|
865
|
+
e.list = this.upList(e.list, i);
|
|
866
|
+
else {
|
|
867
|
+
e = this.upList(s, i), this.record.list = [...e];
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
this.record.list = [...s];
|
|
871
|
+
},
|
|
872
|
+
cancelItem(i) {
|
|
873
|
+
this.$emit("change");
|
|
874
|
+
let e = this;
|
|
875
|
+
this.$confirm(this.$i18nt("gd.filter.mergeCancelTip", "\u662F\u5426\u53D6\u6D88\u7EC4\u5408\u8BE5\u5B50\u53E5?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
876
|
+
confirmButtonText: this.$i18nt("gd.https.cancelOk", "\u786E\u8BA4\u53D6\u6D88"),
|
|
877
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
878
|
+
showClose: !1,
|
|
879
|
+
confirmButtonLoading: !1,
|
|
880
|
+
cancelButtonLoading: !1,
|
|
881
|
+
closeOnClickModal: !1,
|
|
882
|
+
type: "warning",
|
|
883
|
+
confirmButtonClass: "el-button--danger",
|
|
884
|
+
customClass: "custom-alert",
|
|
885
|
+
callback: () => {
|
|
886
|
+
},
|
|
887
|
+
beforeClose: (t, s, a) => {
|
|
888
|
+
if (t !== "confirm") {
|
|
889
|
+
a();
|
|
890
|
+
return;
|
|
891
|
+
}
|
|
892
|
+
e.sbumitCancelItem(i), a();
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
},
|
|
896
|
+
upList(i, e) {
|
|
897
|
+
let t = [], s = [], a = i.findIndex((n) => n.id === e.id), l = e.pid;
|
|
898
|
+
return i.forEach((n, r) => {
|
|
899
|
+
r < a && t.push(n), r == a && n.list.map((o) => (o.pid = l, o)), r > a && s.push(n);
|
|
900
|
+
}), t.concat(e.list).concat(s);
|
|
901
|
+
},
|
|
902
|
+
getItemVal(i, e = 1) {
|
|
903
|
+
let t = "";
|
|
904
|
+
const s = String(i.operators);
|
|
905
|
+
if (["fk", "about"].includes(i.columntype)) {
|
|
906
|
+
let a = e == 1 && i.values !== void 0 ? i.values.join(",") : String(i.value).split(",");
|
|
907
|
+
t = ["3", "4"].includes(s) ? a : i.value === "" ? "" : Number(i.value);
|
|
908
|
+
} else if (i.columntype == "user") {
|
|
909
|
+
let a = e == 1 && i.values !== void 0 ? i.values.join(",") : String(i.value).split(",");
|
|
910
|
+
t = ["3", "4"].includes(s) ? a : i.value === "" ? "" : Number(i.value);
|
|
911
|
+
} else if (i.columntype == "participants") {
|
|
912
|
+
let a = e == 1 && i.values !== void 0 ? i.values.join(",") : String(i.value).split(",");
|
|
913
|
+
t = ["3", "4"].includes(s) ? a : i.value === "" ? "" : Number(i.value);
|
|
914
|
+
} else
|
|
915
|
+
t = i.value;
|
|
916
|
+
return t;
|
|
917
|
+
},
|
|
918
|
+
getDictionary(i) {
|
|
919
|
+
return this.$options.filters.dictData(i);
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
mounted() {
|
|
923
|
+
let i = this.getDictionary("table_lookup_rules");
|
|
924
|
+
i.forEach((e, t) => {
|
|
925
|
+
i[t].sysdicttype = {};
|
|
926
|
+
}), this.rulesList = [...i], this.effectType = this.getDictionary("code_gen_effect_type"), this.fieldFormat = this.getDictionary("time_longshort"), this.fetching = !0, this.$nextTick(() => {
|
|
927
|
+
setTimeout(() => {
|
|
928
|
+
if (this.source === "children") {
|
|
929
|
+
this.visible = !0, this.rulesList = [...this.rulesListed], this.loadData = [...this.loadDataed], this.fkTableList = [...this.fkTableListed], this.relevantList = [...this.relevantListed];
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
Promise.all([this.getList(), this.baseReference()]).then((e) => {
|
|
933
|
+
setTimeout(() => {
|
|
934
|
+
this.init();
|
|
935
|
+
}, 100);
|
|
936
|
+
}), this.fkListOnView();
|
|
937
|
+
}, 10);
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
var M = function() {
|
|
942
|
+
var e = this, t = e._self._c;
|
|
943
|
+
return t("div", { staticStyle: { padding: "1px 0" } }, [e.visible ? t("div", [e._l(e.record.list, function(s, a) {
|
|
944
|
+
return [s.columntype != "relevant" && s.columntype != "parental" ? t("div", [s.operators != 43 && s.operators != 44 ? [s.list.length == 0 ? t("composeFilter", { attrs: { record: s, rulesList: e.rulesList, relevantList: e.relevantList, loadData: e.loadData, fkTableList: e.fkTableList, choiceDisabled: e.choiceDisabled, type: e.type, disableContain: e.disableContain, tableNameAllData: e.tableNameAllData }, on: { delList: e.delList, cancelItem: e.cancelItem } }) : t("div", { staticClass: "compose" }, [t("div", { staticClass: "t" }, [t("el-checkbox", { attrs: { disabled: e.choiceDisabled }, model: { value: s.checked, callback: function(l) {
|
|
945
|
+
e.$set(s, "checked", l);
|
|
946
|
+
}, expression: "item.checked" } }), t("div", { staticClass: "ts tsl" }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled }, model: { value: s.type, callback: function(l) {
|
|
947
|
+
e.$set(s, "type", l);
|
|
948
|
+
}, expression: "item.type" } }, [t("el-option", { attrs: { value: "1", label: e.$i18nt("gd.filter.and", "\u548C") } }), t("el-option", { attrs: { value: "2", label: e.$i18nt("gd.filter.or", "\u6216") } })], 1)], 1), e.choiceDisabled ? e._e() : t("div", { staticClass: "ts active-color", on: { click: e.addItem } }, [t("i", { staticClass: "el-icon-circle-plus-outline", staticStyle: { "font-size": "16px" } }), e._v(" " + e._s(e.$i18nt("gd.btn.addTo", "\u6DFB\u52A0")) + " ")]), e.choiceDisabled ? e._e() : t("div", { staticClass: "ts active-color", on: { click: function(l) {
|
|
949
|
+
return e.cancelItem(s);
|
|
950
|
+
} } }, [t("i", { staticClass: "el-icon-circle-close", staticStyle: { "font-size": "16px" } }), e._v(" " + e._s(e.$i18nt("gd.btn.cancel", "\u53D6\u6D88")) + " ")]), e.choiceDisabled ? e._e() : t("div", { staticClass: "ts", staticStyle: { color: "#ff4d4f" }, on: { click: function(l) {
|
|
951
|
+
return e.delList(s);
|
|
952
|
+
} } }, [t("i", { staticClass: "el-icon-delete", staticStyle: { "font-size": "16px" } }), e._v(" " + e._s(e.$i18nt("gd.btn.del", "\u5220\u9664")) + " ")])], 1), t("div", { staticClass: "b" }, [t("div", { staticClass: "bl" }, [t("div", { staticClass: "bls" })]), t("div", { staticClass: "bc" }, [t("div", { staticClass: "bcs" })]), t("div", { staticClass: "br" }, [t("composeMiddle", { attrs: { record: s, tableNameAllData: e.tableNameAllData, type: e.type, rulesListed: e.rulesList, relevantListed: e.relevantList, loadDataed: e.loadData, fkTableListed: e.fkTableList, disableContain: !0, choiceDisabled: e.choiceDisabled, source: "children" }, on: { change: function(l) {
|
|
953
|
+
return e.$emit("change");
|
|
954
|
+
} } })], 1)])])] : e._e()], 2) : e._e()];
|
|
955
|
+
})], 2) : e._e(), e.record.operators != 6 && !e.choiceDisabled ? t("div", { staticClass: "add" }, [e.selShow ? t("div", { staticClass: "active-color", on: { mouseover: e.mouseover } }, [e._v(e._s(e.$i18nt("gd.btn.choice", "\u9009\u62E9")))]) : t("div", [t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), filterable: "" }, on: { change: e.changeRelevant }, model: { value: e.relevant, callback: function(s) {
|
|
956
|
+
e.relevant = s;
|
|
957
|
+
}, expression: "relevant" } }, [t("el-option-group", { staticStyle: { "font-size": "14px" }, attrs: { label: e.$i18nt("gd.field.field", "\u5B57\u6BB5") } }, [e._l(e.loadData, function(s, a) {
|
|
958
|
+
return [t("el-option", { attrs: { value: s.id, label: e.$i18nt(`Dynamics.${s.transkey}`, s.columncomment) } }, [t("EffectTypeIcon", { attrs: { effectType: s.effecttype } }), t("span", { staticStyle: { "padding-left": "2px" } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${s.transkey}`, s.columncomment)) + " (" + e._s(s.columnname) + ") ")])], 1)];
|
|
959
|
+
})], 2), e.type == 2 ? t("el-option-group", { staticStyle: { "font-size": "14px" }, attrs: { label: e.$i18nt("gd.filter.relevant", "\u76F8\u5173") } }, [e._l(e.relevantList, function(s, a) {
|
|
960
|
+
return [t("el-option", { attrs: { value: s.item4 + "@" + s.item7, label: `${e.$i18nt(s.columnnameTranskey, s.item6)} (${e.$i18nt(s.tableTranskey, s.item3)})` } }, [t("span", { staticClass: "gd-icons", class: s.item7 == "parental" ? "gd-icon-icon_shangxiaji" : "gd-icon-xiaji" }), t("span", { staticStyle: { "margin-left": "2px" } }, [e._v(" " + e._s(e.$i18nt(s.columnnameTranskey, s.item6)) + " (" + e._s(e.$i18nt(s.tableTranskey, s.item3)) + ") ")])])];
|
|
961
|
+
})], 2) : e._e()], 1)], 1)]) : e._e(), e.record.operators == 6 ? t("div", { staticStyle: { width: "600px" } }, [t("el-alert", { staticStyle: { margin: "6px 0", width: "80%" }, attrs: { title: e.$i18nt("gd.filter.noAddCondition", "\u65E0\u6CD5\u5728\u6B64\u9879\u7684\u4E0B\u65B9\u6DFB\u52A0\u6761\u4EF6"), type: "warning", "show-icon": "", closable: !1 } })], 1) : e._e(), e.visible ? t("div", { staticStyle: { position: "relative" } }, [e._l(e.record.list, function(s, a) {
|
|
962
|
+
return [s.columntype == "relevant" || s.columntype == "parental" ? t("div", { staticStyle: { position: "relative" } }, [e.source === "children" ? [t("div", { staticClass: "covering-box" }, [t("el-checkbox", { attrs: { disabled: e.choiceDisabled }, model: { value: s.checked, callback: function(l) {
|
|
963
|
+
e.$set(s, "checked", l);
|
|
964
|
+
}, expression: "item.checked" } })], 1), s.show ? t("div", { staticClass: "covering-xian" }) : e._e()] : e._e(), t("div", { staticClass: "relevant" }, [e.choiceDisabled ? e._e() : t("div", { staticClass: "rg", class: e.source === "children" ? "rgs" : "rg" }, [e.source === "none" ? t("el-checkbox", { attrs: { disabled: e.choiceDisabled }, model: { value: s.checked, callback: function(l) {
|
|
965
|
+
e.$set(s, "checked", l);
|
|
966
|
+
}, expression: "item.checked" } }) : e._e()], 1), t("div", { staticClass: "l" }, [t("i", { class: s.show ? "el-icon-caret-bottom" : "el-icon-caret-right", on: { click: function(l) {
|
|
967
|
+
s.show = !s.show;
|
|
968
|
+
} } })]), t("div", { staticClass: "c" }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled }, on: { change: function(l) {
|
|
969
|
+
return e.changeReselect(l, a, s);
|
|
970
|
+
}, "visible-change": function(l) {
|
|
971
|
+
return e.visibleReselect(l, s);
|
|
972
|
+
} }, model: { value: s.recordid, callback: function(l) {
|
|
973
|
+
e.$set(s, "recordid", l);
|
|
974
|
+
}, expression: "item.recordid" } }, [e._l(e.relevantList, function(l) {
|
|
975
|
+
return [t("el-option", { attrs: { value: l.item4 + "@" + l.item7, label: `${e.$i18nt(l.columnnameTranskey, l.item6)} (${e.$i18nt(l.tableTranskey, l.item3)})` } }, [t("span", { staticClass: "gd-icons", class: l.item7 == "parental" ? "gd-icon-icon_shangxiaji" : "gd-icon-xiaji" }), t("span", { staticStyle: { "margin-left": "2px" } }, [e._v(" " + e._s(e.$i18nt(l.columnnameTranskey, l.item6)) + " (" + e._s(e.$i18nt(l.tableTranskey, l.item3)) + ") ")])])];
|
|
976
|
+
})], 2)], 1), t("div", { staticClass: "r" }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { disabled: e.choiceDisabled }, on: { select: function(l) {
|
|
977
|
+
return e.selectRules(l, a);
|
|
978
|
+
} }, model: { value: s.operators, callback: function(l) {
|
|
979
|
+
e.$set(s, "operators", l);
|
|
980
|
+
}, expression: "item.operators" } }, [e._l(s.ruleslist, function(l) {
|
|
981
|
+
return [t("el-option", { attrs: { value: l.code, label: e.$i18nt(`Dynamics.${l.transkey}`, l.name) } })];
|
|
982
|
+
})], 2)], 1), t("div", { staticClass: "l" }, [e.choiceDisabled ? e._e() : t("i", { staticClass: "el-icon-delete", staticStyle: { "font-size": "16px", color: "#ff4d4f" }, on: { click: function(l) {
|
|
983
|
+
return e.delItem(s);
|
|
984
|
+
} } })])]), t("div", { directives: [{ name: "show", rawName: "v-show", value: s.show, expression: "item.show" }], staticStyle: { "padding-left": "34px" } }, [s.type != "-1" ? t("composeMiddle", { attrs: { record: s, tableNameAllData: e.tableNameAllData, type: e.type, disableContain: !0, choiceDisabled: e.choiceDisabled }, on: { change: function(l) {
|
|
985
|
+
return e.$emit("change");
|
|
986
|
+
} } }) : e._e()], 1)], 2) : e._e(), s.operators == 43 || s.operators == 44 ? t("div", [e.source === "children" ? [t("div", { staticClass: "covering-box" }, [t("el-checkbox", { attrs: { disabled: e.choiceDisabled }, model: { value: s.checked, callback: function(l) {
|
|
987
|
+
e.$set(s, "checked", l);
|
|
988
|
+
}, expression: "item.checked" } })], 1), s.show ? t("div", { staticClass: "covering-xian" }) : e._e()] : e._e(), t("div", { staticClass: "relevant", class: s.dynamicreferencefield == "" ? "relevants" : "" }, [e.choiceDisabled ? e._e() : t("div", { staticClass: "rg", class: e.source === "children" ? "rgs" : "rg" }, [e.source === "none" ? t("el-checkbox", { attrs: { disabled: e.choiceDisabled }, model: { value: s.checked, callback: function(l) {
|
|
989
|
+
e.$set(s, "checked", l);
|
|
990
|
+
}, expression: "item.checked" } }) : e._e()], 1), t("div", { staticClass: "l" }, [t("i", { class: s.show ? "el-icon-caret-bottom" : "el-icon-caret-right", on: { click: function(l) {
|
|
991
|
+
s.show = !s.show;
|
|
992
|
+
} } })]), t("div", { staticClass: "c" }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: e.choiceDisabled }, on: { change: function(l) {
|
|
993
|
+
return e.changeCascader(l, s);
|
|
994
|
+
} }, model: { value: s.columnid, callback: function(l) {
|
|
995
|
+
e.$set(s, "columnid", l);
|
|
996
|
+
}, expression: "item.columnid" } }, [e._l(e.loadData, function(l, n) {
|
|
997
|
+
return [t("el-option", { attrs: { value: l.id, label: e.$i18nt(`Dynamics.${l.transkey}`, l.columncomment) } }, [t("EffectTypeIcon", { attrs: { effectType: l.effecttype } }), t("span", { staticStyle: { "padding-left": "2px" } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${l.transkey}`, l.columncomment)) + " (" + e._s(l.columnName) + ") ")])], 1)];
|
|
998
|
+
})], 2)], 1), t("div", { staticClass: "r" }, [t("el-select", { staticStyle: { width: "100%" }, attrs: { disabled: e.choiceDisabled }, model: { value: s.operators, callback: function(l) {
|
|
999
|
+
e.$set(s, "operators", l);
|
|
1000
|
+
}, expression: "item.operators" } }, [e._l(s.ruleslist, function(l) {
|
|
1001
|
+
return [l.code == 43 || l.code == 44 ? t("el-option", { attrs: { value: l.code, label: e.$i18nt(`Dynamics.${l.transkey}`, l.name) } }) : e._e()];
|
|
1002
|
+
})], 2)], 1), t("div", { staticClass: "c cs" }, [t("ChildCascader", { attrs: { record: s, relevantList: e.relevantList, tableLists: e.tableLists } })], 1), t("div", { staticClass: "l" }, [e.choiceDisabled ? e._e() : t("i", { staticClass: "el-icon-delete", staticStyle: { "font-size": "16px", color: "#ff4d4f" }, on: { click: function(l) {
|
|
1003
|
+
return e.delItem(s);
|
|
1004
|
+
} } })])]), t("div", { directives: [{ name: "show", rawName: "v-show", value: s.show && s.dynamicreferencefield, expression: "item.show && item.dynamicreferencefield" }], staticStyle: { "padding-left": "34px" } }, [e._m(0, !0), t("div", { staticClass: "trendsb" }, [e._m(1, !0), s.list.length > 0 ? t("div", { staticClass: "bc" }, [t("div", { staticClass: "bcs" })]) : e._e(), t("div", { staticClass: "br" }, [s.dynamicreferencefield != "" ? t("composeMiddle", { attrs: { record: s, tableNameAllData: e.tableNameAllData, type: e.type, disableContain: !0, choiceDisabled: e.choiceDisabled }, on: { change: function(l) {
|
|
1005
|
+
return e.$emit("change");
|
|
1006
|
+
} } }) : e._e()], 1)])])], 2) : e._e()];
|
|
1007
|
+
})], 2) : e._e()]);
|
|
1008
|
+
}, G = [function() {
|
|
1009
|
+
var i = this, e = i._self._c;
|
|
1010
|
+
return e("div", { staticClass: "trendst" }, [e("div", { staticClass: "shu" }), e("div", { staticClass: "heng" })]);
|
|
1011
|
+
}, function() {
|
|
1012
|
+
var i = this, e = i._self._c;
|
|
1013
|
+
return e("div", { staticClass: "bl" }, [e("div", { staticClass: "bls" })]);
|
|
1014
|
+
}], V = /* @__PURE__ */ u(
|
|
1015
|
+
I,
|
|
1016
|
+
M,
|
|
1017
|
+
G,
|
|
1018
|
+
!1,
|
|
1019
|
+
null,
|
|
1020
|
+
"d1684601",
|
|
1021
|
+
null,
|
|
1022
|
+
null
|
|
1023
|
+
);
|
|
1024
|
+
const E = V.exports;
|
|
1025
|
+
const K = {
|
|
1026
|
+
name: "GdFindFilter",
|
|
1027
|
+
props: {
|
|
1028
|
+
table: {
|
|
1029
|
+
type: Object,
|
|
1030
|
+
default: () => ({})
|
|
1031
|
+
},
|
|
1032
|
+
type: {
|
|
1033
|
+
type: [Number, String],
|
|
1034
|
+
default: "1"
|
|
1035
|
+
},
|
|
1036
|
+
mode: {
|
|
1037
|
+
type: String,
|
|
1038
|
+
default: "dialog"
|
|
1039
|
+
},
|
|
1040
|
+
choiceDisabled: {
|
|
1041
|
+
type: Boolean,
|
|
1042
|
+
default: !1
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
data() {
|
|
1046
|
+
return {
|
|
1047
|
+
buttons: [
|
|
1048
|
+
{
|
|
1049
|
+
displayName: '\u7EC4\u5408"\u548C"',
|
|
1050
|
+
functionName: "mergeAnd",
|
|
1051
|
+
show: !0,
|
|
1052
|
+
icon: "el-icon-connection",
|
|
1053
|
+
transKey: "gd.filter.ands",
|
|
1054
|
+
tipI18n: "gd.filter.andsTip",
|
|
1055
|
+
tip: "\u4F7F\u7528AND\u5C06\u67E5\u8BE2\u884C\u7EC4\u5408\u5728\u4E00\u8D77\uFF0C\u7ED3\u679C\u5C06\u4EC5\u5305\u542B\u5339\u914D\u6240\u6709\u7EC4\u5408\u884C\u7684\u8BB0\u5F55\u6216\u64CD\u4F5C",
|
|
1056
|
+
btnType: "tooltip"
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
displayName: '\u7EC4\u5408"\u6216"',
|
|
1060
|
+
functionName: "mergeOr",
|
|
1061
|
+
show: !0,
|
|
1062
|
+
icon: "el-icon-connection",
|
|
1063
|
+
transKey: "gd.filter.ors",
|
|
1064
|
+
tipI18n: "gd.filter.orsTip",
|
|
1065
|
+
tip: "\u4F7F\u7528OR\u5C06\u67E5\u8BE2\u884C\u7EC4\u5408\u5728\u4E00\u8D77\uFF0C\u7ED3\u679C\u5C06\u4EC5\u5305\u542B\u5339\u914D\u6240\u6709\u7EC4\u5408\u884C\u7684\u8BB0\u5F55\u6216\u64CD\u4F5C",
|
|
1066
|
+
btnType: "tooltip"
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
displayName: "\u6E05\u7A7A",
|
|
1070
|
+
functionName: "empty",
|
|
1071
|
+
show: !0,
|
|
1072
|
+
icon: "el-icon-delete",
|
|
1073
|
+
transKey: "gd.btn.empty",
|
|
1074
|
+
btnType: "danger"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
displayName: "\u786E\u5B9A",
|
|
1078
|
+
functionName: "handleSubmit",
|
|
1079
|
+
show: !0,
|
|
1080
|
+
transKey: "gd.btn.confirm",
|
|
1081
|
+
icon: "el-icon-document-checked"
|
|
1082
|
+
}
|
|
1083
|
+
],
|
|
1084
|
+
sysViewFilters: {},
|
|
1085
|
+
fullscreen: !1,
|
|
1086
|
+
width: "86%",
|
|
1087
|
+
visible: !1,
|
|
1088
|
+
visibled: !1,
|
|
1089
|
+
confirmLoading: !1,
|
|
1090
|
+
loadData: [],
|
|
1091
|
+
fkTableList: []
|
|
1092
|
+
};
|
|
1093
|
+
},
|
|
1094
|
+
computed: {
|
|
1095
|
+
...f(["tableLists"])
|
|
1096
|
+
},
|
|
1097
|
+
components: {
|
|
1098
|
+
ComposeMiddle: E
|
|
1099
|
+
},
|
|
1100
|
+
methods: {
|
|
1101
|
+
mergeAnd() {
|
|
1102
|
+
this.merge(1);
|
|
1103
|
+
},
|
|
1104
|
+
mergeOr() {
|
|
1105
|
+
this.merge(2);
|
|
1106
|
+
},
|
|
1107
|
+
merge(i) {
|
|
1108
|
+
let e = [];
|
|
1109
|
+
e.push(this.checkTraverseAll(this.sysViewFilters.list));
|
|
1110
|
+
let t = [0];
|
|
1111
|
+
const s = (a) => (a = a.filter((l, n) => (l.list.length > 0 && (l.list = s(l.list)), ["relevant", "parental"].includes(l.columntype) && l.list.length > 0 ? (e.push(this.checkTraverseAll(l.list)), t.push(l.id)) : ["43", "44"].includes(String(l.operators)) && l.list.length > 0 && t.push(l.id), !0)), a);
|
|
1112
|
+
if (s([...this.sysViewFilters.list]), e = e.filter((a) => a.checkAll.length != 0), e.length != 0) {
|
|
1113
|
+
if (!this.checkLength(e)) {
|
|
1114
|
+
this.$message.error(this.$i18nt("gd.filter.mergeTip", "\u7EC4\u5408\u6700\u5C112\u6761\u6570\u636E\u4EE5\u4E0A!"));
|
|
1115
|
+
return;
|
|
1116
|
+
}
|
|
1117
|
+
if (!this.checkEqual(e)) {
|
|
1118
|
+
this.$message.error(this.$i18nt("gd.filter.mergeIllegal", "\u975E\u6CD5\u7EC4\u5408\uFF01"));
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1121
|
+
if (this.checkRepeat(e, t)) {
|
|
1122
|
+
this.$message.error(this.$i18nt("gd.filter.mergeAgainTip", "\u4E0D\u53EF\u518D\u6B21\u7EC4\u5408\uFF01"));
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
e.forEach((a) => {
|
|
1126
|
+
this.result(i, a.checkAll);
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
},
|
|
1130
|
+
checkTraverseAll(i) {
|
|
1131
|
+
let e = [], t = [];
|
|
1132
|
+
const s = (a) => (a = a.filter((l, n) => {
|
|
1133
|
+
if (!["relevant", "parental"].includes(l.columntype) && l.list.length > 0 && (l.list = s(l.list)), l.checked) {
|
|
1134
|
+
let r = {
|
|
1135
|
+
...l
|
|
1136
|
+
};
|
|
1137
|
+
return e.push(r), t = a, !0;
|
|
1138
|
+
} else
|
|
1139
|
+
return !0;
|
|
1140
|
+
}), a);
|
|
1141
|
+
return s(i), {
|
|
1142
|
+
checkAll: e,
|
|
1143
|
+
arr: t
|
|
1144
|
+
};
|
|
1145
|
+
},
|
|
1146
|
+
checkLength(i) {
|
|
1147
|
+
return i.every((e, t, s) => e.checkAll.length > 1);
|
|
1148
|
+
},
|
|
1149
|
+
checkEqual(i) {
|
|
1150
|
+
let e = [];
|
|
1151
|
+
return i.forEach((s) => {
|
|
1152
|
+
e.push(this.isAllEqual(s.checkAll));
|
|
1153
|
+
}), e.filter((s) => !s)[0] === void 0;
|
|
1154
|
+
},
|
|
1155
|
+
checkRepeat(i, e) {
|
|
1156
|
+
let t = [];
|
|
1157
|
+
return i.forEach((a) => {
|
|
1158
|
+
let l = a.checkAll.length == a.arr.length && !e.includes(a.arr[0].pid);
|
|
1159
|
+
t.push(l);
|
|
1160
|
+
}), t.filter((a) => a)[0] !== void 0;
|
|
1161
|
+
},
|
|
1162
|
+
result(i, e) {
|
|
1163
|
+
let t = [], s = h();
|
|
1164
|
+
e[0].pid, e.forEach((n, r) => {
|
|
1165
|
+
r > 0 && t.push(n.id);
|
|
1166
|
+
});
|
|
1167
|
+
const a = (n) => (n = n.filter((r, o) => (r.list.length > 0 && (r.list = a(r.list)), r.checked && e[0].id === r.id ? (r.checked = !1, r.value = "", r.values = [], r.id = s, r.type = String(i), r.referencefiled = "", r.referencetable = "", r.columnid = 0, r.columntype = "input", r.columnname = "", r.list = e.map((d) => (d.checked = !1, d.pid = s, d)), !0) : t.includes(r.id) ? (r.checked = !1, !1) : !0)), n);
|
|
1168
|
+
let l = a([...this.sysViewFilters.list]);
|
|
1169
|
+
this.sysViewFilters.list = [...l];
|
|
1170
|
+
},
|
|
1171
|
+
empty() {
|
|
1172
|
+
let i = this;
|
|
1173
|
+
this.$confirm(this.$i18nt("gd.https.emptyContent", "\u662F\u5426\u6E05\u7A7A\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1174
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1175
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1176
|
+
showClose: !1,
|
|
1177
|
+
confirmButtonLoading: !1,
|
|
1178
|
+
cancelButtonLoading: !1,
|
|
1179
|
+
closeOnClickModal: !1,
|
|
1180
|
+
type: "warning",
|
|
1181
|
+
confirmButtonClass: "el-button--danger",
|
|
1182
|
+
customClass: "custom-alert",
|
|
1183
|
+
callback: () => {
|
|
1184
|
+
},
|
|
1185
|
+
beforeClose: (e, t, s) => {
|
|
1186
|
+
if (e !== "confirm") {
|
|
1187
|
+
s();
|
|
1188
|
+
return;
|
|
1189
|
+
}
|
|
1190
|
+
i.list = [], Object.assign(i.sysViewFilters, {
|
|
1191
|
+
list: [],
|
|
1192
|
+
id: 0
|
|
1193
|
+
}), s();
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
},
|
|
1197
|
+
getItemVal(i, e = 1) {
|
|
1198
|
+
let t = "";
|
|
1199
|
+
const s = String(i.operators);
|
|
1200
|
+
if (["fk", "about"].includes(i.columntype)) {
|
|
1201
|
+
let a = e == 1 && i.values !== void 0 ? i.values.join(",") : String(i.value).split(",");
|
|
1202
|
+
t = ["3", "4"].includes(s) ? a : i.value;
|
|
1203
|
+
} else if (i.columntype == "user") {
|
|
1204
|
+
let a = e == 1 && i.values !== void 0 ? i.values.join(",") : String(i.value).split(",");
|
|
1205
|
+
t = ["3", "4"].includes(s) ? a : i.value;
|
|
1206
|
+
} else if (i.columntype == "participants") {
|
|
1207
|
+
let a = e == 1 && i.values !== void 0 ? i.values.join(",") : String(i.value).split(",");
|
|
1208
|
+
t = ["3", "4"].includes(s) ? a : i.value;
|
|
1209
|
+
} else
|
|
1210
|
+
t = i.value;
|
|
1211
|
+
return t;
|
|
1212
|
+
},
|
|
1213
|
+
isChecked(i) {
|
|
1214
|
+
return i.every((e, t, s) => {
|
|
1215
|
+
const a = String(e.operators);
|
|
1216
|
+
let l = ["5", "6", "45"].includes(a) ? e.columnid : this.getItemVal(e);
|
|
1217
|
+
return ["43", "44"].includes(a) ? l = e.dynamicreferencefiled : (e.columntype == "about" && ["11", "12"].includes(a) || e.columntype == "fk" && ["11", "12"].includes(a) || e.columntype == "user" && ["11", "12"].includes(a) || e.columntype == "participants" && ["41", "42"].includes(a) || e.columntype == "datepicker" && e.operators > 12 && e.operators < 25) && (l = e.columnid), e.columnid !== "" && l !== "" && l !== void 0;
|
|
1218
|
+
});
|
|
1219
|
+
},
|
|
1220
|
+
isAllEqual(i) {
|
|
1221
|
+
return i.length > 0 ? !i.some((e, t) => e.pid !== i[0].pid) : !1;
|
|
1222
|
+
},
|
|
1223
|
+
async handleSubmit() {
|
|
1224
|
+
this.confirmLoading = !0;
|
|
1225
|
+
let i = [];
|
|
1226
|
+
const e = (t) => (t = t.filter((s, a) => (s.list.length > 0 && (s.list = e(s.list)), (s.columntype != "relevant" || s.columntype != "parental") && s.list.length == 0 && i.push(s), s.fkdata !== void 0 && typeof s.fkdata != "string" && (s.fkdata = JSON.stringify(s.fkdata)), s.ruleslist !== void 0 && typeof s.ruleslist != "string" && (s.ruleslist = JSON.stringify(s.ruleslist)), s.value = this.getItemVal(s), !0)), t);
|
|
1227
|
+
if (await e(this.sysViewFilters.list), !this.isChecked(i)) {
|
|
1228
|
+
this.$message.warning(this.$i18nt("gd.field.replenishData", "\u8BF7\u8865\u5145\u6570\u636E")), this.listConversion(), this.confirmLoading = !1;
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
this.$emit("ok", this.sysViewFilters), this.cancel(), setTimeout(() => {
|
|
1232
|
+
this.confirmLoading = !1;
|
|
1233
|
+
}, 300);
|
|
1234
|
+
},
|
|
1235
|
+
listConversion() {
|
|
1236
|
+
const i = (e) => (e = e.filter((t, s) => (t.list.length > 0 && (t.list = i(t.list)), t.fkdata !== void 0 && typeof t.fkdata == "string" && (t.fkdata = JSON.parse(t.fkdata)), t.ruleslist !== void 0 && typeof t.ruleslist == "string" && (t.ruleslist = JSON.parse(t.ruleslist)), t.value = this.getItemVal(t), !0)), e);
|
|
1237
|
+
i(this.sysViewFilters.list);
|
|
1238
|
+
},
|
|
1239
|
+
async init(i) {
|
|
1240
|
+
const e = (s) => (s = s.filter((a, l) => {
|
|
1241
|
+
if (a.type = String(a.type), a.operators = String(a.operators), a.list && a.list.length > 0)
|
|
1242
|
+
a.list = e(a.list);
|
|
1243
|
+
else {
|
|
1244
|
+
let n = this.getItemVal(a, 2);
|
|
1245
|
+
a.values = typeof n == "object" && n !== null ? n.map((r) => Number(r)) : [], ["select", "radio", "checkbox", "switch"].includes(a.columntype) && (a.value = a.value !== void 0 && a.value !== "" && a.value !== null ? a.operators == 45 ? Number(a.value) : String(a.value) : "");
|
|
1246
|
+
}
|
|
1247
|
+
return a.recordid === void 0 && ["relevant", "parental"].includes(a.columntype) && (a.recordid = a.columnid + "@" + a.columntype), a.show === void 0 && (a.show = !0, a.checked = !1), a.fkdata != null && typeof a.fkdata == "string" && (a.fkdata = JSON.parse(a.fkdata)), a.ruleslist != null && typeof a.ruleslist == "string" && (a.ruleslist = JSON.parse(a.ruleslist)), !0;
|
|
1248
|
+
}), s);
|
|
1249
|
+
let t = await e(JSON.parse(JSON.stringify(i.list)));
|
|
1250
|
+
this.sysViewFilters = Object.assign(
|
|
1251
|
+
{ ...this.getLowerCase(this.sysViewFilters) },
|
|
1252
|
+
{ ...this.getLowerCase(i) },
|
|
1253
|
+
{
|
|
1254
|
+
list: t,
|
|
1255
|
+
referencetable: this.table.tablename,
|
|
1256
|
+
tablename: this.table.tablename
|
|
1257
|
+
}
|
|
1258
|
+
), this.fullscreen = !1, this.visible = !0;
|
|
1259
|
+
},
|
|
1260
|
+
async initComponents(i) {
|
|
1261
|
+
this.visibled = !1;
|
|
1262
|
+
const e = (s) => (s = s.filter((a, l) => {
|
|
1263
|
+
if (a.type = String(a.type), a.operators = String(a.operators), a.list.length > 0)
|
|
1264
|
+
a.list = e(a.list);
|
|
1265
|
+
else {
|
|
1266
|
+
let n = this.getItemVal(a, 2);
|
|
1267
|
+
a.values = typeof n == "object" && n !== null ? n.map((r) => Number(r)) : [], ["select", "radio", "checkbox", "switch"].includes(a.columntype) && (a.value = a.value !== void 0 && a.value !== "" && a.value !== null ? a.operators == 45 ? Number(a.value) : String(a.value) : "");
|
|
1268
|
+
}
|
|
1269
|
+
return a.recordid === void 0 && ["relevant", "parental"].includes(a.columntype) && (a.recordid = a.columnid + "@" + a.columntype), a.show === void 0 && (a.show = !0, a.checked = !1), a.fkdata != null && typeof a.fkdata == "string" && (a.fkdata = JSON.parse(a.fkdata)), a.ruleslist != null && typeof a.ruleslist == "string" && (a.ruleslist = JSON.parse(a.ruleslist)), !0;
|
|
1270
|
+
}), s);
|
|
1271
|
+
let t = await e(JSON.parse(JSON.stringify(i.list)));
|
|
1272
|
+
this.sysViewFilters = Object.assign(
|
|
1273
|
+
{ ...this.getLowerCase(this.sysViewFilters) },
|
|
1274
|
+
{ ...this.getLowerCase(i) },
|
|
1275
|
+
{
|
|
1276
|
+
list: t,
|
|
1277
|
+
referencetable: this.table.tablename,
|
|
1278
|
+
tablename: this.table.tablename
|
|
1279
|
+
}
|
|
1280
|
+
), this.$nextTick(() => {
|
|
1281
|
+
setTimeout(() => {
|
|
1282
|
+
this.visibled = !0;
|
|
1283
|
+
}, 100);
|
|
1284
|
+
});
|
|
1285
|
+
},
|
|
1286
|
+
getFieldList() {
|
|
1287
|
+
return p({
|
|
1288
|
+
codeGenId: this.table.id
|
|
1289
|
+
}).then((i) => {
|
|
1290
|
+
let e = i.data.filter((t) => t.effecttype == "about" && t.columnname == (t.relations + "_AboutTable").toLowerCase() || t.effecttype == "currency" && t.columnname == (t.relations + "_Currency_Base").toLowerCase() ? !1 : t.effecttype != "editor");
|
|
1291
|
+
return this.loadData = [...e], i;
|
|
1292
|
+
});
|
|
1293
|
+
},
|
|
1294
|
+
getLowerCase(i) {
|
|
1295
|
+
let e = /* @__PURE__ */ new Map();
|
|
1296
|
+
for (let t in i)
|
|
1297
|
+
e.set(t.toLowerCase(), i[t]);
|
|
1298
|
+
return Object.fromEntries(e);
|
|
1299
|
+
},
|
|
1300
|
+
fkListOnView() {
|
|
1301
|
+
y({
|
|
1302
|
+
codeGenId: this.table.id
|
|
1303
|
+
}).then((i) => {
|
|
1304
|
+
this.fkTableList = i.data;
|
|
1305
|
+
});
|
|
1306
|
+
},
|
|
1307
|
+
toggleFullscreen() {
|
|
1308
|
+
this.fullscreen = !this.fullscreen;
|
|
1309
|
+
},
|
|
1310
|
+
cancel() {
|
|
1311
|
+
this.visible = !1, this.$emit("closed");
|
|
1312
|
+
},
|
|
1313
|
+
doEvent(i) {
|
|
1314
|
+
let e = i.item.functionName;
|
|
1315
|
+
this[e] && this[e]();
|
|
1316
|
+
},
|
|
1317
|
+
getDictionary(i) {
|
|
1318
|
+
return this.$options.filters.dictData(i);
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
mounted() {
|
|
1322
|
+
this.rulesList = this.getDictionary("table_lookup_rules"), this.effectType = this.getDictionary("code_gen_effect_type"), this.getFieldList(), this.fkListOnView();
|
|
1323
|
+
}
|
|
1324
|
+
};
|
|
1325
|
+
var j = function() {
|
|
1326
|
+
var e = this, t = e._self._c;
|
|
1327
|
+
return t("div", [e.mode === "dialog" ? t("el-dialog", { directives: [{ name: "drag", rawName: "v-drag" }], ref: "dialog", class: e.fullscreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { fullscreen: e.fullscreen, visible: e.visible, width: e.width, center: !0, "close-on-click-modal": !1, "append-to-body": !0, "modal-append-to-body": !1, top: "80px", "show-close": !1 }, on: { "update:visible": function(s) {
|
|
1328
|
+
e.visible = s;
|
|
1329
|
+
}, closed: e.cancel } }, [t("gd-modal-title", { attrs: { slot: "title", title: e.$i18nt("gd.filter.condition", "\u6761\u4EF6"), fullscreen: e.fullscreen, buttons: e.buttons, confirmLoading: e.confirmLoading, showClose: !0, closed: "cancel" }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen }, slot: "title" }), t("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [t("composeMiddle", { attrs: { record: e.sysViewFilters, tableNameAllData: e.tableLists, type: e.type, choiceDisabled: e.choiceDisabled } })], 1)], 1) : [e.visibled ? t("composeMiddle", { attrs: { record: e.sysViewFilters, tableNameAllData: e.tableLists, type: e.type, choiceDisabled: e.choiceDisabled }, on: { change: function(s) {
|
|
1330
|
+
return e.$emit("change");
|
|
1331
|
+
} } }) : e._e()]], 2);
|
|
1332
|
+
}, P = [], J = /* @__PURE__ */ u(
|
|
1333
|
+
K,
|
|
1334
|
+
j,
|
|
1335
|
+
P,
|
|
1336
|
+
!1,
|
|
1337
|
+
null,
|
|
1338
|
+
"9a2dfbd7",
|
|
1339
|
+
null,
|
|
1340
|
+
null
|
|
1341
|
+
);
|
|
1342
|
+
const U = J.exports;
|
|
1343
|
+
function z(i) {
|
|
1344
|
+
return window.axios({
|
|
1345
|
+
url: "/SysDupRules/add",
|
|
1346
|
+
method: "post",
|
|
1347
|
+
data: i
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
function v(i) {
|
|
1351
|
+
return window.axios({
|
|
1352
|
+
url: "/SysDupRules/edit",
|
|
1353
|
+
method: "post",
|
|
1354
|
+
data: i
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
function q(i) {
|
|
1358
|
+
return window.axios({
|
|
1359
|
+
url: "/SysDupRules/detail",
|
|
1360
|
+
method: "get",
|
|
1361
|
+
params: i
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
function H(i) {
|
|
1365
|
+
return window.axios({
|
|
1366
|
+
url: "/SysDupRules/del",
|
|
1367
|
+
method: "get",
|
|
1368
|
+
params: i
|
|
1369
|
+
});
|
|
1370
|
+
}
|
|
1371
|
+
function Q(i) {
|
|
1372
|
+
return window.axios({
|
|
1373
|
+
url: "/SysDupRules/list",
|
|
1374
|
+
method: "post",
|
|
1375
|
+
data: i
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
function ye(i) {
|
|
1379
|
+
return window.axios({
|
|
1380
|
+
url: "/SysDupRules/GetDupRecords",
|
|
1381
|
+
method: "post",
|
|
1382
|
+
data: i
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
const X = {
|
|
1386
|
+
data() {
|
|
1387
|
+
return {
|
|
1388
|
+
tableColumns: [
|
|
1389
|
+
{
|
|
1390
|
+
type: "selection",
|
|
1391
|
+
width: "60",
|
|
1392
|
+
fixed: !0
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
transKey: "gd.duplicatechecking.name",
|
|
1396
|
+
prop: "name",
|
|
1397
|
+
label: "\u540D\u79F0",
|
|
1398
|
+
width: "200",
|
|
1399
|
+
type: "slot",
|
|
1400
|
+
slotType: "name",
|
|
1401
|
+
align: "left",
|
|
1402
|
+
fixed: !0,
|
|
1403
|
+
showOverflowTooltip: !0
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
transKey: "gd.duplicatechecking.basicTable",
|
|
1407
|
+
prop: "basicrecordtablename",
|
|
1408
|
+
label: "\u57FA\u672C\u8868",
|
|
1409
|
+
align: "left"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
transKey: "gd.duplicatechecking.matchingTable",
|
|
1413
|
+
prop: "matchingrecordtablename",
|
|
1414
|
+
label: "\u5339\u914D\u8868",
|
|
1415
|
+
align: "left"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
transKey: "gd.duplicatechecking.isSave",
|
|
1419
|
+
prop: "issave",
|
|
1420
|
+
label: "\u662F\u5426\u4FDD\u5B58",
|
|
1421
|
+
type: "slot",
|
|
1422
|
+
slotType: "issave",
|
|
1423
|
+
align: "left"
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
transKey: "gd.duplicatechecking.explain",
|
|
1427
|
+
prop: "remark",
|
|
1428
|
+
label: "\u8BF4\u660E",
|
|
1429
|
+
align: "left"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
transKey: "gd.duplicatechecking.status",
|
|
1433
|
+
prop: "stateCodes",
|
|
1434
|
+
width: "120",
|
|
1435
|
+
label: "\u72B6\u6001",
|
|
1436
|
+
type: "slot",
|
|
1437
|
+
slotType: "stateCodes",
|
|
1438
|
+
align: "left"
|
|
1439
|
+
}
|
|
1440
|
+
],
|
|
1441
|
+
formColumns: [],
|
|
1442
|
+
tableButtons: [
|
|
1443
|
+
{
|
|
1444
|
+
displayName: "\u65B0\u589E",
|
|
1445
|
+
functionName: "add",
|
|
1446
|
+
show: !0,
|
|
1447
|
+
transKey: "gd.btn.add",
|
|
1448
|
+
icon: "el-icon-plus",
|
|
1449
|
+
name: "duplicatechecking:add"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
displayName: "\u7F16\u8F91",
|
|
1453
|
+
functionName: "edit",
|
|
1454
|
+
show: !0,
|
|
1455
|
+
transKey: "gd.btn.edit",
|
|
1456
|
+
icon: "el-icon-edit",
|
|
1457
|
+
name: "duplicatechecking:edit"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
displayName: "\u5220\u9664",
|
|
1461
|
+
functionName: "del",
|
|
1462
|
+
show: !0,
|
|
1463
|
+
transKey: "gd.btn.del",
|
|
1464
|
+
icon: "el-icon-delete",
|
|
1465
|
+
btnType: "danger",
|
|
1466
|
+
name: "duplicatechecking:delete"
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
displayName: "\u542F\u7528",
|
|
1470
|
+
functionName: "enable",
|
|
1471
|
+
show: !0,
|
|
1472
|
+
transKey: "gd.btn.enable",
|
|
1473
|
+
icon: "el-icon-video-play",
|
|
1474
|
+
name: "duplicatechecking:changeStatus"
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
displayName: "\u505C\u7528",
|
|
1478
|
+
functionName: "deactivated",
|
|
1479
|
+
show: !0,
|
|
1480
|
+
btnType: "danger",
|
|
1481
|
+
icon: "el-icon-discover",
|
|
1482
|
+
transKey: "gd.btn.deactivate",
|
|
1483
|
+
name: "duplicatechecking:changeStatus"
|
|
1484
|
+
}
|
|
1485
|
+
],
|
|
1486
|
+
formButtons: [],
|
|
1487
|
+
tableQueries: [
|
|
1488
|
+
{
|
|
1489
|
+
transKey: "gd.msg.temPlate.state",
|
|
1490
|
+
prop: "stateCodes",
|
|
1491
|
+
label: "\u72B6\u6001",
|
|
1492
|
+
effectType: "select",
|
|
1493
|
+
dictTypeCode: "state_code",
|
|
1494
|
+
rules: []
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
transKey: "gd.duplicatechecking.isSave",
|
|
1498
|
+
prop: "isSave",
|
|
1499
|
+
label: "\u662F\u5426\u4FDD\u5B58",
|
|
1500
|
+
effectType: "select",
|
|
1501
|
+
dictTypeCode: "yes_or_no",
|
|
1502
|
+
rules: []
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
transKey: "gd.duplicatechecking.basicTable",
|
|
1506
|
+
prop: "baseRecordTable",
|
|
1507
|
+
label: "\u57FA\u672C\u8868",
|
|
1508
|
+
effectType: "selectMultiple",
|
|
1509
|
+
fkEntityName: "sys_code_gen",
|
|
1510
|
+
rules: [],
|
|
1511
|
+
fkData: [],
|
|
1512
|
+
dictData: []
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
transKey: "gd.duplicatechecking.matchingTable",
|
|
1516
|
+
prop: "matchingRecordTable",
|
|
1517
|
+
label: "\u5339\u914D\u8868",
|
|
1518
|
+
effectType: "selectMultiple",
|
|
1519
|
+
fkEntityName: "sys_code_gen",
|
|
1520
|
+
fkData: [],
|
|
1521
|
+
rules: [],
|
|
1522
|
+
dictData: []
|
|
1523
|
+
}
|
|
1524
|
+
]
|
|
1525
|
+
};
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
const W = {
|
|
1529
|
+
data() {
|
|
1530
|
+
return {
|
|
1531
|
+
confirmLoading: !0,
|
|
1532
|
+
title: "",
|
|
1533
|
+
sysViewButtons: [
|
|
1534
|
+
{
|
|
1535
|
+
displayName: "\u786E\u5B9A",
|
|
1536
|
+
functionName: "handleSubmit",
|
|
1537
|
+
show: !1,
|
|
1538
|
+
transKey: "gd.btn.confirm",
|
|
1539
|
+
icon: "el-icon-document-checked"
|
|
1540
|
+
}
|
|
1541
|
+
],
|
|
1542
|
+
type: 1,
|
|
1543
|
+
fullScreen: !1,
|
|
1544
|
+
width: "1000px",
|
|
1545
|
+
ruleFormData: {
|
|
1546
|
+
stateCodes: "0",
|
|
1547
|
+
name: "",
|
|
1548
|
+
explain: "",
|
|
1549
|
+
issave: !1
|
|
1550
|
+
},
|
|
1551
|
+
rules: {
|
|
1552
|
+
status: [
|
|
1553
|
+
{
|
|
1554
|
+
required: !0,
|
|
1555
|
+
message: this.$i18nt("gd.btn.select", "\u8BF7\u9009\u62E9"),
|
|
1556
|
+
trigger: "change"
|
|
1557
|
+
}
|
|
1558
|
+
],
|
|
1559
|
+
name: [
|
|
1560
|
+
{
|
|
1561
|
+
required: !0,
|
|
1562
|
+
message: this.$i18nt("gd.btn.input", "\u8BF7\u8F93\u5165"),
|
|
1563
|
+
trigger: "change"
|
|
1564
|
+
}
|
|
1565
|
+
]
|
|
1566
|
+
},
|
|
1567
|
+
tableData: [],
|
|
1568
|
+
visible: !1,
|
|
1569
|
+
matchingsysCodeGenId: "",
|
|
1570
|
+
sysCodeGenId: "",
|
|
1571
|
+
sysCodeGenoId: "",
|
|
1572
|
+
viewId: "0",
|
|
1573
|
+
viewoId: "0",
|
|
1574
|
+
filterList: {},
|
|
1575
|
+
isAll: !1,
|
|
1576
|
+
viewListData: [],
|
|
1577
|
+
viewPersonalData: [],
|
|
1578
|
+
loadData: [],
|
|
1579
|
+
ruleslists: [],
|
|
1580
|
+
selShow: !0,
|
|
1581
|
+
tableMode: "basic",
|
|
1582
|
+
isflows: !1,
|
|
1583
|
+
rulesList: [],
|
|
1584
|
+
fieldloadData: [],
|
|
1585
|
+
matchFieldloadData: [],
|
|
1586
|
+
tabledisabled: !1,
|
|
1587
|
+
filteredList: []
|
|
1588
|
+
};
|
|
1589
|
+
},
|
|
1590
|
+
components: { FlowsFilter: U },
|
|
1591
|
+
computed: {
|
|
1592
|
+
table() {
|
|
1593
|
+
return this.tableLists.filter((i) => i.id === this.matchingsysCodeGenId)[0];
|
|
1594
|
+
},
|
|
1595
|
+
processedTableData() {
|
|
1596
|
+
return [
|
|
1597
|
+
...this.tableData,
|
|
1598
|
+
{ isPlaceholder: !0 }
|
|
1599
|
+
];
|
|
1600
|
+
},
|
|
1601
|
+
fieldProp() {
|
|
1602
|
+
return this.tableMode === "basic" ? "field" : "baseField";
|
|
1603
|
+
},
|
|
1604
|
+
plugFilters() {
|
|
1605
|
+
return {
|
|
1606
|
+
referencefiled: "",
|
|
1607
|
+
referencetable: "",
|
|
1608
|
+
checked: !1,
|
|
1609
|
+
columnid: 0,
|
|
1610
|
+
columnname: "",
|
|
1611
|
+
columntype: "",
|
|
1612
|
+
dynamicreferencefield: "",
|
|
1613
|
+
dynamicreferencetable: "",
|
|
1614
|
+
fieldformat: null,
|
|
1615
|
+
fkdata: [],
|
|
1616
|
+
id: 0,
|
|
1617
|
+
operators: "1",
|
|
1618
|
+
optionsdata: [],
|
|
1619
|
+
pid: null,
|
|
1620
|
+
recordid: null,
|
|
1621
|
+
ruleslist: [],
|
|
1622
|
+
show: !0,
|
|
1623
|
+
tablename: "",
|
|
1624
|
+
type: "1",
|
|
1625
|
+
value: "",
|
|
1626
|
+
values: [],
|
|
1627
|
+
list: []
|
|
1628
|
+
};
|
|
1629
|
+
},
|
|
1630
|
+
...f(["screenHeight", "tableLists", "primaryColor"])
|
|
1631
|
+
},
|
|
1632
|
+
methods: {
|
|
1633
|
+
okFilter(i) {
|
|
1634
|
+
this.filterList = { ...i };
|
|
1635
|
+
},
|
|
1636
|
+
toggleFullscreen() {
|
|
1637
|
+
this.fullScreen = !this.fullScreen;
|
|
1638
|
+
},
|
|
1639
|
+
getDictionary(i) {
|
|
1640
|
+
return this.$options.filters.dictData(i);
|
|
1641
|
+
},
|
|
1642
|
+
selectRules(i) {
|
|
1643
|
+
},
|
|
1644
|
+
changeRelevant(i, e) {
|
|
1645
|
+
i.condition = "", this.tabledisabled = !0;
|
|
1646
|
+
let t = null;
|
|
1647
|
+
if (e == "field" ? (this.selShow = !0, t = this.fieldloadData.filter((s) => s.columnname === i.basicField)[0], i.fieldeffecttype = t.effecttype) : (t = this.matchFieldloadData.filter((s) => s.columnname === i.matchingField)[0], i.mactheffecttype = t.effecttype, i.mactheffecttype !== i.fieldeffecttype && this.$message.warning(this.$i18nt("gd.duplicatechecking.pleaseBasicTableandmach", "\u57FA\u672C\u5B57\u6BB5\u9700\u4E0E\u5339\u914D\u5B57\u6BB5\u4FDD\u6301\u4E00\u81F4"))), t) {
|
|
1648
|
+
i.type = t.effecttype, this.conditionColumn(i, t);
|
|
1649
|
+
return;
|
|
1650
|
+
}
|
|
1651
|
+
},
|
|
1652
|
+
conditionColumn(i, e) {
|
|
1653
|
+
let t = this.rulesList.filter((s) => s.remark.split(",").includes(e.effecttype));
|
|
1654
|
+
i.ruleslists = [...t];
|
|
1655
|
+
},
|
|
1656
|
+
getList(i, e) {
|
|
1657
|
+
return p({
|
|
1658
|
+
codeGenId: i
|
|
1659
|
+
}).then((t) => {
|
|
1660
|
+
let a = [...t.data.filter((r) => r.effecttype == "about" && r.columnname == (r.relations + "_AboutTable").toLowerCase() || r.effecttype == "currency" && r.columnname == (r.relations + "_Currency_Base").toLowerCase() ? !1 : r.effecttype != "editor")];
|
|
1661
|
+
const l = this.rulesList.map((r) => ({
|
|
1662
|
+
...r,
|
|
1663
|
+
remarkTypes: r.remark.split(",").map((o) => o.trim())
|
|
1664
|
+
})), n = a.filter((r) => l.some((o) => o.remarkTypes.includes(r.effecttype)));
|
|
1665
|
+
return e == "basicTable" ? this.fieldloadData = n : e == "matchingTable" && (this.matchFieldloadData = n), this.type == 2 && this.tableData.forEach((r) => {
|
|
1666
|
+
let o = null;
|
|
1667
|
+
if (o = this.fieldloadData.filter((d) => d.columnname === r.basicField)[0], o) {
|
|
1668
|
+
let d = this.rulesList.filter((c) => c.remark.split(",").includes(o.effecttype));
|
|
1669
|
+
r.ruleslists = [...d];
|
|
1670
|
+
}
|
|
1671
|
+
}), t;
|
|
1672
|
+
});
|
|
1673
|
+
},
|
|
1674
|
+
init(i) {
|
|
1675
|
+
this.fullScreen = !1, this.confirmLoading = !1, this.visible = !0, this.type = i ? 2 : 1, this.title = i ? this.$i18nt("gd.https.edit") : this.$i18nt("gd.https.add"), this.$nextTick(() => {
|
|
1676
|
+
this.filterList = JSON.parse(JSON.stringify(this.plugFilters));
|
|
1677
|
+
let e = this.getDictionary("table_dup_rule");
|
|
1678
|
+
e.forEach((t, s) => {
|
|
1679
|
+
e[s].sysdicttype = {};
|
|
1680
|
+
}), this.rulesList = [...e];
|
|
1681
|
+
}), this.sysViewButtons = [
|
|
1682
|
+
{
|
|
1683
|
+
displayName: "\u786E\u5B9A",
|
|
1684
|
+
functionName: "handleSubmit",
|
|
1685
|
+
show: !0,
|
|
1686
|
+
transKey: "gd.btn.confirm",
|
|
1687
|
+
icon: "el-icon-document-checked"
|
|
1688
|
+
}
|
|
1689
|
+
], this.isflows = !0, i && this.sysTranslationDetail(i.id), this.filteredList = [], this.filteredList = this.tableLists.filter((e) => e.ischeckduplicate === 1);
|
|
1690
|
+
},
|
|
1691
|
+
sysTranslationDetail(i) {
|
|
1692
|
+
this.confirmLoading = !0, q({
|
|
1693
|
+
id: i
|
|
1694
|
+
}).then((e) => {
|
|
1695
|
+
this.ruleFormData.name = e.data.name, this.ruleFormData.stateCodes = String(e.data.statecodes), this.ruleFormData.id = e.data.id, this.ruleFormData.explain = e.data.explain, this.ruleFormData.issave = e.data.issave === 1, this.tableData = JSON.parse(e.data.matchingrules), this.filterList = e.data.filterconfig ? JSON.parse(e.data.filterconfig) : JSON.parse(JSON.stringify(this.plugfilters)), this.sysCodeGenId = Number(e.data.basicrecordtable), this.getList(e.data.basicrecordtable, "basicTable"), this.tableMode = "basic", this.matchingsysCodeGenId = Number(e.data.matchingrecordtable), this.matchingsysCodeGenId && this.matchingsysCodeGenId != this.sysCodeGenId && (this.getList(this.matchingsysCodeGenId, "matchingTable"), this.tableMode = "match"), this.ruleFormData.stateCodes == 1 && (this.sysViewButtons = []), this.confirmLoading = !1;
|
|
1696
|
+
});
|
|
1697
|
+
},
|
|
1698
|
+
add(i) {
|
|
1699
|
+
this.confirmLoading = !0, delete i.id, z(i).then((e) => {
|
|
1700
|
+
e.success ? (this.$message.success(this.$i18nt("gd.https.addSucc")), this.$emit("ok", i), this.handleCancel()) : this.$message.error(this.$i18nt("gd.https.addFail") + e.message);
|
|
1701
|
+
}).finally((e) => {
|
|
1702
|
+
this.confirmLoading = !1;
|
|
1703
|
+
});
|
|
1704
|
+
},
|
|
1705
|
+
edit(i) {
|
|
1706
|
+
this.confirmLoading = !0, delete i.basicRecordTable, delete i.matchingRecordTable, v(i).then((e) => {
|
|
1707
|
+
e.success ? (this.$message.success(this.$i18nt("gd.https.addSucc")), this.$emit("ok", i), this.handleCancel()) : this.$message.error(this.$i18nt("gd.https.addFail") + e.message);
|
|
1708
|
+
}).finally((e) => {
|
|
1709
|
+
this.confirmLoading = !1;
|
|
1710
|
+
});
|
|
1711
|
+
},
|
|
1712
|
+
handleSubmit() {
|
|
1713
|
+
this.$refs.ruleForm.validate((i) => {
|
|
1714
|
+
this.tableData.forEach((l) => {
|
|
1715
|
+
l.charactorcount = l.charactorcount ? Number(l.charactorcount) : "", l.basicField = l.basicField ? l.basicField : "", l.matchingField = this.tableMode === "match" ? l.matchingField : l.basicField;
|
|
1716
|
+
});
|
|
1717
|
+
let e = JSON.parse(JSON.stringify(this.tableData));
|
|
1718
|
+
e.forEach((l) => {
|
|
1719
|
+
delete l.isPlaceholder, delete l.ruleslists, delete l.fieldeffecttype, delete l.mactheffecttype;
|
|
1720
|
+
});
|
|
1721
|
+
let t = this.filterList.list[0], s = 0;
|
|
1722
|
+
this.filterList.list.forEach((l) => {
|
|
1723
|
+
s += l.list.length;
|
|
1724
|
+
});
|
|
1725
|
+
let a = t && this.filterList.list.length === 1 && t.referencefiled === "" && t.referencetable === "" && t.list.length > 0 ? Object.assign(t, {
|
|
1726
|
+
columnid: 0
|
|
1727
|
+
}) : this.filterList;
|
|
1728
|
+
if (i) {
|
|
1729
|
+
const l = {
|
|
1730
|
+
...this.ruleFormData,
|
|
1731
|
+
basicRecordTable: this.sysCodeGenId,
|
|
1732
|
+
matchingRecordTable: this.matchingsysCodeGenId,
|
|
1733
|
+
filterConfig: JSON.stringify(a),
|
|
1734
|
+
matchingRules: JSON.stringify(e)
|
|
1735
|
+
};
|
|
1736
|
+
this.type == 1 ? this.add(l) : this.edit(l);
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
},
|
|
1740
|
+
handleModeChange(i) {
|
|
1741
|
+
this.tableData = [], this.selShow = !0, this.sysCodeGenId == this.matchingsysCodeGenId ? this.tableMode = "basic" : this.tableMode = "match", this.flowsFilterInit(), this.getList(i, "matchingTable");
|
|
1742
|
+
},
|
|
1743
|
+
handleCancel() {
|
|
1744
|
+
this.visible = !1, this.confirmLoading = !1, this.tabledisabled = !1, this.$refs.ruleForm.resetFields(), this.ruleFormData = {
|
|
1745
|
+
stateCodes: "0",
|
|
1746
|
+
name: "",
|
|
1747
|
+
explain: "",
|
|
1748
|
+
issave: !1
|
|
1749
|
+
}, this.sysCodeGenId = "", this.matchingsysCodeGenId = "", this.tableData = [], this.fieldloadData = [], this.matchFieldloadData = [], this.selShow = !0, this.tableMode = "basic";
|
|
1750
|
+
},
|
|
1751
|
+
doEvent(i) {
|
|
1752
|
+
let e = i.item.functionName;
|
|
1753
|
+
this[e] && this[e]();
|
|
1754
|
+
},
|
|
1755
|
+
shouldShowCharCount(i) {
|
|
1756
|
+
return ["2", "3"].includes(i.condition);
|
|
1757
|
+
},
|
|
1758
|
+
selectTable(i) {
|
|
1759
|
+
this.tableData = [], this.selShow = !0, this.matchingsysCodeGenId === "" && (this.matchingsysCodeGenId = i), this.sysCodeGenId == this.matchingsysCodeGenId ? this.tableMode = "basic" : this.tableMode = "match", this.flowsFilterInit(), this.getList(i, "basicTable");
|
|
1760
|
+
},
|
|
1761
|
+
addNewRow(i) {
|
|
1762
|
+
this.selShow = !1;
|
|
1763
|
+
const e = {
|
|
1764
|
+
basicField: "",
|
|
1765
|
+
matchingField: "",
|
|
1766
|
+
condition: "",
|
|
1767
|
+
charactorcount: "",
|
|
1768
|
+
isPlaceholder: !1,
|
|
1769
|
+
ruleslists: "",
|
|
1770
|
+
type: ""
|
|
1771
|
+
};
|
|
1772
|
+
this.tableData.push(e);
|
|
1773
|
+
},
|
|
1774
|
+
shouldShowAddButton(i) {
|
|
1775
|
+
const e = i === this.processedTableData.length - 1, t = this.tableData.some((s) => !s.field);
|
|
1776
|
+
return e && !t;
|
|
1777
|
+
},
|
|
1778
|
+
removeRow(i) {
|
|
1779
|
+
let e = this;
|
|
1780
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1781
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1782
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1783
|
+
showClose: !1,
|
|
1784
|
+
confirmButtonLoading: !1,
|
|
1785
|
+
cancelButtonLoading: !1,
|
|
1786
|
+
closeOnClickModal: !1,
|
|
1787
|
+
type: "warning",
|
|
1788
|
+
confirmButtonClass: "el-button--danger",
|
|
1789
|
+
customClass: "custom-alert",
|
|
1790
|
+
callback: () => {
|
|
1791
|
+
},
|
|
1792
|
+
beforeClose: (t, s, a) => {
|
|
1793
|
+
if (t !== "confirm") {
|
|
1794
|
+
a();
|
|
1795
|
+
return;
|
|
1796
|
+
}
|
|
1797
|
+
this.tableData.splice(i, 1), this.tabledisabled = !1, this.selShow = !0, e.$message.success(e.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")), a();
|
|
1798
|
+
}
|
|
1799
|
+
});
|
|
1800
|
+
},
|
|
1801
|
+
tableRowClassName({ row: i }) {
|
|
1802
|
+
return i.isPlaceholder ? "placeholder-row" : "";
|
|
1803
|
+
},
|
|
1804
|
+
handleCellHover(i, e, t) {
|
|
1805
|
+
},
|
|
1806
|
+
handleAddRow(i) {
|
|
1807
|
+
this.selShow = !0;
|
|
1808
|
+
},
|
|
1809
|
+
flowsFilterInit() {
|
|
1810
|
+
this.$nextTick(() => {
|
|
1811
|
+
this.$refs.flowsFilter.initComponents(this.plugFilters);
|
|
1812
|
+
});
|
|
1813
|
+
},
|
|
1814
|
+
selFilter() {
|
|
1815
|
+
if (!(this.type == 2 && this.ruleFormData.stateCodes == 1)) {
|
|
1816
|
+
if (this.matchingsysCodeGenId == "") {
|
|
1817
|
+
this.$message.warning(this.$i18nt("gd.duplicatechecking.pleaseSelectBasicTable", "\u8BF7\u9009\u62E9\u5339\u914D\u8868"));
|
|
1818
|
+
return;
|
|
1819
|
+
}
|
|
1820
|
+
console.log(this.filterList), this.$refs.flowsFilter.init(this.filterList);
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
isselect() {
|
|
1824
|
+
return this.type == 2 ? this.ruleFormData.stateCodes != 1 : !0;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
};
|
|
1828
|
+
var Y = function() {
|
|
1829
|
+
var e = this, t = e._self._c;
|
|
1830
|
+
return t("el-dialog", { class: e.fullScreen ? "gd-dialog gd-dialog-fangda" : "gd-dialog", attrs: { width: e.width, visible: e.visible, fullscreen: e.fullScreen, footer: null, top: "30px", "append-to-body": "", "show-close": !1 }, on: { "update:visible": function(s) {
|
|
1831
|
+
e.visible = s;
|
|
1832
|
+
}, closed: e.handleCancel } }, [t("gd-modal-title", { attrs: { slot: "title", title: `${e.title}${e.$i18nt("gd.duplicatechecking.checkConfigurationRetryRule", "\u67E5\u91CD\u89C4\u5219\u914D\u7F6E")}`, fullscreen: e.fullScreen, buttons: e.sysViewButtons, confirmLoading: e.confirmLoading, closed: "handleCancel", showClose: !0 }, on: { changeEvent: e.doEvent, toggleFullscreen: e.toggleFullscreen }, slot: "title" }), t("div", { directives: [{ name: "loading", rawName: "v-loading", value: e.confirmLoading, expression: "confirmLoading" }] }, [t("div", { staticClass: "setting-navs", class: e.fullScreen ? "modal-bodyq" : "modal-body" }, [t("el-form", { ref: "ruleForm", attrs: { model: e.ruleFormData, rules: e.rules, "label-width": "120px" }, nativeOn: { submit: function(s) {
|
|
1833
|
+
s.preventDefault();
|
|
1834
|
+
} } }, [t("el-row", { attrs: { gutter: 20 } }, [t("el-col", { attrs: { span: 12 } }, [t("el-form-item", { staticStyle: { "margin-bottom": "12px" }, attrs: { label: e.$i18nt("gd.duplicatechecking.name", "\u540D\u79F0"), prop: "name" } }, [t("el-input", { attrs: { placeholder: e.$i18nt("gd.placeholder.input", "\u8BF7\u8F93\u5165"), disabled: e.type == 2 && e.ruleFormData.stateCodes == 1 }, model: { value: e.ruleFormData.name, callback: function(s) {
|
|
1835
|
+
e.$set(e.ruleFormData, "name", s);
|
|
1836
|
+
}, expression: "ruleFormData['name']" } })], 1)], 1), t("el-col", { attrs: { span: 12 } }, [t("el-form-item", { staticStyle: { "margin-bottom": "12px" }, attrs: { label: e.$i18nt("gd.duplicatechecking.status", "\u72B6\u6001") } }, [t("el-select", { ref: "refView", staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), filterable: "", disabled: "" }, model: { value: e.ruleFormData.stateCodes, callback: function(s) {
|
|
1837
|
+
e.$set(e.ruleFormData, "stateCodes", s);
|
|
1838
|
+
}, expression: "ruleFormData['stateCodes']" } }, [t("el-option", { attrs: { value: "1", label: e.$i18nt("gd.duplicatechecking.enable", "\u542F\u7528]") } }), t("el-option", { attrs: { value: "0", label: e.$i18nt("gd.duplicatechecking.deactivate", "\u7981\u7528]") } })], 1)], 1)], 1), t("el-col", { attrs: { span: 24 } }, [t("el-form-item", { staticStyle: { "margin-bottom": "12px" }, attrs: { label: e.$i18nt("gd.duplicatechecking.explain", "\u8BF4\u660E") } }, [t("el-input", { attrs: { type: "textarea", placeholder: e.$i18nt("gd.placeholder.inputcontent", "\u8BF7\u8F93\u5165\u5185\u5BB9"), autosize: { minRows: 4, maxRows: 6 }, disabled: e.type == 2 && e.ruleFormData.stateCodes == 1 }, model: { value: e.ruleFormData.explain, callback: function(s) {
|
|
1839
|
+
e.$set(e.ruleFormData, "explain", s);
|
|
1840
|
+
}, expression: "ruleFormData['explain']" } })], 1)], 1), t("el-col", { staticClass: "setting-navs-btn", attrs: { source: 24 } }, [t("span", [e._v(e._s(e.$i18nt("gd.duplicatechecking.repeatDetectionRuleCondition", "\u91CD\u590D\u68C0\u6D4B\u89C4\u5219\u6761\u4EF6")))])]), t("el-col", { attrs: { span: 10 } }, [t("el-form-item", { staticStyle: { "margin-bottom": "12px" }, attrs: { label: e.$i18nt("gd.duplicatechecking.basicTable", "\u57FA\u672C\u8868") } }, [t("el-select", { ref: "refTable", staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), filterable: "", disabled: e.type == 2 && e.ruleFormData.stateCodes == 1 }, on: { change: e.selectTable }, model: { value: e.sysCodeGenId, callback: function(s) {
|
|
1841
|
+
e.sysCodeGenId = s;
|
|
1842
|
+
}, expression: "sysCodeGenId" } }, e._l(e.filteredList, function(s) {
|
|
1843
|
+
return t("el-option", { key: s.id, attrs: { label: e.$i18nt(`Dynamics.${s.transkey}`, s.busname), value: s.id } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${s.transkey}`, s.busname)) + " " + e._s(s.tablename) + " ")]);
|
|
1844
|
+
}), 1)], 1)], 1), t("el-col", { attrs: { span: 10 } }, [t("el-form-item", { staticStyle: { "margin-bottom": "12px" }, attrs: { label: e.$i18nt("gd.duplicatechecking.matchingTable", "\u5339\u914D\u8868") } }, [t("el-select", { ref: "refTable", staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), filterable: "", disabled: e.type == 2 && e.ruleFormData.stateCodes == 1 }, on: { change: e.handleModeChange }, model: { value: e.matchingsysCodeGenId, callback: function(s) {
|
|
1845
|
+
e.matchingsysCodeGenId = s;
|
|
1846
|
+
}, expression: "matchingsysCodeGenId" } }, e._l(e.tableLists, function(s) {
|
|
1847
|
+
return t("el-option", { key: s.id, attrs: { label: e.$i18nt(`Dynamics.${s.transkey}`, s.busname), value: s.id } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${s.transkey}`, s.busname)) + " " + e._s(s.tablename) + " ")]);
|
|
1848
|
+
}), 1)], 1)], 1), t("el-col", { attrs: { span: 4 } }, [t("el-button", { attrs: { type: "primary" }, on: { click: e.selFilter } }, [e._v(e._s(e.$i18nt("gd.view.filterConditions", "\u8FC7\u6EE4\u6761\u4EF6")))])], 1), t("el-col", { attrs: { span: 10 } }, [t("el-form-item", { staticStyle: { "margin-bottom": "12px" }, attrs: { label: e.$i18nt("gd.duplicatechecking.allowSave", "\u5141\u8BB8\u4FDD\u5B58") } }, [t("el-switch", { attrs: { disabled: e.type == 2 && e.ruleFormData.stateCodes == 1, "active-color": e.primaryColor }, model: { value: e.ruleFormData.issave, callback: function(s) {
|
|
1849
|
+
e.$set(e.ruleFormData, "issave", s);
|
|
1850
|
+
}, expression: "ruleFormData['issave']" } })], 1)], 1)], 1)], 1), t("div", { staticClass: "setting-conter" }, [t("div", { staticClass: "config-table-container" }, [t("el-table", { staticStyle: { width: "100%" }, attrs: { data: e.processedTableData, border: "", "header-cell-class-name": "table-header", "row-class-name": e.tableRowClassName }, on: { "cell-mouse-enter": e.handleCellHover } }, [t("el-table-column", { attrs: { prop: e.fieldProp, label: e.tableMode === "basic" ? e.$i18nt("gd.duplicatechecking.field", "\u5B57\u6BB5") : e.$i18nt("gd.duplicatechecking.basicField", "\u57FA\u672C\u5B57\u6BB5"), width: "170" }, scopedSlots: e._u([{ key: "default", fn: function(s) {
|
|
1851
|
+
return [s.row.isPlaceholder ? e._e() : t("el-select", { staticStyle: { width: "100%" }, attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), filterable: "", disabled: e.type == 2 && e.ruleFormData.stateCodes == 1 }, on: { change: function(a) {
|
|
1852
|
+
return e.changeRelevant(s.row, "field");
|
|
1853
|
+
} }, model: { value: s.row.basicField, callback: function(a) {
|
|
1854
|
+
e.$set(s.row, "basicField", a);
|
|
1855
|
+
}, expression: "scope.row.basicField" } }, e._l(e.fieldloadData, function(a, l) {
|
|
1856
|
+
return t("el-option", { key: a.id, attrs: { value: a.columnname, label: e.$i18nt(`Dynamics.${a.transkey}`, a.columncomment), clearable: "" } }, [t("span", { staticStyle: { "padding-left": "2px" } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${a.transkey}`, a.columncomment)) + " " + e._s(a.columnname) + " ")])]);
|
|
1857
|
+
}), 1), e.selShow && s.row.isPlaceholder && e.isselect() ? t("div", { staticClass: "select-placeholder", on: { click: function(a) {
|
|
1858
|
+
return e.addNewRow(s.row);
|
|
1859
|
+
} } }, [t("span", { staticClass: "blue-text active-color" }, [e._v(e._s(e.$i18nt("gd.btn.choice", "\u9009\u62E9")))])]) : e._e()];
|
|
1860
|
+
} }]) }), e.tableMode === "match" ? t("el-table-column", { attrs: { prop: "matchingField", label: e.$i18nt("gd.duplicatechecking.matchingField", "\u5339\u914D\u5B57\u6BB5"), width: "170" }, scopedSlots: e._u([{ key: "default", fn: function(s) {
|
|
1861
|
+
return [s.row.isPlaceholder ? e._e() : t("el-select", { attrs: { placeholder: e.$i18nt("gd.placeholder.select", "\u8BF7\u9009\u62E9"), disabled: !s.row.basicField || e.type == 2 && e.ruleFormData.stateCodes == 1 }, on: { change: function(a) {
|
|
1862
|
+
return e.changeRelevant(s.row, "mactch");
|
|
1863
|
+
} }, model: { value: s.row.matchingField, callback: function(a) {
|
|
1864
|
+
e.$set(s.row, "matchingField", a);
|
|
1865
|
+
}, expression: "scope.row.matchingField" } }, e._l(e.matchFieldloadData, function(a, l) {
|
|
1866
|
+
return t("el-option", { key: a.id, attrs: { value: a.columnname, label: e.$i18nt(`Dynamics.${a.transkey}`, a.columncomment) } }, [t("span", { staticStyle: { "padding-left": "2px" } }, [e._v(" " + e._s(e.$i18nt(`Dynamics.${a.transkey}`, a.columncomment)) + " " + e._s(a.columnname) + " ")])]);
|
|
1867
|
+
}), 1)];
|
|
1868
|
+
} }], null, !1, 2082435928) }) : e._e(), t("el-table-column", { attrs: { prop: "condition", label: e.$i18nt("gd.duplicatechecking.condition", "\u6761\u4EF6"), width: "170" }, scopedSlots: e._u([{ key: "default", fn: function(s) {
|
|
1869
|
+
return [!s.row.isPlaceholder && s.row.ruleslists && s.row.ruleslists.length > 0 ? t("el-select", { staticStyle: { width: "100%" }, attrs: { disabled: e.type == 2 && e.ruleFormData.stateCodes == 1 }, on: { change: e.selectRules }, model: { value: s.row.condition, callback: function(a) {
|
|
1870
|
+
e.$set(s.row, "condition", a);
|
|
1871
|
+
}, expression: "scope.row.condition" } }, [e._l(s.row.ruleslists, function(a) {
|
|
1872
|
+
return [t("el-option", { attrs: { value: a.code, label: e.$i18nt(`Dynamics.${a.transkey}`, a.name) } })];
|
|
1873
|
+
})], 2) : e._e()];
|
|
1874
|
+
} }]) }), t("el-table-column", { staticClass: "charactorcount", attrs: { prop: "charactorcount", label: e.$i18nt("gd.duplicatechecking.numberCharacters", "\u5B57\u7B26\u6570"), width: "160" }, scopedSlots: e._u([{ key: "default", fn: function(s) {
|
|
1875
|
+
return [e.shouldShowCharCount(s.row) ? t("el-input-number", { staticStyle: { width: "100%" }, attrs: { disabled: e.type == 2 && e.ruleFormData.stateCodes == 1, min: 0 }, model: { value: s.row.charactorcount, callback: function(a) {
|
|
1876
|
+
e.$set(s.row, "charactorcount", a);
|
|
1877
|
+
}, expression: "scope.row.charactorcount" } }) : e._e()];
|
|
1878
|
+
} }]) }), t("el-table-column", { attrs: { label: e.$i18nt("gd.duplicatechecking.handle", "\u64CD\u4F5C") }, scopedSlots: e._u([{ key: "default", fn: function(s) {
|
|
1879
|
+
return !s.row.isPlaceholder && e.isselect() ? [t("i", { staticClass: "el-icon-delete", staticStyle: { "font-size": "16px", color: "#ff4d4f" }, on: { click: function(a) {
|
|
1880
|
+
return e.removeRow(s.$index);
|
|
1881
|
+
} } })] : void 0;
|
|
1882
|
+
} }], null, !0) })], 1)], 1)]), e.visible && e.isflows && e.matchingsysCodeGenId ? t("FlowsFilter", { ref: "flowsFilter", attrs: { type: 2, table: e.table }, on: { ok: e.okFilter } }) : e._e()], 1)])], 1);
|
|
1883
|
+
}, Z = [], ee = /* @__PURE__ */ u(
|
|
1884
|
+
W,
|
|
1885
|
+
Y,
|
|
1886
|
+
Z,
|
|
1887
|
+
!1,
|
|
1888
|
+
null,
|
|
1889
|
+
"43bf7b1e",
|
|
1890
|
+
null,
|
|
1891
|
+
null
|
|
1892
|
+
);
|
|
1893
|
+
const te = ee.exports;
|
|
1894
|
+
const ie = {
|
|
1895
|
+
props: {
|
|
1896
|
+
height: {
|
|
1897
|
+
type: Number,
|
|
1898
|
+
default: 100
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1901
|
+
name: "GdDuplicateChecking",
|
|
1902
|
+
mixins: [D, X],
|
|
1903
|
+
components: {
|
|
1904
|
+
editForm: te
|
|
1905
|
+
},
|
|
1906
|
+
data() {
|
|
1907
|
+
return {
|
|
1908
|
+
selectedRowKeys: [],
|
|
1909
|
+
selectedRows: [],
|
|
1910
|
+
disableBtn: [],
|
|
1911
|
+
transKey: "gd.duplicatechecking.checkConfigurationRetryRule",
|
|
1912
|
+
formLoading: !1,
|
|
1913
|
+
currentNode: null,
|
|
1914
|
+
loadData: (i) => Q(Object.assign(i, this.getQueryParam)).then((e) => e.data),
|
|
1915
|
+
record: {},
|
|
1916
|
+
queryParam: {}
|
|
1917
|
+
};
|
|
1918
|
+
},
|
|
1919
|
+
computed: {
|
|
1920
|
+
getTableLists() {
|
|
1921
|
+
let i = [...this.tableLists];
|
|
1922
|
+
return i.forEach((e, t) => {
|
|
1923
|
+
i[t].name = e.busname, i[t].code = e.id;
|
|
1924
|
+
}), i;
|
|
1925
|
+
},
|
|
1926
|
+
getTableQueries() {
|
|
1927
|
+
return this.tableQueries.forEach((i, e) => {
|
|
1928
|
+
if (i.prop === "matchingRecordTable")
|
|
1929
|
+
this.tableQueries[e].dictData = [...this.getTableLists];
|
|
1930
|
+
else if (i.prop === "baseRecordTable") {
|
|
1931
|
+
const t = this.getTableLists.filter((s) => s.ischeckduplicate === 1);
|
|
1932
|
+
this.tableQueries[e].dictData = [...t];
|
|
1933
|
+
}
|
|
1934
|
+
}), this.tableQueries;
|
|
1935
|
+
},
|
|
1936
|
+
getHeight() {
|
|
1937
|
+
return this.height;
|
|
1938
|
+
},
|
|
1939
|
+
getTableButtons() {
|
|
1940
|
+
return this.tableButtons.filter((i) => (i.show = !this.disableBtn.includes(i.displayName), !0));
|
|
1941
|
+
},
|
|
1942
|
+
getQueryParam() {
|
|
1943
|
+
let i = /* @__PURE__ */ new Map();
|
|
1944
|
+
for (let e in this.queryParam)
|
|
1945
|
+
this.queryParam[e] && e === "baseRecordTable" || e === "matchingRecordTable" ? i.set(e, this.queryParam[e].join(",")) : i.set(e, this.queryParam[e]);
|
|
1946
|
+
return Object.fromEntries(i);
|
|
1947
|
+
},
|
|
1948
|
+
...f(["tablePageSize", "tableSize", "labelPosition", "formMode", "tableLists"])
|
|
1949
|
+
},
|
|
1950
|
+
methods: {
|
|
1951
|
+
onSelectChange(i, e) {
|
|
1952
|
+
if (this.selectedRows = e, this.selectedRowKeys = i, i.length === 0) {
|
|
1953
|
+
this.disableBtn = [];
|
|
1954
|
+
return;
|
|
1955
|
+
}
|
|
1956
|
+
const t = e.filter((a) => a.statecodes === 1)[0];
|
|
1957
|
+
this.disableBtn = t ? ["\u5220\u9664", "\u542F\u7528"] : [], e.filter((a) => a.statecodes === 0)[0] && this.disableBtn.push("\u505C\u7528");
|
|
1958
|
+
},
|
|
1959
|
+
refresh() {
|
|
1960
|
+
this.$refs.table.refresh();
|
|
1961
|
+
},
|
|
1962
|
+
edit() {
|
|
1963
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1964
|
+
this.$message.warning(this.$i18nt("gd.https.editTip", "\u8BF7\u9009\u62E9\u9700\u8981\u7F16\u8F91\u7684\u6570\u636E!"));
|
|
1965
|
+
return;
|
|
1966
|
+
}
|
|
1967
|
+
if (this.selectedRowKeys.length > 1) {
|
|
1968
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1971
|
+
this.editForms(this.selectedRows[0]);
|
|
1972
|
+
},
|
|
1973
|
+
editForms(i) {
|
|
1974
|
+
this.$refs.editForm.init(i);
|
|
1975
|
+
},
|
|
1976
|
+
saveQueries(i) {
|
|
1977
|
+
this.queryParam = { ...i }, this.refresh();
|
|
1978
|
+
},
|
|
1979
|
+
add() {
|
|
1980
|
+
this.$refs.editForm.init(null);
|
|
1981
|
+
},
|
|
1982
|
+
del() {
|
|
1983
|
+
if (this.selectedRowKeys.length === 0) {
|
|
1984
|
+
this.$message.warning(this.$i18nt("gd.https.delTip", "\u8BF7\u9009\u62E9\u9700\u8981\u5220\u9664\u7684\u6570\u636E!"));
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
this.$confirm(this.$i18nt("gd.https.delContent", "\u662F\u5426\u5220\u9664\u9009\u4E2D\u6570\u636E?"), this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
1988
|
+
confirmButtonText: this.$i18nt("gd.https.delOk", "\u786E\u5B9A\u5220\u9664"),
|
|
1989
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
1990
|
+
showClose: !1,
|
|
1991
|
+
confirmButtonLoading: !1,
|
|
1992
|
+
cancelButtonLoading: !1,
|
|
1993
|
+
closeOnClickModal: !1,
|
|
1994
|
+
type: "warning",
|
|
1995
|
+
confirmButtonClass: "el-button--danger",
|
|
1996
|
+
customClass: "custom-alert",
|
|
1997
|
+
callback: () => {
|
|
1998
|
+
},
|
|
1999
|
+
beforeClose: (i, e, t) => {
|
|
2000
|
+
this.delHand(i, e, t);
|
|
2001
|
+
}
|
|
2002
|
+
});
|
|
2003
|
+
},
|
|
2004
|
+
delHand(i, e, t) {
|
|
2005
|
+
if (i !== "confirm") {
|
|
2006
|
+
t();
|
|
2007
|
+
return;
|
|
2008
|
+
}
|
|
2009
|
+
let s = [], a = H({
|
|
2010
|
+
ids: this.selectedRowKeys.join(",")
|
|
2011
|
+
}).then((l) => l);
|
|
2012
|
+
s.push(a), e.confirmButtonLoading = !0, e.cancelButtonLoading = !0, e.showCancelButton = !1, Promise.all(s).then((l) => {
|
|
2013
|
+
e.confirmButtonLoading = !1, e.cancelButtonLoading = !1, e.showCancelButton = !0, t();
|
|
2014
|
+
const n = l.filter((r) => !r.success);
|
|
2015
|
+
n.length === 0 ? this.$message.success(this.$i18nt("gd.https.delSucc", "\u5220\u9664\u6210\u529F")) : this.$message.error(this.$i18nt("gd.https.delFail", "\u5220\u9664\u5931\u8D25") + n[0].message), this.refresh();
|
|
2016
|
+
});
|
|
2017
|
+
},
|
|
2018
|
+
doEvent(i) {
|
|
2019
|
+
let e = i.item.functionName;
|
|
2020
|
+
this[e] && this[e]();
|
|
2021
|
+
},
|
|
2022
|
+
handleOk() {
|
|
2023
|
+
this.$refs.table.refresh();
|
|
2024
|
+
},
|
|
2025
|
+
dictSwitch(i, e) {
|
|
2026
|
+
let t = this.$options.filters.dictData(e).filter((s) => s.code == i)[0];
|
|
2027
|
+
return t != null && t.colour ? t.colour : null;
|
|
2028
|
+
},
|
|
2029
|
+
enable() {
|
|
2030
|
+
if (this.selectedRowKeys.length === 0) {
|
|
2031
|
+
this.$message.warning(this.$i18nt("gd.https.operateTip", "\u8BF7\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E!"));
|
|
2032
|
+
return;
|
|
2033
|
+
}
|
|
2034
|
+
if (this.selectedRowKeys.length > 1) {
|
|
2035
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
this.editStateCodes({ row: this.selectedRows[0] });
|
|
2039
|
+
},
|
|
2040
|
+
deactivated() {
|
|
2041
|
+
if (this.selectedRowKeys.length === 0) {
|
|
2042
|
+
this.$message.warning(this.$i18nt("gd.https.operateTip", "\u8BF7\u9009\u62E9\u8981\u64CD\u4F5C\u7684\u6570\u636E!"));
|
|
2043
|
+
return;
|
|
2044
|
+
}
|
|
2045
|
+
if (this.selectedRowKeys.length > 1) {
|
|
2046
|
+
this.$message.warning(this.$i18nt("gd.https.editTipOne", "\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u6570\u636E\u7F16\u8F91!"));
|
|
2047
|
+
return;
|
|
2048
|
+
}
|
|
2049
|
+
this.editStateCodes({ row: this.selectedRows[0] });
|
|
2050
|
+
},
|
|
2051
|
+
editStateCodes({ column: i, row: e }) {
|
|
2052
|
+
if (e.dict_type == 1) {
|
|
2053
|
+
this.$message.error(this.$i18nt("gd.https.operableNoTip", "\u4E0D\u53EF\u64CD\u4F5C!"));
|
|
2054
|
+
return;
|
|
2055
|
+
}
|
|
2056
|
+
const t = e.statecodes != 1 ? this.$i18nt("gd.https.enableContent", "\u662F\u5426\u505C\u7528\u9009\u4E2D\u6570\u636E?") : this.$i18nt("gd.https.deactivateContent", "\u662F\u5426\u542F\u7528\u9009\u4E2D\u6570\u636E?"), s = e.statecodes != 1 ? this.$i18nt("gd.https.enableOk", "\u786E\u8BA4\u505C\u7528") : this.$i18nt("gd.https.deactivateOk", "\u786E\u8BA4\u542F\u7528");
|
|
2057
|
+
this.$confirm(t, this.$i18nt("gd.https.delTitle", "\u6E29\u99A8\u63D0\u793A"), {
|
|
2058
|
+
confirmButtonText: s,
|
|
2059
|
+
cancelButtonText: this.$i18nt("gd.https.delCancel", "\u53D6\u6D88"),
|
|
2060
|
+
showClose: !1,
|
|
2061
|
+
confirmButtonLoading: !1,
|
|
2062
|
+
cancelButtonLoading: !1,
|
|
2063
|
+
closeOnClickModal: !1,
|
|
2064
|
+
type: "warning",
|
|
2065
|
+
confirmButtonClass: "el-button--danger",
|
|
2066
|
+
customClass: "custom-alert",
|
|
2067
|
+
callback: () => {
|
|
2068
|
+
},
|
|
2069
|
+
beforeClose: (a, l, n) => {
|
|
2070
|
+
if (a !== "confirm") {
|
|
2071
|
+
n();
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2074
|
+
l.confirmButtonLoading = !0, l.cancelButtonLoading = !0, l.showCancelButton = !1, v({ id: e.id, stateCodes: e.statecodes == 1 ? 0 : 1 }).then((r) => {
|
|
2075
|
+
n(), l.confirmButtonLoading = !1, l.cancelButtonLoading = !1, l.showCancelButton = !0, r.success ? (this.$message.success(this.$i18nt("gd.https.operateSucc", "\u64CD\u4F5C\u6210\u529F")), this.handleOk()) : this.$message.error(this.$i18nt("gd.https.operateFail", "\u64CD\u4F5C\u5931\u8D25") + r.message);
|
|
2076
|
+
});
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
};
|
|
2082
|
+
var se = function() {
|
|
2083
|
+
var e = this, t = e._self._c;
|
|
2084
|
+
return t("div", { staticClass: "gd-page-view" }, [t("div", { staticClass: "page-view-list", staticStyle: { padding: "0px" } }, [t("gd-tables", { ref: "table", attrs: { dataSource: e.loadData, size: e.tableSize, pageSize: e.tablePageSize, columns: e.tableColumns, selectedRowKeys: e.selectedRowKeys, filtering: !0, height: e.getHeight }, on: { onChange: e.onSelectChange }, scopedSlots: e._u([{ key: "name", fn: function({ column: s, row: a }) {
|
|
2085
|
+
return [t("gd-tooltip", { attrs: { rowKey: "name", row: a, highlight: "" }, on: { click: e.editForms } })];
|
|
2086
|
+
} }, { key: "basicrecordtablename", fn: function({ column: s, row: a }) {
|
|
2087
|
+
return [t("gd-tooltip", { attrs: { rowKey: "basicrecordtable", row: a } })];
|
|
2088
|
+
} }, { key: "matchingrecordtablename", fn: function({ column: s, row: a }) {
|
|
2089
|
+
return [t("gd-tooltip", { attrs: { rowKey: "matchingrecordtable", row: a } })];
|
|
2090
|
+
} }, { key: "issave", fn: function(s) {
|
|
2091
|
+
return [e.dictSwitch(s.row.issave, "yes_or_no") ? t("el-tag", { staticStyle: { "border-color": "transparent" }, attrs: { effect: "dark", color: e.dictSwitch(s.row.issave, "yes_or_no") } }, [e._v(" " + e._s(e._f("dictType")("yes_or_no", s.row.issave)) + " ")]) : t("span", [e._v(e._s(e._f("dictType")("yes_or_no", s.row.issave)))])];
|
|
2092
|
+
} }, { key: "remark", fn: function({ column: s, row: a }) {
|
|
2093
|
+
return [t("gd-tooltip", { attrs: { rowKey: "remark", row: a } })];
|
|
2094
|
+
} }, { key: "stateCodes", fn: function(s) {
|
|
2095
|
+
return [e.dictSwitch(s.row.statecodes, "state_code") ? t("el-tag", { staticStyle: { "border-color": "transparent" }, attrs: { effect: "dark", color: e.dictSwitch(s.row.statecodes, "state_code") } }, [e._v(" " + e._s(e._f("dictType")("state_code", s.row.statecodes)) + " ")]) : t("span", [e._v(e._s(e._f("dictType")("state_code", s.row.statecodes)))])];
|
|
2096
|
+
} }, { key: "operator", fn: function() {
|
|
2097
|
+
return [t("div", { staticClass: "gd-table-operator" }, [t("div", { staticClass: "gd-table-operatorr" }, [t("gd-btn-list", { attrs: { sysViewButtons: e.getTableButtons }, on: { functionName: e.doEvent } })], 1)])];
|
|
2098
|
+
}, proxy: !0 }, { key: "filtering", fn: function({ colse: s, visible: a }) {
|
|
2099
|
+
return [t("gd-table-queries-field", { attrs: { columns: e.getTableQueries, height: e.getHeight, queryParam: e.queryParam, colse: s, visible: a }, on: { save: e.saveQueries } })];
|
|
2100
|
+
} }]) })], 1), t("editForm", { ref: "editForm", attrs: { table: e.record }, on: { ok: e.handleOk } })], 1);
|
|
2101
|
+
}, ae = [], le = /* @__PURE__ */ u(
|
|
2102
|
+
ie,
|
|
2103
|
+
se,
|
|
2104
|
+
ae,
|
|
2105
|
+
!1,
|
|
2106
|
+
null,
|
|
2107
|
+
"a9183337",
|
|
2108
|
+
null,
|
|
2109
|
+
null
|
|
2110
|
+
);
|
|
2111
|
+
const g = le.exports;
|
|
2112
|
+
g.install = function(i) {
|
|
2113
|
+
i.component(g.name, g);
|
|
2114
|
+
};
|
|
2115
|
+
export {
|
|
2116
|
+
U as F,
|
|
2117
|
+
g as G,
|
|
2118
|
+
fe as a,
|
|
2119
|
+
oe as b,
|
|
2120
|
+
C as c,
|
|
2121
|
+
ue as d,
|
|
2122
|
+
me as e,
|
|
2123
|
+
ge as f,
|
|
2124
|
+
pe as g,
|
|
2125
|
+
de as h,
|
|
2126
|
+
ce as i,
|
|
2127
|
+
be as j,
|
|
2128
|
+
ye as k,
|
|
2129
|
+
he as s
|
|
2130
|
+
};
|