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

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.5121251f.js";import{T as V}from"./useForm.f7045c13.js";import{d as j}from"./other.ce003455.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.54dd8fb6.js";import{u as z}from"./index.00da2b1c.js";import{_ as G,c as H,s as J}from"./DeviceDrawer.a93b9785.js";import"./index.0951859d.js";import"./Checkbox.842af2a5.js";import"./index.73863928.js";import"./index.95d2b670.js";import"./index.036d0022.js";import"./index.31d73402.js";import"./useSize.05d6b1d9.js";import"./eagerComputed.1aeded3e.js";import"./onMountedOrActivated.ade78d57.js";import"./useWindowSizeFn.c58342cc.js";import"./useContentViewHeight.a8a28318.js";import"./ArrowLeftOutlined.480aa1c5.js";import"./transButton.d2ae3ef9.js";import"./index.be3e543c.js";import"./index.12f47237.js";import"./index.21d4868f.js";import"./index.6f073bc9.js";import"./dateUtil.e0bfcbbd.js";import"./_baseMerge.81045748.js";import"./_isIterateeCall.e1bd0c80.js";import"./_baseEach.7eb9b630.js";import"./get.0e1df90e.js";import"./index.3d3b0af9.js";import"./FullscreenOutlined.8d4d7491.js";import"./index.b274985b.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.47152d84.js";import"./index.f92b3679.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.92b4630e.js";import"./scrollTo.cba4cf38.js";import"./index.ab1fd04f.js";import"./index.532acd66.js";import"./index.613f50d0.js";import"./_baseIteratee.b0a0a030.js";import"./index.484fd188.js";import"./useRefs.d5419e97.js";import"./download.98ecc8d8.js";import"./index.601f20d9.js";import"./uniqBy.7d39eb72.js";import"./index.d7ed52fa.js";import"./defaultsDeep.23ff92fd.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};