lcny-vue3-antd-admin/dist/assets/index.4d40f34f.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.d0ac0332.js";import{T as A}from"./useForm.9a2db385.js";import{d as V}from"./other.19b23380.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.1c21b270.js";import{u as G}from"./index.6ea1205a.js";import{_ as H,c as J,s as L}from"./DeviceDrawer.ca6cd35c.js";import"./index.f5ef0af4.js";import"./Checkbox.0afca320.js";import"./index.16addc92.js";import"./index.4735147a.js";import"./index.89bfd8ba.js";import"./index.8b6a9e70.js";import"./useSize.95cc89e0.js";import"./eagerComputed.c03251a9.js";import"./onMountedOrActivated.b0089aeb.js";import"./useWindowSizeFn.80f08068.js";import"./useContentViewHeight.3d0df870.js";import"./ArrowLeftOutlined.f21977ee.js";import"./transButton.6fc250a9.js";import"./index.268803ef.js";import"./index.e52ad4c8.js";import"./index.8d0922ec.js";import"./index.2a2b440f.js";import"./dateUtil.768de925.js";import"./_baseMerge.09dc1719.js";import"./_isIterateeCall.18176193.js";import"./_baseEach.8a908f77.js";import"./get.fa76943e.js";import"./index.3bc5264b.js";import"./FullscreenOutlined.7e34998a.js";import"./index.d594c2b7.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.fef05e74.js";import"./index.5e63b934.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.4691f200.js";import"./scrollTo.2c0d38e2.js";import"./index.7c1cd7ce.js";import"./index.2fe7d0b4.js";import"./index.8f5b8d5a.js";import"./_baseIteratee.a0856a2e.js";import"./index.41d92815.js";import"./useRefs.1e9f4fa6.js";import"./download.9fc2b25a.js";import"./index.e1c46204.js";import"./uniqBy.92d19b6e.js";import"./index.0f641caa.js";import"./defaultsDeep.7bc30680.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};