1.提交修改,修复菜单、路由。2.修改每日汇报大小、样式

This commit is contained in:
2026-04-09 09:32:10 +08:00
parent e8dcc0d7be
commit dd379b1e8f
2 changed files with 86 additions and 7 deletions

View File

@@ -757,6 +757,82 @@ const remainingRouter: AppRouteRecordRaw[] = [
} }
] ]
}, },
{
path: '/reports',
component: Layout,
name: 'Reports',
meta: {
hidden: true,
title: '数据报表'
},
children: [
{
path: 'lijun/category-diagnostic',
name: 'CategoryDiagnostic',
meta: {
title: '品类诊断',
noCache: true,
hidden: true,
canTo: true
},
component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/categoryCardListComponents.vue')
},
{
path: 'lijun/supplier-ranking',
name: 'SupplierRanking',
meta: {
title: '供货商销售排行',
noCache: true,
hidden: true,
canTo: true
},
component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/SupplierRanking.vue')
},
{
path: 'lijun/supplier-performance',
name: 'SupplierPerformance',
meta: {
title: '供应商详情',
hidden: true,
canTo: true
},
component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/SupplierPerformancePage.vue')
},
{
path: 'lijun/middle-class-ranking',
name: 'MiddleClassRanking',
meta: {
title: '中类销售排名',
noCache: true,
hidden: true,
canTo: true
},
component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/MiddleClassRanking.vue')
},
{
path: 'lijun/product-cards',
name: 'ProductCards',
meta: {
title: '查看更多产品卡片',
noCache: true,
hidden: true,
canTo: true
},
component: () => import('@/views/ydoyun/report/lijun/reportpage6/components/ProductCardsPage.vue')
},
{
path: 'lijun/reportpage6/detail',
name: 'ProductDetailPage',
meta: {
title: '商品明细详情',
noCache: true,
hidden: true,
canTo: true
},
component: () => import('@/views/ydoyun/report/lijun/reportpage6/detail.vue')
}
]
},
{ {
path: '/ydoyuntag', path: '/ydoyuntag',
component: Layout, component: Layout,

View File

@@ -2,6 +2,9 @@ import { useCache, CACHE_KEY } from '@/hooks/web/useCache'
import { TokenType } from '@/api/login/types' import { TokenType } from '@/api/login/types'
import { decrypt, encrypt } from '@/utils/jsencrypt' import { decrypt, encrypt } from '@/utils/jsencrypt'
// 登录态使用 sessionStorage每个浏览器标签页独立会话新标签打开同一 URL 需重新登录
const { wsCache: tokenCache } = useCache('sessionStorage')
// 租户、记住密码等仍用 localStorage便于跨标签保持
const { wsCache } = useCache() const { wsCache } = useCache()
const AccessTokenKey = 'ACCESS_TOKEN' const AccessTokenKey = 'ACCESS_TOKEN'
@@ -10,25 +13,25 @@ const RefreshTokenKey = 'REFRESH_TOKEN'
// 获取token // 获取token
export const getAccessToken = () => { export const getAccessToken = () => {
// 此处与TokenKey相同此写法解决初始化时Cookies中不存在TokenKey报错 // 此处与TokenKey相同此写法解决初始化时Cookies中不存在TokenKey报错
const accessToken = wsCache.get(AccessTokenKey) const accessToken = tokenCache.get(AccessTokenKey)
return accessToken ? accessToken : wsCache.get('ACCESS_TOKEN') return accessToken ? accessToken : tokenCache.get('ACCESS_TOKEN')
} }
// 刷新token // 刷新token
export const getRefreshToken = () => { export const getRefreshToken = () => {
return wsCache.get(RefreshTokenKey) return tokenCache.get(RefreshTokenKey)
} }
// 设置token // 设置token
export const setToken = (token: TokenType) => { export const setToken = (token: TokenType) => {
wsCache.set(RefreshTokenKey, token.refreshToken) tokenCache.set(RefreshTokenKey, token.refreshToken)
wsCache.set(AccessTokenKey, token.accessToken) tokenCache.set(AccessTokenKey, token.accessToken)
} }
// 删除token // 删除token
export const removeToken = () => { export const removeToken = () => {
wsCache.delete(AccessTokenKey) tokenCache.delete(AccessTokenKey)
wsCache.delete(RefreshTokenKey) tokenCache.delete(RefreshTokenKey)
} }
/** 格式化tokenjwt格式 */ /** 格式化tokenjwt格式 */