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.51ee8fca.js";import{T as A}from"./useForm.7accec25.js";import{d as V}from"./other.11d7ac69.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.b265aafb.js";import{u as G}from"./index.0b7f1bad.js";import{_ as H,c as J,s as L}from"./DeviceDrawer.d513f6e9.js";import"./index.d8b69743.js";import"./Checkbox.fb1f1a43.js";import"./index.326d43cc.js";import"./index.3b89d2fa.js";import"./index.7d345617.js";import"./index.903683bc.js";import"./useSize.91e50358.js";import"./eagerComputed.26208a24.js";import"./onMountedOrActivated.6cc2f596.js";import"./useWindowSizeFn.34f5e7d5.js";import"./useContentViewHeight.8a485fd5.js";import"./ArrowLeftOutlined.569ac501.js";import"./transButton.8fd04611.js";import"./index.d18f0943.js";import"./index.515d66cf.js";import"./index.83a08446.js";import"./index.f7a582e5.js";import"./dateUtil.38491d64.js";import"./_baseMerge.c6fe4f1f.js";import"./_isIterateeCall.e1e4d7aa.js";import"./_baseEach.e6aa615a.js";import"./get.9f5fba4d.js";import"./index.feaeeee0.js";import"./FullscreenOutlined.99a5e3f3.js";import"./index.febf46c1.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.cf588135.js";import"./index.035c2fcb.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.ad1d6885.js";import"./scrollTo.0d2a316f.js";import"./index.d510e954.js";import"./index.ebab61cd.js";import"./index.978d26a7.js";import"./_baseIteratee.cde6582b.js";import"./index.a4fc876f.js";import"./useRefs.fc64ecdd.js";import"./download.26a3c4b0.js";import"./index.5ad28b1a.js";import"./uniqBy.05f6c4c4.js";import"./index.2ab056d2.js";import"./defaultsDeep.19eb189b.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};
|