Commit 13c32485 by wangren

任务统计点击跳转功能实现

parent 5cbe9835
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<CellWrapper title="任务统计" :cellContentHeight="cellContentHeight"> <CellWrapper title="任务统计" :cellContentHeight="cellContentHeight">
<template v-slot:header> <template v-slot:header>
<span class="el-icon-refresh" title="刷新"></span> <span class="el-icon-refresh" title="刷新"></span>
<span class="el-icon-more" title="操作"></span> <!-- <span class="el-icon-more" title="操作"></span> -->
</template> </template>
<div class="statistics-container"> <div class="statistics-container">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
:key="idx" :key="idx"
:style="{ width: item.name === '来报待处理' ? '20%' : 'unset' }" :style="{ width: item.name === '来报待处理' ? '20%' : 'unset' }"
> >
<div class="stat-name">{{ item.name }}</div> <div class="stat-name" @click="goToTaskPage(item.name)">{{ item.name }}</div>
<div class="stat-count">{{ item.count }}</div> <div class="stat-count">{{ item.count }}</div>
</div> </div>
</div> </div>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<div class="task-stat-display mime"> <div class="task-stat-display mime">
<div class="display-wrapper"> <div class="display-wrapper">
<div class="stat-item" v-for="(item, idx) in mime" :key="idx"> <div class="stat-item" v-for="(item, idx) in mime" :key="idx">
<div class="stat-name">{{ item.name }}</div> <div class="stat-name" @click="goToTaskPage(item.name)">{{ item.name }}</div>
<div class="stat-count">{{ item.count }}</div> <div class="stat-count">{{ item.count }}</div>
</div> </div>
</div> </div>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<div class="task-stat-display pty"> <div class="task-stat-display pty">
<div class="display-wrapper"> <div class="display-wrapper">
<div class="stat-item" v-for="(item, idx) in pty" :key="idx"> <div class="stat-item" v-for="(item, idx) in pty" :key="idx">
<div class="stat-name">{{ item.name }}</div> <div class="stat-name" @click="goToTaskPage(item.name)">{{ item.name }}</div>
<div class="stat-count">{{ item.count }}</div> <div class="stat-count">{{ item.count }}</div>
</div> </div>
</div> </div>
...@@ -76,7 +76,20 @@ export default { ...@@ -76,7 +76,20 @@ export default {
// { name: "待打印", count: "4564" }, // { name: "待打印", count: "4564" },
// { name: "已完结", count: "3212" }, // { name: "已完结", count: "3212" },
], ],
pty: [], pty: [
],
mapping: {
'待经办': 'sptsel',
'来报待处理': 'sptsel',
'待复核': 'trnrel',
'待授权': 'trnrel',
'待匹配': 'sptsel',
'待打印': 'trnfnd',
'待修改': 'sptsel',
'待回复': '',
'已完结': '',
}
}; };
}, },
created() { created() {
...@@ -90,6 +103,17 @@ export default { ...@@ -90,6 +103,17 @@ export default {
this.pty = res; this.pty = res;
}) })
}, },
//点击对应的文字 跳转
methods: {
goToTaskPage(name) {
if(!this.mapping[name]) {
return;
}
this.$router.push('/taskList').then(() => {
this.$store.commit('setTaskListTabVal', this.mapping[name])
})
}
}
}; };
</script> </script>
...@@ -159,6 +183,7 @@ export default { ...@@ -159,6 +183,7 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-right: 1px solid; border-right: 1px solid;
cursor: pointer;
} }
.task-stat-display.total .display-wrapper .stat-item:last-child .stat-count { .task-stat-display.total .display-wrapper .stat-item:last-child .stat-count {
border-right: 0; border-right: 0;
......
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