|
@@ -10,14 +10,14 @@
|
|
|
</router-view>
|
|
|
|
|
|
</div>
|
|
|
- <van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'" :style="isIos() ? 'height:65px' : ''">
|
|
|
- <van-tabbar-item to="/main/message" :badge="msgCount" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
+ <van-tabbar v-model="tabType" v-if="routerName != '/main/processDtl'" @change="onChange" :style="isIos() ? 'height:65px' : ''">
|
|
|
+ <van-tabbar-item to="/main/message" name="message" :badge="msgCount" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
{{$t('common.message')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_shengc_gray1 footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
|
</template>
|
|
|
</van-tabbar-item>
|
|
|
- <van-tabbar-item to="/main/working" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
+ <van-tabbar-item to="/main/working" name="working" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
{{$t('common.workbench')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_gongz footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
@@ -26,12 +26,13 @@
|
|
|
<van-tabbar-item
|
|
|
:style="isIos() ? 'padding-bottom:15px' : ''"
|
|
|
:to="tenantId == 'smt' ? '/main/xiamenList' : '/main/equipment'"
|
|
|
+ name="equipment"
|
|
|
>{{$t('common.things')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_wulw footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
|
</template>
|
|
|
</van-tabbar-item>
|
|
|
- <van-tabbar-item icon="setting-o" to="/main/home" :style="isIos() ? 'padding-bottom:15px' : ''">
|
|
|
+ <van-tabbar-item icon="setting-o" to="/main/home" :style="isIos() ? 'padding-bottom:15px' : ''" name="home">
|
|
|
{{$t('common.mine')}}
|
|
|
<template #icon="props">
|
|
|
<i class="icon iconfont icon-btn_mine footer-icon" :class="props.active ? 'footer-icon-active' : ''"></i>
|
|
@@ -40,7 +41,7 @@
|
|
|
</van-tabbar>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import { ref, getCurrentInstance, watch } from 'vue'
|
|
|
+import { ref, getCurrentInstance, watch,computed } from 'vue'
|
|
|
import { getUserInfo,getToken } from '@/utils/auth'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { lang } from '@/lang/cn'
|
|
@@ -50,9 +51,27 @@ import 'vant/lib/index.css'
|
|
|
import axios from 'axios'
|
|
|
import { uploadDdRightBtn } from '@/utils/ddAdapter'
|
|
|
import { showDialog,showNotify } from 'vant'
|
|
|
+import tabTypeStore from '@/store/modules/tabType'
|
|
|
+
|
|
|
+const onChange = (val) => {
|
|
|
+ tabTypeStore().setTabType(val)
|
|
|
+
|
|
|
+ if (val == 'message') {
|
|
|
+ router.push('/main/message')
|
|
|
+ }
|
|
|
+ if (val == 'working') {
|
|
|
+ router.push('/main/working')
|
|
|
+ }
|
|
|
+ if (val == 'equipment') {
|
|
|
+ router.push('/main/equipment')
|
|
|
+ }
|
|
|
+ if (val == 'home') {
|
|
|
+ router.push('/main/home')
|
|
|
+ }
|
|
|
+}
|
|
|
const tenantId = getUserInfo().tenantId
|
|
|
const proxy = getCurrentInstance().proxy
|
|
|
-const tabType = ref('home')
|
|
|
+const tabType = computed(() => tabTypeStore().tabType);
|
|
|
const msgCount = ref(0)
|
|
|
const socketInit = () => {
|
|
|
window.ws = new WebSocket(
|