2 lines
3.6 KiB
JavaScript
2 lines
3.6 KiB
JavaScript
var F=Object.defineProperty,x=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var B=(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={}))T.call(e,t)&&B(o,t,e[t]);if(v)for(var t of v(e))R.call(e,t)&&B(o,t,e[t]);return o},g=(o,e)=>x(o,E(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.0fe7b343.js";import{T as V}from"./useForm.501f3f59.js";import{d as j}from"./other.1b193edd.js";import{a as A,aE as I,bP as K,o as h,h as y,p as f,B as _,y as P,j as U,D as W,k as n,l as $,cu as w,fb as q}from"./index.ed5deffd.js";import{u as z}from"./index.a73969f1.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.95bd5241.js";import"./index.57e79dcc.js";import"./Checkbox.0ade27c0.js";import"./index.dfe580e1.js";import"./index.271eb465.js";import"./index.0292c9d3.js";import"./index.78c12dec.js";import"./useSize.f4cf68f5.js";import"./eagerComputed.890ab31a.js";import"./onMountedOrActivated.9d9d02f7.js";import"./useWindowSizeFn.a262cec0.js";import"./useContentViewHeight.b8e37cbd.js";import"./ArrowLeftOutlined.9abfd432.js";import"./transButton.f4575a26.js";import"./index.d726974a.js";import"./index.8d83801a.js";import"./index.cf1b1f15.js";import"./index.afc21ce4.js";import"./dateUtil.91a9b59f.js";import"./_baseMerge.9fac86cf.js";import"./_isIterateeCall.779fe698.js";import"./_baseEach.aed94d5c.js";import"./get.b38b45ae.js";import"./index.5b432cd4.js";import"./FullscreenOutlined.a18420c1.js";import"./index.cca952d1.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.a1f78ebd.js";import"./index.af1b13fa.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.51b9ef19.js";import"./scrollTo.707f46cf.js";import"./index.3b4e2932.js";import"./index.09a74575.js";import"./index.f6ae7164.js";import"./_baseIteratee.7c3a5712.js";import"./index.272fae53.js";import"./useRefs.045d664d.js";import"./download.b80ee91a.js";import"./index.c3b59272.js";import"./uniqBy.6fa12436.js";import"./index.141e5e7b.js";import"./defaultsDeep.74e32aaf.js";const L={key:0,class:"flex items-center justify-center"},zt=A({__name:"index",setup(o){const[e,{openDrawer:t}]=z(),[p,{reload:a}]=S({title:"\u8BBE\u5907\u5217\u8868",api:r=>d(this,null,function*(){const{data:b,meta:m}=yield q(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=()=>{w.success("\u64CD\u4F5C\u6210\u529F"),a()},c=()=>{t(!0,{id:!1})},s=r=>{t(!0,g(l({},r),{isUpdate:!0}))},i=r=>d(this,null,function*(){yield j(r.id),w.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:_(()=>[P((h(),U(m,{type:"primary",onClick:c},{default:_(()=>[W(" \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"])])):$("",!0)]),_:1},8,["onRegister"]),f(G,{onRegister:n(e),onSuccess:u},null,8,["onRegister"])])}}});export{zt as default};
|