2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var F=Object.defineProperty,x=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?F(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)=>x(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.f5e8bb01.js";import{T as V}from"./useForm.354d9dda.js";import{d as j}from"./other.5efafd8e.js";import{a as A,aC as z,bP as I,o as h,h as y,p as f,y as _,w as K,j as P,z as U,k as n,l as W,cu as B,fb as $}from"./index.b9edafc5.js";import{u as q}from"./index.c68a4867.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.e3cfdf91.js";import"./index.1818d178.js";import"./Checkbox.3693edd4.js";import"./index.68134fec.js";import"./index.161c6c24.js";import"./index.ec2e2643.js";import"./index.07ffe575.js";import"./useSize.68b0b927.js";import"./eagerComputed.e71ccd62.js";import"./onMountedOrActivated.1b2852ce.js";import"./useWindowSizeFn.163a2397.js";import"./useContentViewHeight.f1232089.js";import"./ArrowLeftOutlined.70e6d78b.js";import"./transButton.28c267d1.js";import"./index.ddea2c87.js";import"./index.42b29c86.js";import"./index.0ae85186.js";import"./index.f9d5ec0c.js";import"./dateUtil.5a03aaf6.js";import"./_baseMerge.aa91e649.js";import"./_isIterateeCall.6ba6d6fa.js";import"./_baseEach.adcefe03.js";import"./get.525b1412.js";import"./index.a1398b2b.js";import"./FullscreenOutlined.6ed405b9.js";import"./index.0180ed58.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.864ed0d9.js";import"./index.345ec072.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.074234ca.js";import"./scrollTo.495af765.js";import"./index.ea48b9f7.js";import"./index.09659ee2.js";import"./index.b7b73885.js";import"./_baseIteratee.2ccd493f.js";import"./index.fe531bc3.js";import"./useRefs.6d27f120.js";import"./download.dc49e8e1.js";import"./index.219c7033.js";import"./uniqBy.20331f76.js";import"./index.4c585e91.js";import"./defaultsDeep.e2c5a558.js";const L={key:0,class:"flex items-center justify-center"},qt=A({__name:"index",setup(o){const[e,{openDrawer:t}]=q(),[p,{reload:a}]=S({title:"\u8BBE\u5907\u5217\u8868",api:r=>d(this,null,function*(){const{data:b,meta:m}=yield $(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=z("a-button"),D=I("auth");return h(),y("div",null,[f(n(N),{onRegister:n(p)},{toolbar:_(()=>[K((h(),P(m,{type:"primary",onClick:c},{default:_(()=>[U(" \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"])])):W("",!0)]),_:1},8,["onRegister"]),f(G,{onRegister:n(e),onSuccess:u},null,8,["onRegister"])])}}});export{qt as default};
|