2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var F=Object.defineProperty,x=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?F(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)=>x(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.cbbe2c64.js";import{T as V}from"./useForm.ba32b870.js";import{d as j}from"./other.581e80b4.js";import{a as A,aC as z,bP as I,o as h,h as y,p as f,y as _,w as K,j as P,z as U,k as n,l as W,cu as B,fb as $}from"./index.2cdbaad0.js";import{u as q}from"./index.127e760e.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.6a3495f8.js";import"./index.d6da02c1.js";import"./Checkbox.c3dcd23d.js";import"./index.0c5172a8.js";import"./index.052834a1.js";import"./index.6b7db3f0.js";import"./index.374ddcfd.js";import"./useSize.6a81371f.js";import"./eagerComputed.dd374092.js";import"./onMountedOrActivated.ceffb9a2.js";import"./useWindowSizeFn.37c64509.js";import"./useContentViewHeight.9010a11c.js";import"./ArrowLeftOutlined.496f293c.js";import"./transButton.3783c419.js";import"./index.9c81af9f.js";import"./index.d71f2929.js";import"./index.a66be64e.js";import"./index.c83e6254.js";import"./dateUtil.667ca424.js";import"./_baseMerge.e853c408.js";import"./_isIterateeCall.7a3f7b16.js";import"./_baseEach.0a08a0a3.js";import"./get.7d647d75.js";import"./index.38a7c073.js";import"./FullscreenOutlined.2399646b.js";import"./index.d52f5601.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.bb7075a0.js";import"./index.0648ffce.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.b3eee854.js";import"./scrollTo.8be90725.js";import"./index.bbbf1aa7.js";import"./index.df6501fa.js";import"./index.a8e4332c.js";import"./_baseIteratee.08cafe90.js";import"./index.12083f86.js";import"./useRefs.e6353c4f.js";import"./download.7790a0b6.js";import"./index.91807f4e.js";import"./uniqBy.725fa3fa.js";import"./index.eadffb1c.js";import"./defaultsDeep.60161449.js";const L={key:0,class:"flex items-center justify-center"},qt=A({__name:"index",setup(o){const[e,{openDrawer:t}]=q(),[p,{reload:a}]=S({title:"\u8BBE\u5907\u5217\u8868",api:r=>d(this,null,function*(){const{data:b,meta:m}=yield $(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=z("a-button"),D=I("auth");return h(),y("div",null,[f(n(N),{onRegister:n(p)},{toolbar:_(()=>[K((h(),P(m,{type:"primary",onClick:c},{default:_(()=>[U(" \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"])])):W("",!0)]),_:1},8,["onRegister"]),f(G,{onRegister:n(e),onSuccess:u},null,8,["onRegister"])])}}});export{qt as default};
|