lcny-vue3-antd-admin/dist/assets/warningModal.7c63fe0c.js

2 lines
4.5 KiB
JavaScript

var A=Object.defineProperty;var v=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var w=(r,a,e)=>a in r?A(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e,b=(r,a)=>{for(var e in a||(a={}))I.call(a,e)&&w(r,e,a[e]);if(v)for(var e of v(a))T.call(a,e)&&w(r,e,a[e]);return r};var d=(r,a,e)=>new Promise((B,p)=>{var c=s=>{try{n(e.next(s))}catch(m){p(m)}},f=s=>{try{n(e.throw(s))}catch(m){p(m)}},n=s=>s.done?B(s.value):Promise.resolve(s.value).then(c,f);n((e=e.apply(r,a)).next())});import{u as k,B as D}from"./useTable.18aa077e.js";import{T as R}from"./useForm.24abe18e.js";import{a as M,f as S,r as O,o as _,j as Y,x,p as F,k as l,h as j,l as z,aB as H,fd as L,bT as N,cG as V,fc as W,cs as G}from"./index.6f10b46a.js";import{a as K,B as P}from"./index.6fa690bb.js";import{T as $}from"./index.4269d7a3.js";import"./index.14bf9cc8.js";import"./Checkbox.b3b9d2a6.js";import"./index.065bf3d2.js";import"./index.b751d5cd.js";import"./index.8db488dd.js";import"./index.bd11d0db.js";import"./useSize.3f7a1258.js";import"./eagerComputed.a37112d3.js";import"./onMountedOrActivated.b44361ea.js";import"./useWindowSizeFn.5f9c58eb.js";import"./useContentViewHeight.37c68daa.js";import"./ArrowLeftOutlined.985a0d70.js";import"./transButton.42fc736b.js";import"./index.cd4d1d96.js";import"./index.001beb91.js";import"./index.106a8ba0.js";import"./dateUtil.fc0b2e7e.js";import"./_baseMerge.24ca6210.js";import"./_isIterateeCall.e5b0a120.js";import"./_baseEach.e90207ad.js";import"./get.de375d54.js";import"./index.0211eb77.js";import"./sortable.esm.2632adaa.js";import"./RedoOutlined.41ead4e6.js";import"./FullscreenOutlined.205f97f6.js";import"./index.5d70cb5f.js";import"./fromPairs.84aabb58.js";import"./CaretUpOutlined.7b41c6d6.js";import"./scrollTo.8fc0b618.js";import"./index.19de3a0e.js";import"./index.91ba81e2.js";import"./index.1c81fdba.js";import"./_baseIteratee.e4edbf90.js";import"./index.a49969bd.js";import"./useRefs.79978461.js";import"./download.fac879dd.js";import"./index.fb26da79.js";import"./uniqBy.6225c1e0.js";const q={key:0,class:"flex items-center justify-center"},Ht=M({__name:"warningModal",setup(r){const a=[{label:"\u76D1\u63A7\u8BBE\u5907",value:1},{label:"\u571F\u58E4\u8BBE\u5907",value:2},{label:"\u6C34\u8D28\u8BBE\u5907",value:3},{label:"\u6C14\u8C61\u8BBE\u5907",value:4}],e=[{label:"\u2160\u7EA7\u9884\u8B66",value:1},{label:"\u2161\u7EA7\u9884\u8B66",value:2},{label:"\u2162\u7EA7\u9884\u8B66",value:3},{label:"\u2163\u7EA7\u9884\u8B66",value:4}],B=[{value:0,color:"red",label:"\u672A\u5904\u7406"},{value:1,color:"green",label:"\u5DF2\u5904\u7406"},{value:2,color:"pink",label:"\u5DF2\u5FFD\u7565"}],p=S(()=>"\u9884\u8B66\u5217\u8868"),c=O({}),[f]=K(t=>d(this,null,function*(){c.value=t,s()})),[n,{reload:s}]=k({pagination:{pageSize:10,pageSizeOptions:["10","20","30","40"]},immediate:!1,canResize:!1,api:t=>d(this,null,function*(){const{data:o,meta:i}=yield L(b(b({},t),c.value));return{items:o,total:i==null?void 0:i.total}}),rowKey:"id",columns:[{title:"ID",dataIndex:"id",width:80},{title:"\u57FA\u5730",dataIndex:"base_name"},{title:"\u76D1\u63A7\u70B9",dataIndex:"point_name"},{title:"\u8BBE\u5907\u7C7B\u578B",dataIndex:"device_type",customRender:({text:t})=>{var i;const o=a.find(({value:u})=>u==t);return(i=o==null?void 0:o.label)!=null?i:t}},{title:"\u5185\u5BB9",dataIndex:"content"},{title:"\u7B49\u7EA7",dataIndex:"lv",width:100,customRender:({text:t})=>{var i;const o=e.find(({value:u})=>u==t);return(i=o==null?void 0:o.label)!=null?i:t}},{title:"\u72B6\u6001",dataIndex:"status",width:100,customRender:({record:t})=>{var g,h;const o=t.status,u=B.find(y=>y.value===o),E=(g=u==null?void 0:u.color)!=null?g:"red",C=(h=u==null?void 0:u.label)!=null?h:o;return N($,{color:E},()=>C)}},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"created_at",width:180,customRender:({text:t})=>t?V.unix(t).format("YYYY-MM-DD HH:mm:ss"):""},{width:90,title:"\u64CD\u4F5C",dataIndex:"action",align:"center",fixed:"right"}],useSearchForm:!1,showTableSetting:!1,bordered:!0}),m=t=>d(this,null,function*(){yield W(t.id),G.success("\u6210\u529F"),s()});return(t,o)=>(_(),Y(l(P),H(t.$attrs,{onRegister:l(f),showFooter:"",title:l(p),showOkBtn:!1,width:"1200px"}),{default:x(()=>[F(l(D),{onRegister:l(n)},{bodyCell:x(({column:i,record:u})=>[i.key==="action"?(_(),j("div",q,[F(l(R),{actions:[{label:"\u6807\u8BB0",popConfirm:{title:"\u662F\u5426\u786E\u8BA4\u6807\u8BB0",placement:"topRight",confirm:m.bind(null,u)},ifShow:u.status==0}]},null,8,["actions"])])):z("",!0)]),_:1},8,["onRegister"])]),_:1},16,["onRegister","title"]))}});export{Ht as default};