|
- import{h as F,f as v,c as s,b,e as y,r}from"./uploadAction.0eabe13b.js";import{d as S,B as k,r as A,c as p,e as N,G as P,i as l,h as o,u as t,g as h,t as w,j as g,k as c}from"./index.a2494fc2.js";const O={class:"el-upload__tip"};const $={class:"el-upload__tip"},B={class:"el-upload__tip"},U={class:"el-upload__tip"},I={class:"el-upload__tip"},J=S({name:"accessory"}),z=Object.assign(J,{props:{detailData:{type:Object,default:()=>({})},projectType:{type:String,default:""},declareAmount:{type:Number}},setup(D,{expose:R}){const u=k.dictStore.uploadUrl,n=A({constructionPlanFile:[],preliminaryPlanFile:[],mainResponsibilitiesApplicantFile:[],supportingMaterialsFile:[],calculationTotalInvestmentFile:[],projectApplicationForm:[],mainAccusationDoc:[]}),x=A(),V={preliminaryPlanFile:[{required:!0,message:"\u9879\u76EE\u7533\u62A5\u4E66",trigger:"blur"}],supportingMaterialsFile:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u4F50\u8BC1\u6750\u6599",trigger:"blur"}],calculationTotalInvestmentFile:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u9879\u76EE\u603B\u6295\u8D44\u6D4B\u7B97\u660E\u7EC6",trigger:"blur"}],mainResponsibilitiesApplicantFile:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u7533\u62A5\u5355\u4F4D\u4E3B\u8981\u804C\u8D23(\u5355\u4F4D\u4E09\u5B9A\u65B9\u6848)",trigger:"blur"}],projectApplicationForm:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u9879\u76EE\u7533\u62A5\u4E66"}],baseResearchReportFile:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u53EF\u884C\u6027\u7814\u7A76\u62A5\u544A"}],constructionPlanFile:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5EFA\u8BBE\u65B9\u6848"}],mainAccusationDoc:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u7533\u62A5\u5355\u4F4D\u4E3B\u8981\u804C\u8D23(\u5355\u4F4D\u4E09\u5B9A\u65B9\u6848)",trigger:"blur"}]};return R({validForm:i=>{x.value.validate(a=>{i(a)})},formData:n,setFormData:i=>{n.value={constructionPlanFile:i.constructionPlanFile?r(JSON.parse(i.constructionPlanFile)):[],preliminaryPlanFile:i.preliminaryPlanFile?r(JSON.parse(i.preliminaryPlanFile)):[],mainResponsibilitiesApplicantFile:i.mainResponsibilitiesApplicantFile?r(JSON.parse(i.mainResponsibilitiesApplicantFile)):[],supportingMaterialsFile:i.supportingMaterialsFile?r(JSON.parse(i.supportingMaterialsFile)):[],baseResearchReportFile:i.baseResearchReportFile?r(JSON.parse(i.baseResearchReportFile)):[],calculationTotalInvestmentFile:i.calculationTotalInvestmentFile?r(JSON.parse(i.calculationTotalInvestmentFile)):[],projectApplicationForm:i.projectApplicationForm?r(JSON.parse(i.projectApplicationForm)):[],baseProjOtherFile:i.baseProjOtherFile?r(JSON.parse(i.baseProjOtherFile)):[],mainAccusationDoc:i.mainAccusationDoc?r(JSON.parse(i.mainAccusationDoc)):[]}}}),(i,a)=>{const f=p("el-button"),m=p("el-upload"),d=p("el-form-item"),_=p("el-col"),C=p("el-row"),T=p("el-form");return N(),P(T,{ref_key:"formRef",ref:x,model:n.value,rules:V,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":""},{default:l(()=>[o(C,{gutter:40},{default:l(()=>{var j;return[o(_,{span:12},{default:l(()=>[o(d,{label:"\u9879\u76EE\u7533\u62A5\u4E66",prop:"preliminaryPlanFile"},{default:l(()=>[o(m,{"file-list":n.value.preliminaryPlanFile,"onUpdate:fileList":a[0]||(a[0]=e=>n.value.preliminaryPlanFile=e),class:"w-full",action:t(u),limit:1,"on-success":e=>t(F)(e,n.value.preliminaryPlanFile,!0),"before-upload":e=>t(v)(e,{types:t(s)}),accept:t(s).map(e=>`.${e}`).join(","),"on-preview":t(b)},{tip:l(()=>[h("div",O," \u652F\u6301"+w(t(y))+"\u6587\u4EF6 ",1)]),default:l(()=>[o(f,{type:"primary",plain:""},{default:l(()=>a[9]||(a[9]=[g("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1}),c("",!0),c("",!0),c("",!0),(D.projectType,c("",!0)),o(_,{span:12},{default:l(()=>[o(d,{label:"\u53EF\u884C\u6027\u7814\u7A76\u62A5\u544A",prop:"baseResearchReportFile"},{default:l(()=>[o(m,{"file-list":n.value.baseResearchReportFile,"onUpdate:fileList":a[5]||(a[5]=e=>n.value.baseResearchReportFile=e),class:"w-full",action:t(u),limit:1,"on-success":e=>t(F)(e,n.value.baseResearchReportFile,!0),"before-upload":e=>t(v)(e,{types:t(s)}),accept:t(s).map(e=>`.${e}`).join(","),"on-preview":t(b)},{tip:l(()=>[h("div",$," \u652F\u6301"+w(t(y))+"\u6587\u4EF6 ",1)]),default:l(()=>[o(f,{type:"primary",plain:""},{default:l(()=>a[14]||(a[14]=[g("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1}),i.$route.name==="declarePlan"||[10012,10013,10016].includes((j=D.detailData)==null?void 0:j.status)?(N(),P(_,{key:4,span:12},{default:l(()=>[o(d,{label:"\u5EFA\u8BBE\u65B9\u6848",prop:"constructionPlanFile"},{default:l(()=>[o(m,{"file-list":n.value.constructionPlanFile,"onUpdate:fileList":a[6]||(a[6]=e=>n.value.constructionPlanFile=e),class:"w-full",action:t(u),limit:1,"on-success":e=>t(F)(e,n.value.constructionPlanFile,!0),"before-upload":e=>t(v)(e,{types:t(s)}),accept:t(s).map(e=>`.${e}`).join(","),"on-preview":t(b)},{tip:l(()=>[h("div",B," \u652F\u6301"+w(t(y))+"\u6587\u4EF6 ",1)]),default:l(()=>[o(f,{type:"primary",plain:""},{default:l(()=>a[15]||(a[15]=[g("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1})):c("",!0),o(_,{span:12},{default:l(()=>[o(d,{label:"\u5176\u4ED6\u9644\u4EF6"},{default:l(()=>[o(m,{ref:"baseProjOtherFileRef","file-list":n.value.baseProjOtherFile,"onUpdate:fileList":a[7]||(a[7]=e=>n.value.baseProjOtherFile=e),class:"upload-demo",action:t(u),multiple:"","on-success":e=>t(F)(e,n.value.baseProjOtherFile),"before-upload":e=>t(v)(e,{types:t(s)}),accept:t(s).map(e=>`.${e}`).join(","),limit:10,"on-preview":t(b)},{tip:l(()=>[h("div",U," \u652F\u6301"+w(t(y))+"\u6587\u4EF6 ",1)]),default:l(()=>[o(f,{plain:"",type:"primary"},{default:l(()=>a[16]||(a[16]=[g("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1}),o(_,{span:12},{default:l(()=>[D.declareAmount>=1e3?(N(),P(d,{key:0,label:"\u7533\u62A5\u5355\u4F4D\u4E3B\u8981\u804C\u8D23\u6587\u4EF6\uFF08\u5355\u4F4D\u4E09\u5B9A\u804C\u8D23\uFF09",prop:"mainAccusationDoc"},{default:l(()=>[o(m,{ref:"mainAccusationDocRef","file-list":n.value.mainAccusationDoc,"onUpdate:fileList":a[8]||(a[8]=e=>n.value.mainAccusationDoc=e),class:"upload-demo",action:t(u),multiple:"","on-success":e=>t(F)(e,n.value.mainAccusationDoc),"before-upload":e=>t(v)(e,{types:t(s)}),accept:t(s).map(e=>`.${e}`).join(","),limit:10,"on-preview":t(b)},{tip:l(()=>[h("div",I," \u652F\u6301"+w(t(y))+"\u6587\u4EF6 ",1)]),default:l(()=>[o(f,{plain:"",type:"primary"},{default:l(()=>a[17]||(a[17]=[g("\u9009\u62E9\u6587\u4EF6")])),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})):c("",!0)]),_:1})]}),_:1})]),_:1},8,["model"])}}});export{z as default};
|