|
@@ -25,6 +25,7 @@
|
|
<t-form-item label="区域" name="targetValue" requiredMark>
|
|
<t-form-item label="区域" name="targetValue" requiredMark>
|
|
<div style="height: 400px">
|
|
<div style="height: 400px">
|
|
<t-transfer
|
|
<t-transfer
|
|
|
|
+ v-if="visible"
|
|
v-model="targetValue"
|
|
v-model="targetValue"
|
|
v-model:checked="checkedRef"
|
|
v-model:checked="checkedRef"
|
|
:data="areaData"
|
|
:data="areaData"
|
|
@@ -48,7 +49,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup name="AddRegionDialog">
|
|
<script setup name="AddRegionDialog">
|
|
-import { ref, computed } from 'vue';
|
|
|
|
|
|
+import { ref, computed, watch } from 'vue';
|
|
import { MessagePlugin } from 'tdesign-vue-next';
|
|
import { MessagePlugin } from 'tdesign-vue-next';
|
|
import useClearDialog from '@/hooks/useClearDialog';
|
|
import useClearDialog from '@/hooks/useClearDialog';
|
|
import { serviceRegionEditApi } from '@/api/service-unit';
|
|
import { serviceRegionEditApi } from '@/api/service-unit';
|
|
@@ -151,6 +152,15 @@ const save = async () => {
|
|
emit('update:visible', false);
|
|
emit('update:visible', false);
|
|
emit('success');
|
|
emit('success');
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+watch(
|
|
|
|
+ () => props.visible,
|
|
|
|
+ (val) => {
|
|
|
|
+ if (!val) {
|
|
|
|
+ targetValue.value = [];
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+);
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|