This commit is contained in:
zpc 2026-03-19 07:06:41 +08:00
parent 9f17e03c00
commit a88f31e5e2
2 changed files with 4 additions and 2 deletions

View File

@ -62,7 +62,9 @@ async function loadOptions() {
loading.value = true loading.value = true
try { try {
const res = await getDictItemsByTypeCode(props.type) const res = await getDictItemsByTypeCode(props.type)
console.log(`[DictSelect] 加载字典 ${props.type}:`, res.data)
options.value = (res.data || []).filter(item => item.status === 1) options.value = (res.data || []).filter(item => item.status === 1)
console.log(`[DictSelect] 过滤后选项:`, options.value)
} catch (error) { } catch (error) {
console.error(`加载字典[${props.type}]失败`, error) console.error(`加载字典[${props.type}]失败`, error)
options.value = [] options.value = []

View File

@ -31,7 +31,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<DictSelect v-model="queryParams.status" dict-type="booking_status" placeholder="请选择状态" clearable /> <DictSelect v-model="queryParams.status" type="booking_status" placeholder="请选择状态" clearable style="width: 180px" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSearch"><el-icon><Search /></el-icon></el-button> <el-button type="primary" @click="handleSearch"><el-icon><Search /></el-icon></el-button>
@ -122,7 +122,7 @@
<el-tag :type="getStatusType(statusForm.currentStatus)">{{ statusForm.currentStatusName }}</el-tag> <el-tag :type="getStatusType(statusForm.currentStatus)">{{ statusForm.currentStatusName }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="新状态"> <el-form-item label="新状态">
<DictSelect v-model="statusForm.status" dict-type="booking_status" placeholder="请选择状态" style="width: 100%" /> <DictSelect v-model="statusForm.status" type="booking_status" placeholder="请选择状态" style="width: 100%" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>