diff --git a/src/components/negative/dialog.vue b/src/components/negative/dialog.vue index 32edec2..8156ad7 100644 --- a/src/components/negative/dialog.vue +++ b/src/components/negative/dialog.vue @@ -530,14 +530,17 @@ const getConfinementData=()=>{ * */ function rtuenConfinementData(val,index){ confinementQuery.value.id = val.confinementId - getConfinementListAll(confinementQuery.value).then((res)=>{ - const data = res.records; - if(Array.isArray(data)){ - negative.value.blames[index].ConfinementData= data[0] - }else{ - return null; - } - }) + if(val.confinementId){ + getConfinementListAll(confinementQuery.value).then((res)=>{ + const data = res.records; + if(Array.isArray(data)){ + negative.value.blames[index].ConfinementData= data[0] + }else{ + return null; + } + }) + } + } /** @@ -545,15 +548,17 @@ function rtuenConfinementData(val,index){ * */ async function rtuenLeadConfinementData(val,index){ confinementQuery.value.id = val.leadConfinementId - getConfinementListAll(confinementQuery.value).then((res)=>{ - const data = res.records; - if(Array.isArray(data)){ - negative.value.blames[index].leadConfinement= data[0] - - }else{ - return null; - } - }) + if(val.leadConfinementId){ + getConfinementListAll(confinementQuery.value).then((res)=>{ + const data = res.records; + if(Array.isArray(data)){ + negative.value.blames[index].leadConfinement= data[0] + + }else{ + return null; + } + }) + } } diff --git a/src/views/work/Confinement.vue b/src/views/work/Confinement.vue index 2fd05c7..b573ff4 100644 --- a/src/views/work/Confinement.vue +++ b/src/views/work/Confinement.vue @@ -190,15 +190,16 @@ const handleDetail = (row) => { formData.value.gender = gender formData.value.age = age formData.value.birthTime = birthTime - detailShow.value=true } /** * 删除数据 * */ const handleDel = async (row) => { + await feedback.confirm("确定要删除该数据?"); const res = await DelConfinementById(row.id); getList() + feedback.msgSuccess("删除成功"); } /** * 编辑 @@ -721,13 +722,13 @@ onMounted(() => { - {{ calculateAge(formData.birthTime) || '/' }} + {{ timeFormat(formData.birthTime) || '/' }} - {{ calculateAge(formData.joinPartyTime) || '/' }} + {{ timeFormat(formData.joinPartyTime) || '/' }} @@ -735,14 +736,14 @@ onMounted(() => { - {{ calculateAge(formData.joinWorkTime) || '/' }} + {{ timeFormat(formData.joinWorkTime) || '/' }} - {{ calculateAge(formData.joinPoliceTime) || '/' }} + {{ timeFormat(formData.joinPoliceTime) || '/' }} @@ -798,14 +799,13 @@ onMounted(() => { - - {{ calculateAge(formData.startTime) || '/' }} + {{ timeFormat(formData.startTime) || '/' }} - {{ calculateAge(formData.endTime) || '/' }} + {{ timeFormat(formData.endTime) || '/' }}