diff --git a/back/src/views/modules/workBench/components/dept-chart-view.vue b/back/src/views/modules/workBench/components/dept-chart-view.vue index 400863a4..1714eb5f 100644 --- a/back/src/views/modules/workBench/components/dept-chart-view.vue +++ b/back/src/views/modules/workBench/components/dept-chart-view.vue @@ -98,7 +98,17 @@ export default { }, ], tooltip: { - triagger: 'item' + triagger: 'item', + formatter: (params) => { + let str = '' + if (params.name == '线') { + str = '' + } else { + str = `${params.name}: ${params.value}` + } + return str; + } }, "legend": { type: 'scroll', @@ -163,18 +173,19 @@ export default { }, data: this.dataListCopy, }, - { "type": "pie", "center": ["50%", "40%"], - "radius": ["35%", "36%"], + "radius": ["38%", "39%"], "label": { "show": false }, + hoverAnimation: false, + showTooltip: false, color: ['#d8dde8'], "data": [{ - "value": 78, - "name": "实例1", + "value": 0, + "name": "线", }] } ] diff --git a/back/src/views/modules/workBench/components/dept-todo-view.vue b/back/src/views/modules/workBench/components/dept-todo-view.vue index 21406fa1..083dd2c4 100644 --- a/back/src/views/modules/workBench/components/dept-todo-view.vue +++ b/back/src/views/modules/workBench/components/dept-todo-view.vue @@ -77,7 +77,8 @@ export default { .left-box { display: flex; justify-content: center; - width: 80px; + // width: 80px; + width: 100px; border-radius: 2px; height: 100%; } @@ -100,6 +101,7 @@ export default { color: #000; margin-top: 25px; margin-bottom: 18px; + text-align: center; } .num { diff --git a/back/src/views/modules/workBench/components/frequency-top5-view.vue b/back/src/views/modules/workBench/components/frequency-top5-view.vue index 381a4a5b..9df85d3e 100644 --- a/back/src/views/modules/workBench/components/frequency-top5-view.vue +++ b/back/src/views/modules/workBench/components/frequency-top5-view.vue @@ -5,23 +5,23 @@
{{ no2Obj.name || '--' }}
-
{{ no2Obj.count }}
+
{{ formatCount(no2Obj.count) }}
-
{{ no1Obj.name }}
-
{{ no1Obj.count }}
+
{{ no1Obj.name || '--' }}
+
{{ formatCount(no1Obj.count) }}
-
{{ no3Obj.name }}
-
{{ no3Obj.count }}
+
{{ no3Obj.name || '--' }}
+
{{ formatCount(no3Obj.count) }}
{{ i + 3 }}
-
{{ data.name }}
+
{{ data.name || '--' }}
-
{{ data.count }}
+
{{ formatCount(data.count) }}
暂无数据
@@ -84,14 +84,17 @@ export default { this[`no${k}Obj`].count = _arr[i].count } this.listInfo = [] - this.listInfo.push(_arr[3]) - this.listInfo.push(_arr[4]) + this.listInfo.push(_arr[3] || {}) + this.listInfo.push(_arr[4] || {}) }, err => { this.loading = false; this.$message.error(err); }); }, + formatCount(count) { + return count || count === 0 ? count : '--' + } }, components: { contentTitle } } @@ -188,7 +191,7 @@ export default { .num-text { font-size: 14px; color: #2b2b2b; - + } .no-data { diff --git a/back/src/views/modules/workBench/workBench.vue b/back/src/views/modules/workBench/workBench.vue index da4f3d82..96c7a140 100644 --- a/back/src/views/modules/workBench/workBench.vue +++ b/back/src/views/modules/workBench/workBench.vue @@ -105,7 +105,7 @@ export default { } console.log('res----待办-------->', res.data); this.toToData.list = res.data.data.records || [] - this.toToData.num = res.data.data.records.length || 0 + this.toToData.num = res.data.data.total || 0 }, err => { this.$message.error(err); this.loadingToDo = false; @@ -125,7 +125,7 @@ export default { } console.log('res----已办-------->', res.data); this.hasToDodoData.list = res.data.data.records || [] - this.hasToDodoData.num = res.data.data.records.length || 0 + this.hasToDodoData.num = res.data.data.total || 0 }, err => { this.$message.error(err) this.loadingHasToDo = false;