lcny-vue3-antd-admin/dist/assets/index.ff678f0f.js

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.8bfb918a.js";import{T as V}from"./useForm.72366620.js";import{d as j}from"./other.a9ed122c.js";import{a as A,aC as I,bP as K,o as h,h as y,p as f,x as _,w as P,j as U,y as W,k as n,l as $,cu as B,fb as q}from"./index.caefd1ac.js";import{u as z}from"./index.eec82b6c.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.23e71715.js";import"./index.62749bc9.js";import"./Checkbox.96a09ef1.js";import"./index.6f4e828b.js";import"./index.1c274344.js";import"./index.b8cde84f.js";import"./index.b47a82da.js";import"./useSize.de9063a9.js";import"./eagerComputed.550b9170.js";import"./onMountedOrActivated.f55f7cb1.js";import"./useWindowSizeFn.94f84601.js";import"./useContentViewHeight.48b9e1ed.js";import"./ArrowLeftOutlined.953e7c53.js";import"./transButton.e5176e05.js";import"./index.9cb1b4a3.js";import"./index.4c660ef0.js";import"./index.11569a26.js";import"./index.e2f73f4c.js";import"./dateUtil.5b2c030b.js";import"./_baseMerge.9e5a397a.js";import"./_isIterateeCall.b2126e63.js";import"./_baseEach.c97ad90b.js";import"./get.373dfd79.js";import"./index.358e7c19.js";import"./FullscreenOutlined.93df46a8.js";import"./index.adc41522.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.51e4046e.js";import"./index.9445e0f3.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.e75bff24.js";import"./scrollTo.b81ed8fd.js";import"./index.f1bb3c7b.js";import"./index.eb967d29.js";import"./index.1159119f.js";import"./_baseIteratee.3eabc135.js";import"./index.66cc952c.js";import"./useRefs.32aa9173.js";import"./download.9e6c0445.js";import"./index.f24323fa.js";import"./uniqBy.d3cafc9d.js";import"./index.584ef0f9.js";import"./defaultsDeep.6913164b.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=()=>{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=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};