Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

2 řádky
4.0KB

  1. import{d as O,D as S,r as g,L as $,c as r,e as u,I as m,a5 as E,i as a,g as y,h as i,j as v,t as _,k as L,f as A,u as n,F as U,J,x as q}from"./index.622ee9e7.js";import{r as T,h as z,f as G,c as C,b as H,e as K,g as M}from"./uploadAction.44c3f16c.js";import{d as Q,f as W}from"./projectReform.fd8043e4.js";import{_ as X}from"./index.f85fe99a.js";const Y={class:"mb-16"},Z={key:1},ee={class:"el-upload__tip"},te={class:"flex justify-center"},ae=O({name:"upLoadReplayDialog"}),re=Object.assign(ae,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object,isEdit:{type:Boolean,default:!0}},emits:["close"],setup(c,{emit:w}){const I=S.dictStore.uploadUrl,{proxy:P}=q(),s=c,R=w,e=g({}),f=g(!1),h={rectifyResult:[{required:!0,message:"\u8BF7\u8F93\u5165"}]},k=g(),V=async p=>{!p||await p.validate(async t=>{var d;if(t){f.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),P.$message.success("\u63D0\u4EA4\u6210\u529F"),e.value={},f.value=!1,R("close",!0)}catch{f.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"),x=r("el-alert"),j=r("el-input"),b=r("el-button"),F=r("el-upload"),B=r("el-form"),D=r("el-dialog");return u(),m(D,{"model-value":c.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"))},E({default:a(()=>[i(B,{ref_key:"formRef",ref:k,model:e.value,rules:h,"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"])):L("",!0)]),i(d,{label:"\u6574\u6539\u7ED3\u679C\u8BF4\u660E",prop:"rectifyResult"},{default:a(()=>[c.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[c.isEdit?(u(),m(F,{key:0,"file-list":e.value.rectifyResultAppendix,"onUpdate:fileList":t[1]||(t[1]=l=>e.value.rectifyResultAppendix=l),action:n(I),multiple:"","on-success":l=>n(z)(l,e.value.rectifyResultAppendix,!0),"before-upload":l=>n(G)(l,{types:n(C)}),accept:n(C).map(l=>`.${l}`).join(","),"on-preview":n(H)},{tip:a(()=>[y("div",ee," \u652F\u6301"+_(n(K))+"\u6587\u4EF6 ",1)]),default:a(()=>[i(b,{plain:"",type:"primary"},{default:a(()=>[v("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])):(u(!0),A(U,{key:1},J(((o=e.value.rectifyResultAppendix)==null?void 0:o.length)&&e.value.rectifyResultAppendix,(l,N)=>(u(),A("p",{key:N,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:f.value,onClick:t[2]||(t[2]=o=>V(k.value))},{default:a(()=>[v(" \u63D0\u4EA4 ")]),_:1},8,["loading"]),i(b,{onClick:t[3]||(t[3]=o=>R("close"))},{default:a(()=>[v("\u5173\u95ED")]),_:1})])]),key:"0"}:void 0]),1032,["model-value","title"])}}});export{re as default};