|
@@ -2,6 +2,7 @@ import pinia from '~src/store/init'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
import { getButtons } from '~api/menu'
|
|
|
import projectApi from '~api/project'
|
|
|
+import router from '~src/router/index'
|
|
|
import { getStoreValue } from '~src/utils/storage'
|
|
|
import { ArrToOneObj, getArrValue, getObjVal, getObjValue, isNullES } from 'js-fast-way'
|
|
|
|
|
@@ -96,7 +97,8 @@ const setProjectStore = (project, contract) => {
|
|
|
const getProjectArr = async (error, data) => {
|
|
|
let projectList = getArrValue(data)
|
|
|
if (error || projectList.length <= 0) {
|
|
|
- window.$message?.error('没有相关项目权限')
|
|
|
+ window.$messageBox.alert('您账户下还没有任何项目,请先联系管理员给你配置相关项目', '登录失败')
|
|
|
+ router.push({ path: '/login-main' })
|
|
|
return []
|
|
|
}
|
|
|
//处理合同段的别名
|
|
@@ -113,7 +115,8 @@ const getProjectArr = async (error, data) => {
|
|
|
return contractList.length > 0
|
|
|
})
|
|
|
if (projectArr.length <= 0) {
|
|
|
- window.$message?.error('没有相关项目权限')
|
|
|
+ window.$messageBox.alert('您账户下还没有任何项目,请先联系管理员给你配置相关项目', '登录失败')
|
|
|
+ router.push({ path: '/login-main' })
|
|
|
return []
|
|
|
}
|
|
|
store.setProjectContract(projectArr)
|