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
6.6KB

  1. import{d as z,z as H,A as J,D as k,r as B,L as K,c as i,e as h,I as G,i as e,g as v,h as t,j as d,f as S,k as A,F as Q,V as T,u as s,t as q,ah as X,ae as Y,x as Z}from"./index.b425256a.js";import{h as N,i as $,f as D,c as w,b as P,e as R,g as ee}from"./uploadAction.beba1377.js";const te={key:0,class:"infoTip flex items-center mb-16"},oe=v("span",null,"\u9A73\u56DE\u540E\uFF0C\u9700\u8981\u7533\u62A5\u5355\u4F4D\u4FEE\u6539\u9879\u76EE\u4FE1\u606F\u540E\uFF0C\u91CD\u65B0\u53D1\u8D77\u8BE5\u6D41\u7A0B\u3002",-1),ae={key:1,class:"infoTip flex items-center mb-16"},le=v("span",null,"\u9000\u56DE\u540E\uFF0C\u9700\u8981\u7533\u62A5\u5355\u4F4D\u4FEE\u6539\u9879\u76EE\u4FE1\u606F\u540E\uFF0C\u518D\u7531\u60A8\u8FDB\u884C\u5BA1\u6838\u786E\u8BA4\u3002",-1),se={class:"el-upload__tip"},ne={class:"el-upload__tip"},ie={class:"flex justify-center"},re=z({name:"auditDialog"}),de=Object.assign(re,{props:{visible:{type:Boolean,default:!1,required:!0},title:{type:String,default:"\u901A\u8FC7"},taskId:{type:String,default:""},action:{type:String,default:""},constructionSuggestions:{type:Boolean,default:!1},projectDetail:{type:Object},projectCode:{type:String,default:""},isPerformance:{type:Boolean,default:!1}},emits:["close","reload"],setup(n,{emit:U}){const g=H(),F=J(),{proxy:x}=Z(),C=k.dictStore.uploadUrl,r=n,_=U,I=B(),l=B({attachments:[],opinions:[]}),M={comment:[{required:!0,message:"\u8BF7\u8F93\u5165\u610F\u89C1",trigger:"blur"}],proposeTotalInvest:[{required:!0,message:"\u8BF7\u8F93\u5165\u5EFA\u8BAE\u603B\u6295\u8D44"}],proposeAnnualBudget:[{required:!0,message:"\u8BF7\u8F93\u5165\u5EFA\u8BAE\u5E74\u5EA6\u9884\u7B97"}],proposeAttachFiles:[{required:!0,message:"\u8BF7\u4E0A\u4F20"}],opinions:[{required:!0,message:"\u8BF7\u4E0A\u4F20"}]},O=async c=>{!c||await c.validate(async a=>{if(a){const y={instanceId:g.query.instanceId,projectId:g.query.projectId,projectCode:r.projectCode,taskId:r.taskId,action:r.action,auditInfo:{text:l.value.comment,attachments:l.value.attachments.map(p=>({fileId:p.response.data.id,fileName:p.response.data.originalFileName})),opinions:l.value.opinions.map(p=>({fileId:p.response.data.id,fileName:p.response.data.originalFileName}))}};r.constructionSuggestions&&r.action==="PASS"&&await X({projectCode:r.projectCode,instanceId:g.query.instanceId,proposeTotalInvest:l.value.proposeTotalInvest,proposeAnnualBudget:l.value.proposeAnnualBudget,proposeAttachFiles:l.value.proposeAttachFiles&&JSON.stringify(ee(l.value.proposeAttachFiles))});const u=await Y(y);u.data==="TASKID_ERROR"?(x.$message.warning("\u5F53\u524D\u5BA1\u6279\u4EFB\u52A1\u6709\u53D8\u52A8\uFF0C\u8BF7\u8FD4\u56DE\u5F85\u6211\u5904\u7406\u5217\u8868\uFF01"),F.push({name:"waitMeToHandle"})):(x.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),u.data&&F.push({query:{...g.query,taskId:u.data}}),_("close",!0),_("reload",u.data),await k.countStore.setCountStore())}})};return K(()=>r.visible,async c=>{c||(I.value.resetFields(),l.value={attachments:[],opinions:[]})}),(c,a)=>{const y=i("Warning"),u=i("el-icon"),p=i("el-input"),m=i("el-form-item"),f=i("el-col"),V=i("el-input-number"),b=i("el-button"),j=i("el-upload"),L=i("el-row"),E=i("el-form"),W=i("el-dialog");return h(),G(W,{"model-value":n.visible,title:n.title,width:"600px","destroy-on-close":"",onClose:a[9]||(a[9]=o=>_("close"))},{footer:e(()=>[v("div",ie,[t(b,{class:"ml-22",type:"primary",onClick:a[7]||(a[7]=o=>O(I.value))},{default:e(()=>[d(" \u63D0\u4EA4 ")]),_:1}),t(b,{onClick:a[8]||(a[8]=o=>_("close"))},{default:e(()=>[d(" \u5173\u95ED ")]),_:1})])]),default:e(()=>[n.title==="\u9A73\u56DE"&&!n.isPerformance?(h(),S("div",te,[t(u,{class:"mr-8"},{default:e(()=>[t(y)]),_:1}),oe])):A("",!0),n.title==="\u9000\u56DE"?(h(),S("div",ae,[t(u,{class:"mr-8"},{default:e(()=>[t(y)]),_:1}),le])):A("",!0),t(E,{ref_key:"formRef",ref:I,model:l.value,rules:M,"label-width":"auto","label-suffix":":"},{default:e(()=>[t(L,null,{default:e(()=>[t(f,{span:24},{default:e(()=>[t(m,{label:`${n.title}\u610F\u89C1`,prop:"comment"},{default:e(()=>[t(p,{modelValue:l.value.comment,"onUpdate:modelValue":a[0]||(a[0]=o=>l.value.comment=o),maxlength:"200",placeholder:"\u8BF7\u8F93\u5165","show-word-limit":"",type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"])]),_:1}),n.constructionSuggestions&&n.action==="PASS"?(h(),S(Q,{key:0},[t(f,{span:24},{default:e(()=>[t(m,{label:"\u5EFA\u8BAE\u603B\u6295\u8D44",prop:"proposeTotalInvest"},{default:e(()=>[t(V,{modelValue:l.value.proposeTotalInvest,"onUpdate:modelValue":a[1]||(a[1]=o=>l.value.proposeTotalInvest=o),class:"input-amount",placeholder:"\u8BF7\u586B\u5199",min:1e-6,controls:!1,onMousewheel:a[2]||(a[2]=T(()=>{},["prevent"]))},{suffix:e(()=>[d("\u4E07\u5143")]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(f,{span:24},{default:e(()=>[t(m,{label:"\u5EFA\u8BAE\u5E74\u5EA6\u9884\u7B97",prop:"proposeAnnualBudget"},{default:e(()=>[t(V,{modelValue:l.value.proposeAnnualBudget,"onUpdate:modelValue":a[3]||(a[3]=o=>l.value.proposeAnnualBudget=o),class:"input-amount",placeholder:"\u8BF7\u586B\u5199",min:1e-6,controls:!1,onMousewheel:a[4]||(a[4]=T(()=>{},["prevent"]))},{suffix:e(()=>[d("\u4E07\u5143")]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(f,{span:24},{default:e(()=>[t(m,{label:"\u8BC4\u5BA1\u610F\u89C1\u9644\u4EF6",prop:"proposeAttachFiles"},{default:e(()=>[t(j,{"file-list":l.value.proposeAttachFiles,"onUpdate:fileList":a[5]||(a[5]=o=>l.value.proposeAttachFiles=o),class:"w-full",action:s(C),"on-success":o=>s(N)(o,l.value.proposeAttachFiles),"on-error":s($),"before-upload":o=>s(D)(o,{types:s(w)}),accept:s(w).map(o=>`.${o}`).join(","),multiple:"",limit:10,"on-preview":s(P)},{tip:e(()=>[v("div",se,"\u652F\u6301"+q(s(R))+"\u6587\u4EF6",1)]),default:e(()=>[t(b,{type:"primary",class:"mr-4"},{default:e(()=>[d("\u4E0A\u4F20\u9644\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload","accept","on-preview"])]),_:1})]),_:1})],64)):A("",!0),t(f,{span:24},{default:e(()=>[t(m,{label:`${n.constructionSuggestions&&n.action==="PASS"?"\u5176\u4ED6\u9644\u4EF6":"\u9644\u4EF6"}`,prop:"files"},{default:e(()=>[t(j,{"file-list":l.value.attachments,"onUpdate:fileList":a[6]||(a[6]=o=>l.value.attachments=o),class:"w-full",action:s(C),"on-success":o=>s(N)(o,l.value.attachments),"on-error":s($),"before-upload":o=>s(D)(o,{types:s(w)}),accept:s(w).map(o=>`.${o}`).join(","),multiple:"",limit:10,"on-preview":s(P)},{tip:e(()=>[v("div",ne,"\u652F\u6301"+q(s(R))+"\u6587\u4EF6",1)]),default:e(()=>[t(b,{type:"primary",class:"mr-4"},{default:e(()=>[d("\u4E0A\u4F20\u9644\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload","accept","on-preview"])]),_:1},8,["label"])]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}});export{de as default};