Commit 70d70111 authored by “lixuyan”'s avatar “lixuyan”

修改任务执行的标题

parent fddd23bb
......@@ -6,7 +6,7 @@
</span>
<div v-if="activeModel" class="login-module">
<span class="dex" style="cursor: pointer;" @click="goHome">DEX</span>
<span class="moudle-name">{{ activeModel | formatMoudleName }}</span>
<span class="moudle-name"><i v-if="activeModel.path.backFlag" class="el-icon-back" @click="goback(activeModel)" />{{ activeModel | formatMoudleName }}</span>
<!-- <span>>></span>
<span>{{ routeName }}</span> -->
</div>
......@@ -102,7 +102,8 @@ export default {
return '待办任务'
} else if (obj.id === 'myMessage') {
return '我的消息'
} else if (obj.id === 'myTaskReceive' || obj.id === 'myCheckTaskReceive' || obj.id === 'myAirTaskReceive') {
} else if (obj.id === 'myTaskReceive' || obj.id === 'myCheckTaskReceive' || obj.id === 'myAirTaskReceive' ||
obj.id === 'myTaskReceiveExecute' || obj.id === 'myCheckTaskReceiveExecute' || obj.id === 'myAirTaskReceiveExecute') {
return obj.path.title
}
}
......@@ -202,6 +203,16 @@ export default {
// }
// this.moduleName = localStorage.getItem('moduleName')
// },
goback() {
this.$router.go(-1)
this.$store.dispatch('menu/activeModel', {
appId: this.activeModel.id,
pageInfo: {
title: this.$route.query.title.slice(0, -2),
path: '/dee-mes/taskExecution'
}
})
},
goHome() {
this.$router.push(`/`)
},
......
......@@ -97,7 +97,10 @@ const mutations = {
const actions = {
activeModel({ commit, state }, model) {
// if (!state.activeModel || model.appId !== state.activeModel.id || (model.appId === 'todoTask' && state.activeModel.id !== 'todoTask')) {
if (model.appId === 'todoTask' || model.appId === 'myMessage' || model.appId === 'myTaskReceive' || model.appId === 'myCheckTaskReceive' || model.appId === 'myAirTaskReceive') { // 待办任务页特殊处理
if (model.appId === 'todoTask' || model.appId === 'myMessage' ||
model.appId === 'myTaskReceive' || model.appId === 'myCheckTaskReceive' ||
model.appId === 'myAirTaskReceive' || model.appId === 'myTaskReceiveExecute' ||
model.appId === 'myCheckTaskReceiveExecute' || model.appId === 'myAirTaskReceiveExecute') { // 待办任务页特殊处理
commit('SET_ACTIVE_MODEL', {
id: model.appId,
path: { ...model.pageInfo }
......
......@@ -114,6 +114,7 @@
<script>
// import Dialog from './dialog'
// import TimeToSee from '@/views/mes/programExecutionManagement/assemblyPerform/components/TimeToSee/index'
import { mapGetters } from 'vuex'
import { post } from '@/utils/http'
export default {
name: 'TaskReceiveCard',
......@@ -185,7 +186,11 @@ export default {
searchElement: []
}
},
computed: {},
computed: {
...mapGetters([
'activeModel'
])
},
watch: {
$route: {
handler(to, from) {
......@@ -228,10 +233,11 @@ export default {
}
})
this.$store.dispatch('menu/activeModel', {
appId: 'myTaskReceive',
appId: this.activeModel.id + 'Execute',
pageInfo: {
title: this.$route.query.title,
path: '/dee-mes/taskExecution'
title: this.activeModel.path.title + '执行',
path: '/dee-mes/taskExecution',
backFlag: true
}
})
this.$store.dispatch('app/closeSideBar', false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment