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.f44f0a90.js";import{T as A}from"./useForm.4e8a2777.js";import{d as V}from"./other.cf8d9de6.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.4c322715.js";import{u as G}from"./index.ecf9ef1b.js";import{_ as H,c as J,s as L}from"./DeviceDrawer.cacf6ce3.js";import"./index.3f44adf3.js";import"./Checkbox.7c2bf332.js";import"./index.caf0fb82.js";import"./index.50fa8b01.js";import"./index.78713b21.js";import"./index.a07280c3.js";import"./useSize.8594f04c.js";import"./eagerComputed.59208401.js";import"./onMountedOrActivated.df5dfde3.js";import"./useWindowSizeFn.485f7a2c.js";import"./useContentViewHeight.26384ef1.js";import"./ArrowLeftOutlined.375c84ed.js";import"./transButton.4f423a5c.js";import"./index.868c5186.js";import"./index.936d84e7.js";import"./index.d7bdbb30.js";import"./index.f09d81f0.js";import"./dateUtil.885498bd.js";import"./_baseMerge.8025dd87.js";import"./_isIterateeCall.54c222a4.js";import"./_baseEach.82c26c52.js";import"./get.dd9ca609.js";import"./index.473488dc.js";import"./FullscreenOutlined.abe4e3bc.js";import"./index.ab45e30f.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.90152b7a.js";import"./index.6dff22c5.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.b39c6822.js";import"./scrollTo.fb4ed6df.js";import"./index.f9e9effd.js";import"./index.b07992ee.js";import"./index.c0799d9b.js";import"./_baseIteratee.41f6738e.js";import"./index.4b1b3803.js";import"./useRefs.cd3feee7.js";import"./download.395d344e.js";import"./index.f194ddfb.js";import"./uniqBy.e7749ed9.js";import"./index.d6d0063a.js";import"./defaultsDeep.adfccc6d.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};
|