2 lines
5.3 KiB
JavaScript
2 lines
5.3 KiB
JavaScript
import{B as K,C as j,R as q,S as H,w as J,D as O,H as z,I as G,J as Q,K as W}from"./element-plus.c4a2af8a.js";import{_ as X}from"./index.vue_vue_type_script_setup_true_lang.2a46e71f.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.23d19169.js";import{_ as Z}from"./index.vue_vue_type_script_setup_true_lang.d8a052c5.js";import{u as ee}from"./usePaging.160b82b8.js";import{u as te}from"./useDictOptions.f965e37e.js";import{_ as oe,a as ae,b as le}from"./edit.vue_vue_type_script_setup_true_name_monitorAlarmEdit_lang.07aa9204.js";import{t as ne,f as ie}from"./index.a7ae38ad.js";import{d as g,s as se,r as h,$ as re,af as ue,o as s,c as k,U as e,L as a,M as C,u as l,K as m,R as me,V as pe,a7 as de,a as D,T as _e,k as ce,S as f,n as fe}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.a5d54722.js";import"./lodash.ec5da75f.js";import"./vue-router.12d45bc3.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 ve=f("\u67E5\u8BE2"),Be=f("\u91CD\u7F6E"),be={class:"mt-4"},ye=f(" \u7F16\u8F91 "),Ce=f(" \u5220\u9664 "),De={class:"flex mt-4 justify-end"},Ee=g({name:"monitorAlarmLists"}),pt=g({...Ee,setup(we){const v=se(),B=h(!1),n=re({device_id:"",type:""}),V=h([]),T=r=>{V.value=r.map(({id:o})=>o)},{dictData:b}=te("alarm_type"),{pager:u,getLists:p,resetParams:x,resetPage:A}=ee({fetchFun:ae,params:n}),S=async r=>{var o,d;B.value=!0,await fe(),(o=v.value)==null||o.open("edit"),(d=v.value)==null||d.setFormData(r)},$=async r=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await le({id:r}),p()};return p(),(r,o)=>{const d=K,_=j,E=q,I=H,L=Z,c=J,R=O,w=z,i=G,U=Y,M=Q,N=X,F=ue("perms"),P=W;return s(),k("div",null,[e(w,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(R,{class:"mb-[-16px]",model:n,inline:""},{default:a(()=>[e(_,{label:"\u8BBE\u5907ID",prop:"device_id"},{default:a(()=>[e(d,{class:"w-[280px]",modelValue:n.device_id,"onUpdate:modelValue":o[0]||(o[0]=t=>n.device_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907ID"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u76D1\u6D4B\u7C7B\u578B",prop:"type"},{default:a(()=>[e(I,{class:"w-[280px]",modelValue:n.type,"onUpdate:modelValue":o[1]||(o[1]=t=>n.type=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u76D1\u6D4B\u7C7B\u578B"},{default:a(()=>[e(E,{label:"\u5168\u90E8",value:""}),(s(!0),k(pe,null,de(l(b).alarm_type,(t,y)=>(s(),m(E,{key:y,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(_,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time"},{default:a(()=>[e(L,{startTime:n.start_time,"onUpdate:startTime":o[2]||(o[2]=t=>n.start_time=t),endTime:n.end_time,"onUpdate:endTime":o[3]||(o[3]=t=>n.end_time=t)},null,8,["startTime","endTime"])]),_:1}),e(_,null,{default:a(()=>[e(c,{type:"primary",onClick:l(A)},{default:a(()=>[ve]),_:1},8,["onClick"]),e(c,{onClick:l(x)},{default:a(()=>[Be]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),C((s(),m(w,{class:"!border-none",shadow:"never"},{default:a(()=>[D("div",be,[e(M,{data:l(u).lists,onSelectionChange:T},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(i,{label:"\u8BBE\u5907ID",prop:"device_id","show-overflow-tooltip":""}),e(i,{label:"\u8BBE\u5907\u540D\u79F0",prop:"device.name","show-overflow-tooltip":""}),e(i,{label:"\u76D1\u6D4B\u7C7B\u578B",prop:"type"},{default:a(({row:t})=>[e(U,{options:l(b).alarm_type,value:t.type},null,8,["options","value"])]),_:1}),e(i,{label:"\u62A5\u8B66\u5185\u5BB9",prop:"content","show-overflow-tooltip":""}),e(i,{label:"\u62A5\u8B66\u6570\u503C",prop:"value","show-overflow-tooltip":""}),e(i,{label:"\u62A5\u8B66\u65F6\u95F4",prop:"plant_date"},{default:a(({row:t})=>[D("span",null,_e(t.create_time?l(ne)(t.plant_date,"yyyy-mm-dd hh:MM:ss"):""),1)]),_:1}),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:a(({row:t})=>[C((s(),m(c,{type:"primary",link:"",onClick:y=>S(t)},{default:a(()=>[ye]),_:2},1032,["onClick"])),[[F,["device.monitor_alarm/edit"]]]),C((s(),m(c,{type:"danger",link:"",onClick:y=>$(t.id)},{default:a(()=>[Ce]),_:2},1032,["onClick"])),[[F,["device.monitor_alarm/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",De,[e(N,{modelValue:l(u),"onUpdate:modelValue":o[4]||(o[4]=t=>ce(u)?u.value=t:null),onChange:l(p)},null,8,["modelValue","onChange"])])]),_:1})),[[P,l(u).loading]]),B.value?(s(),m(oe,{key:0,ref_key:"editRef",ref:v,"dict-data":l(b),onSuccess:l(p),onClose:o[5]||(o[5]=t=>B.value=!1)},null,8,["dict-data","onSuccess"])):me("",!0)])}}});export{pt as default};
|