优化标签小票打印
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
<template>
|
||||
<div class="left_menu_wrap">
|
||||
<div class="item online">
|
||||
<div class="item" :class="{ online: socketStore.online }" @click="connectWsHandle">
|
||||
<el-icon class="icon">
|
||||
<Monitor />
|
||||
</el-icon>
|
||||
<el-text type="success">在线</el-text>
|
||||
<el-text :type="socketStore.online ? 'success' : ''">
|
||||
<template v-if="socketStore.online">
|
||||
在线
|
||||
</template>
|
||||
<template v-else>
|
||||
离线
|
||||
</template>
|
||||
</el-text>
|
||||
</div>
|
||||
<router-link class="item" :class="{ active: route.path == item.path }" v-for="item in menus" :key="item.path"
|
||||
:to="item.path">
|
||||
@@ -29,9 +36,14 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useSocket } from '@/store/socket.js'
|
||||
import more from '@/components/more.vue'
|
||||
import callNumber from './callNumber.vue'
|
||||
|
||||
const emits = defineEmits(['connectWsHandle'])
|
||||
|
||||
const socketStore = useSocket()
|
||||
|
||||
const route = useRoute()
|
||||
const moreref = ref(null)
|
||||
const callNumberRef = ref(null)
|
||||
@@ -82,6 +94,12 @@ function openCall() {
|
||||
callNumberRef.value.show()
|
||||
}
|
||||
|
||||
// 手动重新连接ws
|
||||
function connectWsHandle() {
|
||||
if (socketStore.online) return
|
||||
emits('connectWsHandle')
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
updateCallNumber
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user