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

修改任务执行的标题

parent fddd23bb
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</span> </span>
<div v-if="activeModel" class="login-module"> <div v-if="activeModel" class="login-module">
<span class="dex" style="cursor: pointer;" @click="goHome">DEX</span> <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>>></span>
<span>{{ routeName }}</span> --> <span>{{ routeName }}</span> -->
</div> </div>
...@@ -102,7 +102,8 @@ export default { ...@@ -102,7 +102,8 @@ export default {
return '待办任务' return '待办任务'
} else if (obj.id === 'myMessage') { } else if (obj.id === 'myMessage') {
return '我的消息' 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 return obj.path.title
} }
} }
...@@ -202,6 +203,16 @@ export default { ...@@ -202,6 +203,16 @@ export default {
// } // }
// this.moduleName = localStorage.getItem('moduleName') // 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() { goHome() {
this.$router.push(`/`) this.$router.push(`/`)
}, },
......
...@@ -97,7 +97,10 @@ const mutations = { ...@@ -97,7 +97,10 @@ const mutations = {
const actions = { const actions = {
activeModel({ commit, state }, model) { activeModel({ commit, state }, model) {
// if (!state.activeModel || model.appId !== state.activeModel.id || (model.appId === 'todoTask' && state.activeModel.id !== 'todoTask')) { // 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', { commit('SET_ACTIVE_MODEL', {
id: model.appId, id: model.appId,
path: { ...model.pageInfo } path: { ...model.pageInfo }
......
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
<script> <script>
// import Dialog from './dialog' // import Dialog from './dialog'
// import TimeToSee from '@/views/mes/programExecutionManagement/assemblyPerform/components/TimeToSee/index' // import TimeToSee from '@/views/mes/programExecutionManagement/assemblyPerform/components/TimeToSee/index'
import { mapGetters } from 'vuex'
import { post } from '@/utils/http' import { post } from '@/utils/http'
export default { export default {
name: 'TaskReceiveCard', name: 'TaskReceiveCard',
...@@ -185,7 +186,11 @@ export default { ...@@ -185,7 +186,11 @@ export default {
searchElement: [] searchElement: []
} }
}, },
computed: {}, computed: {
...mapGetters([
'activeModel'
])
},
watch: { watch: {
$route: { $route: {
handler(to, from) { handler(to, from) {
...@@ -228,10 +233,11 @@ export default { ...@@ -228,10 +233,11 @@ export default {
} }
}) })
this.$store.dispatch('menu/activeModel', { this.$store.dispatch('menu/activeModel', {
appId: 'myTaskReceive', appId: this.activeModel.id + 'Execute',
pageInfo: { pageInfo: {
title: this.$route.query.title, title: this.activeModel.path.title + '执行',
path: '/dee-mes/taskExecution' path: '/dee-mes/taskExecution',
backFlag: true
} }
}) })
this.$store.dispatch('app/closeSideBar', false) 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