lcny-vue3-antd-admin/dist/assets/index.0b8e7111.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.c83ad96f.js";import{T as V}from"./useForm.91200ff4.js";import{d as j}from"./other.cfbc782b.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.fe4a8f33.js";import{u as z}from"./index.fb9026e4.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.d0f167d6.js";import"./index.d5115c22.js";import"./Checkbox.e7a76727.js";import"./index.ba54dfdc.js";import"./index.da0efa36.js";import"./index.7149a9c2.js";import"./index.c65768ea.js";import"./useSize.698e0459.js";import"./eagerComputed.6cd9c590.js";import"./onMountedOrActivated.a9c5b13d.js";import"./useWindowSizeFn.f54b1eaa.js";import"./useContentViewHeight.4b680c2b.js";import"./ArrowLeftOutlined.5eb8b727.js";import"./transButton.10edb678.js";import"./index.f3c4f1f0.js";import"./index.a19b4fff.js";import"./index.26ce3e68.js";import"./index.a83792d6.js";import"./dateUtil.745bf349.js";import"./_baseMerge.ff56dae6.js";import"./_isIterateeCall.ece7fd31.js";import"./_baseEach.d3257b7c.js";import"./get.3dc7fc10.js";import"./index.2977da73.js";import"./FullscreenOutlined.637c676d.js";import"./index.0279ef27.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.837f44db.js";import"./index.1495ff0a.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.c49132c3.js";import"./scrollTo.c0800d71.js";import"./index.3f9a8575.js";import"./index.6c03f363.js";import"./index.3a3c0d77.js";import"./_baseIteratee.278425b3.js";import"./index.fb5e2d05.js";import"./useRefs.eb1da46f.js";import"./download.b0c50d65.js";import"./index.53dafb64.js";import"./uniqBy.aaa43b12.js";import"./index.45b3895e.js";import"./defaultsDeep.60f9001d.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};