|
- import{h as F,f as v,c as s,b,e as y,r}from"./uploadAction.b85e4dbe.js";import{d as S,D as k,r as A,c,e as N,I as j,i as l,h as o,u as t,g as h,t as w,j as D,k as p}from"./index.ac8ca1e3.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"}),E=Object.assign(J,{props:{detailData:{type:Object,default:()=>({})},projectType:{type:String,default:""},declareAmount:{type:Number}},setup(g,{expose:R}){const u=k.dictStore.uploadUrl,a=A({constructionPlanFile:[],preliminaryPlanFile:[],mainResponsibilitiesApplicantFile:[],supportingMaterialsFile:[],calculationTotalInvestmentFile:[],projectApplicationForm:[],mainAccusationDoc:[]}),x=A(),V={preliminaryPlanFile:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u521D\u6B65\u65B9\u6848",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(n=>{i(n)})},formData:a,setFormData:i=>{a.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,n)=>{const f=c("el-button"),m=c("el-upload"),d=c("el-form-item"),_=c("el-col"),T=c("el-row"),C=c("el-form");return N(),j(C,{ref_key:"formRef",ref:x,model:a.value,rules:V,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":""},{default:l(()=>[o(T,{gutter:40},{default:l(()=>{var P;return[o(_,{span:12},{default:l(()=>[o(d,{label:"\u521D\u6B65\u8BBE\u8BA1\u65B9\u6848"},{default:l(()=>[o(m,{"file-list":a.value.preliminaryPlanFile,"onUpdate:fileList":n[0]||(n[0]=e=>a.value.preliminaryPlanFile=e),class:"w-full",action:t(u),limit:1,"on-success":e=>t(F)(e,a.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(()=>[D("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1}),p("",!0),p("",!0),p("",!0),(g.projectType,p("",!0)),g.projectType!=="03"?(N(),j(_,{key:4,span:12},{default:l(()=>[o(d,{label:"\u53EF\u884C\u6027\u7814\u7A76\u62A5\u544A",prop:"baseResearchReportFile"},{default:l(()=>[o(m,{"file-list":a.value.baseResearchReportFile,"onUpdate:fileList":n[5]||(n[5]=e=>a.value.baseResearchReportFile=e),class:"w-full",action:t(u),limit:1,"on-success":e=>t(F)(e,a.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(()=>[D("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1})):p("",!0),i.$route.name==="declarePlan"||[10012,10013,10016].includes((P=g.detailData)==null?void 0:P.status)?(N(),j(_,{key:5,span:12},{default:l(()=>[o(d,{label:"\u5EFA\u8BBE\u65B9\u6848",prop:"constructionPlanFile"},{default:l(()=>[o(m,{"file-list":a.value.constructionPlanFile,"onUpdate:fileList":n[6]||(n[6]=e=>a.value.constructionPlanFile=e),class:"w-full",action:t(u),limit:1,"on-success":e=>t(F)(e,a.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(()=>[D("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1})):p("",!0),o(_,{span:12},{default:l(()=>[o(d,{label:"\u5176\u4ED6\u9644\u4EF6"},{default:l(()=>[o(m,{ref:"baseProjOtherFileRef","file-list":a.value.baseProjOtherFile,"onUpdate:fileList":n[7]||(n[7]=e=>a.value.baseProjOtherFile=e),class:"upload-demo",action:t(u),multiple:"","on-success":e=>t(F)(e,a.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(()=>[D("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})]),_:1}),o(_,{span:12},{default:l(()=>[g.declareAmount>=1e3?(N(),j(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":a.value.mainAccusationDoc,"onUpdate:fileList":n[8]||(n[8]=e=>a.value.mainAccusationDoc=e),class:"upload-demo",action:t(u),multiple:"","on-success":e=>t(F)(e,a.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(()=>[D("\u9009\u62E9\u6587\u4EF6")]),_:1})]),_:1},8,["file-list","action","on-success","before-upload","accept","on-preview"])]),_:1})):p("",!0)]),_:1})]}),_:1})]),_:1},8,["model"])}}});export{E as default};
|