2 lines
3.6 KiB
JavaScript
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.d755b541.js";import{T as V}from"./useForm.024db75e.js";import{d as j}from"./other.8de15476.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.5b1de205.js";import{u as z}from"./index.d5fb365d.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.f1fd88eb.js";import"./index.220f4681.js";import"./Checkbox.4652efed.js";import"./index.6b9d4c19.js";import"./index.6d44fe1b.js";import"./index.c9d6dc29.js";import"./index.34206c03.js";import"./useSize.d68bded8.js";import"./eagerComputed.a173f99e.js";import"./onMountedOrActivated.3ed1e37c.js";import"./useWindowSizeFn.f8c2a784.js";import"./useContentViewHeight.9fbf66fc.js";import"./ArrowLeftOutlined.4b0689a0.js";import"./transButton.6c2fbe09.js";import"./index.4fd3f6ba.js";import"./index.c5a39e8d.js";import"./index.2c4217b1.js";import"./index.8b7f49b7.js";import"./dateUtil.2849ce88.js";import"./_baseMerge.33d1a9f7.js";import"./_isIterateeCall.a4aa41fa.js";import"./_baseEach.d6905549.js";import"./get.3c3ca3ed.js";import"./index.5e276473.js";import"./FullscreenOutlined.00cd31c1.js";import"./index.f6702905.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.44475631.js";import"./index.4893596c.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.f590c6b3.js";import"./scrollTo.3f8d6157.js";import"./index.a02eb0f6.js";import"./index.73771d44.js";import"./index.44c44f79.js";import"./_baseIteratee.db59b603.js";import"./index.ef8d1a8f.js";import"./useRefs.4f518036.js";import"./download.ff2f8869.js";import"./index.b95c38c4.js";import"./uniqBy.6bf5dc2b.js";import"./index.72846e94.js";import"./defaultsDeep.f2a0b400.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};
|