From e75fe741fd8da9a936f0f6fd42eb283078d1463e Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 11 Jul 2024 10:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AD=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en-US.ts | 7 ++++++- src/locales/zh-CN.ts | 7 ++++++- src/store/modules/permission.ts | 9 +++++++++ .../demandforecastingMain/demandforecastingMain.data.ts | 4 ++-- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index e2d991a60..70665df76 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1147,7 +1147,12 @@ export default { 总数量超出计划数量:'The total quantity exceeds the planned quantity', 导出二维表:'Exporting two-dimensional tables', 要货计划明细:'Detailed requisition plan', - 要货计划二维表:'Two dimensional requisition schedule' + 要货计划二维表:'Two dimensional requisition schedule', + '要货预测-计划员':'Demand forecast-Planner', + '要货预测-供应商':'Demand forecast-Supplier', + 全选:'All', + 计划员:'Planner', + }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 48bd82c29..9e6733363 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1147,7 +1147,12 @@ export default { 总数量超出计划数量:'总数量超出计划数量', 导出二维表:'导出二维表', 要货计划明细:'要货计划明细', - 要货计划二维表:'要货计划二维表' + 要货计划二维表:'要货计划二维表', + '要货预测-计划员':'要货预测-计划员', + '要货预测-供应商':'要货预测-供应商', + 全选:'全选', + 计划员:'计划员', + }, } diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts index c729cea02..19a8bcb38 100644 --- a/src/store/modules/permission.ts +++ b/src/store/modules/permission.ts @@ -4,6 +4,7 @@ import { cloneDeep } from 'lodash-es' import remainingRouter from '@/router/modules/remaining' import { flatMultiLevelRoutes, generateRoute } from '@/utils/routerHelper' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import { getTenantId } from '@/utils/auth' const { wsCache } = useCache() @@ -33,11 +34,19 @@ export const usePermissionStore = defineStore('permission', { actions: { async generateRoutes(): Promise { return new Promise(async (resolve) => { + let names =[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}] + let tenant = names.find(item=>item.value == getTenantId()) // 获得菜单列表,它在登录的时候,setUserInfoAction 方法中已经进行获取 let res: AppCustomRouteRecordRaw[] = [] if (wsCache.get(CACHE_KEY.ROLE_ROUTERS)) { res = wsCache.get(CACHE_KEY.ROLE_ROUTERS) as AppCustomRouteRecordRaw[] + res.forEach(item=>{ + if(item.name == '富维海拉供应商系统'&&tenant){ + item.name = item.name + tenant['text'] + } + }) } + console.log('菜单res',res) const routerMap: AppRouteRecordRaw[] = generateRoute(res) // 动态路由,404一定要放到最后面 this.addRouters = routerMap.concat([ diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index 5e9af683e..85e043a17 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -19,8 +19,8 @@ let planerList = await DemandforecastingMainApi.queryUserPlanerList() if(planerList.length>0){ planerList.unshift({ planerId:'ALL', - planerNickname:'全选', - planerUsername:'全选' + planerNickname:t('ts.全选'), + planerUsername:t('ts.全选'), }) } console.log('planerList',planerList)