From 233a467167e2b363098cc7fa63e7f26d1d15507b Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期日, 27 四月 2025 16:23:28 +0800 Subject: [PATCH] 线索任务 --- pages/cluetask/home/statistic-proxy.js | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 54 insertions(+), 5 deletions(-) diff --git a/pages/cluetask/home/statistic-proxy.js b/pages/cluetask/home/statistic-proxy.js index 189bdb3..65ed899 100644 --- a/pages/cluetask/home/statistic-proxy.js +++ b/pages/cluetask/home/statistic-proxy.js @@ -1,4 +1,6 @@ import { getClueStatistic } from '../../../model/clue/clueTask'; +import { fetchClueTaskSummary } from '../../../services/clue/fetchClue'; + /** * 绾跨储浠诲姟缁熻鐩稿叧淇℃伅鑾峰彇閫昏緫 @@ -8,13 +10,60 @@ clueCountRes: [], }, methods: { + fetchClueTaskSummary(page) { + const options = this._getOptions(); + fetchClueTaskSummary(options).then(res => { + const { + totalCount, + internalTaskCount, + externalTaskCount, + finishedCount, + unfinishedCount, + internalFinishedCount, + internalUnFinishedCount, + externalFinishedCount, + externalUnFinishedCount, + } = res.data; + const p1 = Math.round((finishedCount / totalCount) * 1000) / 10; + const p2 = Math.round((unfinishedCount / totalCount) * 1000) / 10; + this.setData({ + clueCountRes: [ + { + name: '鎬昏', + value: totalCount, + diff: '', + clickable: false, + }, + { + name: '宸插畬鎴�', + value: finishedCount, + diff: totalCount == 0 ? '0%' : `${p1}%`, + clickable: false, + }, + { + name: '寰呭畬鎴�', + value: unfinishedCount, + diff: totalCount == 0 ? '0%' : `${p2}%`, + clickable: false, + }, + // { + // name: '寰呭畬鎴�', + // value: unfinishedCount, + // diff: totalCount == 0 ? '0%' : `${p2}%`, + // clickable: false, + // }, + ], + }); + }); + }, + /** * 璁$畻绾跨储宸℃煡瀹屾垚鎯呭喌 */ - calClueCount() { - this.setData({ - clueCountRes: getClueStatistic(this.data.clueTaskList), - }); - }, + // calClueCount() { + // this.setData({ + // clueCountRes: getClueStatistic(this.data.clueTaskList), + // }); + // }, }, }); -- Gitblit v1.9.3