diff --git a/src/views/demo/tiankongdi/changearea/MapList/amend.vue b/src/views/demo/tiankongdi/changearea/MapList/amend.vue
index bfe6ea08..61834cc7 100644
--- a/src/views/demo/tiankongdi/changearea/MapList/amend.vue
+++ b/src/views/demo/tiankongdi/changearea/MapList/amend.vue
@@ -36,14 +36,14 @@
@change="handleStreetChange"
/>
-
+
+
+
@@ -84,14 +84,14 @@
@change="handleStreetChange"
/>
-
+
+
+
@@ -123,12 +123,12 @@
const rules = ref({
countyid: [{ required: true, message: '县区不能为空', trigger: 'blur' }],
streetid: [{ required: true, message: '乡镇不能为空', trigger: 'blur' }],
- // communityid: [{ required: true, message: '村/社区不能为空', trigger: 'blur' }],
+ communityid: [{ required: true, message: '村/社区不能为空', trigger: 'blur' }],
});
const data = reactive({
countyOptions: [],
streetOptions: [],
- // communityOptions: [],
+ communityOptions: [],
});
watch(
@@ -157,19 +157,20 @@
data.streetOptions = res;
});
formState.value.streetid = '';
- // formState.value.communityid = '';
+ formState.value.communityid = '';
}
async function handleStreetChange(value, option) {
formState.value.streetid = value;
formState.value.streetname = option.name;
- // getOptions(value).then((res) => {
- // data.communityOptions = res;
- // });
+ getOptions(value).then((res) => {
+ data.communityOptions = res;
+ });
+ formState.value.communityid = '';
+ }
+ async function handleCommunityChange(value, option) {
+ formState.value.communityid = value;
+ formState.value.communityname = option.name;
}
- // async function handleCommunityChange(value, option) {
- // formState.value.communityid = value;
- // formState.value.communityname = option.name;
- // }
async function getOptions(value) {
const data = await getChildrenTree({
parentId: value,
@@ -192,9 +193,9 @@
data.streetOptions = res;
});
// 获取村/社区数据
- // getOptions(formState.value.streetid).then((res) => {
- // data.communityOptions = res;
- // });
+ getOptions(formState.value.streetid).then((res) => {
+ data.communityOptions = res;
+ });
}
function handlerCloseModal() {
@@ -211,8 +212,8 @@
countyname: formState.value.countyname,
streetid: formState.value.streetid,
streetname: formState.value.streetname,
- // communityid: formState.value.communityid,
- // communityname: formState.value.communityname,
+ communityid: formState.value.communityid,
+ communityname: formState.value.communityname,
};
console.log(querys);
const data = await updateDroneCaseInfo(querys);