|
- import{d as $,B as D,r as g,J as E,c as r,e as u,G as m,a3 as U,i as a,g as y,h as i,j as v,t as _,k as q,f as A,u as n,F as J,H as L,q as h}from"./index.0018c8ef.js";import{r as T,h as G,f as H,c as C,b as z,e as K,g as M}from"./uploadAction.60337e0f.js";import{d as Q,f as W}from"./projectReform.84cdedba.js";import{_ as X}from"./index.c14d8851.js";const Y={class:"mb-16"},Z={key:1},ee={class:"el-upload__tip"},te={class:"flex justify-center"},ae=$({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=D.dictStore.uploadUrl,{proxy:I}=h(),s=f,R=w,e=g({}),c=g(!1),V={rectifyResult:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},k=g(),B=async p=>{!p||await p.validate(async t=>{var d;if(t){c.value=!0;const x={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(x),I.$message.success("\u63D0\u4EA4\u6210\u529F"),e.value={},c.value=!1,R("close",!0)}catch{c.value=!1}}})};return E(()=>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"),x=r("el-alert"),j=r("el-input"),b=r("el-button"),F=r("el-upload"),N=r("el-form"),O=r("el-dialog");return u(),m(O,{"model-value":f.visible,title:s.isEdit?"\u586B\u5199\u6574\u6539\u610F\u89C1":"\u6574\u6539\u8BE6\u60C5","destroy-on-close":"",onClose:t[4]||(t[4]=o=>R("close"))},U({default:a(()=>[i(N,{ref_key:"formRef",ref:k,model:e.value,rules:V,"label-suffix":":","label-width":"130"},{default:a(()=>[i(d,{label:"\u6574\u6539\u610F\u89C1"},{default:a(()=>[v(_(e.value.rectifyOpinion),1)]),_:1}),y("div",Y,[e.value.rectifyAuditResult===2||e.value.rectifyAuditResult===1?(u(),m(x,{key:0,title:e.value.rectifyAuditResult===2?"\u6574\u6539\u6838\u67E5\u4E0D\u901A\u8FC7":"\u6574\u6539\u6838\u67E5\u901A\u8FC7",type:e.value.rectifyAuditResult===2?"error":"success",effect:"dark",closable:!1},{default:a(()=>[y("div",null,"\u6838\u67E5\u610F\u89C1\uFF1A"+_(e.value.rectifyAuditOpinion),1)]),_:1},8,["title","type"])):q("",!0)]),i(d,{label:"\u6574\u6539\u7ED3\u679C\u8BF4\u660E",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:"\u76F8\u5173\u6750\u6599"},{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(G)(l,e.value.rectifyResultAppendix,!0),"before-upload":l=>n(H)(l,{types:n(C)}),accept:n(C).map(l=>`.${l}`).join(","),"on-preview":n(z)},{tip:a(()=>[y("div",ee," \u652F\u6301"+_(n(K))+"\u6587\u4EF6 ",1)]),default:a(()=>[i(b,{plain:"",type:"primary"},{default:a(()=>t[5]||(t[5]=[v("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])):(u(!0),A(J,{key:1},L(((o=e.value.rectifyResultAppendix)==null?void 0:o.length)&&e.value.rectifyResultAppendix,(l,S)=>(u(),A("p",{key:S,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(b,{class:"ml-22",type:"primary",loading:c.value,onClick:t[2]||(t[2]=o=>B(k.value))},{default:a(()=>t[6]||(t[6]=[v(" \u63D0\u4EA4 ")])),_:1},8,["loading"]),i(b,{onClick:t[3]||(t[3]=o=>R("close"))},{default:a(()=>t[7]||(t[7]=[v("\u5173\u95ED")])),_:1})])]),key:"0"}:void 0]),1032,["model-value","title"])}}});export{re as default};
|