1 |
- var e=Object.defineProperty,a=(a,t,o)=>(((a,t,o)=>{t in a?e(a,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):a[t]=o})(a,"symbol"!=typeof t?t+"":t,o),o);import{s as t,t as o,A as l}from"../element-plus/element-plus.a206f5fe.js";import{C as n,X as i,x as s,e as r,E as u,f as m,d as c,A as p,b as d}from"../../assets/index.9d3f0ed9.js";import{d as g}from"../como-ts-utils/como-ts-utils.52443996.js";import{B as f}from"../Controller/Controller.ef4ed6a0.js";import{p as h}from"../print-js/print-js.4f6134cd.js";import{_ as v}from"../HeaderLeft.vue_vue_type_script_setup_true_lang/HeaderLeft.vue_vue_type_script_setup_true_lang.91b10e2e.js";import{d as w,B as b,r as C,E as y,i as A,A as P,ad as R,o as j,c as U,T as x,aj as D,S as I,P as F,Q as k,a9 as S,H as E,Y as N,ak as T,al as L}from"../@vue/@vue.2e72eb65.js";import"../lodash-es/lodash-es.72245c2f.js";import"../async-validator/async-validator.21881447.js";import"../@vueuse/@vueuse.decddfd9.js";import"../dayjs/dayjs.c17b983f.js";import"../como-admin-web/como-admin-web.4290f457.js";import"../@element-plus/@element-plus.3703707e.js";import"../@ctrl/@ctrl.9c8f424f.js";import"../@popperjs/@popperjs.f1fb8f77.js";import"../normalize-wheel-es/normalize-wheel-es.94de1731.js";import"../vue-router/vue-router.8caf83cb.js";import"../mitt/mitt.fcf4f812.js";import"../axios/axios.93b23c89.js";import"../pinia/pinia.0960c1bb.js";import"../vue-count-to/vue-count-to.ec270ea8.js";import"../@wangeditor/@wangeditor.bc4d1034.js";import"../xlsx/xlsx.a42c9766.js";import"../docx-preview/docx-preview.ad0b8171.js";import"../jszip/jszip.e379f989.js";import"../crypto-js/crypto-js.38083f5b.js";import"../vue-como-image/vue-como-image.1f08e6a4.js";import"../echarts/echarts.adb31f9c.js";import"../tslib/tslib.e35f93b8.js";import"../zrender/zrender.a6916eca.js";import"../vue3-count-to/vue3-count-to.20d3c162.js";import"../szjcomo-utils/szjcomo-utils.8c09309c.js";import"../ua-parser-js/ua-parser-js.f2fc0435.js";import"../como-validator/como-validator.c3b2e2bb.js";class O extends f{constructor(){super(...arguments),a(this,"tableConfig",null),a(this,"TableId",""),a(this,"SelectParams",{}),a(this,"allactions",[]),a(this,"flushRandom",Math.random())}get CurrentAPIURL(){var e,a;return null!=(a=null==(e=this.tableConfig)?void 0:e.apiUrl)?a:`/${this.GetTableName()}`}SetTableId(e){this.TableId=e,console.log("tableId",this.TableId)}SetSelectParams(e){this.SelectParams=e}SetTableConfig(e){this.tableConfig&&(this.tableConfig.tableConfig=e)}SetAllActionData(e){this.allactions=e}async Select(e){const a=this;if(this.SelectParams=null!=e?e:{},!a.tableConfig)return{count:0,rows:[]};const t=await a.ProxyRequest(a.Request.Get,a.CurrentAPIURL,null!=e?e:{},!0,"请求中");return t||{count:0,rows:[]}}async Create(e,a,t){const o=this;e.powerName&&o.RouteActionAuth(e.powerName);const l=o.GetTableName(),i=await o.ProxyRequest(o.Request.Get,n.CommonPageFormAPI,{tablename:l});if(!i)return;const s=o.FormOptionToResult(i.formOption);o.dialogIns=await o.Dialog(),o.dialogIns.Form(s,Object.assign(i.dialogOption,{callback:e=>o.FormSubmitHandle(e,t)}))}async Update(e,a,t){var o,l;const i=this;console.log(a),e.powerName&&i.RouteActionAuth(e.powerName);const s=i.GetTableName(),r=await i.ProxyRequest(i.Request.Get,n.CommonPageFormAPI,{tablename:s,pkId:null!=(l=a[null==(o=i.tableConfig)?void 0:o.pkField])?l:0});if(!r)return;i.dialogIns=await i.Dialog();const u=i.FormOptionToResult(r.formOption);i.dialogIns.Form(u,Object.assign(r.dialogOption,{callback:e=>i.FormSubmitHandle(e,t)}))}async FormSubmitHandle(e,a){var t,o,l,n,i;const s=this;try{const i=e[null==(t=s.tableConfig)?void 0:t.pkField]?"更新":"新增",r=e[null==(o=s.tableConfig)?void 0:o.pkField]?s.Request.Put:s.Request.Post;if(!(await s.ProxyRequest(r,s.CurrentAPIURL,e,!0,"提交中")))return;(await s.Dialog()).Message(`${null!=(n=null==(l=s.tableConfig)?void 0:l.apiName)?n:""}数据${i}成功`,{icon:"SUCCESS"},(()=>{s.dialogIns&&s.dialogIns.Close(),a&&a()}))}catch(r){return void s.Exception(null!=(i=r.message)?i:"未知错误")}}async Delete(e,a,t){var o,l,n,i,s,r,u,m,c,p,d,g,f;const h=this;e.powerName&&h.RouteActionAuth(e.powerName);let v=(null==(o=h.tableConfig)?void 0:o.nameField)?`${null!=(l=h.tableConfig.apiName)?l:""}<span style="color:#ff0000;">【${a[h.tableConfig.nameField]}】</span>`:"",w=`${null!=(i=null==(n=h.tableConfig)?void 0:n.apiName)?i:""}删除操作提醒`,b="您确定要删除",C='数据删除后将无法恢复,<span style="color:#ff0000;font-weight:800;">请谨慎操作!!</span>';e.params&&e.params.deleteOptions&&e.params.deleteOptions.title&&(v="",w=this.AlertContent(e.params.deleteOptions.title,a),b=this.AlertContent(e.params.deleteOptions.prefix,a),C=this.AlertContent(e.params.deleteOptions.content,a));const y={name:v,content:C,title:w};if(!(await h.DeleteHandle(y,b)))return;if(!a[null==(s=h.tableConfig)?void 0:s.pkField])return;let A={};A[null==(r=h.tableConfig)?void 0:r.pkField]=a[null==(u=h.tableConfig)?void 0:u.pkField];const P=(null==(c=null==(m=e.params)?void 0:m.deleteOptions)?void 0:c.CusURL)?this.AlertContent(null==(d=null==(p=e.params)?void 0:p.deleteOptions)?void 0:d.CusURL,a):h.CurrentAPIURL;await h.ProxyRequest(h.Request.Delete,P,A,!0,"提交中")&&(await h.Dialog()).Message(`${null!=(f=null==(g=h.tableConfig)?void 0:g.apiName)?f:""}数据删除成功`,{icon:"SUCCESS"},t)}async ExportDataPullHandle(){var e,a;const t=this;let o=null==(e=t.tableConfig)?void 0:e.tableConfig.options.data;const l=(null==(a=t.tableConfig)?void 0:a.tableConfig).pagination.total,n=Math.ceil(l/t.SelectParams.limit),i=t.SelectParams.page;let s=t.SelectParams;for(let r=i+1;r<=n;r++){s.page=r;const e=await t.ProxyRequest(t.Request.Get,t.CurrentAPIURL,Object.assign(s,{export:1}));e&&e.rows.length>0&&(o=o.concat(e.rows)),await t.SleepTime(100)}return o}async ExportDataHandle(e){var a,t,o,l,n;const s=this;if(!e)return!1;try{let n=s.GetTableColumns().map((e=>({title:e.name,key:e.key,default:""})));if(null==(a=s.tableConfig)?void 0:a.exportColumnAPI){const e=await s.ProxyRequest(s.Request.Get,s.tableConfig.exportColumnAPI,{},!0,"请求中");e&&(n=e)}let r=1==e?null==(t=s.tableConfig)?void 0:t.tableConfig.options.data:await s.ExportDataPullHandle();i(n,r,`${null!=(l=null==(o=s.tableConfig)?void 0:o.apiName)?l:""}数据导出(${g.ComoTsUtils.Ins.Date("Ymd")}).xlsx`)}catch(r){return void s.Exception(null!=(n=r.message)?n:"未知错误")}}async ExportData(e,a,t){var o,l,n,i,s;const r=this;try{e.powerName&&r.RouteActionAuth(e.powerName),(await r.Dialog()).Confirm(`您确定要导出<span style="color:#ff0000;">【${null!=(l=null==(o=r.tableConfig)?void 0:o.apiName)?l:""}数据】</span>吗?请选择当前导出数据的数量类型!`,{title:`${null!=(i=null==(n=r.tableConfig)?void 0:n.apiName)?i:""}数据导出提醒`,icon:"ask",btns:[{name:"算了关闭",type:"danger",text:!0},{name:"当前所见数据",type:"success",text:!0},{name:"当前页至最后",type:"warning",text:!0}],callback:e=>r.ExportDataHandle(e)})}catch(u){return void r.Exception(null!=(s=u.message)?s:"未知错误")}}OpenUploadDialog(e){return new Promise(((a,t)=>{let o=document.createElement("input");o.type="file",o.name="como_editor_import_file",o.style.display="none",o.accept=`.${e}`,o.onchange=function(e){var t;a(null==(t=e.target.files)?void 0:t.item(0))},o.onerror=function(e){t(e)},o.click()}))}async ImportData(e,a,t){var o;const l=this;e.powerName&&l.RouteActionAuth(e.powerName);const n=await l.OpenUploadDialog("xlsx");if(!n)return!1;if(n.size>2097152)throw new Error("需要解析的文件超出2M,太大可能会造成卡顿,建议处理后再进行上传吧!");const i=await s(n);1==await l.ProxyRequest(l.Request.Post,`${l.CurrentAPIURL}/import`,{data:i,params:null!=(o=e.params)?o:{}},!0,"导入中")&&(await l.Dialog()).Message("数据导入成功",{icon:"success"},t)}async DownFile(e,a,t){var o;const l=this;if(e.powerName&&l.RouteActionAuth(e.powerName),!(null==(o=e.params)?void 0:o.DownFileUrl))return(await l.Dialog()).Message("未配置文件下载地址,请联系管理员处理",{icon:"error"}),!1;window.open(e.params.DownFileUrl)}async AllAction(e,a,t){var o,l,n,i,s,r,u;const m=this;if(e.powerName&&m.RouteActionAuth(e.powerName),!e.params||!e.params.AllActionParams||0==m.allactions.length){if(!e.params||!e.params.AllActionParams)throw new Error("批量操作参数错误,请联系管理员处理");if(!1!==e.params.AllActionParams.IsLen&&0==m.allactions.length)throw new Error(`当前没有选中需要操作的<span style="color:#ff0000;">【${null!=(l=e.params.AllActionParams.title)?l:null==(o=m.tableConfig)?void 0:o.apiName}】</span>数据,请选择`)}const c=m.allactions.map((e=>{var a;return e[null==(a=m.tableConfig)?void 0:a.pkField]}));if(e.params.AllActionParams.loadPage)await this.LoadPage(e,{Ids:c},t);else{if(!(await this.DeleteHandle({title:null!=(n=e.params.AllActionParams.title)?n:"批量操作提醒",name:null!=(i=e.params.AllActionParams.name)?i:"数据",content:null!=(s=e.params.AllActionParams.content)?s:""},null!=(r=e.params.AllActionParams.prefix)?r:"您确定要删除")))return!1;if(e.params.AllActionParams.CurGetUrl){const o=this.AlertContent(e.params.AllActionParams.CurGetUrl,null!=a?a:{});await this.AllActionCustom(o,null!=(u=e.params.AllActionParams.DownFile)&&u,t)}else{if(!(await m.ProxyRequest(m.Request.Post,`${m.CurrentAPIURL}/allaction`,{...e.params.AllActionParams,actions:c})))return!1;t&&t()}}}async AllActionCustom(e,a,t){const o=await this.ProxyRequest(this.Request.Get,e,{},!0,"下载中");a?o&&i(o.columns,o.data,o.fileName):t&&t()}async LoadForm(e,a,t){const o=this;if(e.powerName&&o.RouteActionAuth(e.powerName),!(e.params&&e.params.loadFormDialog&&e.params.loadFormDialog.FormUrl&&e.params.loadFormDialog.SubmitUrl))throw new Error("加载dialog表单操作参数错误,请联系管理员处理");const l=await o.ProxyRequest(o.Request.Get,e.params.loadFormDialog.FormUrl);if(!l)return!1;o.dialogIns=await o.Dialog();const n=o.FormOptionToResult(l.formOption);o.dialogIns.Form(n,Object.assign(l.dialogOption,{callback:a=>o.LoadFormHandle(e,a,t)}))}async LoadFormHandle(e,a,t){var o,l,n,i,s;const r=this;try{await r.ProxyRequest(r.Request[null==(l=null==(o=e.params)?void 0:o.loadFormDialog)?void 0:l.SubmitType],null==(i=null==(n=e.params)?void 0:n.loadFormDialog)?void 0:i.SubmitUrl,a,!0,"提交中")&&(await r.Dialog()).Message("本次数据提交成功",{icon:"success"},(()=>{r.dialogIns&&r.dialogIns.Close(),t&&t()}))}catch(u){return void r.Exception(null!=(s=u.message)?s:"未知错误")}}async LoadPage(e,a,t){var o,l;const n=this;if(e.powerName&&n.RouteActionAuth(e.powerName),!(null==(o=e.params)?void 0:o.LoadPageDialog)||!e.params.LoadPageDialog.PageUrl)throw new Error("加载dialog页面操作参数错误,请联系管理员处理");const i=await r(e.params.LoadPageDialog.PageUrl)();n.dialogIns=await n.Dialog();const s=Object.assign(null!=a?a:{},null!=(l=e.params.LoadPageDialog.OtherParams)?l:{});s.search=this.SelectParams;let m={...e.params.LoadPageDialog.DialogOptions};e.params.LoadPageDialog.DialogOptions&&e.params.LoadPageDialog.DialogOptions.title&&(m.title=this.AlertContent(e.params.LoadPageDialog.DialogOptions.title,a)),n.dialogIns.Iframe(i.default,e.params.LoadPageDialog.PropsData?s:{},{...m}),u.on("loadpageClose",(e=>{var a;if(e||(e={flush:Math.random()}),!1!==(null!=(a=e.flush)&&a)){if(this.flushRandom==e.flush)return!1;this.flushRandom=e.flush}console.log("loadpageClose",e),n.dialogIns&&n.dialogIns.Close(),t&&t()}))}async PageLink(e,a,t){var o,l;if(e.powerName&&this.RouteActionAuth(e.powerName),!(null==(o=e.params)?void 0:o.PageLink)||!e.params.PageLink.RouterName)throw new Error("跳转页面路由操作参数错误,请联系管理员处理");this.Router.push({name:e.params.PageLink.RouterName,state:null!=(l=e.params.PageLink.OtherParams)?l:{}})}GetTableColumns(){var e;const a=(null==(e=this.tableConfig)?void 0:e.tableConfig).columns.map((e=>({key:e.prop,name:e.label,type:e.type}))),t=["selection","custom","image","images"];return a.filter((e=>!t.includes(e.type)))}async TablePrinter(e,a,t){var o,l;const n=this;e.powerName&&n.RouteActionAuth(e.powerName);const i=(null==(o=n.tableConfig)?void 0:o.tableConfig).options.data,s=n.GetTableColumns(),r=await n.TablePrinterToHtml(s,i);h({printable:r,type:"raw-html",targetStyles:["*"],maxWidth:1600,scanStyles:!1,documentTitle:`${null==(l=n.tableConfig)?void 0:l.apiName}数据打印`})}async PageEventBus(e,a,t){var o;const l=this;try{if(!e.clickEventName)return!1;const o={create:l.Create,update:l.Update,delete:l.Delete,export:l.ExportData,import:l.ImportData,printer:l.TablePrinter,down:l.DownFile,allaction:l.AllAction,loadform:l.LoadForm,loadpage:l.LoadPage,pagelink:l.PageLink,urllink:l.UrlLink,upload:l.UploadDataAction,alert:l.alertHandle}[e.clickEventName];if(!o)return!1;await o.call(l,e,a,t)}catch(n){return console.log(n),l.Exception(null!=(o=n.message)?o:"未知错误"),!1}}async alertHandle(e,a,t){var o,l;e.powerName&&this.RouteActionAuth(e.powerName);const n=null==(o=e.params)?void 0:o.AlertContent;if(!n)return!1;const i=n.title,s=this.AlertContent(n.message,a);(await this.Dialog()).Alert(s,Object.assign({title:i,width:"600px"},null!=(l=e.params.alertOptions)?l:{}))}AlertContent(e,a){var t;let o=e;const l=e.match(/({{)(.*?)(}})/g);if(l&&l.length>0)for(let n=0;n<l.length;n++){const e=l[n],i=e.replace("{{","").replace("}}","");let s=null!=(t=a[i])?t:"";i.includes("-")&&(s=g.ComoTsUtils.Ins.ComoDecode(a[i.replace("-","")])),o=o.replace(e,s||"")}return o}objectToUrlParams(e){return new URLSearchParams(e).toString()}async UrlLink(e,a,t){var o,l,n,i,s,r;if(e.powerName&&this.RouteActionAuth(e.powerName),!(null==(o=e.params)?void 0:o.UrlLink)||!(null==(n=null==(l=e.params)?void 0:l.UrlLink)?void 0:n.url))throw new Error("跳转页面url地址未填写,请完善");const u=m();const p={token:c().GetAdminToken()};let d=e.params.UrlLink.url;const g=d.match(/({{)(.*?)(}})/g);if(g&&g.length>0)for(let m=0;m<g.length;m++){const e=g[m],t=e.replace("{{","").replace("}}","");d=d.replace(e,null!=(r=null!=(s=null!=(i=a[t])?i:u[t])?s:p[t])?r:"")}window.open(d,"_blank")}async UploadDataAction(e,a,t){var o;const l=this;if(!(null==a?void 0:a.file))return!1;if((null==a?void 0:a.file.size)>(null==a?void 0:a.data).maxSize)throw new Error(`上传文件的大小超出${Math.ceil(a.data.maxSize/1024)}KB了,请检查`);let n=null==a?void 0:a.file;if(null==a?void 0:a.data.imageZip){const e=await l.GetImageCompressOptions();n=(await l.ImageHandle.compress(a.file,e)).file}const i=await l.Request.Upload({url:a.data.uploadurl,fileObject:n,postParams:null!=(o=a.data.fields)?o:{},filename:a.filename});if(!1!==i.error)throw new Error(i.message);(await l.Dialog()).Message(`${a.file.name}上传成功`,{icon:"success"},(()=>{t&&t()}))}async SwitchChangeHandle(e,a){var t,o;const l=this;try{l.RouteActionAuth(`Update${l.GetTableName()}`);let n={};n[null==(t=l.tableConfig)?void 0:t.pkField]=e.row[null==(o=l.tableConfig)?void 0:o.pkField],n[e.prop]=e.value,await l.FormSubmitHandle(n,a)}catch(n){return void l.Exception(null==n?void 0:n.message)}}async InputChangeHandle(e,a){var t,o;try{this.RouteActionAuth(`Update${this.GetTableName()}`);let l={};l[null==(t=this.tableConfig)?void 0:t.pkField]=e.row[null==(o=this.tableConfig)?void 0:o.pkField],l[e.prop]=e.value,await this.FormSubmitHandle(l,a)}catch(l){return void this.Exception(null==l?void 0:l.message)}}GetTableName(){const e=window.location.href.match(/admin\/managers\/[A-Z0-9a-z]{1,}/);if(!e||0==e.length)throw new Error("未匹配到对应的控制器名称,请检查");const a=e[0].split("/").map((e=>g.ComoTsUtils.Ins.Trim(e)));return a[a.length-1]}async GetTablePage(){var e;const a=this;try{if(!a.tableConfig){const e=a.GetTableName();let t=await a.ProxyRequest(a.Request.Get,n.CommonPageTableAPI,{tablename:e},!0,"请求中");if(!t)return!1;let o=[];t.tableConfig.columns.forEach((e=>{if(e.formatterBody){const a=new Function(`return ${e.formatterBody}`);window.ComoTsUtils||(window.ComoTsUtils=g.ComoTsUtils),e.formatter=a()}g.ComoTsUtils.Ins.Empty(e.fixed)&&delete e.fixed,o.push(e)})),t.tableConfig.columns=o,t&&(a.tableConfig=t)}return!!a.tableConfig&&a.tableConfig}catch(t){return a.Exception(null!=(e=t.message)?e:""),!1}}FormOptionToResult(e){var a;const t=this;let o=[];return null==(a=e.config)||a.forEach((e=>{var a;if(e instanceof Array){let a=[];e.forEach((e=>{var o;if("image"==e.type||"images"==e.type||"file"==e.type)e.options=Object.assign(null!=(o=e.options)?o:{},{httpRequest:e=>t.UploadImageAndFile(e)});else if("editor"==e.type){let a=e.options.config||{};a.customUpload=(e,a)=>t.EditorUploadImage(e,a),a.docxImageUpload=e=>t._UploadFile(e),e.options.config=a}a.push(e)})),o.push(a)}else{if("image"==e.type||"images"==e.type||"file"==e.type)e.options=Object.assign(null!=(a=e.options)?a:{},{httpRequest:e=>t.UploadImageAndFile(e)});else if("editor"==e.type){let a=e.options.config||{};a.customUpload=(e,a)=>t.EditorUploadImage(e,a),a.docxImageUpload=e=>t._UploadFile(e),e.options.config=a}o.push(e)}})),e.config=o,e}async UploadImageAndFile(e){const a=this;try{const t=await a._UploadFile(e.file);if("image"==e.data.uploadType||"file"==e.data.uploadType)e.data.change(t);else if("images"==e.data.uploadType){let a=e.data.value?e.data.value.split(","):[];a.unshift(t),e.data.change(a.join(","))}}catch(t){return void a.Exception(null==t?void 0:t.message)}}async _UploadFile(e){const a=this,t=await a.GetImageCompressOptions(),o=await a.ImageHandle.compress(e,t),l=await a.Request.Upload({url:"/CommonPage/upload",fileObject:o.file,filename:"filename"});if(!1!==l.error)throw new Error(l.message);return l.data.savePath}async EditorUploadImage(e,a){const t=this;try{a(await t._UploadFile(e))}catch(o){return void t.Exception(null==o?void 0:o.message)}}GetLoginAdminUser(){return c().GetData()}static get Ins(){return new this}}const q={class:"common-page-main"},_=w({__name:"CommonPage",setup(e){const a=O.Ins.SetDialogIns(b("comoDialog")),n=C(!1),i=C({}),s=C({}),r=C("CommonPageId"),m=C(a.GetLoginAdminUser()),c=C(null),g=C({}),f=C(p.Ins.GetThemeColor()),h=function(){let e={page:i.value.tableConfig.pagination.currentPage,limit:i.value.tableConfig.pagination.pageSize};for(let a in s.value)""!==s.value[a]&&(s.value[a]instanceof Array?s.value[a].length>0&&(e[a]=s.value[a]):e[a]=s.value[a]);return e},w=async function(){const e=h(),t=await a.Select(e);i.value.tableConfig.options.data=t.rows,i.value.tableConfig.pagination.total=t.count,setTimeout((()=>{var e;if(c.value&&Object.keys(g.value).length&&i.value.pkField){const a=i.value.tableConfig.options.data.filter((e=>e[i.value.pkField]==g.value[i.value.pkField]));a.length>0&&(g.value=a[0],null==(e=c.value)||e.setCurrentRow(g.value))}}),100)},_=function(e,t,o){a.SetTableConfig(i.value.tableConfig),a.SetSelectParams(h()),"search"==e?H(o):a.PageEventBus({...t},o,w)},G=function(e){g.value=e.row},H=function(e){s.value=e,g.value={},w()},$=function(e){i.value.tableConfig.pagination.currentPage=e,g.value={},w()},z=function(e){i.value.tableConfig.pagination.pageSize=e,g.value={},w()};return y((async()=>{f.value=await d().GetAppProThemeColor()})),A((async()=>{await async function(){const e=await a.GetTablePage();if(e){for(let a in e)i.value[a]=e[a];await w(),n.value=!0}}()})),P((()=>{u.off("loadpageClose"),g.value={}})),(e,s)=>{const u=t,p=o,d=R("como-form"),g=l,h=R("como-table");return j(),U("div",q,[n.value?(j(),x(h,E({key:0},i.value.tableConfig,{onSwitchChange:s[0]||(s[0]=e=>{return t=e,void a.SwitchChangeHandle(t,w);var t}),onCurrentPageChange:$,onPageSizeChange:z,"table-id":r.value,onSelectionChange:s[1]||(s[1]=e=>function(e){a.SetAllActionData(e.selection)}(e)),"table-theme-color":f.value,onInputChange:s[2]||(s[2]=e=>{return t=e,void a.InputChangeHandle(t,w);var t}),onRowClick:G,ref_key:"comotablemain",ref:c}),D({search:I((()=>[!i.value.search?N("",!0):(j(),x(d,E({key:0},i.value.search,{onSubmit:H}),null,16))])),buttons:I((e=>[F(g,T(L(e.column)),{default:I((a=>[(j(!0),U(k,null,S(e.column.list,(e=>(j(),x(v,{item:e,onMoreEvent:_,data:a.row,"admin-user":m.value},null,8,["item","data","admin-user"])))),256))])),_:2},1040)])),_:2},[i.value.headerLeft?{name:"headerLeft",fn:I((()=>[F(p,{gutter:5},{default:I((()=>[(j(!0),U(k,null,S(i.value.headerLeft,(e=>{var a;return j(),x(u,{span:null!=(a=e.options.span)?a:24},{default:I((()=>[F(v,{item:e,onMoreEvent:_,"admin-user":m.value},null,8,["item","admin-user"])])),_:2},1032,["span"])})),256))])),_:1})])),key:"0"}:void 0,i.value.headerRight?{name:"headerRight",fn:I((()=>[(j(!0),U(k,null,S(i.value.headerRight,(e=>(j(),x(v,{item:e,onMoreEvent:_},null,8,["item"])))),256))])),key:"1"}:void 0,i.value.pageRight?{name:"pageRight",fn:I((()=>[F(p,{gutter:5},{default:I((()=>[(j(!0),U(k,null,S(i.value.pageRight,(e=>{var a;return j(),x(u,{span:null!=(a=e.options.span)?a:24},{default:I((()=>[F(v,{item:e,onMoreEvent:_,"admin-user":m.value},null,8,["item","admin-user"])])),_:2},1032,["span"])})),256))])),_:1})])),key:"2"}:void 0]),1040,["table-id","table-theme-color"])):N("",!0)])}}});export{_ as default};
|