merge
parent
ff3f4dcfe4
commit
ef1b3d879a
|
|
@ -36,14 +36,14 @@
|
|||
@change="handleStreetChange"
|
||||
/>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item label="村/社区" name="communityid">
|
||||
<a-form-item label="村/社区" name="communityid">
|
||||
<a-select
|
||||
v-model:value="formState.communityid"
|
||||
:options="data.communityOptions"
|
||||
:field-names="{ label: 'name', value: 'id' }"
|
||||
@change="handleCommunityChange"
|
||||
/>
|
||||
</a-form-item> -->
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
|
||||
|
|
@ -84,14 +84,14 @@
|
|||
@change="handleStreetChange"
|
||||
/>
|
||||
</a-form-item>
|
||||
<!-- <a-form-item label="村/社区" name="communityid">
|
||||
<a-form-item label="村/社区" name="communityid">
|
||||
<a-select
|
||||
v-model:value="formState.communityid"
|
||||
:options="data.communityOptions"
|
||||
:field-names="{ label: 'name', value: 'id' }"
|
||||
@change="handleCommunityChange"
|
||||
/>
|
||||
</a-form-item> -->
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-modal>
|
||||
</div>
|
||||
|
|
@ -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,19 @@
|
|||
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;
|
||||
});
|
||||
}
|
||||
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 +192,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 +211,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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue