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.77d73289.js";import{T as A}from"./useForm.96558754.js";import{d as V}from"./other.4f884b07.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.6c80cc19.js";import{u as G}from"./index.2e4d4c36.js";import{_ as H,c as J,s as L}from"./DeviceDrawer.715a2a70.js";import"./index.a8170106.js";import"./Checkbox.d4965003.js";import"./index.00c7c5e2.js";import"./index.9b71d7cd.js";import"./index.4b1b22ef.js";import"./index.04eb1479.js";import"./useSize.283d0817.js";import"./eagerComputed.1976f765.js";import"./onMountedOrActivated.ab39c918.js";import"./useWindowSizeFn.da3badfc.js";import"./useContentViewHeight.4d193d90.js";import"./ArrowLeftOutlined.dc57794f.js";import"./transButton.44f753c0.js";import"./index.97d348d1.js";import"./index.53053767.js";import"./index.33248555.js";import"./index.d822d396.js";import"./dateUtil.75313094.js";import"./_baseMerge.3b2a7b8a.js";import"./_isIterateeCall.ee7bfd30.js";import"./_baseEach.7bcf811f.js";import"./get.24ba2b55.js";import"./index.8f2d4da0.js";import"./FullscreenOutlined.295e66a3.js";import"./index.acbd45eb.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.4bdcdeab.js";import"./index.9719a404.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.e8740387.js";import"./scrollTo.af67b220.js";import"./index.e0251c72.js";import"./index.214da44d.js";import"./index.f3cf27d5.js";import"./_baseIteratee.f1063301.js";import"./index.22002bc0.js";import"./useRefs.b71fd7f8.js";import"./download.dbebd0d9.js";import"./index.7fa0a554.js";import"./uniqBy.8999124b.js";import"./index.2c2686bc.js";import"./defaultsDeep.2221bec8.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};
|