import{_ as A,a5 as L,b as H,r as c,J as g,o as I,y as U,q as u,n as a,c as F,p as n,P as S,x as r,t as J,v as _,C as f,cG as V,cH as v,s as T,dc as q,k as G,m as Q,l as R,bv as z,a0 as W,a1 as X,D as Y}from"./index.8d733f79.js";import{E as Z}from"./el-input-number.60463ef8.js";import{a as x,u as O}from"./setValue.1d09ba51.js";import"./index.28f6da25.js";const j=m=>(W("data-v-97e47376"),m=m(),X(),m),ee={style:{"margin-bottom":"16px"}},oe={style:{"margin-right":"12px"}},ae={style:{"margin-right":"12px"}},le=j(()=>_("span",null,"\u503C\u7C7B\u578B\uFF1A\u6709\u6548\u503C",-1)),ne={key:0,class:"dialog-footer"},te=L({name:"PositionMapModal"}),se=Object.assign(te,{emits:["refreshChart"],setup(m,{expose:M,emit:P}){const{t:y}=H(),{proxy:$}=Y(),d=c(!1),t=c({}),l=c({id:null,oneValue:null,twoValue:null,threeValue:null,fourValue:null}),w=c(),B=g.session.getJSON("userInfo").deployType==="cloud",E=g.session.getJSON("userInfo").userType===1&&g.session.getJSON("userInfo").userLevel===1;function K(o){if(d.value=!0,o.direction===y("quickQuery")){const e=o.name.match(/[VHA]/g);o.name=e?o.name.replace(e[0],""):o.name,o.direction=e?e[0]:"-"}o.direction=["V","H","A"].includes(o.direction)?o.direction:"-",o.direction=o.identifier==="temperature"?"-":o.direction,t.value=o,k()}const k=()=>{const o={pointId:t.value.pointId,alarmMetric:t.value.identifier.replace(/_(V|H|A)$/,""),axial:t.value.direction};x(o).then(e=>{e.data&&(Object.keys(l.value).forEach(i=>{l.value[i]=e.data[i]}),w.value=!e.data.alarmHosting||e.data.alarmHosting&&B&&E)})};function D(){if(!q(l.value.fourValue,l.value.threeValue,l.value.twoValue,l.value.oneValue)){$.$modal.msgError(y("highToLow"));return}O([{...l.value}]).then(()=>{P("refreshChart",t.value),h()})}function h(){d.value=!1}return M({showModal:K}),(o,e)=>{const i=Z,p=G,N=Q,C=R,b=z;return I(),U(b,{title:"\u62A5\u8B66\u9608\u503C\u8BBE\u7F6E",modelValue:a(d),"onUpdate:modelValue":e[8]||(e[8]=s=>T(d)?d.value=s:null),width:"460px","align-center":!0},{footer:u(()=>[a(w)?(I(),F("div",ne,[n(C,{onClick:h},{default:u(()=>[S(r(o.$t("cancel")),1)]),_:1}),n(C,{type:"primary",onClick:D},{default:u(()=>[S(r(o.$t("confirm")),1)]),_:1})])):J("",!0)]),default:u(()=>[_("div",ee,[_("span",oe,r(o.$t("metric"))+"\uFF1A"+r(a(t).name)+r(a(t).unit?`(${a(t).unit})`:""),1),_("span",ae,r(o.$t("direction"))+"\uFF1A"+r(a(t).direction),1),le]),n(N,{model:a(l),style:{"padding-right":"30px"}},{default:u(()=>[n(p,{label:o.$t("alarmLevel4"),prop:"fourValue"},{default:u(()=>[n(i,{modelValue:a(l).fourValue,"onUpdate:modelValue":e[0]||(e[0]=s=>a(l).fourValue=s),step:1,onMousewheel:e[1]||(e[1]=f(()=>{},["prevent"])),max:99999,min:0,onKeydown:a(V),onPaste:a(v)},null,8,["modelValue","onKeydown","onPaste"])]),_:1},8,["label"]),n(p,{label:o.$t("alarmLevel3"),prop:"threeValue"},{default:u(()=>[n(i,{modelValue:a(l).threeValue,"onUpdate:modelValue":e[2]||(e[2]=s=>a(l).threeValue=s),step:1,onMousewheel:e[3]||(e[3]=f(()=>{},["prevent"])),max:99999,min:0,onKeydown:a(V),onPaste:a(v)},null,8,["modelValue","onKeydown","onPaste"])]),_:1},8,["label"]),n(p,{label:o.$t("alarmLevel2"),prop:"twoValue"},{default:u(()=>[n(i,{modelValue:a(l).twoValue,"onUpdate:modelValue":e[4]||(e[4]=s=>a(l).twoValue=s),step:1,onMousewheel:e[5]||(e[5]=f(()=>{},["prevent"])),max:99999,min:0,onKeydown:a(V),onPaste:a(v)},null,8,["modelValue","onKeydown","onPaste"])]),_:1},8,["label"]),n(p,{label:o.$t("alarmLevel1"),prop:"oneValue"},{default:u(()=>[n(i,{modelValue:a(l).oneValue,"onUpdate:modelValue":e[6]||(e[6]=s=>a(l).oneValue=s),step:1,onMousewheel:e[7]||(e[7]=f(()=>{},["prevent"])),max:99999,min:0,onKeydown:a(V),onPaste:a(v)},null,8,["modelValue","onKeydown","onPaste"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),me=A(se,[["__scopeId","data-v-97e47376"]]);export{me as default};
