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

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.ee8c5bdc.js";import{T as V}from"./useForm.3f34acab.js";import{d as j}from"./other.7b37c636.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.88f96e32.js";import{u as q}from"./index.3b45e39b.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.8d7d3294.js";import"./index.2da5f418.js";import"./Checkbox.d4b756a8.js";import"./index.b12f8850.js";import"./index.8c3d6be2.js";import"./index.bf4ee368.js";import"./index.a4b3034f.js";import"./useSize.626bdc58.js";import"./eagerComputed.12492c19.js";import"./onMountedOrActivated.833af151.js";import"./useWindowSizeFn.77c78245.js";import"./useContentViewHeight.59e7d479.js";import"./ArrowLeftOutlined.e6daa345.js";import"./transButton.37bb2b21.js";import"./index.5bffaffa.js";import"./index.17fc4c3f.js";import"./index.e2419808.js";import"./index.f8c38951.js";import"./dateUtil.6e4dcdbf.js";import"./_baseMerge.40b73f54.js";import"./_isIterateeCall.a78b4eb0.js";import"./_baseEach.381ed723.js";import"./get.0717a4b3.js";import"./index.ac411425.js";import"./FullscreenOutlined.9b2bd652.js";import"./index.e3a67a0d.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.a7a321d4.js";import"./index.b3e175ad.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.47f1b2b3.js";import"./scrollTo.7f7da156.js";import"./index.bd86a53c.js";import"./index.1f2a442e.js";import"./index.d356626e.js";import"./_baseIteratee.f22f427f.js";import"./index.0121362c.js";import"./useRefs.11703366.js";import"./download.00272c72.js";import"./index.6bbd71d3.js";import"./uniqBy.e4da9e77.js";import"./index.91f9830e.js";import"./defaultsDeep.4bff0f4c.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};