update taskName改为从接口获取
This commit is contained in:
+6
-1
@@ -261,6 +261,9 @@ const queryStandardCompliance = (params) => getAction('/process/projectStandard/
|
|||||||
// 在线编辑-通过在线编辑的文件id获取文件信息
|
// 在线编辑-通过在线编辑的文件id获取文件信息
|
||||||
const queryFileInfoByEditId = (params) => getAction('/onlyOffice/queryById', params)
|
const queryFileInfoByEditId = (params) => getAction('/onlyOffice/queryById', params)
|
||||||
|
|
||||||
|
// 获取taskName
|
||||||
|
const queryTaskNameByTaskId = (params) => getAction('/workCenter/getByTaskId', params)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
queryPermissionsByUser,
|
queryPermissionsByUser,
|
||||||
getFormDictTreeList,
|
getFormDictTreeList,
|
||||||
@@ -385,5 +388,7 @@ export {
|
|||||||
rejectStandardCompliance,
|
rejectStandardCompliance,
|
||||||
queryStandardCompliance,
|
queryStandardCompliance,
|
||||||
|
|
||||||
queryFileInfoByEditId
|
queryFileInfoByEditId,
|
||||||
|
|
||||||
|
queryTaskNameByTaskId
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-3
@@ -3,7 +3,7 @@ import router from './router'
|
|||||||
import store from './store'
|
import store from './store'
|
||||||
import { ACCESS_TOKEN, UI_CACHE_DB_DICT_DATA, USER_INFO, USER_NAME } from '@/store/mutation-types'
|
import { ACCESS_TOKEN, UI_CACHE_DB_DICT_DATA, USER_INFO, USER_NAME } from '@/store/mutation-types'
|
||||||
import { welcome } from '@/utils/util'
|
import { welcome } from '@/utils/util'
|
||||||
import { getSSOUserInfo } from './api/api'
|
import { getSSOUserInfo, queryTaskNameByTaskId } from './api/api'
|
||||||
|
|
||||||
const whiteList = ['/user/login'] // no redirect whitelist
|
const whiteList = ['/user/login'] // no redirect whitelist
|
||||||
|
|
||||||
@@ -26,10 +26,20 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
if (to.path === '/user/login') {
|
if (to.path === '/user/login') {
|
||||||
next('/')
|
next('/')
|
||||||
} else {
|
} else {
|
||||||
if (to.query.taskName) {
|
if (to.query.taskId) {
|
||||||
|
queryTaskNameByTaskId({ taskId: to.query.taskId }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
to.meta.title = res.result.taskName
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
next()
|
||||||
|
})
|
||||||
|
} else if (to.query.taskName) {
|
||||||
to.meta.title = to.query.taskName
|
to.meta.title = to.query.taskName
|
||||||
|
next()
|
||||||
|
} else {
|
||||||
|
next()
|
||||||
}
|
}
|
||||||
next()
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user