suyuan/public/admin/assets/index.73229922.js

2 lines
6.4 KiB
JavaScript

import{B as X,C as Y,Q as Z,R as ee,w as te,D as ae,I as oe,L as le,_ as ie,M as ue,J as ne,N as se}from"./element-plus.f958bb38.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.437cabf2.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang.2a805e45.js";import{u as pe}from"./vue-router.12d45bc3.js";import{u as _e}from"./usePaging.160b82b8.js";import{a as ce}from"./useDictOptions.a1641d27.js";import{_ as fe,a as ve,b as Be}from"./edit.vue_vue_type_script_setup_true_name_monitorAlarmEdit_lang.dbc6cf86.js";import{t as T,f as De}from"./index.79566453.js";import{d as $,s as ye,r as h,$ as A,af as ge,o as m,c as x,a as B,U as e,L as a,M as I,u as i,K as D,R as be,V as M,a7 as he,S as d,T as E,k as Ee}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./axios.eb055ccc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./index.ace66c08.js";import"./lodash.ec5da75f.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";const Ce=d("\u67E5\u8BE2"),Fe=d("\u91CD\u7F6E"),ke={class:"mt-4"},we=d(" \u8BE6\u60C5 "),Ve=d(" \u5220\u9664 "),Te={class:"flex mt-4 justify-end"},Ae=$({name:"monitorAlarmLists"}),yt=$({...Ae,setup(xe){const{query:L}=pe(),R=ye(),C=h(!1);let y=L.device_id;typeof y>"u"&&(y="");const u=A({device_id:y,type:"",start_time:"",end_time:""}),S=h([]),U=l=>{S.value=l.map(({id:o})=>o)},{dictData:r}=ce("alarm_type"),{pager:p,getLists:_,resetParams:N,resetPage:P}=_e({fetchFun:ve,params:u}),g=h(!1),s=A({gridData:[{}]}),q=l=>{s.gridData=[{}];let o="";for(const c in r.alarm_type)r.alarm_type[c].value==l.type&&(o=r.alarm_type[c].name);s.gridData.unshift({item:"\u62A5\u8B66\u65F6\u95F4",value:l.create_time?T(l.create_time,"yyyy-mm-dd hh:MM:ss"):""}),s.gridData.unshift({item:"\u89E3\u51B3\u65B9\u6848",value:l.solution}),s.gridData.unshift({item:"\u62A5\u8B66\u6570\u503C",value:l.value}),s.gridData.unshift({item:"\u62A5\u8B66\u5185\u5BB9",value:l.content}),s.gridData.unshift({item:"\u76D1\u6D4B\u7C7B\u578B",value:o}),s.gridData.unshift({item:"\u8BBE\u5907\u540D\u79F0",value:l.device.name}),s.gridData.unshift({item:"\u8BBE\u5907ID",value:l.device_id}),g.value=!0},j=async l=>{await De.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Be({id:l}),_()};return _(),(l,o)=>{const c=X,f=Y,F=Z,J=ee,K=de,v=te,O=ae,k=oe,n=le,w=ie,Q=me,V=ue,z=re,G=ne,H=ge("perms"),W=se;return m(),x(M,null,[B("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(O,{class:"mb-[-16px]",model:u,inline:""},{default:a(()=>[e(f,{label:"\u8BBE\u5907ID",prop:"device_id"},{default:a(()=>[e(c,{class:"w-[280px]",modelValue:u.device_id,"onUpdate:modelValue":o[0]||(o[0]=t=>u.device_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907ID"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u76D1\u6D4B\u7C7B\u578B",prop:"type"},{default:a(()=>[e(J,{class:"w-[280px]",modelValue:u.type,"onUpdate:modelValue":o[1]||(o[1]=t=>u.type=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u76D1\u6D4B\u7C7B\u578B"},{default:a(()=>[e(F,{label:"\u5168\u90E8",value:""}),(m(!0),x(M,null,he(i(r).alarm_type,(t,b)=>(m(),D(F,{key:b,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(f,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"},{default:a(()=>[e(K,{startTime:u.start_time,"onUpdate:startTime":o[2]||(o[2]=t=>u.start_time=t),endTime:u.end_time,"onUpdate:endTime":o[3]||(o[3]=t=>u.end_time=t)},null,8,["startTime","endTime"])]),_:1}),e(f,null,{default:a(()=>[e(v,{type:"primary",onClick:i(P)},{default:a(()=>[Ce]),_:1},8,["onClick"]),e(v,{onClick:i(N)},{default:a(()=>[Fe]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),I((m(),D(k,{class:"!border-none",shadow:"never"},{default:a(()=>[B("div",ke,[e(V,{data:i(p).lists,onSelectionChange:U},{default:a(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"ID",prop:"id",width:"80","show-overflow-tooltip":""}),e(n,{label:"\u8BBE\u5907\u4FE1\u606F",width:"200"},{default:a(({row:t})=>[e(w,{class:"mr-2",type:"success"},{default:a(()=>[d("ID: "+E(t.device_id),1)]),_:2},1024),e(w,{class:"mr-2",type:"success"},{default:a(()=>[d("\u540D\u79F0: "+E(t.device.name),1)]),_:2},1024)]),_:1}),e(n,{label:"\u76D1\u6D4B\u7C7B\u578B",align:"center",prop:"type"},{default:a(({row:t})=>[e(Q,{options:i(r).alarm_type,value:t.type},null,8,["options","value"])]),_:1}),e(n,{label:"\u62A5\u8B66\u5185\u5BB9",width:"300",prop:"content","show-overflow-tooltip":""}),e(n,{label:"\u62A5\u8B66\u6570\u503C",prop:"value","show-overflow-tooltip":""}),e(n,{label:"\u62A5\u8B66\u65F6\u95F4",align:"center",prop:"create_time"},{default:a(({row:t})=>[B("span",null,E(t.create_time?i(T)(t.create_time,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),e(n,{label:"\u64CD\u4F5C",width:"140",align:"center",fixed:"right"},{default:a(({row:t})=>[e(v,{type:"primary",link:"",onClick:b=>q(t)},{default:a(()=>[we]),_:2},1032,["onClick"]),I((m(),D(v,{type:"danger",link:"",onClick:b=>j(t.id)},{default:a(()=>[Ve]),_:2},1032,["onClick"])),[[H,["device.monitor_alarm/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",Te,[e(z,{modelValue:i(p),"onUpdate:modelValue":o[4]||(o[4]=t=>Ee(p)?p.value=t:null),onChange:i(_)},null,8,["modelValue","onChange"])])]),_:1})),[[W,i(p).loading]]),C.value?(m(),D(fe,{key:0,ref_key:"editRef",ref:R,"dict-data":i(r),onSuccess:i(_),onClose:o[5]||(o[5]=t=>C.value=!1)},null,8,["dict-data","onSuccess"])):be("",!0)]),e(G,{modelValue:g.value,"onUpdate:modelValue":o[6]||(o[6]=t=>g.value=t),title:"\u76D1\u6D4B\u62A5\u8B66\u6570\u636E"},{default:a(()=>[e(V,{data:s.gridData},{default:a(()=>[e(n,{property:"item",label:"\u76D1\u6D4B\u9879",width:"150"}),e(n,{property:"value",label:"\u76D1\u6D4B\u6570\u636E"})]),_:1},8,["data"])]),_:1},8,["modelValue"])],64)}}});export{yt as default};