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.918bafcc.js";import{T as V}from"./useForm.c4fee4ef.js";import{d as j}from"./other.64e6b55b.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.96e740c6.js";import{u as q}from"./index.92355b32.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.fac215c7.js";import"./index.5483f2ce.js";import"./Checkbox.93eb545c.js";import"./index.3cbf0ea9.js";import"./index.886478d5.js";import"./index.5ddc4451.js";import"./index.a18b2097.js";import"./useSize.8d3cdcbe.js";import"./eagerComputed.be242bd5.js";import"./onMountedOrActivated.c13d4314.js";import"./useWindowSizeFn.90138703.js";import"./useContentViewHeight.d128193e.js";import"./ArrowLeftOutlined.2ed7c2a1.js";import"./transButton.435c8dc5.js";import"./index.57f33d2a.js";import"./index.ba1abc61.js";import"./index.89ed2e6e.js";import"./index.281a0015.js";import"./dateUtil.5d81bac3.js";import"./_baseMerge.d6160398.js";import"./_isIterateeCall.da405eb1.js";import"./_baseEach.ccc4a2cf.js";import"./get.f812c6f0.js";import"./index.e11b4492.js";import"./FullscreenOutlined.6f7d8842.js";import"./index.55c7cf53.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.c6cde412.js";import"./index.2c15bbd7.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.45589da1.js";import"./scrollTo.8f764404.js";import"./index.84fac896.js";import"./index.2571c4e4.js";import"./index.ca3cd773.js";import"./_baseIteratee.c057c387.js";import"./index.a5169cd8.js";import"./useRefs.096b7468.js";import"./download.8f679bee.js";import"./index.e63b89d0.js";import"./uniqBy.743d7474.js";import"./index.2bed69b0.js";import"./defaultsDeep.947b0fcb.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};
|