Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

2 lines
5.1KB

  1. import"./appBasicInfo.7a8776c7.js";import"./appSafeInfo.05035c5a.js";import"./appResourceInfo.1b75e8d8.js";import{d as Z,x as H,r as n,c as i,e as x,f as J,h as t,i as a,j as d,G as B,g as C,k as w,F as K,Z as Q,L as N,$ as X,q as Y}from"./index.0018c8ef.js";import ee from"./applicationInfo.6441d9c4.js";import"./uploadAction.60337e0f.js";import"./index.ae9e1952.js";const ae=["onClick"],le=["onClick"],te={class:"applyBottomBtn flexCenter marginTop"},oe=Z({name:"applications"}),Ve=Object.assign(oe,{props:{isInnovateWholeProvinceShare:{type:Boolean,default:!1},isFirst:{type:Number,default:void 0},coreBusiness:{type:Array,default:()=>[]}},setup(V,{expose:R}){const I=H(),{proxy:$}=Y(),o=n({applicationList:[]}),y=n(),D={includeApplication:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u5305\u542B\u5E94\u7528",trigger:"blur"}],applicationList:[{required:!0,message:"\u8BF7\u6DFB\u52A0\u5E94\u7528",trigger:"blur"}],includeCause:[{required:!0,message:"\u8BF7\u586B\u5199\u4E0D\u5305\u62EC\u539F\u56E0",trigger:"blur"}]},L=[{type:"index",label:"\u5E8F\u53F7",width:60},{label:"\u5E94\u7528\u540D\u79F0",key:"applicationName",prop:"applicationName",render:l=>{var e;return Q("span",l.applicationName||((e=l.relatedExistsApplication)==null?void 0:e.applicationName)||"")}},{label:"\u64CD\u4F5C",slot:"action"}],E=l=>{$.$messageBox.confirm("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u9879\u5417?","\u63D0\u793A\uFF01",{type:"warning"}).then(()=>{o.value.applicationList.splice(l,1)})},c=n(!1),ie=n(["1","2","3"]),f=n({}),ne=n(),se=n(),pe=n(),p=n(),_=n(!1),h=n(),F=async(l,e)=>{_.value=!0,h.value=l,f.value=e,c.value=!0,await N(),p.value.clearValidate()},q=async()=>{_.value=!1,f.value={},c.value=!0,await N(),p.value.clearValidate()},g=()=>{X.confirm("\u786E\u5B9A\u8981\u5173\u95ED\u5E94\u7528\u7F16\u8F91\u9875\u9762\u5417\uFF1F").then(()=>{k()}).catch(()=>{})},k=()=>{p.value.formData={},p.value.clearValidate(),c.value=!1},A=()=>{_.value?o.value.applicationList[h.value]={...p.value.formData}:o.value.applicationList.push({...p.value.formData}),k()},P=()=>{const l=[];l.push(new Promise((e,u)=>{p.value.validForm(r=>{r&&e()})})),Promise.all([...l]).then(()=>{A()})},S=l=>{y.value.validate(e=>{l(e)})},j=l=>{var u;const e=I.query.isDraft?"applicationList":"projectApplications";o.value={includeApplication:l.includeApplication,applicationList:(u=l[e])!=null&&u.length?l[e].map(r=>({...r,relatedExistsApplication:r.relatedExistsApplication?{applicationCode:r.relatedExistsApplicationCode,applicationName:r.relatedExistsApplication}:void 0})):[],includeCause:l.includeCause}},M=()=>{o.value.applicationList=[]};return R({validForm:S,formData:o,applicationData:f,setFormData:j}),(l,e)=>{const u=i("el-radio"),r=i("el-radio-group"),v=i("el-form-item"),b=i("el-col"),m=i("el-button"),U=i("table-list"),T=i("el-input"),W=i("el-row"),z=i("el-form"),re=i("el-collapse-item"),ce=i("el-collapse"),G=i("el-drawer");return x(),J(K,null,[t(z,{ref_key:"formRef",ref:y,model:o.value,rules:D,"label-position":"right","label-width":"180px","label-suffix":":","scroll-to-error":""},{default:a(()=>[t(W,{gutter:40},{default:a(()=>[t(b,{span:12},{default:a(()=>[t(v,{label:"\u662F\u5426\u5305\u542B\u5E94\u7528","label-width":"atuo",prop:"includeApplication"},{default:a(()=>[t(r,{modelValue:o.value.includeApplication,"onUpdate:modelValue":e[0]||(e[0]=s=>o.value.includeApplication=s),onChange:M},{default:a(()=>[t(u,{label:1},{default:a(()=>e[4]||(e[4]=[d("\u662F")])),_:1}),t(u,{label:0},{default:a(()=>e[5]||(e[5]=[d("\u5426")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),o.value.includeApplication===1?(x(),B(b,{key:0,span:24},{default:a(()=>[t(v,{label:"\u5305\u542B\u7684\u5E94\u7528",prop:"applicationList"},{default:a(()=>[t(m,{type:"primary",plain:"",class:"w-full mb-10",icon:"Plus",onClick:q},{default:a(()=>e[6]||(e[6]=[d("\u6DFB\u52A0\u5E94\u7528")])),_:1}),t(U,{class:"w-full",pagination:!1,data:o.value.applicationList,column:L},{action:a(({scope:s})=>[C("a",{onClick:O=>F(s.$index,s.row)},"\u7F16\u8F91",8,ae),C("a",{class:"text-red-400",onClick:O=>E(s.$index)},"\u5220\u9664",8,le)]),_:1},8,["data"])]),_:1})]),_:1})):w("",!0),o.value.includeApplication!==1?(x(),B(b,{key:1,span:24},{default:a(()=>[t(v,{label:"\u4E0D\u5305\u542B\u5E94\u7528\u539F\u56E0",prop:"includeCause"},{default:a(()=>[t(T,{modelValue:o.value.includeCause,"onUpdate:modelValue":e[1]||(e[1]=s=>o.value.includeCause=s),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1})):w("",!0)]),_:1})]),_:1},8,["model"]),t(G,{modelValue:c.value,"onUpdate:modelValue":e[3]||(e[3]=s=>c.value=s),title:"\u6DFB\u52A0\u5E94\u7528","before-close":g,size:1e3},{footer:a(()=>[C("div",te,[t(m,{onClick:g},{default:a(()=>e[10]||(e[10]=[d(" \u5173\u95ED ")])),_:1}),t(m,{type:"primary",plain:"",onClick:A},{default:a(()=>e[11]||(e[11]=[d(" \u6682\u5B58 ")])),_:1}),t(m,{type:"primary",onClick:P},{default:a(()=>e[12]||(e[12]=[d(" \u786E\u5B9A ")])),_:1})])]),default:a(()=>[w("",!0),t(ee,{ref_key:"applicationInfoRef",ref:p,data:f.value,"is-first":V.isFirst,"core-business":V.coreBusiness,"drawer-visible":c.value},null,8,["data","is-first","core-business","drawer-visible"])]),_:1},8,["modelValue"])],64)}}});export{Ve as default};