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