lcny-vue3-antd-admin/dist/assets/index.7a89e01d.js

2 lines
3.6 KiB
JavaScript

var x=Object.defineProperty,F=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var E=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var g=(o,e,t)=>e in o?x(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,l=(o,e)=>{for(var t in e||(e={}))E.call(e,t)&&g(o,t,e[t]);if(v)for(var t of v(e))R.call(e,t)&&g(o,t,e[t]);return o},w=(o,e)=>F(o,T(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.2cb6ac87.js";import{T as V}from"./useForm.7fe08fd8.js";import{d as j}from"./other.17b9a127.js";import{a as A,aC as I,bP as K,o as h,h as y,p as f,x as _,w as P,j as U,y as W,k as n,l as $,cu as B,fb as q}from"./index.87f5651e.js";import{u as z}from"./index.e094d3e1.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.ada57611.js";import"./index.d1fa0ed9.js";import"./Checkbox.3db0370e.js";import"./index.418ac987.js";import"./index.c4455f20.js";import"./index.cda5cd2a.js";import"./index.186f4f46.js";import"./useSize.27783b73.js";import"./eagerComputed.23f39912.js";import"./onMountedOrActivated.372c426a.js";import"./useWindowSizeFn.48468f6a.js";import"./useContentViewHeight.5c144a40.js";import"./ArrowLeftOutlined.71a4d039.js";import"./transButton.0d32b98f.js";import"./index.f31826ee.js";import"./index.0a0c69f8.js";import"./index.5d144744.js";import"./index.b411c6d7.js";import"./dateUtil.ef4a3ad9.js";import"./_baseMerge.28530b27.js";import"./_isIterateeCall.43d4569c.js";import"./_baseEach.b2f5642f.js";import"./get.9e0b8096.js";import"./index.9fcd679b.js";import"./FullscreenOutlined.6a34b648.js";import"./index.10a33c8f.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.027a657a.js";import"./index.913a00d3.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.b0d29e58.js";import"./scrollTo.c0822575.js";import"./index.eaab66d0.js";import"./index.c7dc64ac.js";import"./index.7b1b22ab.js";import"./_baseIteratee.4ac43bc7.js";import"./index.a50afb96.js";import"./useRefs.78cd22ff.js";import"./download.9ba3c179.js";import"./index.d6e1c0f1.js";import"./uniqBy.85b44fbc.js";import"./index.aa0dba54.js";import"./defaultsDeep.402865a1.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=()=>{B.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{t(!0,{id:!1})},s=r=>{t(!0,w(l({},r),{isUpdate:!0}))},i=r=>d(this,null,function*(){yield j(r.id),B.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};