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.19412597.js";import{T as V}from"./useForm.52bdb676.js";import{d as j}from"./other.8236530f.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.7ce6f084.js";import{u as z}from"./index.606622af.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.6637e568.js";import"./index.d0463034.js";import"./Checkbox.919d90c9.js";import"./index.7bf57d3d.js";import"./index.4b360d76.js";import"./index.c022e2f1.js";import"./index.728ac976.js";import"./useSize.3e94ed3b.js";import"./eagerComputed.8bc93e87.js";import"./onMountedOrActivated.e95960e7.js";import"./useWindowSizeFn.a9c5a9d2.js";import"./useContentViewHeight.14f3b8a3.js";import"./ArrowLeftOutlined.555c92d9.js";import"./transButton.1346368d.js";import"./index.74fc6a3b.js";import"./index.c0e22c2e.js";import"./index.3162fbb8.js";import"./index.4faf0917.js";import"./dateUtil.f1ed9768.js";import"./_baseMerge.4c44d7c8.js";import"./_isIterateeCall.ae4e69f8.js";import"./_baseEach.00efc838.js";import"./get.48d5698a.js";import"./index.da8259db.js";import"./FullscreenOutlined.b4a77bb5.js";import"./index.1189f0a9.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.c6cd253d.js";import"./index.e8879cf8.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.40c2df91.js";import"./scrollTo.f7855aeb.js";import"./index.2b1561f6.js";import"./index.87a6b6a5.js";import"./index.25b6d4b1.js";import"./_baseIteratee.d0ff3125.js";import"./index.499b05d5.js";import"./useRefs.fe2d123f.js";import"./download.db52fd9f.js";import"./index.7ee42cfb.js";import"./uniqBy.ce0a005a.js";import"./index.e93106b5.js";import"./defaultsDeep.575d6106.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};
|