diff --git a/src/views/company/edit.vue b/src/views/company/edit.vue
index 6b98d0a..0f608fd 100644
--- a/src/views/company/edit.vue
+++ b/src/views/company/edit.vue
@@ -32,7 +32,7 @@
>
-
+
+
+
+
+ {{ city[regionType + "_name"] }}
+
+
+
@@ -777,6 +792,22 @@ function openCompany() {
isCompany.value = true;
}
+// 当前选择的负责区域列表
+const regionList = ref([]);
+// 当前应当显示的区域
+const regionType = ref("");
+watch(
+ () => formData[regionType.value],
+ (newValue, oldValue) => {
+ regionList.value = [];
+ regionList.value.push(newValue);
+ }
+);
+// 多选区域
+const handleCheckedCitiesChange = (value: string[]) => {
+ console.log(value);
+};
+
// 获取详情
const setFormData = async (data: Record) => {
console.log(formData);
@@ -883,6 +914,7 @@ function company_type_change(type: any) {
formData.street = "";
formData.village = "";
formData.brigade = "";
+ regionType.value = "area";
return true;
}
//镇
@@ -895,6 +927,7 @@ function company_type_change(type: any) {
formData.brigade = "";
partyDisabled.value = true;
indexType.value = 30;
+ regionType.value = "street";
return true;
}
if (type != 16) {
@@ -907,6 +940,7 @@ function company_type_change(type: any) {
isVillage.value = true;
isBrigade.value = false;
formData.brigade = "";
+ regionType.value = "village";
return true;
}
@@ -916,6 +950,7 @@ function company_type_change(type: any) {
isStreet.value = true;
isVillage.value = true;
isBrigade.value = true;
+ regionType.value = "brigade";
return true;
}
}
@@ -1030,7 +1065,6 @@ const getDetails = async () => {
// fileList.value[0].url = data.contract?.file
// fileList.value[0].name = '合同文件'
// }
- console.log(formData);
company_type_change(formData.company_type);
};
const clickdelete = (index) => {
@@ -1058,6 +1092,7 @@ 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 {