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.

accessory.91562139.js 6.7KB

1
  1. import{h as F,f as v,c as r,b,e as y,r as s}from"./uploadAction.1ee5b723.js";import{d as S,D as k,r as A,c,e as N,I as P,i as l,h as o,u as t,g as h,t as w,j as D,k as p}from"./index.8d65dd27.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:[]}),j=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=>{j.value.validate(n=>{i(n)})},formData:a,setFormData:i=>{a.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)):[],calculationTotalInvestmentFile:i.calculationTotalInvestmentFile?s(JSON.parse(i.calculationTotalInvestmentFile)):[],projectApplicationForm:i.projectApplicationForm?s(JSON.parse(i.projectApplicationForm)):[],baseProjOtherFile:i.baseProjOtherFile?s(JSON.parse(i.baseProjOtherFile)):[],mainAccusationDoc:i.mainAccusationDoc?s(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(),P(C,{ref_key:"formRef",ref:j,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 x;return[o(_,{span:12},{default:l(()=>[o(d,{label:"\u9879\u76EE\u7533\u62A5\u4E66",prop:"preliminaryPlanFile"},{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(r)}),accept:t(r).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(),P(_,{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(r)}),accept:t(r).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((x=g.detailData)==null?void 0:x.status)?(N(),P(_,{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(r)}),accept:t(r).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(r)}),accept:t(r).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(),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":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(r)}),accept:t(r).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};