gcs-ui-lib 1.2.2 → 1.2.3
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/gcs-ui-lib.common.js +20326 -17567
- package/lib/gcs-ui-lib.css +1 -1
- package/lib/gcs-ui-lib.umd.js +20326 -17567
- package/lib/gcs-ui-lib.umd.min.js +110 -110
- package/package.json +7 -1
- package/packages/AutoFillDetail/src/components/fillDetail.vue +0 -15
- package/packages/AutoFillDetail/src/demo/index.vue +1 -1
- package/packages/AutoFillDetail/src/main.vue +22 -7
- package/packages/AutoFillDetection/src/components/HandEntred.vue +24 -51
- package/packages/AutoFillDetection/src/components/HandEntredThird.vue +225 -0
- package/packages/AutoFillDetection/src/components/RuleHit.vue +1 -0
- package/packages/AutoFillDetection/src/components/THIRD_ACCOUNT.vue +200 -0
- package/packages/AutoFillDetection/src/components/config.js +214 -3
- package/packages/AutoFillDetection/src/main.vue +38 -15
- package/packages/AutoFillList/src/components/config.js +56 -12
- package/packages/AutoFillList/src/main.vue +60 -15
- package/packages/AutoFillRuleHistory/src/main.vue +158 -133
- package/packages/AutoFillService/src/components/ConditionGroup.vue +36 -18
- package/packages/AutoFillService/src/components/basic.vue +162 -119
- package/packages/AutoFillService/src/components/fillRules.vue +28 -19
- package/packages/AutoFillService/src/demo/index.vue +17 -6
- package/packages/AutoFillService/src/main.vue +14 -9
- package/packages/Bank/src/main.vue +5 -1
- package/packages/CommonExport/index.js +7 -0
- package/packages/CommonExport/src/demo/index.vue +18 -0
- package/packages/CommonExport/src/main.vue +76 -0
- package/packages/MergeAutoFill/demo/NstcMergeAutoFillList.vue +47 -0
- package/packages/MergeAutoFill/index.js +28 -0
- package/packages/MergeAutoFill/merge/ExtendMergeHistory.vue +62 -0
- package/packages/MergeAutoFill/merge/merageBasic.vue +390 -0
- package/packages/MergeAutoFill/merge/merageFillService.vue +168 -0
- package/packages/MergeAutoFill/merge/merageHistoryRules.vue +133 -0
- package/packages/MergeAutoFill/merge/mergeFillDetail.vue +148 -0
- package/packages/MergeAutoFill/merge/mergeFillList.vue +94 -0
- package/packages/Trade/src/components/all/index.vue +1 -1
- package/packages/Trade/src/components/pendingEvent/index.vue +49 -44
- package/src/api/setting.js +17 -1
- package/src/index.js +18 -0
- package/src/preview/router.js +5 -0
- package/src/utils/index.js +31 -16
- package/.env.development +0 -5
- package/.env.production +0 -7
- package/.eslintrc.js +0 -5
- package/_webpack.config.js +0 -135
- package/babel.config.js +0 -16
- package/docs/README.md +0 -246
- package/npm +0 -1
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -19
- package/vue.config.js +0 -49
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ClPage :style="{ height: test ? '100%' : '' }">
|
|
3
3
|
<div slot="header" ref="formWrap">
|
|
4
|
-
<
|
|
4
|
+
<cl-page-header @back="$goBackCommon" content="历史规则查询">
|
|
5
|
+
</cl-page-header>
|
|
6
|
+
<div
|
|
7
|
+
class="flex-box flex-r"
|
|
8
|
+
style="position: absolute; top: 2px; right: 16px"
|
|
9
|
+
>
|
|
5
10
|
<el-button
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
icon="n20-icon-shuaxin"
|
|
12
|
+
plain
|
|
13
|
+
onlyicon
|
|
14
|
+
size="mini"
|
|
15
|
+
@click="refresh"
|
|
11
16
|
/>
|
|
12
17
|
<el-button
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
icon="n20-icon-iconfontshaixuan "
|
|
19
|
+
plain
|
|
20
|
+
onlyicon
|
|
21
|
+
size="mini"
|
|
22
|
+
class="m-l-s"
|
|
23
|
+
@click="multiple = !multiple"
|
|
19
24
|
/>
|
|
20
25
|
<el-dropdown trigger="click" class="m-l-s" @command="exportFn">
|
|
21
26
|
<span class="el-dropdown-link">
|
|
@@ -24,94 +29,84 @@
|
|
|
24
29
|
></el-button>
|
|
25
30
|
</span>
|
|
26
31
|
<el-dropdown-menu slot="dropdown">
|
|
27
|
-
<el-dropdown-item command="xls"
|
|
28
|
-
|
|
29
|
-
}}
|
|
32
|
+
<el-dropdown-item command="xls"
|
|
33
|
+
>{{ $l(".xls格式") }}
|
|
30
34
|
</el-dropdown-item>
|
|
31
|
-
<el-dropdown-item command="xlsx"
|
|
32
|
-
|
|
33
|
-
}}
|
|
35
|
+
<el-dropdown-item command="xlsx"
|
|
36
|
+
>{{ $l(".xlsx格式") }}
|
|
34
37
|
</el-dropdown-item>
|
|
35
38
|
</el-dropdown-menu>
|
|
36
39
|
</el-dropdown>
|
|
37
40
|
</div>
|
|
38
41
|
<ClAdvancedFilter
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
:visible.sync="multiple"
|
|
43
|
+
:filterId="`RulesManage-payment-filter-rules-${settingSource}432-rf3231`"
|
|
44
|
+
:model="formData"
|
|
45
|
+
onlyKey="id"
|
|
46
|
+
:filter-list="filterList"
|
|
47
|
+
@search="refresh"
|
|
48
|
+
@enter="refresh"
|
|
49
|
+
@clear="clearSearch"
|
|
47
50
|
/>
|
|
48
51
|
</div>
|
|
49
52
|
<div style="flex: 1; position: relative; height: 100%">
|
|
50
53
|
<div style="position: absolute; width: 100%; height: 100%">
|
|
51
54
|
<CLTablePro
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
ref="vTable"
|
|
56
|
+
:loading="loading"
|
|
57
|
+
:data="tableData"
|
|
58
|
+
:columns="tableHeader"
|
|
59
|
+
:height="'100%'"
|
|
60
|
+
:clearSelect="false"
|
|
61
|
+
auto-resize
|
|
62
|
+
:rowConfig="{
|
|
63
|
+
keyField: 'md5Code',
|
|
64
|
+
}"
|
|
65
|
+
:checkboxConfig="{
|
|
66
|
+
reserve: true,
|
|
67
|
+
}"
|
|
68
|
+
:key="`table-pro-${fillField.length}`"
|
|
69
|
+
@selection-change-method="handleSelectionChange"
|
|
70
|
+
@sort-change-method="sortChange"
|
|
68
71
|
>
|
|
69
72
|
<vxe-column
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
slot="usedUnit"
|
|
74
|
+
slot-scope="{ column }"
|
|
75
|
+
v-bind="column"
|
|
76
|
+
:field="column.prop"
|
|
77
|
+
:title="column.label"
|
|
75
78
|
>
|
|
76
79
|
<template slot-scope="{ row }">
|
|
77
80
|
<div v-html="row.usedUnit || '--'" :title="row.usedUnits"></div>
|
|
78
81
|
</template>
|
|
79
82
|
</vxe-column>
|
|
80
83
|
<vxe-column
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
slot="matchingId"
|
|
85
|
+
slot-scope="{ column }"
|
|
86
|
+
v-bind="column"
|
|
87
|
+
:field="column.prop"
|
|
88
|
+
:title="column.label"
|
|
86
89
|
>
|
|
87
90
|
<template slot-scope="{ row }">
|
|
88
|
-
<el-button
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
$router.push({
|
|
92
|
-
path: '/RulesDetailHiId',
|
|
93
|
-
query: { id: row.matchingIdHi },
|
|
94
|
-
})
|
|
95
|
-
"
|
|
96
|
-
>{{ row.matchingId }}-{{ row.matchingIdHi }}
|
|
97
|
-
</el-button
|
|
98
|
-
>
|
|
91
|
+
<el-button type="text" @click="handleClick(row)"
|
|
92
|
+
>{{ row.matchingId }}-{{ row.matchingIdHi }}
|
|
93
|
+
</el-button>
|
|
99
94
|
</template>
|
|
100
95
|
</vxe-column>
|
|
101
96
|
<vxe-colgroup
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
97
|
+
width="220"
|
|
98
|
+
slot="fillInfo"
|
|
99
|
+
:title="$l('补填信息')"
|
|
100
|
+
align="center"
|
|
106
101
|
>
|
|
107
102
|
<template v-for="item in fillField">
|
|
108
103
|
<vxe-column
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
104
|
+
v-if="fillField.length"
|
|
105
|
+
:key="item.fieldCode"
|
|
106
|
+
:field="item.fieldCode"
|
|
107
|
+
:title="item.fieldName"
|
|
108
|
+
align="center"
|
|
109
|
+
:width="200"
|
|
115
110
|
>
|
|
116
111
|
<template slot-scope="scope">
|
|
117
112
|
<div>
|
|
@@ -125,23 +120,23 @@
|
|
|
125
120
|
</div>
|
|
126
121
|
</div>
|
|
127
122
|
<div
|
|
128
|
-
|
|
129
|
-
|
|
123
|
+
class="page-footer-shadow flex-box flex-lr flex-v pt-4 pb-4"
|
|
124
|
+
slot="footer"
|
|
130
125
|
>
|
|
131
126
|
<div class="flex-box flex-v">
|
|
132
127
|
<StatisItem
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
:type="$l('已选合计')"
|
|
129
|
+
:list="[{ label: $l('笔数'), value: selectRows.length }]"
|
|
135
130
|
/>
|
|
136
131
|
<StatisItem
|
|
137
|
-
|
|
138
|
-
|
|
132
|
+
:type="$l('全部合计')"
|
|
133
|
+
:list="[{ label: $l('笔数'), value: pagination.total }]"
|
|
139
134
|
/>
|
|
140
135
|
</div>
|
|
141
136
|
<ClPagination
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
:page-obj="pagination"
|
|
138
|
+
:page-key="{ no: 'current', size: 'size', total: 'total' }"
|
|
139
|
+
@change="queryData"
|
|
145
140
|
/>
|
|
146
141
|
</div>
|
|
147
142
|
</ClPage>
|
|
@@ -150,20 +145,38 @@
|
|
|
150
145
|
<script>
|
|
151
146
|
import {
|
|
152
147
|
StatisItem,
|
|
153
|
-
AdvancedFilter as ClAdvancedFilter,
|
|
148
|
+
AdvancedFilter as ClAdvancedFilter,
|
|
149
|
+
dayjs,
|
|
154
150
|
Dialog as CLDialog,
|
|
155
151
|
Page as ClPage,
|
|
156
|
-
Pagination as ClPagination,
|
|
152
|
+
Pagination as ClPagination,
|
|
153
|
+
TablePro as CLTablePro,
|
|
154
|
+
PageHeader as ClPageHeader,
|
|
157
155
|
} from "n20-common-lib";
|
|
158
|
-
import {
|
|
159
|
-
|
|
156
|
+
import {
|
|
157
|
+
AutoFillListFilter,
|
|
158
|
+
AutoFillListHeader,
|
|
159
|
+
} from "^/AutoFillList/src/components/config";
|
|
160
|
+
import { matchingHisList, matchingSetting } from "@/api/setting";
|
|
160
161
|
import downloadBlob from "n20-common-lib/src/utils/downloadBlob";
|
|
161
162
|
|
|
162
163
|
export default {
|
|
163
164
|
name: "NstcAutoFillRuleHistory",
|
|
164
|
-
components: {
|
|
165
|
+
components: {
|
|
166
|
+
CLTablePro,
|
|
167
|
+
ClPagination,
|
|
168
|
+
CLDialog,
|
|
169
|
+
ClPage,
|
|
170
|
+
ClAdvancedFilter,
|
|
171
|
+
StatisItem,
|
|
172
|
+
ClPageHeader,
|
|
173
|
+
},
|
|
165
174
|
|
|
166
175
|
props: {
|
|
176
|
+
type: {
|
|
177
|
+
type: String,
|
|
178
|
+
default: "single",
|
|
179
|
+
},
|
|
167
180
|
// 1:收入 2: 支出
|
|
168
181
|
settingSource: {
|
|
169
182
|
type: [Number, String],
|
|
@@ -185,6 +198,13 @@ export default {
|
|
|
185
198
|
},
|
|
186
199
|
data(vm) {
|
|
187
200
|
return {
|
|
201
|
+
list: [
|
|
202
|
+
{
|
|
203
|
+
label: vm.$l("历史规则查询"),
|
|
204
|
+
value: "all",
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
name: vm.$l("历史规则查询"),
|
|
188
208
|
Dvisible: false,
|
|
189
209
|
pagination: {
|
|
190
210
|
size: 50,
|
|
@@ -227,40 +247,26 @@ export default {
|
|
|
227
247
|
selectRowIds: [],
|
|
228
248
|
selectRows: [],
|
|
229
249
|
fillField: [], // 补填动态字段
|
|
230
|
-
filterList:
|
|
250
|
+
filterList: [],
|
|
231
251
|
tableHeader: [],
|
|
232
252
|
fillCommonConditionList: [],
|
|
233
|
-
orders: {action: "DESC", key: "updateTime"},
|
|
253
|
+
orders: { action: "DESC", key: "updateTime" },
|
|
234
254
|
};
|
|
235
255
|
},
|
|
236
256
|
|
|
237
257
|
async mounted() {
|
|
238
|
-
this.tableHeader = [...AutoFillListHeader]
|
|
239
|
-
|
|
240
|
-
// {
|
|
241
|
-
// label: "生效时间",
|
|
242
|
-
// prop: "effectiveTime",
|
|
243
|
-
// align: "center",
|
|
244
|
-
// width: "180",
|
|
245
|
-
// sortable: true,
|
|
246
|
-
// "show-overflow-tooltip": true,
|
|
247
|
-
// },
|
|
248
|
-
// {
|
|
249
|
-
// label: "失效时间",
|
|
250
|
-
// prop: "updateTime",
|
|
251
|
-
// align: "center",
|
|
252
|
-
// width: "180",
|
|
253
|
-
// sortable: true,
|
|
254
|
-
// "show-overflow-tooltip": true,
|
|
255
|
-
// },
|
|
256
|
-
// );
|
|
257
|
-
// console.log(this.tableHeader)
|
|
258
|
-
await this.matchingSetting();
|
|
259
|
-
},
|
|
260
|
-
activated() {
|
|
258
|
+
this.tableHeader = [...AutoFillListHeader];
|
|
259
|
+
this.filterList = [...AutoFillListFilter];
|
|
261
260
|
this.queryData();
|
|
261
|
+
await this.matchingSetting();
|
|
262
262
|
},
|
|
263
263
|
methods: {
|
|
264
|
+
handleClick(row) {
|
|
265
|
+
this.$router.push({
|
|
266
|
+
path: "/RulesDetailHiId",
|
|
267
|
+
query: { id: row.matchingIdHi, fillType: row.usedAccountType },
|
|
268
|
+
});
|
|
269
|
+
},
|
|
264
270
|
clearSearch() {
|
|
265
271
|
for (const key in this.formData) {
|
|
266
272
|
const el = this.formData[key];
|
|
@@ -290,7 +296,14 @@ export default {
|
|
|
290
296
|
};
|
|
291
297
|
}
|
|
292
298
|
params.exportType = type;
|
|
293
|
-
|
|
299
|
+
if (this.type && this.type == "merageFill") {
|
|
300
|
+
params.refillBasis = "3";
|
|
301
|
+
}
|
|
302
|
+
let res = await this.$axios.post(
|
|
303
|
+
"/api/aims/record/record-matching/1.0/history/export",
|
|
304
|
+
params,
|
|
305
|
+
{ responseType: "blob" },
|
|
306
|
+
);
|
|
294
307
|
let t = dayjs().format("YYYYMMDD");
|
|
295
308
|
let fn = this.$l("历史规则查询") + "-" + t + "." + type;
|
|
296
309
|
downloadBlob(res, fn);
|
|
@@ -299,17 +312,25 @@ export default {
|
|
|
299
312
|
// 获取动态匹配/补填字段
|
|
300
313
|
async matchingSetting() {
|
|
301
314
|
this.fillCommonConditionList = [];
|
|
302
|
-
this.fillField = await matchingSetting(
|
|
315
|
+
this.fillField = await matchingSetting(
|
|
316
|
+
2,
|
|
317
|
+
this.settingSource,
|
|
318
|
+
this.type == "merageFill" ? "THIRD_ACCOUNT" : "BANK_ACCOUNT",
|
|
319
|
+
);
|
|
303
320
|
this.fillField = this.fillField.filter(
|
|
304
|
-
(item) => !item.fieldCode.includes("Extend")
|
|
321
|
+
(item) => !item.fieldCode.includes("Extend"),
|
|
305
322
|
);
|
|
306
323
|
//1:收入 2: 支出
|
|
307
|
-
if (this.settingSource ==
|
|
308
|
-
this.fillField = this.fillField.filter(
|
|
324
|
+
if (this.settingSource == "2") {
|
|
325
|
+
this.fillField = this.fillField.filter(
|
|
326
|
+
(item) => item.fieldCode != "paymentCategory",
|
|
327
|
+
);
|
|
309
328
|
}
|
|
310
329
|
// 收款排除付款类型
|
|
311
|
-
if (this.settingSource ==
|
|
312
|
-
this.fillField = this.fillField.filter(
|
|
330
|
+
if (this.settingSource == "1") {
|
|
331
|
+
this.fillField = this.fillField.filter(
|
|
332
|
+
(item) => item.fieldCode != "paymentTypeNo",
|
|
333
|
+
);
|
|
313
334
|
}
|
|
314
335
|
for (let i of this.fillField) {
|
|
315
336
|
this.fillCommonConditionList.push({
|
|
@@ -343,7 +364,7 @@ export default {
|
|
|
343
364
|
},
|
|
344
365
|
sortChange(data) {
|
|
345
366
|
if (!data.length) {
|
|
346
|
-
this.orders = {action: "DESC", key: "updateTime"};
|
|
367
|
+
this.orders = { action: "DESC", key: "updateTime" };
|
|
347
368
|
return;
|
|
348
369
|
}
|
|
349
370
|
let obj = data[0] || {};
|
|
@@ -354,7 +375,7 @@ export default {
|
|
|
354
375
|
this.queryData();
|
|
355
376
|
},
|
|
356
377
|
async queryData() {
|
|
357
|
-
let map = {...this.formData};
|
|
378
|
+
let map = { ...this.formData };
|
|
358
379
|
for (let i of this.fillCommonConditionList) {
|
|
359
380
|
if (map[i.fillFieldCode]) {
|
|
360
381
|
i.fillValueLike = map[i.fillFieldCode];
|
|
@@ -373,8 +394,11 @@ export default {
|
|
|
373
394
|
...map,
|
|
374
395
|
};
|
|
375
396
|
try {
|
|
376
|
-
this.
|
|
377
|
-
|
|
397
|
+
if (this.type && this.type == "merageFill") {
|
|
398
|
+
params.refillBasis = "3";
|
|
399
|
+
}
|
|
400
|
+
this.loading = true;
|
|
401
|
+
const { records, total } = await matchingHisList(params);
|
|
378
402
|
this.tableData = (records || []).map((item) => {
|
|
379
403
|
if (typeof item.usedUnit == "string") {
|
|
380
404
|
item.usedUnit = JSON.parse(item.usedUnit);
|
|
@@ -382,31 +406,32 @@ export default {
|
|
|
382
406
|
}
|
|
383
407
|
if (item.usedUnit?.length > 5) {
|
|
384
408
|
item.usedUnit = item.usedUnit.slice(0, 5);
|
|
385
|
-
item.usedUnit.push({unitName: "....."});
|
|
409
|
+
item.usedUnit.push({ unitName: "....." });
|
|
386
410
|
}
|
|
387
411
|
for (let i of item.matchingFillCommons) {
|
|
388
412
|
let fv = undefined;
|
|
389
413
|
try {
|
|
390
414
|
fv = JSON.parse(i.fillValue);
|
|
391
|
-
} catch {
|
|
392
|
-
}
|
|
415
|
+
} catch {}
|
|
393
416
|
item[i.fillFieldCode] = fv?.budgetAccountName || fv?.name;
|
|
394
417
|
}
|
|
395
|
-
console.log(window.btoa(`${item.matchingId}${item.updateTime}`))
|
|
418
|
+
console.log(window.btoa(`${item.matchingId}${item.updateTime}`));
|
|
396
419
|
return {
|
|
397
420
|
...item,
|
|
398
421
|
md5Code: window.btoa(`${item.matchingId}${item.updateTime}`),
|
|
399
422
|
usedUnits: item.usedUnits?.map((item) => item.unitName)?.join("\n"),
|
|
400
|
-
usedUnit: item.usedUnit
|
|
423
|
+
usedUnit: item.usedUnit
|
|
424
|
+
?.map((item) => item.unitName)
|
|
425
|
+
?.join("<br/>"),
|
|
401
426
|
};
|
|
402
427
|
});
|
|
403
428
|
this.pagination.total = total || 0;
|
|
404
429
|
} catch (err) {
|
|
405
|
-
console.error(err)
|
|
406
|
-
this.tableData = []
|
|
407
|
-
this.pagination.total = 0
|
|
430
|
+
console.error(err);
|
|
431
|
+
this.tableData = [];
|
|
432
|
+
this.pagination.total = 0;
|
|
408
433
|
} finally {
|
|
409
|
-
this.loading = false
|
|
434
|
+
this.loading = false;
|
|
410
435
|
}
|
|
411
436
|
},
|
|
412
437
|
handleSelectionChange(rows) {
|
|
@@ -418,5 +443,5 @@ export default {
|
|
|
418
443
|
this.selectRows = rows;
|
|
419
444
|
},
|
|
420
445
|
},
|
|
421
|
-
}
|
|
446
|
+
};
|
|
422
447
|
</script>
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
class="auto-rule"
|
|
36
36
|
:key="item.key + '-auto-rule'"
|
|
37
37
|
>
|
|
38
|
-
<div
|
|
38
|
+
<div
|
|
39
|
+
class="auto-group-item"
|
|
40
|
+
:class="{ 'auto-group-item-disabled': disabled }"
|
|
41
|
+
>
|
|
39
42
|
<label class="auto-group-item-label">匹配字段</label>
|
|
40
43
|
<el-select
|
|
41
44
|
v-model="item.matchingFieldCode"
|
|
@@ -58,7 +61,7 @@
|
|
|
58
61
|
class="auto-group-item"
|
|
59
62
|
:class="{
|
|
60
63
|
'auto-required': localNode.vaild && !item.matchingOperation,
|
|
61
|
-
'auto-group-item-disabled':disabled
|
|
64
|
+
'auto-group-item-disabled': disabled,
|
|
62
65
|
}"
|
|
63
66
|
>
|
|
64
67
|
<label class="auto-group-item-label">匹配关系</label>
|
|
@@ -80,10 +83,9 @@
|
|
|
80
83
|
</div>
|
|
81
84
|
<div
|
|
82
85
|
class="auto-group-item"
|
|
83
|
-
v-if="isNew"
|
|
84
86
|
:class="{
|
|
85
87
|
'auto-required': localNode.vaild && !item.matchingValueType,
|
|
86
|
-
'auto-group-item-disabled':disabled
|
|
88
|
+
'auto-group-item-disabled': disabled,
|
|
87
89
|
}"
|
|
88
90
|
>
|
|
89
91
|
<label class="auto-group-item-label">匹配值</label>
|
|
@@ -106,7 +108,7 @@
|
|
|
106
108
|
class="auto-group-item item-content"
|
|
107
109
|
:class="{
|
|
108
110
|
'auto-required': autoValus(item),
|
|
109
|
-
'auto-group-item-disabled':disabled
|
|
111
|
+
'auto-group-item-disabled': disabled,
|
|
110
112
|
}"
|
|
111
113
|
>
|
|
112
114
|
<label class="auto-group-item-label">匹配内容</label>
|
|
@@ -162,7 +164,6 @@
|
|
|
162
164
|
<condition-group
|
|
163
165
|
:localNode="child"
|
|
164
166
|
:emptyList="emptyList"
|
|
165
|
-
:isNew="isNew"
|
|
166
167
|
:options="options"
|
|
167
168
|
:ref="`conditionGroup${idx}`"
|
|
168
169
|
@delete="deleteGrout(idx)"
|
|
@@ -215,9 +216,9 @@ const ruleItem = {
|
|
|
215
216
|
export default {
|
|
216
217
|
name: "ConditionGroup",
|
|
217
218
|
props: {
|
|
218
|
-
|
|
219
|
+
NoNeedDefaultValue: {
|
|
219
220
|
type: Boolean,
|
|
220
|
-
default:
|
|
221
|
+
default: false,
|
|
221
222
|
},
|
|
222
223
|
options: {
|
|
223
224
|
type: Array,
|
|
@@ -278,8 +279,8 @@ export default {
|
|
|
278
279
|
disabledOps() {
|
|
279
280
|
return (val, item) => {
|
|
280
281
|
return (
|
|
281
|
-
|
|
282
|
-
|
|
282
|
+
!["EQUALS", "NOT_EQUALS", "CONTAINS", "NOT_CONTAINS"].includes(item.matchingOperation) &&
|
|
283
|
+
val === "DYNAMIC"
|
|
283
284
|
);
|
|
284
285
|
};
|
|
285
286
|
},
|
|
@@ -294,7 +295,7 @@ export default {
|
|
|
294
295
|
},
|
|
295
296
|
async mounted() {},
|
|
296
297
|
methods: {
|
|
297
|
-
handChangeValueType(val, item){
|
|
298
|
+
handChangeValueType(val, item) {
|
|
298
299
|
this.$set(item, "TmValues", []);
|
|
299
300
|
this.$set(item, "mValues", []);
|
|
300
301
|
},
|
|
@@ -314,17 +315,22 @@ export default {
|
|
|
314
315
|
}
|
|
315
316
|
},
|
|
316
317
|
addItem() {
|
|
318
|
+
let temp = structuredClone(ruleItem);
|
|
319
|
+
// 新增规则时,若无需默认值,则匹配字段为空
|
|
320
|
+
if (this.NoNeedDefaultValue) {
|
|
321
|
+
temp.matchingFieldCode = "";
|
|
322
|
+
}
|
|
317
323
|
let arr = this.localNode.matchingRules;
|
|
318
324
|
if (Array.isArray(arr)) {
|
|
319
|
-
this.localNode.matchingRules.push({ ...
|
|
325
|
+
this.localNode.matchingRules.push({ ...temp });
|
|
320
326
|
} else {
|
|
321
|
-
this.localNode.matchingRules = [{ ...
|
|
327
|
+
this.localNode.matchingRules = [{ ...temp }];
|
|
322
328
|
}
|
|
323
329
|
},
|
|
324
330
|
handChangeOperation(val, item) {
|
|
325
331
|
// if (this.emptyList.includes(val)) {
|
|
326
|
-
|
|
327
|
-
|
|
332
|
+
this.$set(item, "mValues", []);
|
|
333
|
+
this.$set(item, "TmValues", []);
|
|
328
334
|
// }
|
|
329
335
|
this.$set(item, "matchingValueType", "FIXED");
|
|
330
336
|
this.$set(item, "key", uuid());
|
|
@@ -352,7 +358,14 @@ export default {
|
|
|
352
358
|
}
|
|
353
359
|
},
|
|
354
360
|
addGroup() {
|
|
355
|
-
let
|
|
361
|
+
let temp = structuredClone(groupItem);
|
|
362
|
+
// 新增分组时,若无需默认值,则匹配字段为空
|
|
363
|
+
if (this.NoNeedDefaultValue) {
|
|
364
|
+
for (let i of temp) {
|
|
365
|
+
i.matchingFieldCode = "";
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
let matchingRules = JSON.parse(JSON.stringify(temp));
|
|
356
369
|
for (let i of matchingRules) {
|
|
357
370
|
i.key = uuid();
|
|
358
371
|
}
|
|
@@ -376,7 +389,7 @@ export default {
|
|
|
376
389
|
if (!this.textarea)
|
|
377
390
|
return this.$message.warning(this.$l("请输入匹配内容"));
|
|
378
391
|
let temp = this.textarea.split("\n");
|
|
379
|
-
temp = temp.filter(item
|
|
392
|
+
temp = temp.filter((item) => !!item);
|
|
380
393
|
this.$set(
|
|
381
394
|
this.localNode.matchingRules[this.currentIndex],
|
|
382
395
|
"mValues",
|
|
@@ -395,7 +408,12 @@ export default {
|
|
|
395
408
|
this.visible = true;
|
|
396
409
|
},
|
|
397
410
|
addRule(idx) {
|
|
398
|
-
let
|
|
411
|
+
let temp = structuredClone(ruleItem);
|
|
412
|
+
// 新增规则时,若无需默认值,则匹配字段为空
|
|
413
|
+
if (this.NoNeedDefaultValue) {
|
|
414
|
+
temp.matchingFieldCode = "";
|
|
415
|
+
}
|
|
416
|
+
let item = JSON.parse(JSON.stringify(temp));
|
|
399
417
|
item.key = uuid();
|
|
400
418
|
this.localNode.matchingRules.splice(idx + 1, 0, { ...item });
|
|
401
419
|
},
|