Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { getProcessNodeList, queryTaskNameByTaskId } from '../api/workCenter'
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO } from '../store/mutation-types'
|
||||
import { findFirstRoute } from '@/utils/util'
|
||||
|
||||
export const WorkCenterMixin = {
|
||||
data () {
|
||||
@@ -89,7 +90,12 @@ export const WorkCenterMixin = {
|
||||
let timer = setTimeout(() => {
|
||||
clearTimeout(timer)
|
||||
timer = null
|
||||
this.$router.go(-1)
|
||||
// 有上个页面就返回,否则就返回第一个页面
|
||||
if (history.length > 1) {
|
||||
this.$router.go(-1)
|
||||
} else {
|
||||
this.$router.replace({ path: findFirstRoute(this.$store.state.user.permissionList) })
|
||||
}
|
||||
}, 700)
|
||||
},
|
||||
switchChange (value) {
|
||||
@@ -104,7 +110,7 @@ export const WorkCenterMixin = {
|
||||
*/
|
||||
beforeRouteEnter (to, from, next) {
|
||||
if (to.query.taskId) {
|
||||
queryTaskNameByTaskId({taskId: to.query.taskId}).then(res => {
|
||||
queryTaskNameByTaskId({ taskId: to.query.taskId }).then(res => {
|
||||
if (res.success) {
|
||||
to.query.taskName = res.result.taskName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user