lcny-vue3-antd-admin/dist/assets/index.676a97af.js

2 lines
3.6 KiB
JavaScript

var F=Object.defineProperty,x=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var B=(o,e,t)=>e in o?F(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,l=(o,e)=>{for(var t in e||(e={}))T.call(e,t)&&B(o,t,e[t]);if(v)for(var t of v(e))R.call(e,t)&&B(o,t,e[t]);return o},g=(o,e)=>x(o,E(e));var d=(o,e,t)=>new Promise((p,a)=>{var u=i=>{try{s(t.next(i))}catch(r){a(r)}},c=i=>{try{s(t.throw(i))}catch(r){a(r)}},s=i=>i.done?p(i.value):Promise.resolve(i.value).then(u,c);s((t=t.apply(o,e)).next())});import{u as S,B as N}from"./useTable.a44c6a23.js";import{T as V}from"./useForm.d5b43e2d.js";import{d as j}from"./other.990c753d.js";import{a as A,aE as I,bP as K,o as h,h as y,p as f,B as _,y as P,j as U,D as W,k as n,l as $,cu as w,fb as q}from"./index.1f7d25e9.js";import{u as z}from"./index.187f904b.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.0d21d17d.js";import"./index.d7098dbd.js";import"./Checkbox.36b5df89.js";import"./index.7275e559.js";import"./index.46b54a73.js";import"./index.95a5c9e5.js";import"./index.1c593919.js";import"./useSize.99a4f943.js";import"./eagerComputed.9246bd1b.js";import"./onMountedOrActivated.36e055c5.js";import"./useWindowSizeFn.793e718b.js";import"./useContentViewHeight.8d11d5bb.js";import"./ArrowLeftOutlined.8bba6732.js";import"./transButton.d6e0d56f.js";import"./index.04c37fba.js";import"./index.c1b07704.js";import"./index.f8460443.js";import"./index.868c43ec.js";import"./dateUtil.c30f15a5.js";import"./_baseMerge.8959575a.js";import"./_isIterateeCall.1c2e901f.js";import"./_baseEach.72947e09.js";import"./get.f554c0ea.js";import"./index.e980f1c4.js";import"./FullscreenOutlined.57336edf.js";import"./index.d73d7311.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.e38d7363.js";import"./index.bc7521b5.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.953abb63.js";import"./scrollTo.a6082086.js";import"./index.658a3a14.js";import"./index.241abd4a.js";import"./index.a5a5ac20.js";import"./_baseIteratee.9a6d11c8.js";import"./index.1c376dc3.js";import"./useRefs.533ff99f.js";import"./download.73fec536.js";import"./index.5eeaea1a.js";import"./uniqBy.a47dd7b5.js";import"./index.92775e2c.js";import"./defaultsDeep.158f35d2.js";const L={key:0,class:"flex items-center justify-center"},zt=A({__name:"index",setup(o){const[e,{openDrawer:t}]=z(),[p,{reload:a}]=S({title:"\u8BBE\u5907\u5217\u8868",api:r=>d(this,null,function*(){const{data:b,meta:m}=yield q(l({},r));return{items:b,total:m==null?void 0:m.total}}),rowKey:"id",columns:H,formConfig:{labelWidth:120,schemas:J},useSearchForm:!0,showTableSetting:!0,bordered:!0,showIndexColumn:!0}),u=()=>{w.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{t(!0,{id:!1})},s=r=>{t(!0,g(l({},r),{isUpdate:!0}))},i=r=>d(this,null,function*(){yield j(r.id),w.success("\u5220\u9664\u6210\u529F"),a()});return(r,b)=>{const m=I("a-button"),D=K("auth");return h(),y("div",null,[f(n(N),{onRegister:n(p)},{toolbar:_(()=>[P((h(),U(m,{type:"primary",onClick:c},{default:_(()=>[W(" \u65B0\u589E\u8BBE\u5907 ")]),_:1})),[[D,"endpoint.device.create"]])]),bodyCell:_(({column:k,record:C})=>[k.key==="action"?(h(),y("div",L,[f(n(V),{actions:[{label:"\u7F16\u8F91",onClick:s.bind(null,C),auth:"endpoint.device.edit"},{label:"\u5220\u9664",auth:"endpoint.device.destroy",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u5220\u9664",placement:"topRight",confirm:i.bind(null,C)}}]},null,8,["actions"])])):$("",!0)]),_:1},8,["onRegister"]),f(G,{onRegister:n(e),onSuccess:u},null,8,["onRegister"])])}}});export{zt as default};