Commit edddaede9f66b8c4493e083699163a47d13bd983
1 parent
bbfdda54
fix: DEFECT-1282 修复选择该组织下时有网关设备,然后选择另一个组织,没有网关设备,但是之前的网关设备回显,点击确认还能编辑成功,回显为id问题
Showing
1 changed file
with
9 additions
and
0 deletions
@@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
6 | <div style="display: flex; align-items: center"> | 6 | <div style="display: flex; align-items: center"> |
7 | <div style="width: 245px"> | 7 | <div style="width: 245px"> |
8 | <a-tree-select | 8 | <a-tree-select |
9 | + @change="handleTreeOrg" | ||
9 | v-model:value="model[field]" | 10 | v-model:value="model[field]" |
10 | show-search | 11 | show-search |
11 | style="width: 100%" | 12 | style="width: 100%" |
@@ -417,6 +418,13 @@ | @@ -417,6 +418,13 @@ | ||
417 | }); | 418 | }); |
418 | } | 419 | } |
419 | 420 | ||
421 | + const handleTreeOrg = () => { | ||
422 | + const clearGatewayId = { | ||
423 | + gatewayId: '', | ||
424 | + }; | ||
425 | + setFieldsValue(clearGatewayId); | ||
426 | + }; | ||
427 | + | ||
420 | return { | 428 | return { |
421 | resetFields, | 429 | resetFields, |
422 | positionState, | 430 | positionState, |
@@ -449,6 +457,7 @@ | @@ -449,6 +457,7 @@ | ||
449 | registerModal, | 457 | registerModal, |
450 | handleOpenOrgDrawer, | 458 | handleOpenOrgDrawer, |
451 | handleSuccess, | 459 | handleSuccess, |
460 | + handleTreeOrg, | ||
452 | }; | 461 | }; |
453 | }, | 462 | }, |
454 | }); | 463 | }); |