|
@@ -98,7 +98,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="outer11 flex-row">
|
|
|
- <div class="main25 flex-col" v-for="(item, index) in pushToolList" :key="index" @click="pushToolPage(item.value)">
|
|
|
+ <div class="main25 flex-col" v-for="(item, index) in pushToolList" :key="index"
|
|
|
+ @click="pushToolPage(item.value)">
|
|
|
<img class="mod7 flex-col" :src="showLogo(item.value)" />
|
|
|
<div class="TextGroup14 flex-col">
|
|
|
<!-- <span class="info15" v-html="item.label"></span> -->
|
|
@@ -117,7 +118,8 @@
|
|
|
<van-dialog v-model:show="showAlarm" :title="$t('home.alarmTitle')" @confirm="confirmAlarm">
|
|
|
<div style="max-height: 30vh; overflow-y: auto;">
|
|
|
<div v-for="(item, index) in alarmList" :key="index" style="padding: 2px 5px;">
|
|
|
- <van-cell :title="$t('home.alarmDevice') + (item.name ? item.name : item.clientId.slice(-6)) + $t('home.alarmContent') + item.alarmContent" />
|
|
|
+ <van-cell
|
|
|
+ :title="$t('home.alarmDevice') + (item.name ? item.name : item.clientId.slice(-6)) + $t('home.alarmContent') + item.alarmContent" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-dialog>
|
|
@@ -132,7 +134,7 @@ import { onMounted, ref, nextTick } from "vue";
|
|
|
import sHeader from "../../components/SimpleHeader";
|
|
|
import dateSelectList from "../../components/dateSelectList";
|
|
|
import typeSelectList from "../../components/typeSelectList";
|
|
|
-import { getLoginUser, $M_Menus, Format_time, styleUrl } from "../../common/js/utils";
|
|
|
+import { getLoginUser, $M_Menus, Format_time, styleUrl, getLocal, setLocal, navigatorLanguage } from "../../common/js/utils";
|
|
|
import { useRouter } from "vue-router";
|
|
|
import {
|
|
|
getStatistics,
|
|
@@ -375,9 +377,14 @@ export default {
|
|
|
const showAlarm = ref(false);
|
|
|
const alarmList = ref([]);
|
|
|
// 页面初始化
|
|
|
- onMounted(async() => {
|
|
|
+ onMounted(async () => {
|
|
|
// 加载样式
|
|
|
styleUrl('home');
|
|
|
+ // 检测语言是否有缓存
|
|
|
+ if (!getLocal("curLang")) {
|
|
|
+ // 根据浏览器语言重新缓存到localstorage
|
|
|
+ setLocal("curLang", navigatorLanguage());
|
|
|
+ }
|
|
|
if (localStorage.getItem("loginSys")) {
|
|
|
const loginSysString = localStorage.getItem("loginSys");
|
|
|
sys.value = JSON.parse(loginSysString);
|
|
@@ -422,7 +429,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
const confirmAlarm = () => {
|
|
|
localStorage.setItem('firstLogin', false);
|
|
|
}
|