From 77475478d8400fac884be02ded0a6c61e6ad0497 Mon Sep 17 00:00:00 2001 From: wpf <2187978347@qq.com> Date: Sun, 13 Aug 2023 11:29:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8C=BA=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/company/edit.vue | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/views/company/edit.vue b/src/views/company/edit.vue index 0f608fd..ca9ac43 100644 --- a/src/views/company/edit.vue +++ b/src/views/company/edit.vue @@ -178,13 +178,18 @@ {{ city[regionType + "_name"] }} @@ -666,6 +671,7 @@ const formData = reactive({ village: "", brigade: "", address: "", + responsible_area: [], company_type: "", avatar: "", sex: "1", @@ -793,24 +799,24 @@ function openCompany() { } // 当前选择的负责区域列表 -const regionList = ref([]); +// const formData.responsible_area = ref([]); // 当前应当显示的区域 const regionType = ref(""); watch( () => formData[regionType.value], (newValue, oldValue) => { - regionList.value = []; - regionList.value.push(newValue); + formData.responsible_area.value = []; + formData.responsible_area.value.push(newValue); } ); // 多选区域 const handleCheckedCitiesChange = (value: string[]) => { - console.log(value); + // console.log("选的值", value); }; // 获取详情 const setFormData = async (data: Record) => { - console.log(formData); + // console.log(formData); for (const key in formData) { if (data[key] != null && data[key] != undefined) { @@ -1092,7 +1098,6 @@ const create = async () => { data.qualification.other_qualifications = JSON.stringify( data.qualification.other_qualifications ); - data[regionType.value] = regionList.value; if (route.query.id) { await apiCompanyEdit(data); } else {