|
|
@@ -101,9 +101,9 @@
|
|
|
<el-option v-for="item in itemOptionsStore" :key="item.id" :label="item.label" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="服务类型" prop="typeId">
|
|
|
+<!-- <el-form-item label="服务类型" prop="typeId">
|
|
|
<el-input v-model="form.typeId" placeholder="请输入服务类型" disabled />
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item>-->
|
|
|
<el-form-item label="服务类型" prop="">
|
|
|
<el-input v-model="form.storeTypeName" placeholder="请输入服务类型" disabled />
|
|
|
</el-form-item>
|
|
|
@@ -437,14 +437,23 @@ const handleExport = () => {
|
|
|
const itemOptionsType = ref<{ id: number; label: string }[]>([]);
|
|
|
const itemOptionsStore = ref<{ id: number; label: string; storeTypeName?: string; storeTypeId?: string }[]>([]);
|
|
|
|
|
|
-const loadOptions = async (apiFunc: () => Promise<any>, targetRef: any, labelKey: string = 'serviceName') => {
|
|
|
+// ... existing code ...
|
|
|
+const loadOptions = async (apiFunc: () => Promise<any>, targetRef: any, labelKey: string = 'serviceName', extraKeys?: string[]) => {
|
|
|
try {
|
|
|
const res = await apiFunc();
|
|
|
if (res.code === 200) {
|
|
|
- targetRef.value = (res.data as unknown as any[]).map((item) => ({
|
|
|
- id: item.id,
|
|
|
- label: item[labelKey]
|
|
|
- }));
|
|
|
+ targetRef.value = (res.data as unknown as any[]).map((item) => {
|
|
|
+ const result: any = {
|
|
|
+ id: item.id,
|
|
|
+ label: item[labelKey]
|
|
|
+ };
|
|
|
+ if (extraKeys) {
|
|
|
+ extraKeys.forEach((key) => {
|
|
|
+ result[key] = item[key];
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ });
|
|
|
} else {
|
|
|
alert('加载失败:' + res.msg);
|
|
|
}
|
|
|
@@ -454,7 +463,7 @@ const loadOptions = async (apiFunc: () => Promise<any>, targetRef: any, labelKey
|
|
|
};
|
|
|
|
|
|
const loadItemStructuresOptions = () => loadOptions(selectAllPhysicalTagsSelList, itemOptionsType);
|
|
|
-const loadStoreOptions = () => loadOptions(selectPhysicalStoreSelList, itemOptionsStore, 'name');
|
|
|
+const loadStoreOptions = () => loadOptions(selectPhysicalStoreSelList, itemOptionsStore, 'name', ['storeTypeId', 'storeTypeName']);
|
|
|
onMounted(() => {
|
|
|
getList();
|
|
|
loadItemStructuresOptions();
|