You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 line
3.9KB

  1. import{E as S,r as g,B as $,b as r,c as u,L as m,a4 as D,h as a,e as y,f as i,i as v,t as _,j as L,d as A,u as n,F as U,H as h,k as q,s as J}from"./index-dd5fae99.js";import{r as T,h as H,f as z,b as C,c as G,e as K,g as M}from"./uploadAction-3962500e.js";import{d as Q,f as W}from"./projectReform-148bed72.js";import{_ as X}from"./index-33a0e6e3.js";const Y={class:"mb-16"},Z={key:1},ee={class:"el-upload__tip"},te={class:"flex justify-center"},ae=q({name:"upLoadReplayDialog"}),re=Object.assign(ae,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object,isEdit:{type:Boolean,default:!0}},emits:["close"],setup(f,{emit:w}){const P=S.dictStore.uploadUrl,{proxy:I}=J(),s=f,R=w,e=g({}),c=g(!1),V={rectifyResult:[{required:!0,message:"请输入"}]},k=g(),B=async p=>{p&&await p.validate(async t=>{var d;if(t){c.value=!0;const b={appraisalId:s.data.appraisalId,appraisalProjectId:e.value.appraisalProjectId,appraisalProjectCode:e.value.appraisalProjectCode,rectifyResult:e.value.rectifyResult,rectifyResultAppendix:((d=e.value.rectifyResultAppendix)==null?void 0:d.length)&&JSON.stringify(M(e.value.rectifyResultAppendix))};try{await W(b),I.$message.success("提交成功"),e.value={},c.value=!1,R("close",!0)}catch{c.value=!1}}})};return $(()=>s.visible,async p=>{if(p){const t=await Q(s.data.appraisalId,s.data.projectCode);e.value={...t.data,appraisalProjectId:s.data.projectId,appraisalProjectCode:s.data.projectCode,rectifyResultAppendix:t.data.rectifyResultAppendix&&T(JSON.parse(t.data.rectifyResultAppendix))||[]}}}),(p,t)=>{const d=r("el-form-item"),b=r("el-alert"),j=r("el-input"),x=r("el-button"),F=r("el-upload"),E=r("el-form"),N=r("el-dialog");return u(),m(N,{"model-value":f.visible,title:s.isEdit?"填写整改意见":"整改详情","destroy-on-close":"",onClose:t[4]||(t[4]=o=>R("close"))},D({default:a(()=>[i(E,{ref_key:"formRef",ref:k,model:e.value,rules:V,"label-suffix":":","label-width":"130"},{default:a(()=>[i(d,{label:"整改意见"},{default:a(()=>[v(_(e.value.rectifyOpinion),1)]),_:1}),y("div",Y,[e.value.rectifyAuditResult===2||e.value.rectifyAuditResult===1?(u(),m(b,{key:0,title:e.value.rectifyAuditResult===2?"整改核查不通过":"整改核查通过",type:e.value.rectifyAuditResult===2?"error":"success",effect:"dark",closable:!1},{default:a(()=>[y("div",null,"核查意见:"+_(e.value.rectifyAuditOpinion),1)]),_:1},8,["title","type"])):L("",!0)]),i(d,{label:"整改结果说明",prop:"rectifyResult"},{default:a(()=>[f.isEdit?(u(),m(j,{key:0,modelValue:e.value.rectifyResult,"onUpdate:modelValue":t[0]||(t[0]=o=>e.value.rectifyResult=o),type:"textarea","show-word-limit":"",maxlength:500},null,8,["modelValue"])):(u(),A("span",Z,_(e.value.rectifyResult),1))]),_:1}),i(d,{label:"相关材料"},{default:a(()=>{var o;return[f.isEdit?(u(),m(F,{key:0,"file-list":e.value.rectifyResultAppendix,"onUpdate:fileList":t[1]||(t[1]=l=>e.value.rectifyResultAppendix=l),action:n(P),multiple:"","on-success":l=>n(H)(l,e.value.rectifyResultAppendix,!0),"before-upload":l=>n(z)(l,{types:n(C)}),accept:n(C).map(l=>`.${l}`).join(","),"on-preview":n(G)},{tip:a(()=>[y("div",ee," 支持"+_(n(K))+"文件 ",1)]),default:a(()=>[i(x,{plain:"",type:"primary"},{default:a(()=>t[5]||(t[5]=[v("选择文件")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])):(u(!0),A(U,{key:1},h(((o=e.value.rectifyResultAppendix)==null?void 0:o.length)&&e.value.rectifyResultAppendix,(l,O)=>(u(),A("p",{key:O,class:"mb-4"},[i(X,{"file-name":l.name,"file-id":l.response.data.id},null,8,["file-name","file-id"])]))),128))]}),_:1})]),_:1},8,["model"])]),_:2},[s.isEdit?{name:"footer",fn:a(()=>[y("div",te,[i(x,{class:"ml-22",type:"primary",loading:c.value,onClick:t[2]||(t[2]=o=>B(k.value))},{default:a(()=>t[6]||(t[6]=[v(" 提交 ")])),_:1},8,["loading"]),i(x,{onClick:t[3]||(t[3]=o=>R("close"))},{default:a(()=>t[7]||(t[7]=[v("关闭")])),_:1})])]),key:"0"}:void 0]),1032,["model-value","title"])}}});export{re as default};