You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
6.8KB

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