import{d as S,p as U,f as O,i as s,a as i,z as p,m as o,k as n,S as j,V as z,e as r,j as a,c as m,F as J,q as $,t as F,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=S({__name:"ElsePlan",props:{value:Object,disabled:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(C,{expose:b,emit:k}){const y=U({xs:20,sm:20,md:18,lg:16,xl:12}),h=k;let _=C;const u=O({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 b({elsePlan:u}),(e,l)=>{const E=s("el-input"),L=s("el-link"),P=s("Close"),v=s("el-icon"),N=s("Delete"),w=s("el-button"),A=s("FormCol"),R=s("FormRow");return i(),p(R,null,{default:o(()=>[n(A,j(z(r(y))),{default:o(()=>[a("div",H,[(i(!0),m(J,null,$(r(u),(t,c)=>(i(),m("div",{key:c,class:"else-plan mb20"},[a("span",K,"\u65B9\u6848"+F(c+1),1),a("div",M,[l[0]||(l[0]=f(" \u65B9\u6848\u540D\u79F0\uFF1A ")),n(E,{modelValue:t.scheme_name,"onUpdate:modelValue":d=>t.scheme_name=d,disabled:r(_).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(L,{type:"primary",href:t.url_list[0].file_url,target:"_blank",class:"mr10"},{default:o(()=>[f(F(t.url_list[0].name),1)]),_:2},1032,["href"]),n(v,{onClick:d=>D(c)},{default:o(()=>[n(P)]),_:2},1032,["onClick"])])):(i(),p(G,{key:1,fileList:t.url_list,"onUpdate:fileList":d=>t.url_list=d,limit:1,showFileList:!1},{default:o(()=>l[1]||(l[1]=[a("div",null,"\u4E0A\u4F20\u9644\u4EF6",-1)])),_:2},1032,["fileList","onUpdate:fileList"]))]),a("div",X,[r(u).length>1?(i(),p(v,{key:0,onClick:d=>V(c),class:"icon"},{default:o(()=>[n(N)]),_:2},1032,["onClick"])):q("v-if",!0)])]))),128)),n(w,{class:"add-button",icon:r(I),disabled:r(_).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-30bc8205"]]);export{le as default};
