import{q as e,F as a,S as s}from"./common-utils-8H8K2JPG.js";import{U as t,a4 as o,r as i,b as r,h as l,q as n,u as m,F as u,e as c,I as p,y as d,f as v,s as g,o as f,t as h,x as y}from"./vendor-jA_NIjzi.js";import{_ as w,b as j,u as k,aO as _}from"./common-store-e_1WBubm.js";import{H as x}from"./Header-hbN0HDAk.js";import{p as C}from"./popUpDialog-cRaJbZ6V.js";import{S as I}from"./SvgIcon-unOD6nfS.js";import"./vendor-crypto-Vtl7-GZS.js";import"./vendor-mqtt-lYGapirz.js";/* empty css              */import"./BtnClose-9Q8xqZiI.js";const b={class:"system"},S={class:"system-userInfo",id:"system"},H=["onClick"],T={class:"system-userInfo-item-left"},U={class:"logout-wrapper"},V=w({__name:"system",setup(w){const{t:V}=t(),q=j(),R=k(),W=o(),F=i(!1),G=i(!1),L=[{id:0,name:V("清空缓存")},{id:1,name:V("系统与装置")}],A=async()=>{"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations&&navigator.serviceWorker.getRegistrations().then((e=>{e.forEach((e=>e.unregister()))})).catch((e=>{})),await B(),G.value=!1},B=async()=>{q.showGlobalLoading();const s=await _();if(q.clearGlobalLoading(),!s.success)return g(s.message);R.logout(),F.value=!1,e()?(a("logout"),await W.push({path:"/mine",replace:!0})):await W.push({path:"/",replace:!0})};return(e,a)=>{const t=s;return f(),r(u,null,[l("div",b,[n(x,{title:m(V)("系统设置"),isRightShow:!1},null,8,["title"]),l("div",S,[(f(),r(u,null,c(L,(e=>l("div",{class:"system-userInfo-item",key:e.id,onClick:a=>(e=>{if(1===e)return W.push("/systemSetting");G.value=!0})(e.id)},[l("div",T,h(e.name),1),n(I,{name:"rightArrow"})],8,H))),64))]),l("div",U,[n(t,{block:"",type:"danger",onClick:a[0]||(a[0]=e=>F.value=!0)},{default:p((()=>[y(h(m(V)("退出登录")),1)])),_:1})])]),F.value?(f(),d(C,{key:0,dialog:F.value,"onUpdate:dialog":a[1]||(a[1]=e=>F.value=e),showValue:F.value,title:m(V)("退出登录"),content:m(V)("您确定要退出吗"),confrimText:m(V)("退出"),teleport:"#system",onHandleConfrim:B},null,8,["dialog","showValue","title","content","confrimText"])):v("",!0),G.value?(f(),d(C,{key:1,dialog:G.value,"onUpdate:dialog":a[2]||(a[2]=e=>G.value=e),showValue:G.value,title:m(V)("清空缓存"),content:m(V)("提醒您缓存清空后需重新加载相关资源"),confrimText:m(V)("立即清空"),teleport:"#system",onHandleConfrim:A},null,8,["dialog","showValue","title","content","confrimText"])):v("",!0)],64)}}},[["__scopeId","data-v-3913744a"],["__file","system.vue"]]);export{V as default};
