| 1 |
- var C=(t,u,n)=>new Promise((d,r)=>{var m=e=>{try{c(n.next(e))}catch(o){r(o)}},a=e=>{try{c(n.throw(e))}catch(o){r(o)}},c=e=>e.done?d(e.value):Promise.resolve(e.value).then(m,a);c((n=n.apply(t,u)).next())});import{_ as L}from"./TableImg.vue_vue_type_style_index_0_lang-652ccd09.js";import{j as I,k as g,aZ as O,o as h,m as N,q as f,b0 as $,D as E,y as i,ad as w,C as S,aq as y,z as _,t as H,ao as D,ap as j,g as T,v as V,af as q,w as J,s as M,r as k,bH as U,f as b,bN as Z,cb as z,a3 as G,J as l,bO as Q}from"./index-d3600154.js";const W={key:1,class:"px-2 batch-style"},X={class:"batch-style_item"};function Y(t,u,n,d,r,m){var P,B,A,K,F;const a=g("BasicForm"),c=g("HeaderCell"),e=g("Table"),o=g("Checkbox"),p=g("Button"),v=O("auth");return h(),N("div",{ref:"wrapRef",class:M(t.getWrapperClass)},[t.getBindValues.useSearchForm?(h(),f(a,_({key:0,ref:"formRef",submitOnReset:""},t.getFormProps,{tableAction:t.tableAction,onRegister:t.registerForm,onSubmit:t.handleSearchInfoChange,onAdvancedChange:t.redoHeight}),$({_:2},[E(t.getFormSlotKeys,s=>({name:t.replaceFormSlotKey(s),fn:i(R=>[w(t.$slots,s,S(y(R||{})))])}))]),1040,["tableAction","onRegister","onSubmit","onAdvancedChange"])):H("",!0),D(T(e,_({ref:"tableElRef"},t.getBindValues,{rowClassName:t.getRowClassName,onChange:t.handleTableChange}),$({headerCell:i(({column:s})=>[T(c,{column:s},null,8,["column"])]),bodyCell:i(s=>[w(t.$slots,"bodyCell",S(y(s||{})))]),_:2},[E(Object.keys(t.$slots),s=>({name:s,fn:i(R=>[w(t.$slots,s,S(y(R||{})))])}))]),1040,["rowClassName","onChange"]),[[j,t.getEmptyDataIsShowTable]]),(P=t.getSelectRowKeys())!=null&&P.length&&((B=t.getProps)!=null&&B.batchShow)?(h(),N("div",W,[T(o,{indeterminate:t.indeterminate,checked:t.checkedAll,onChange:t.onCheckAllChange,style:{"margin-right":"10px"}},null,8,["indeterminate","checked","onChange"]),D((h(),f(p,{class:"batch-style_item batch-style_item--btn",type:"primary",ghost:"",onClick:t.batchExport},{default:i(()=>[V("导出选中项")]),_:1},8,["onClick"])),[[v,(A=t.getProps)==null?void 0:A.exportAuthList]]),D((h(),f(p,{class:"batch-style_item batch-style_item--btn",danger:"",onClick:t.batchDel},{default:i(()=>[V(" 删除选中项 ")]),_:1},8,["onClick"])),[[v,(K=t.getProps)==null?void 0:K.delAuthList]]),q("span",X,'当前选中"'+J((F=t.getSelectRowKeys())==null?void 0:F.length)+'"行列表',1)])):H("",!0)],2)}const ae=I(L,[["render",Y]]);function oe(t){const u=k(null),n=k(!1),d=k(null);let r;function m(e,o){U(()=>{u.value=null,n.value=null}),!(b(n)&&Z()&&e===b(u))&&(u.value=e,d.value=o,t&&e.setProps(z(t)),n.value=!0,r==null||r(),r=G(()=>t,()=>{t&&e.setProps(z(t))},{immediate:!0,deep:!0}))}function a(){const e=b(u);return e||Q("The table instance has not been obtained yet, please make sure the table is presented when performing the table operation!"),e}return[m,{reload:e=>C(this,null,function*(){return yield a().reload(e)}),setProps:e=>{a().setProps(e)},redoHeight:()=>{a().redoHeight()},setSelectedRows:e=>l(a().setSelectedRows(e)),setLoading:e=>{a().setLoading(e)},getDataSource:()=>a().getDataSource(),getRawDataSource:()=>a().getRawDataSource(),getColumns:({ignoreIndex:e=!1}={})=>{const o=a().getColumns({ignoreIndex:e})||[];return l(o)},setColumns:e=>{a().setColumns(e)},setTableData:e=>a().setTableData(e),setPagination:e=>a().setPagination(e),deleteSelectRowByKey:e=>{a().deleteSelectRowByKey(e)},getSelectRowKeys:()=>l(a().getSelectRowKeys()),getSelectRows:()=>l(a().getSelectRows()),clearSelectedRowKeys:()=>{a().clearSelectedRowKeys()},setSelectedRowKeys:e=>{a().setSelectedRowKeys(e)},getPaginationRef:()=>a().getPaginationRef(),getSize:()=>l(a().getSize()),updateTableData:(e,o,p)=>a().updateTableData(e,o,p),deleteTableDataRecord:e=>a().deleteTableDataRecord(e),insertTableDataRecord:(e,o)=>a().insertTableDataRecord(e,o),updateTableDataRecord:(e,o)=>a().updateTableDataRecord(e,o),findTableDataRecord:e=>a().findTableDataRecord(e),getRowSelection:()=>l(a().getRowSelection()),getCacheColumns:()=>l(a().getCacheColumns()),getForm:()=>b(d),setShowPagination:e=>C(this,null,function*(){a().setShowPagination(e)}),getShowPagination:()=>l(a().getShowPagination()),expandAll:()=>{a().expandAll()},expandRows:e=>{a().expandRows(e)},collapseAll:()=>{a().collapseAll()},scrollTo:e=>{a().scrollTo(e)}}]}export{ae as B,oe as u};
|