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.22bbcf24.js";import{T as A}from"./useForm.72cd401a.js";import{d as V}from"./other.2f03f1c6.js";import{a as j,aA as I,bN as K,o as h,h as y,p as f,x as _,w as U,j as W,y as $,k as n,l as q,cs as B,f9 as z}from"./index.274e5454.js";import{u as G}from"./index.a2bdeefc.js";import{_ as H,c as J,s as L}from"./DeviceDrawer.c0f7f488.js";import"./index.ecd202df.js";import"./Checkbox.11bf000c.js";import"./index.e36b7018.js";import"./index.e2ffcf8b.js";import"./index.53b7d507.js";import"./index.df961c65.js";import"./useSize.c651af42.js";import"./eagerComputed.896d76a1.js";import"./onMountedOrActivated.ebb3a506.js";import"./useWindowSizeFn.230f0c50.js";import"./useContentViewHeight.a108f773.js";import"./ArrowLeftOutlined.8b37bab4.js";import"./transButton.0dcd9f98.js";import"./index.c1767668.js";import"./index.c831ad0e.js";import"./index.a54a3dd7.js";import"./index.c9d021f8.js";import"./dateUtil.2125cb5d.js";import"./_baseMerge.4cc5fe84.js";import"./_isIterateeCall.897d3d75.js";import"./_baseEach.06d2f87d.js";import"./get.3c8de76a.js";import"./index.eeda8590.js";import"./FullscreenOutlined.d7b3a88b.js";import"./index.53d7dca1.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.bc39673e.js";import"./index.76bed561.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.f665e805.js";import"./scrollTo.1cb93694.js";import"./index.4a1ec22b.js";import"./index.750daedc.js";import"./index.ec8343a5.js";import"./_baseIteratee.92b56d3b.js";import"./index.96f35920.js";import"./useRefs.da7d9fe4.js";import"./download.6b0ca9f8.js";import"./index.6a40c558.js";import"./uniqBy.44b48fd0.js";import"./index.642d4f14.js";import"./defaultsDeep.271900a6.js";const M={key:0,class:"flex items-center justify-center"},Gt=j({__name:"index",setup(o){const[e,{openDrawer:t}]=G(),[p,{reload:a}]=S({title:"\u8BBE\u5907\u5217\u8868",api:r=>d(this,null,function*(){const{data:b,meta:m}=yield z(l({},r));return{items:b,total:m==null?void 0:m.total}}),rowKey:"id",columns:J,formConfig:{labelWidth:120,schemas:L},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 V(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:_(()=>[U((h(),W(m,{type:"primary",onClick:c},{default:_(()=>[$(" \u65B0\u589E\u8BBE\u5907 ")]),_:1})),[[D,"endpoint.device.create"]])]),bodyCell:_(({column:k,record:C})=>[k.key==="action"?(h(),y("div",M,[f(n(A),{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"])])):q("",!0)]),_:1},8,["onRegister"]),f(H,{onRegister:n(e),onSuccess:u},null,8,["onRegister"])])}}});export{Gt as default};
|