import{d as A,p as R,f as U,i as s,a as i,z as p,m as o,k as n,S as O,V as j,e as d,j as a,c as m,F as J,q as $,t as C,v as f,l as q,at as I,_ as T}from"./index-deffec86.js";import{D as G}from"./Document-d521be1d.js";const H={class:"plan-container"},K={class:"pr10 flex-s"},M={class:"flex pr20 flex-s"},Q={class:"upload"},W={key:0,class:"file_list"},X={class:"flex flex-s"},Y=A({__name:"ElsePlan",props:{value:Object,disabled:{type:Boolean,default:!1},fileSize:{type:Number,default:50}},emits:["update:value","update:loading","cancel","submit"],setup(v,{expose:k,emit:y}){const b=R({xs:20,sm:20,md:18,lg:16,xl:12}),h=y;let _=v;const u=U({get(){return x(_.value)},set(e){h("update:value",B(e))}}),x=e=>e,B=e=>JSON.parse(JSON.stringify(e)),g=()=>{u.value.push({name:"",url_list:[],url:"",file_name:""})},V=e=>{u.value.splice(e,1)},D=e=>{u.value[e].url_list=[]};return k({elsePlan:u}),(e,l)=>{const E=s("el-input"),S=s("el-link"),L=s("Close"),F=s("el-icon"),N=s("Delete"),P=s("el-button"),z=s("FormCol"),w=s("FormRow");return i(),p(w,null,{default:o(()=>[n(z,O(j(d(b))),{default:o(()=>[a("div",H,[(i(!0),m(J,null,$(d(u),(t,c)=>(i(),m("div",{key:c,class:"else-plan mb20"},[a("span",K,"\u65B9\u6848"+C(c+1),1),a("div",M,[l[0]||(l[0]=f(" \u65B9\u6848\u540D\u79F0\uFF1A ")),n(E,{modelValue:t.scheme_name,"onUpdate:modelValue":r=>t.scheme_name=r,disabled:d(_).disabled,placeholder:"\u8BF7\u8F93\u5165\u65B9\u6848\u540D\u79F0",class:"w_more_2"},null,8,["modelValue","onUpdate:modelValue","disabled"])]),l[2]||(l[2]=a("span",{class:"pr10 flex-s"},"\u65B9\u6848\u9644\u4EF6\uFF1A",-1)),a("div",Q,[t.url_list.length>0?(i(),m("div",W,[n(S,{type:"primary",href:t.url_list[0].file_url,target:"_blank",class:"mr10"},{default:o(()=>[f(C(t.url_list[0].name),1)]),_:2},1032,["href"]),n(F,{onClick:r=>D(c)},{default:o(()=>[n(L)]),_:2},1032,["onClick"])])):(i(),p(G,{key:1,fileList:t.url_list,"onUpdate:fileList":r=>t.url_list=r,limit:1,showFileList:!1,fileSize:v.fileSize},{default:o(()=>l[1]||(l[1]=[a("div",null,"\u4E0A\u4F20\u9644\u4EF6",-1)])),_:2},1032,["fileList","onUpdate:fileList","fileSize"]))]),a("div",X,[d(u).length>1?(i(),p(F,{key:0,onClick:r=>V(c),class:"icon"},{default:o(()=>[n(N)]),_:2},1032,["onClick"])):q("v-if",!0)])]))),128)),n(P,{class:"add-button",icon:d(I),disabled:d(_).disabled,onClick:g},{default:o(()=>l[3]||(l[3]=[f("\u65B0\u589E")])),_:1},8,["icon","disabled"])])]),_:1},16)]),_:1})}}});const le=T(Y,[["__scopeId","data-v-ce48d325"]]);export{le as default};
