Browse Source

202512022323-start获取警员列表加上兜底

main
shihao0303 2 months ago
parent
commit
6d89eca6e4
  1. 22
      src/components/reportAudit/start.vue

22
src/components/reportAudit/start.vue

@ -28,6 +28,7 @@
});
let polices = ref([])
function getPoliceList() {
debugger
listPolice(query.value).then((data) => {
polices.value = data.records;
});
@ -90,6 +91,7 @@
}
const submitFun = async ()=>{
debugger
await auditForm.value.validate();
await feedback.confirm("是否确认通过?");
formData.value.reportId = props.reportId;
@ -129,6 +131,8 @@
})
//
watch(()=>formData.value.approverId,(val)=>{
debugger
console.log(polices.value)
if(props.isWarning && "inform" === props.isWarning){
return;
}
@ -152,6 +156,7 @@
watch(()=>props.dialog,(val)=>{
debugger
if(val){
const data = catchSotre.getDepartNotPolice()
const departId = userStore.user.departId;
@ -199,6 +204,23 @@
}
})
watch(
() => polices.value,
(list) => {
if (!formData.value.approverId) return
const target = list.find(
s => String(s.idCode) === String(formData.value.approverId)
)
if (target) {
formData.value.approver = target.name
console.log('polices 加载完成后命中 approver:', target.name)
}
},
{ deep: true }
)
function getShortName(departData, id) {
let name = null;
if (departData) {

Loading…
Cancel
Save