|
|
@@ -183,7 +183,11 @@
|
|
|
|
|
|
<!-- 分类 -->
|
|
|
<el-form-item label="分类" prop="" v-if="categoryTypeList.length > 0">
|
|
|
- <el-checkbox-group v-model="formData.businessClassify" disabled style="display: flex; flex-wrap: wrap; width: 100%">
|
|
|
+ <el-checkbox-group
|
|
|
+ v-model="formData.businessClassifyList"
|
|
|
+ disabled
|
|
|
+ style="display: flex; flex-wrap: wrap; width: 100%"
|
|
|
+ >
|
|
|
<div class="businessSection-item" v-for="type in categoryTypeList" :key="type.id || type.value">
|
|
|
<el-checkbox :value="type.dictId || type.value" :label="type.dictDetail" />
|
|
|
</div>
|
|
|
@@ -266,7 +270,7 @@ const formData = reactive({
|
|
|
businessSection: "",
|
|
|
businessTypes: "",
|
|
|
businessTypesList: [] as string[],
|
|
|
- businessClassify: [] as string[],
|
|
|
+ businessClassifyList: [] as string[],
|
|
|
expirationTime: "",
|
|
|
foodLicenceExpirationTime: "",
|
|
|
storePosition: "",
|
|
|
@@ -581,7 +585,7 @@ const handleBusinessSectionChange = async (sectionId: string, init?: boolean) =>
|
|
|
const handleCategoryChange = async (sectionId: string, init?: boolean) => {
|
|
|
if (!sectionId) {
|
|
|
categoryTypeList.value = [];
|
|
|
- formData.businessClassify = [];
|
|
|
+ formData.businessClassifyList = [];
|
|
|
return;
|
|
|
}
|
|
|
try {
|
|
|
@@ -605,7 +609,7 @@ const handleCategoryChange = async (sectionId: string, init?: boolean) => {
|
|
|
}
|
|
|
// 清空已选择的分类
|
|
|
// if (!init) {
|
|
|
- // formData.businessClassify = [];
|
|
|
+ // formData.businessClassifyList = [];
|
|
|
// }
|
|
|
} catch (error: any) {
|
|
|
// 忽略请求取消错误(这是正常的,当有重复请求时会被取消)
|
|
|
@@ -615,7 +619,7 @@ const handleCategoryChange = async (sectionId: string, init?: boolean) => {
|
|
|
}
|
|
|
console.error("获取分类失败:", error);
|
|
|
categoryTypeList.value = [];
|
|
|
- formData.businessClassify = [];
|
|
|
+ formData.businessClassifyList = [];
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -623,7 +627,7 @@ const handleCategoryChange = async (sectionId: string, init?: boolean) => {
|
|
|
const handleCategoryChangeByType = async (typeId: string, init?: boolean) => {
|
|
|
if (!typeId) {
|
|
|
categoryTypeList.value = [];
|
|
|
- formData.businessClassify = [];
|
|
|
+ formData.businessClassifyList = [];
|
|
|
return;
|
|
|
}
|
|
|
try {
|
|
|
@@ -647,7 +651,7 @@ const handleCategoryChangeByType = async (typeId: string, init?: boolean) => {
|
|
|
}
|
|
|
// 清空已选择的分类(如果不是初始化)
|
|
|
if (!init) {
|
|
|
- formData.businessClassify = [];
|
|
|
+ formData.businessClassifyList = [];
|
|
|
}
|
|
|
} catch (error: any) {
|
|
|
// 忽略请求取消错误(这是正常的,当有重复请求时会被取消)
|
|
|
@@ -657,7 +661,7 @@ const handleCategoryChangeByType = async (typeId: string, init?: boolean) => {
|
|
|
}
|
|
|
console.error("根据经营种类获取分类失败:", error);
|
|
|
categoryTypeList.value = [];
|
|
|
- formData.businessClassify = [];
|
|
|
+ formData.businessClassifyList = [];
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -718,7 +722,7 @@ const handleSubmit = async () => {
|
|
|
storePositionLatitude: formData.storePositionLatitude,
|
|
|
businessStatus: formData.businessStatus,
|
|
|
businessTypes: formData.businessTypes ?? "",
|
|
|
- businessClassify: formData.businessClassify ?? []
|
|
|
+ businessClassifyList: formData.businessClassifyList ?? []
|
|
|
};
|
|
|
|
|
|
let result;
|
|
|
@@ -819,10 +823,10 @@ const getStoreDetailData = async () => {
|
|
|
: [storeData.businessTypesList];
|
|
|
}
|
|
|
// 设置已选择的分类
|
|
|
- if (storeData.businessClassify) {
|
|
|
- formData.businessClassify = Array.isArray(storeData.businessClassify)
|
|
|
- ? storeData.businessClassify
|
|
|
- : [storeData.businessClassify];
|
|
|
+ if (storeData.businessClassifyList) {
|
|
|
+ formData.businessClassifyList = Array.isArray(storeData.businessClassifyList)
|
|
|
+ ? storeData.businessClassifyList
|
|
|
+ : [storeData.businessClassifyList];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -864,7 +868,7 @@ watch(
|
|
|
} else {
|
|
|
// 如果清空了经营种类,清空分类
|
|
|
categoryTypeList.value = [];
|
|
|
- formData.businessClassify = [];
|
|
|
+ formData.businessClassifyList = [];
|
|
|
}
|
|
|
}
|
|
|
);
|