import{w as $,J as P,K as R,L as N,M}from"./element-plus.995fab54.js";import{_ as j}from"./index.vue_vue_type_script_setup_true_lang.6c6b6b7d.js";import{f as J,b as K}from"./index.49bc9e20.js";import{u as q}from"./usePaging.2a59f422.js";import{u as H}from"./useDictOptions.071e6d85.js";import{e as Q,f as U}from"./monitor_threshold.7b4f5d62.js";import{d as k,s as z,r as x,_ as G,ae as I,o as r,c as O,L as p,u as m,J as d,K as o,Q as W,T as a,a as E,R as s,S as t,j as X,n as F}from"./@vue.108c970a.js";import"./lodash.e92d81a1.js";import{_ as Y}from"./edit.vue_vue_type_script_setup_true_name_monitorThresholdEdit_lang.e465d06e.js";import"./@vueuse.d3d080b7.js";import"./@element-plus.d6eabd08.js";import"./lodash-es.29c53eac.js";import"./dayjs.664390f6.js";import"./axios.4ebfdb3f.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"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.dbf33394.js";import"./color.e1b5fced.js";import"./clone.0a4e8ac3.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.f174a91e.js";import"./ms.a9ae1d6d.js";import"./nprogress.d7c3ab1b.js";import"./vue-clipboard3.add720e2.js";import"./clipboard.01ea18f5.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./index.1996b8ef.js";const Z=s(" \u65B0\u589E "),ee=s(" \u5220\u9664 "),oe={class:"mt-4"},te=s(" \u7F16\u8F91 "),ae={class:"flex mt-4 justify-end"},ie=k({name:"monitorThresholdLists"}),Oe=k({...ie,setup(se){const _=z(),c=x(!1),y=G({}),v=x([]),D=l=>{v.value=l.map(({id:i})=>i)},{dictData:B}=H(""),{pager:u,getLists:f,resetParams:le,resetPage:ne}=q({fetchFun:Q,params:y}),T=async()=>{var l;c.value=!0,await F(),(l=_.value)==null||l.open("add")},V=async l=>{var i,h;c.value=!0,await F(),(i=_.value)==null||i.open("edit"),(h=_.value)==null||h.setFormData(l)},A=async l=>{await J.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await U({id:l}),f()};return f(),(l,i)=>{const h=K,w=$,g=P,n=R,L=N,S=j,b=I("perms"),C=M;return r(),O("div",null,[p((r(),d(g,{class:"!border-none",shadow:"never"},{default:o(()=>[p((r(),d(g,{class:"!border-none",shadow:"never"},{default:o(()=>[p((r(),d(w,{type:"primary",onClick:T},{icon:o(()=>[a(h,{name:"el-icon-Plus"})]),default:o(()=>[Z]),_:1})),[[b,["device.monitor_threshold/add"]]]),p((r(),d(w,{disabled:!v.value.length,onClick:i[0]||(i[0]=e=>A(v.value))},{default:o(()=>[ee]),_:1},8,["disabled"])),[[b,["device.monitor_threshold/delete"]]])]),_:1})),[[C,m(u).loading]]),E("div",oe,[a(L,{data:m(u).lists,onSelectionChange:D},{default:o(()=>[a(n,{label:"\u680F\u820D","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.fenceHousrAttr.fence_house_name),1)]),_:1}),a(n,{label:"\u5BA4\u6E29","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.air_temp_min)+" ~ "+t(e.air_temp_max),1)]),_:1}),a(n,{label:"\u6E7F\u5EA6","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.air_mois_min)+" ~ "+t(e.air_mois_max),1)]),_:1}),a(n,{label:"\u6C2E\u6C14\u542B\u91CF","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.nitrogen_min)+" ~ "+t(e.nitrogen_max),1)]),_:1}),a(n,{label:"\u9632\u706B","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.fireproof_min)+" ~ "+t(e.fireproof_max),1)]),_:1}),a(n,{label:"\u7532\u70F7","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.fireproof_min)+" ~ "+t(e.fireproof_max),1)]),_:1}),a(n,{label:"\u566A\u97F3","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.noise_min)+" ~ "+t(e.noise_max),1)]),_:1}),a(n,{label:"\u4F53\u6E29","show-overflow-tooltip":""},{default:o(({row:e})=>[s(t(e.temperature_min)+" ~ "+t(e.temperature_max),1)]),_:1}),a(n,{label:"\u64CD\u4F5C",width:"120",align:"center",fixed:"right"},{default:o(({row:e})=>[p((r(),d(w,{type:"primary",link:"",onClick:re=>V(e)},{default:o(()=>[te]),_:2},1032,["onClick"])),[[b,["device.monitor_threshold/edit"]]])]),_:1})]),_:1},8,["data"])]),E("div",ae,[a(S,{modelValue:m(u),"onUpdate:modelValue":i[1]||(i[1]=e=>X(u)?u.value=e:null),onChange:m(f)},null,8,["modelValue","onChange"])])]),_:1})),[[C,m(u).loading]]),c.value?(r(),d(Y,{key:0,ref_key:"editRef",ref:_,"dict-data":m(B),onSuccess:m(f),onClose:i[2]||(i[2]=e=>c.value=!1)},null,8,["dict-data","onSuccess"])):W("",!0)])}}});export{Oe as default};