Browse Source

中英文

master_hella_20240701
wangyufei 5 months ago
parent
commit
e75fe741fd
  1. 7
      src/locales/en-US.ts
  2. 7
      src/locales/zh-CN.ts
  3. 9
      src/store/modules/permission.ts
  4. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts

7
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',
},

7
src/locales/zh-CN.ts

@ -1147,7 +1147,12 @@ export default {
:'总数量超出计划数量',
:'导出二维表',
:'要货计划明细',
:'要货计划二维表'
:'要货计划二维表',
'要货预测-计划员':'要货预测-计划员',
'要货预测-供应商':'要货预测-供应商',
:'全选',
:'计划员',
},
}

9
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<unknown> {
return new Promise<void>(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([

4
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)

Loading…
Cancel
Save