Commit b1d6735307d0edcb3d5f59409119ed7be6e1b287
1 parent
306b533b
pref:DEFECT-509 启用数据流转时,点了两次然后规则链出现两次,禁用数据流转,规则链还存在一条
Showing
1 changed file
with
5 additions
and
0 deletions
... | ... | @@ -69,6 +69,7 @@ |
69 | 69 | </template> |
70 | 70 | <template #status="{ record }"> |
71 | 71 | <Switch |
72 | + :disabled="disabledSwitch" | |
72 | 73 | :checked="record.status === 1" |
73 | 74 | :loading="record.pendingStatus" |
74 | 75 | checkedChildren="启用" |
... | ... | @@ -102,6 +103,7 @@ |
102 | 103 | name: 'Index', |
103 | 104 | components: { BasicTable, TableAction, DataTransferDrawer, Authority, Switch }, |
104 | 105 | setup() { |
106 | + const disabledSwitch = ref(false); | |
105 | 107 | const enableObj = reactive({ |
106 | 108 | convertIds: [], |
107 | 109 | status: 0, |
... | ... | @@ -272,6 +274,7 @@ |
272 | 274 | setProps({ |
273 | 275 | loading: true, |
274 | 276 | }); |
277 | + disabledSwitch.value = true; | |
275 | 278 | enableObj.convertIds.length = 0; |
276 | 279 | resetSelectedRowKeys(); |
277 | 280 | clearSelectedRowKeys(); |
... | ... | @@ -293,6 +296,7 @@ |
293 | 296 | setProps({ |
294 | 297 | loading: false, |
295 | 298 | }); |
299 | + disabledSwitch.value = false; | |
296 | 300 | }, 500); |
297 | 301 | reload(); |
298 | 302 | } |
... | ... | @@ -315,6 +319,7 @@ |
315 | 319 | handleDeleteOrBatchDelete, |
316 | 320 | singleStopDeleteStatus, |
317 | 321 | statusChange, |
322 | + disabledSwitch, | |
318 | 323 | }; |
319 | 324 | }, |
320 | 325 | }); | ... | ... |