修复一些路由跳转问题

This commit is contained in:
梁州 2025-05-08 16:58:18 +08:00
parent ab65f82cf4
commit 64f1067a8d
5 changed files with 5264 additions and 13809 deletions

File diff suppressed because it is too large Load Diff

View File

@ -40,21 +40,20 @@ const closeTag = (tag) => {
}
//
const handleClose = (tag, index) => {
if (tags.value.length === 1) { //
return
}
closeTag(tag) // tag
if (router.path !== tag.path) {
//
if (router.currentRoute.value.path === tag.path) {
console.log(index + ':' + tags.value.length)
if (index === (tags.value.length - 1)) { // ,
router.push(this.tags[index].path)
router.push('/home')
} else { //
if (index === 0) {
router.push(tags.value[0].path)
router.push(tags.value[index + 1].path)
} else {
router.push(tags.value[index - 1].path)
}
}
}
closeTag(tag) // tag
}
// tags
const handleClick = (tag) => {

View File

@ -1,7 +1,8 @@
<template>
<div class="menu-title">主菜单</div>
<!-- 侧边栏菜单区域 -->
<el-menu :default-active="route.path" active-text-color="#409Eff" background-color="#fff" text-color="#000" :router="true" unique-opened>
<el-menu :default-active="route.path" active-text-color="#409Eff" background-color="#fff" text-color="#000"
:router="true" unique-opened>
<!-- 一级菜单 -->
<el-sub-menu :index="item.id" v-for="item in menuList" :key="item.id">
<!-- 一级菜单模板区域 -->
@ -25,6 +26,7 @@
<script setup>
import store from '@/store'
import {useRoute} from 'vue-router'
const menuList = store.getters.getMenuList
const route = useRoute()
//

View File

@ -4,7 +4,7 @@
<div class="work-area">
<fieldset class="search-area">
<el-form ref="stockQueryFormRef" :model="stockQuery" :label-position="labelPosition"
label-width="158px" style="max-width: 100%" status-icon>
label-width="auto" style="max-width: 100%" status-icon>
<div style="display: flex;justify-content: space-between;">
<el-row>
<el-form-item label="箱号">

View File

@ -30,7 +30,8 @@
<script setup>
import store from '@/store'
import router from '@/router'
const user = store.getters.getUserNam//
const user = store.getters.getUserName//
const token = store.getters.getToken//
// WMS
const loginToWms = () => {
@ -50,12 +51,10 @@ const loginToScanImage = () => {
}
// WCS
const loginToWcs = () => {
const wcsUrl = `https://cxlasrs.ecorp.cat.com/wcs/#/login?user=user&pwd=user`
window.location.href = wcsUrl//
window.location.href = `https://cxlasrs.ecorp.cat.com/wcs/#/login?user=user&pwd=user`//
}
const loginToMonitor = () => {
const mpnitorUrl = `https://cxlasrs.ecorp.cat.com?user=${user}&token=${token}`
window.location.href = mpnitorUrl//
window.location.href = `https://cxlasrs.ecorp.cat.com?user=${user}&token=${token}`//
}
</script>