...
|
...
|
@@ -5,7 +5,7 @@ |
5
|
5
|
<Authority>
|
6
|
6
|
<a-button type="primary" @click="handleAdd"> 新增规则链 </a-button>
|
7
|
7
|
</Authority>
|
8
|
|
- <Upload :show-upload-list="false" :customRequest="handleImport">
|
|
8
|
+ <Upload :show-upload-list="false" accept=".json," :customRequest="handleImport">
|
9
|
9
|
<Button type="primary" :loading="importLoading"> 导入规则链 </Button>
|
10
|
10
|
</Upload>
|
11
|
11
|
<Authority>
|
...
|
...
|
@@ -113,7 +113,7 @@ |
113
|
113
|
|
114
|
114
|
const isEmptyObject = (value: any) => isObject(value) && !Object.keys(value).length;
|
115
|
115
|
const importLoading = ref<boolean>(false);
|
116
|
|
- const hasBatchDelete = ref<boolean>(false);
|
|
116
|
+ const hasBatchDelete = ref<boolean>(true);
|
117
|
117
|
|
118
|
118
|
const beforeFetch = (params) => {
|
119
|
119
|
Reflect.set(params, 'page', params.page - 1);
|
...
|
...
|
@@ -239,10 +239,19 @@ |
239
|
239
|
const { firstNodeIndex, nodes, connections, ruleChainConnections } = await exportRuleChine(
|
240
|
240
|
record.id.id
|
241
|
241
|
);
|
|
242
|
+
|
|
243
|
+ const node = nodes.map((item) => {
|
|
244
|
+ return {
|
|
245
|
+ ...item,
|
|
246
|
+ id: undefined,
|
|
247
|
+ ruleChainId: undefined,
|
|
248
|
+ };
|
|
249
|
+ });
|
242
|
250
|
const value = {
|
243
|
251
|
ruleChain: { additionalInfo, name, type, firstRuleNodeId, root, debugMode, configuration },
|
244
|
|
- metadata: { firstNodeIndex, nodes, connections, ruleChainConnections },
|
|
252
|
+ metadata: { firstNodeIndex, nodes: node, connections, ruleChainConnections },
|
245
|
253
|
};
|
|
254
|
+ // return;
|
246
|
255
|
exportJSONFile(value, name);
|
247
|
256
|
};
|
248
|
257
|
|
...
|
...
|
|