2 lines
3.6 KiB
JavaScript
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.792cc9b8.js";import{T as V}from"./useForm.7bfdaab3.js";import{d as j}from"./other.536f8027.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.10bef8d9.js";import{u as z}from"./index.11d0d4f7.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.ffe4ec7b.js";import"./index.e2b21023.js";import"./Checkbox.3916bf4f.js";import"./index.2c46e1c2.js";import"./index.e1b248c7.js";import"./index.63bd55f9.js";import"./index.7d64c1fd.js";import"./useSize.a3cc155e.js";import"./eagerComputed.6cbc98cb.js";import"./onMountedOrActivated.1a52296b.js";import"./useWindowSizeFn.828b4ed1.js";import"./useContentViewHeight.34af3465.js";import"./ArrowLeftOutlined.00865997.js";import"./transButton.fa379ab6.js";import"./index.2cfaf595.js";import"./index.d11714a0.js";import"./index.04b03248.js";import"./index.603dbfe2.js";import"./dateUtil.9f7564f2.js";import"./_baseMerge.4ec785d2.js";import"./_isIterateeCall.048b9e2b.js";import"./_baseEach.9a9c295f.js";import"./get.54ea2f74.js";import"./index.ebbd9b0a.js";import"./FullscreenOutlined.1a57dd79.js";import"./index.7c202422.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.5e7f9ab6.js";import"./index.8d3663fe.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.f79ea720.js";import"./scrollTo.29e5c0fe.js";import"./index.405564ab.js";import"./index.6b7c6906.js";import"./index.ac844111.js";import"./_baseIteratee.ca4916de.js";import"./index.be423f4b.js";import"./useRefs.c7d6606b.js";import"./download.8b305a5b.js";import"./index.0fbf50e1.js";import"./uniqBy.3a475547.js";import"./index.88228e57.js";import"./defaultsDeep.78c4b719.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};
|