| 1 |
- var N=Object.defineProperty,q=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var z=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var S=(n,o,t)=>o in n?N(n,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[o]=t,B=(n,o)=>{for(var t in o||(o={}))z.call(o,t)&&S(n,t,o[t]);if(k)for(var t of k(o))A.call(o,t)&&S(n,t,o[t]);return n},D=(n,o)=>q(n,P(o));var m=(n,o,t)=>new Promise((d,s)=>{var f=i=>{try{c(t.next(i))}catch(a){s(a)}},g=i=>{try{c(t.throw(i))}catch(a){s(a)}},c=i=>i.done?d(i.value):Promise.resolve(i.value).then(f,g);c((t=t.apply(n,o)).next())});import{d as Q,al as W,r as Z,aZ as j,o as u,m as G,g as y,y as p,q as w,f as r,t as H,ao as x,dh as R,v as T,bz as J}from"./index-d3600154.js";import{u as L,B as X}from"./useTable-f2c6d443.js";import{T as Y}from"./index-2e69b74a.js";import{_ as I}from"./formDrawer.vue_vue_type_script_setup_true_lang-8fd2cade.js";import{_ as ee}from"./viewDrawer.vue_vue_type_script_setup_true_lang-5ab209b6.js";import{c as F,e as te,f as oe,g as ne}from"./sysConstantConfig-82493a6f.js";import{u as V}from"./index-670a4efc.js";import"./useForm-d916f71d.js";import"./index-87d6eb60.js";import"./useWindowSizeFn-89902ab2.js";import"./index-ad3d032c.js";import"./XTUpload.vue_vue_type_style_index_0_scoped_61a00cd1_lang-e5e6c9c7.js";import"./index-89c06ea2.js";import"./download-c8c6e0d3.js";import"./uniqBy-2d445bc4.js";import"./index-fa5e3d7c.js";import"./useContentViewHeight-ee38db3f.js";import"./componentMap-e709b4e7.js";import"./clickOutside-53868c41.js";import"./uuid-98bbe2a6.js";import"./sortable.esm-4ae27e0b.js";import"./SettingOutlined-22b7deed.js";import"./RedoOutlined-8977b36a.js";import"./index-06ce4386.js";import"./index-b06c40a8.js";import"./index-9b854704.js";const Ve=Q({__name:"index",setup(n){W(()=>m(this,null,function*(){}));const{createConfirm:o,createMessage:t}=J(),[d,{openDrawer:s}]=V(),[f,{openDrawer:g}]=V(),c=Z([{field:"create_time",direction:"DESC"}]),[i,{reload:a,getSelectRowKeys:E}]=L({title:" ",api:te,rowKey:"id",columns:oe,showIndexColumn:!0,rowSelection:{type:"checkbox"},formConfig:{labelWidth:120,schemas:ne,autoSubmitOnEnter:!0,baseColProps:{xs:24,sm:12,md:12,lg:8},resetButtonOptions:{preIcon:"icon-delete|iconfont"},submitButtonOptions:{preIcon:"icon-search|iconfont"}},useSearchForm:!0,bordered:!0,actionColumn:{width:200,title:"操作",dataIndex:"action"},beforeFetch:M,sortFn:$});function K(e){g(!0,{record:e})}function O(){s(!0,{isUpdate:!1})}function U(e){s(!0,{record:e,isUpdate:!0})}function b(e){return m(this,null,function*(){e?(yield F([e.id]),t.success("删除成功!"),yield a()):o({content:"你确定要删除?",iconType:"warning",onOk:()=>m(this,null,function*(){const l=E();yield F(l),t.success("删除成功!"),yield a()})})})}function $(e){e!=null&&e.order&&(e!=null&&e.columnKey)&&(c.value=[{field:e.columnKey,direction:e.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function M(e){return D(B({},e),{orders:c.value})}function C(_){return m(this,arguments,function*({isUpdate:e,values:l}){yield a()})}return(e,l)=>{const _=j("auth");return u(),G("div",null,[y(r(X),{onRegister:r(i)},{bodyCell:p(({column:v,record:h})=>[v.key==="action"?(u(),w(r(Y),{key:0,actions:[{auth:"constant:config:query",icon:"icon-eye|iconfont",tooltip:"查看",label:"查看",onClick:K.bind(null,h)},{auth:"constant:config:edit",icon:"icon-edit|iconfont",tooltip:"编辑",label:"编辑",onClick:U.bind(null,h)},{auth:"constant:config:remove",icon:"icon-delete|iconfont",tooltip:"删除",label:"删除",color:"error",popConfirm:{title:"是否确认删除",placement:"left",confirm:b.bind(null,h)}}]},null,8,["actions"])):H("",!0)]),toolbar:p(()=>[x((u(),w(r(R),{type:"primary",onClick:O,preIcon:"icon-plus|iconfont"},{default:p(()=>[T(" 新增 ")]),_:1})),[[_,["constant:config:add"]]]),x((u(),w(r(R),{type:"primary",danger:"",onClick:l[0]||(l[0]=v=>b(null)),preIcon:"icon-delete|iconfont"},{default:p(()=>[T(" 批量删除 ")]),_:1})),[[_,["constant:config:remove"]]])]),_:1},8,["onRegister"]),y(I,{onRegister:r(d),onSuccess:C},null,8,["onRegister"]),y(ee,{onRegister:r(f),onSuccess:C},null,8,["onRegister"])])}}});export{Ve as default};
|