|
|
|
@ -136,7 +136,7 @@ |
|
|
|
}" |
|
|
|
}" |
|
|
|
> |
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
<el-select v-model="form.checkStatusCode" @change="(val) => handleChangeCheckStatus(val, item)" clearable |
|
|
|
<el-select v-model="form.checkStatusCode" @change="handleChangeCheckStatus" clearable |
|
|
|
style="width: 280px"> |
|
|
|
style="width: 280px"> |
|
|
|
<el-option v-for="item in dict.checkStatus" :value="item.dictValue" :label="item.dictLabel"></el-option> |
|
|
|
<el-option v-for="item in dict.checkStatus" :value="item.dictValue" :label="item.dictLabel"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
@ -1571,35 +1571,37 @@ import {getConfinementListAll} from "@/api/work/confinement"; |
|
|
|
import {timeFormat} from "@/utils/util"; |
|
|
|
import {timeFormat} from "@/utils/util"; |
|
|
|
//获取数据 |
|
|
|
//获取数据 |
|
|
|
const catchSotre = useCatchStore(); |
|
|
|
const catchSotre = useCatchStore(); |
|
|
|
const baseDict = catchSotre.getDicts([ |
|
|
|
|
|
|
|
"isRectify", |
|
|
|
|
|
|
|
"personType", |
|
|
|
|
|
|
|
"superviseMeasures", |
|
|
|
|
|
|
|
"subjectiveAspect", |
|
|
|
|
|
|
|
"responsibilityType", |
|
|
|
|
|
|
|
"handleResult", |
|
|
|
|
|
|
|
"departHandleResult", |
|
|
|
|
|
|
|
"protectRights", |
|
|
|
|
|
|
|
"accountabilityTarget", |
|
|
|
|
|
|
|
"leadResponsibilityType", |
|
|
|
|
|
|
|
"resolveSituation", |
|
|
|
|
|
|
|
"resolveStatus", |
|
|
|
|
|
|
|
"checkStatus", |
|
|
|
|
|
|
|
"sfssSourceTable", |
|
|
|
|
|
|
|
"sfssTags", |
|
|
|
|
|
|
|
// 如果模板里用到 businessType,建议也补上 |
|
|
|
|
|
|
|
"businessType", |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dict = computed(() => ({ |
|
|
|
|
|
|
|
...baseDict, |
|
|
|
|
|
|
|
...(props.extraDict || {}), |
|
|
|
|
|
|
|
})) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
|
const props = defineProps<{ |
|
|
|
extraDict?: Record<string, any[]> |
|
|
|
extraDict?: Record<string, any[]> |
|
|
|
}>() |
|
|
|
}>() |
|
|
|
|
|
|
|
const dict = reactive<Record<string, any[]>>({}) |
|
|
|
|
|
|
|
watchEffect(() => { |
|
|
|
|
|
|
|
const base = catchSotre.getDicts([ |
|
|
|
|
|
|
|
"isRectify", |
|
|
|
|
|
|
|
"personType", |
|
|
|
|
|
|
|
"superviseMeasures", |
|
|
|
|
|
|
|
"subjectiveAspect", |
|
|
|
|
|
|
|
"responsibilityType", |
|
|
|
|
|
|
|
"handleResult", |
|
|
|
|
|
|
|
"departHandleResult", |
|
|
|
|
|
|
|
"protectRights", |
|
|
|
|
|
|
|
"accountabilityTarget", |
|
|
|
|
|
|
|
"leadResponsibilityType", |
|
|
|
|
|
|
|
"resolveSituation", |
|
|
|
|
|
|
|
"resolveStatus", |
|
|
|
|
|
|
|
"checkStatus", |
|
|
|
|
|
|
|
"sfssSourceTable", |
|
|
|
|
|
|
|
"sfssTags", |
|
|
|
|
|
|
|
"businessType", |
|
|
|
|
|
|
|
// 你缺哪个就补哪个,比如 yesNo、handleMethodType |
|
|
|
|
|
|
|
"yesNo", |
|
|
|
|
|
|
|
"handleMethodType", |
|
|
|
|
|
|
|
]) || {} |
|
|
|
|
|
|
|
// ✅ props 传入的字典覆盖/补充 base |
|
|
|
|
|
|
|
Object.assign(dict, base, props.extraDict || {}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const negative = inject("negative"); |
|
|
|
const negative = inject("negative"); |
|
|
|
const form = ref({ |
|
|
|
const form = ref({ |
|
|
|
@ -1806,23 +1808,30 @@ watch( |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
function handleChangeCheckStatus(val, item) { |
|
|
|
function handleChangeCheckStatus(val) { |
|
|
|
form.value.checkStatusName = dict.checkStatus.filter( |
|
|
|
// 兜底 |
|
|
|
(item) => item.dictValue === val |
|
|
|
if (!val) { |
|
|
|
)[0].dictLabel; |
|
|
|
form.value.checkStatusCode = '' |
|
|
|
if (val) { |
|
|
|
form.value.checkStatus = '' |
|
|
|
if (val === '1') { |
|
|
|
form.value.checkStatusName = '' |
|
|
|
form.value.checkStatus = '1'; |
|
|
|
return |
|
|
|
} else if (val === '2' || val === '3') { |
|
|
|
} |
|
|
|
form.value.checkStatus = '2'; |
|
|
|
// 1️⃣ 设置中文名 |
|
|
|
} else if (val === '4' || val === '5') { |
|
|
|
const hit = dict.checkStatus?.find( |
|
|
|
form.value.checkStatus = '3'; |
|
|
|
(item) => String(item.dictValue) === String(val) |
|
|
|
} |
|
|
|
) |
|
|
|
} else { |
|
|
|
form.value.checkStatusName = hit?.dictLabel || '' |
|
|
|
form.value.checkStatus = ''; |
|
|
|
// 2️⃣ 设置后端需要的 checkStatus(你原来的业务规则) |
|
|
|
|
|
|
|
if (val === '1') { |
|
|
|
|
|
|
|
form.value.checkStatus = '1' |
|
|
|
|
|
|
|
} else if (val === '2' || val === '3') { |
|
|
|
|
|
|
|
form.value.checkStatus = '2' |
|
|
|
|
|
|
|
} else if (val === '4' || val === '5') { |
|
|
|
|
|
|
|
form.value.checkStatus = '3' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleChangePolice(police, item) { |
|
|
|
function handleChangePolice(police, item) { |
|
|
|
item.blameName = police.name; |
|
|
|
item.blameName = police.name; |
|
|
|
item.blameIdCode = police.idCode; |
|
|
|
item.blameIdCode = police.idCode; |
|
|
|
|