Commit a9ccaae1 authored by jingnan's avatar jingnan 👀

首页修改

parent 40047988
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
v-show="!['系统管理','应用中心','安全中心','运维中心'].includes(activeModel.name)" v-show="!['系统管理','应用中心','安全中心','运维中心'].includes(activeModel.name)"
ref="homeLink" ref="homeLink"
class="home tags-view-item" class="home tags-view-item"
:to="{ path: '/dee-task-center/home?title=任务中心&showMenu=false'}" :to="{ path: '/'}"
tag="span" tag="span"
> >
<i class="el-icon-s-home" /> <i class="el-icon-s-home" />
...@@ -217,7 +217,8 @@ export default { ...@@ -217,7 +217,8 @@ export default {
if (!this.$utils._get(this.showViews, this.activeModel.id)) { if (!this.$utils._get(this.showViews, this.activeModel.id)) {
this.visitedViews = [] this.visitedViews = []
} else { } else {
this.$set(this, 'visitedViews', this.$store.state.tagsView.visitedViews[this.activeModel.id].filter(x => (x.path !== '/dee-task-center/workflow/task-center/home'))) // this.$set(this, 'visitedViews', this.$store.state.tagsView.visitedViews[this.activeModel.id].filter(x => (x.path !== '/dee-task-center/workflow/task-center/home')))
this.$set(this, 'visitedViews', this.$store.state.tagsView.visitedViews[this.activeModel.id].filter(x => (x.path !== '/home')))
} }
}, 0) }, 0)
}, },
...@@ -264,11 +265,14 @@ export default { ...@@ -264,11 +265,14 @@ export default {
if (!['系统管理', '应用中心', '安全中心', '运维中心'].includes(this.activeModel.name)) { if (!['系统管理', '应用中心', '安全中心', '运维中心'].includes(this.activeModel.name)) {
this.$store.dispatch('tagsView/delAllVisitedViews') this.$store.dispatch('tagsView/delAllVisitedViews')
this.$store.dispatch('tagsView/delAllCachedViews') this.$store.dispatch('tagsView/delAllCachedViews')
// this.$router.push({
// path: '/dee-task-center/workflow/task-center/home',
// query: {
// title: '任务中心'
// }
// })
this.$router.push({ this.$router.push({
path: '/dee-task-center/workflow/task-center/home', path: '/home'
query: {
title: '任务中心'
}
}) })
} else { } else {
// const view = this.showViews[this.activeModel.id].find(r => r.path === this.$route.path) // const view = this.showViews[this.activeModel.id].find(r => r.path === this.$route.path)
...@@ -442,7 +446,8 @@ export default { ...@@ -442,7 +446,8 @@ export default {
if (this.visitedViews.length) { if (this.visitedViews.length) {
this.$router.push(this.visitedViews[0].fullPath) this.$router.push(this.visitedViews[0].fullPath)
} else { } else {
this.$router.push('/dee-task-center/workflow/task-center/home') // this.$router.push('/dee-task-center/workflow/task-center/home')
this.$router.push('/home')
} }
} else { } else {
if (this.visitedViews.length > 1) { if (this.visitedViews.length > 1) {
......
...@@ -137,16 +137,17 @@ export const constantRoutes = [ ...@@ -137,16 +137,17 @@ export const constantRoutes = [
path: '/', path: '/',
name: 'navigation', name: 'navigation',
meta: { disnav: true }, meta: { disnav: true },
component: () => import('@/views/navigation/index'), // component: () => import('@/views/navigation/index'),
redirect: '/home',
hidden: true hidden: true
}, },
{ {
path: '/home', path: '/home',
name: 'home', name: 'navigation',
meta: { title: '任务中心', disnav: true }, meta: { disnav: false, isHome: true },
// component: () => import('../../../dee-task-center/src/views/home/index.vue'), component: () => import('../../../dee-task-center/src/views/home/index.vue'),
// component: () => import('@/layout/home.vue'), // component: () => import('@/layout/home.vue'),
redirect: '/dee-task-center/home?title=任务中心&showMenu=false', // redirect: '/dee-task-center/home?showMenu=false',
hidden: true hidden: true
}, },
// { // {
......
...@@ -97,7 +97,7 @@ const mutations = { ...@@ -97,7 +97,7 @@ 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' || if (model.appId === 'todoTask' || model.appId === 'homeCenter' || model.appId === 'myMessage' ||
model.appId === 'myTaskReceive' || model.appId === 'myCheckTaskReceive' || model.appId === 'myTaskReceive' || model.appId === 'myCheckTaskReceive' ||
model.appId === 'myAirTaskReceive') { // 待办任务页特殊处理 model.appId === 'myAirTaskReceive') { // 待办任务页特殊处理
commit('SET_ACTIVE_MODEL', { commit('SET_ACTIVE_MODEL', {
......
...@@ -199,6 +199,14 @@ export default { ...@@ -199,6 +199,14 @@ export default {
this.$store.dispatch('permission/clearPermissionList') this.$store.dispatch('permission/clearPermissionList')
// this.$router.push({ path: this.redirect || '/' }) // this.$router.push({ path: this.redirect || '/' })
this.$router.push({ path: '/' }) this.$router.push({ path: '/' })
this.$store.dispatch('menu/activeModel', {
appId: 'homeCenter',
pageInfo: {
path: '/home'
}
})
this.$store.dispatch('app/closeSideBar', false)
// this.$store.dispatch('app/toggleSideBar')
} }
}) })
}).catch(e => { }).catch(e => {
......
...@@ -67,7 +67,7 @@ import { showIcon } from '@/utils/util' ...@@ -67,7 +67,7 @@ import { showIcon } from '@/utils/util'
import { getTemps } from '@/api/workflow/userSettings.js' import { getTemps } from '@/api/workflow/userSettings.js'
// import { getFinishedTaskHome } from '@/api/workflow/taskCenter.js' // import { getFinishedTaskHome } from '@/api/workflow/taskCenter.js'
import { getAllApplication } from '@/api/workflow/config' import { getAllApplication } from '@/api/workflow/config'
import { getTaskCount } from '@/api/workspace.js' // import { getTaskCount } from '@/api/workspace.js'
import _get from 'lodash.get' import _get from 'lodash.get'
import { post, get } from '@/utils/http' import { post, get } from '@/utils/http'
...@@ -353,7 +353,7 @@ export default { ...@@ -353,7 +353,7 @@ export default {
const params = { const params = {
type: this.quickAccessList[index].type type: this.quickAccessList[index].type
} }
getTaskCount(params).then(res => { get(`/indexTask/task/fitOut`, params).then(res => {
this.$set(this.quickAccessList[index], 'taskCount', res.items.count) this.$set(this.quickAccessList[index], 'taskCount', res.items.count)
}) })
}, },
...@@ -368,6 +368,7 @@ export default { ...@@ -368,6 +368,7 @@ export default {
path: '/dee-task-center/workflow/task-center/home', path: '/dee-task-center/workflow/task-center/home',
query: { query: {
DAO: '单个签审', DAO: '单个签审',
title: '任务中心',
processDefKey: item.procDefKey, processDefKey: item.procDefKey,
taskDefinitionKey: item.taskKey, taskDefinitionKey: item.taskKey,
type: this.type type: this.type
......
...@@ -23,9 +23,10 @@ ...@@ -23,9 +23,10 @@
</div> </div>
</template> </template>
<script> <script>
import { getMyTodoList } from '@/api/workflow/taskCenter' // import { getMyTodoList } from '@/api/workflow/taskCenter'
import { get } from '@/utils/http'
export default { export default {
name: 'ModuleTaskList', name: 'ModuleTaskListNew',
data() { data() {
return { return {
loading: false, loading: false,
...@@ -41,7 +42,7 @@ export default { ...@@ -41,7 +42,7 @@ export default {
methods: { methods: {
loadData(hasFlag) { loadData(hasFlag) {
this.loading = true this.loading = true
getMyTodoList().then(res => { get('indexTask/task/todo').then(res => {
const that = this const that = this
that.taskList = res.items || [] that.taskList = res.items || []
that.loading = false that.loading = false
...@@ -57,6 +58,7 @@ export default { ...@@ -57,6 +58,7 @@ export default {
// path: '/dee-task-center/taskList?title=批量签审', // path: '/dee-task-center/taskList?title=批量签审',
path: '/dee-task-center/workflow/task-center/home', path: '/dee-task-center/workflow/task-center/home',
query: { query: {
title: '任务中心',
DAO: '批量签审', DAO: '批量签审',
processDefKey: item.procDefKey, processDefKey: item.procDefKey,
taskDefinitionKey: item.taskKey taskDefinitionKey: item.taskKey
......
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