import{d as t,r as e,s as l,o as a,a as s,b as n,h as i,F as r,i as u,f as d,k as o,e as c,w as m,j as f,l as p,_ as v}from"./index-d052b22f-1780912037814v=1.0.0.js";const _={class:"plan-container"},x={class:"item flex"},h={class:"flex flex-s"},b=v(t({__name:"fundChannel",props:{value:Object},emits:["update:value","update:loading","cancel","submit"],setup(t,{expose:v,emit:b}){let k=t;const y=b;e([]);const w=l({get:()=>L(k.value),set(t){y("update:value",C(t))}}),L=t=>{let e=t;return e.forEach((t=>{t.fileList=[],t.file_url&&t.fileList.push({url:t.file_url,name:t.name,file_path:t.file_url})})),e},C=t=>{let e=t;return e=e.map((t=>{const{name:e,file_url:l}=t;return{name:e,file_url:l}})),e},D=()=>{w.value.push({title:"",url:""})};return e(!1),a((()=>{})),v({elsePlan:w}),(t,e)=>{const l=s("el-input"),a=s("Delete"),v=s("el-icon"),b=s("Plus");return n(),i("div",_,[(n(!0),i(r,null,u(d(w),((t,s)=>(n(),i("div",{key:s,class:"else-plan mb20"},[o("div",x,[p(' <div class="flex mr10">\r\n\t\t\t\t\t<span>文件类型：</span>\r\n\t\t\t\t\t<el-select v-model="item.file_type_id" class="flex1 w_more_2" placeholder="请先选择文件类型再上传文件">\r\n\t\t\t\t\t\t<el-option v-for="item1 in options" :key="item1.file_type_id" :label="item1.name" :value="item1.file_type_id" />\r\n\t\t\t\t\t</el-select>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class="flex mr10"> '),e[0]||(e[0]=o("span",null,"文件名称：",-1)),c(l,{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,rows:1,autosize:"",class:"flex1",type:"textarea",placeholder:"请输入文件名称"},null,8,["modelValue","onUpdate:modelValue"]),p(" </div> ")]),e[1]||(e[1]=o("div",{class:"item"},[p(' <div class="flex flex-s">\r\n\t\t\t\t\t<span>文件附件：</span>\r\n\t\t\t\t\t<Document\r\n\t\t\t\t\t\tv-if="!item.url"\r\n\t\t\t\t\t\tv-model:fileList="item.fileList"\r\n\t\t\t\t\t\t@upload-file="e => getData(e, index)"\r\n\t\t\t\t\t\t:limit="1"\r\n\t\t\t\t\t\t:showFileList="false"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<template #default>\r\n\t\t\t\t\t\t\t<el-button>点击上传</el-button>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</Document>\r\n\t\t\t\t\t<div v-else class="flex" style="width: 100%; overflow: hidden">\r\n\t\t\t\t\t\t<span @click="handleUrl" class="url">{{ item.url }}</span>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div> ')],-1)),o("div",h,[c(v,{onClick:t=>(t=>{w.value.splice(t,1)})(s),class:"icon"},{default:m((()=>[c(a)])),_:2},1032,["onClick"])])])))),128)),o("div",{class:"add-button",onClick:D},[c(v,null,{default:m((()=>[c(b)])),_:1}),e[2]||(e[2]=f(" 新增 "))])])}}}),[["__scopeId","data-v-898def36"]]);export{b as default};
