240 检查项目设置-》检查部位:服务范围字段下拉选项取值错误

This commit is contained in:
Ranyunqiao
2026-03-19 10:11:02 +08:00
parent 0a8428a4ca
commit 6ed41eb513

View File

@@ -534,19 +534,19 @@
{{ item.number || '999999' }}
</template>
</td>
<td>
<td>
<template v-if="item.editing">
<el-select v-model="item.checkType" placeholder="选择检查类型" style="width: 100%">
<el-select v-model="item.serviceScope" placeholder="选择服务范围" style="width: 100%">
<el-option
v-for="opt in checkTypeOptionsForMethodPart"
:key="opt.value"
:label="opt.label"
:value="opt.value"
v-for="opt in serviceScopeDicts"
:key="opt.dictValue"
:label="opt.dictLabel"
:value="opt.dictValue"
/>
</el-select>
</template>
<template v-else>
{{ getCheckTypeLabelForMethodPart(item.checkType) || '' }}
{{ getServiceScopeLabel(item.serviceScope) || '' }}
</template>
</td>
<td>
@@ -667,6 +667,8 @@ const checkTypeOptions = ref([]);
const inspectionTypeDicts = ref([]);
// 完整的服务范围字典数据
const serviceScopeDicts = ref([]);
// 服务范围下拉选项
const serviceScopeOptions = ref([]);
const checkMethods = ref([]);
// 根据字典值获取检查类型标签
@@ -926,6 +928,11 @@ onMounted(async () => {
inspectionTypeDicts.value = [];
}
// 获取服务范围字典
const scopeRes = await getDicts('scope_of_services');
serviceScopeDicts.value = scopeRes?.data || [];
// 从检查类型维护页面获取检查类型数据,用于检查方法和检查部位的下拉选项
await loadCheckTypeOptionsForMethodPart();