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