| 1 |
- import{a as i,w as S,o as V,U as m,V as r,W as u,j as c,X as p,a4 as T,u as o,G as y,H as w,ab as F,ac as K,R as f,F as b,a5 as U}from"./vue-9763c232.js";import{n as E}from"./index-67aa7c8a.js";import{m as H}from"./index-937821e6.js";const I={style:{"margin-bottom":"10px"},class:"inline-16"},L={key:0},P={key:1},G={__name:"index2",props:{title:String,wdith:String,custom:{type:Boolean,default:()=>!1}},emits:["selectRowData","close"],setup(d,{expose:g,emit:v}){let s=i(""),a=i(),l=i(!1),_=i(),h=i(""),k=()=>{if(!a.value.tableRecord.length)return H.warning("请选择数据");l.value=!1,v("selectRowData",a.value.tableRecord)};S(()=>l.value,(e,n)=>{e||a.value.reloadSelect()});let D=()=>{v("close")},C=()=>{a.value.listData()},x=()=>{a.value.emitParam(e=>{e.content.where.condition=s.value,e.content.pageNumber=1,a.value.listData()})};return V(()=>{setTimeout(()=>{let e=document.getElementsByClassName("ant-drawer-body")[0].offsetHeight;h.value=e-190},200)}),g({modeVisible:l,refreshTable:C,list:a}),(e,n)=>{const B=m("a-button"),R=m("a-input"),N=m("a-drawer");return r(),u(b,null,[c(N,{ref_key:"drawer",ref:_,visible:o(l),"onUpdate:visible":n[1]||(n[1]=t=>w(l)?l.value=t:l=t),class:"custom-class",title:d.title||"标题",placement:"right",width:d.wdith||"1200px",closable:!1,onClose:o(D)},{default:p(()=>[T("div",I,[c(B,{type:"primary",onClick:o(k)},{default:p(()=>[y("提交")]),_:1},8,["onClick"]),c(R,{style:{width:"150px","margin-left":"10px"},value:o(s),"onUpdate:value":n[0]||(n[0]=t=>w(s)?s.value=t:s=t),onKeyup:F(o(x),["enter"]),placeholder:"请输入搜索内容",autocomplete:"off"},null,8,["value","onKeyup"])]),c(E,K({"scroll-y":o(h)},e.$attrs,{ref_key:"list",ref:a,size:"small",onListData:e.listData}),{tb_cell:p(({data:t})=>[d.custom?(r(),u("div",L,[f(e.$slots,"custom",{data:t})])):(r(),u("div",P,[t.column.dataIndex==="operation"?f(e.$slots,"handleBtn",{key:0}):(r(),u(b,{key:1},[y(U(t.record[t.column.dataIndex]),1)],64))]))]),_:3},16,["scroll-y","onListData"])]),_:3},8,["visible","title","width","onClose"]),f(e.$slots,"slot1")],64)}}};export{G as _};
|