From f722106984f3dc74e4012f2bc537aca774d21b4a Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Mon, 27 Oct 2025 15:21:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=90=A5=E5=85=BB=E5=88=86=E6=9E=90?= =?UTF-8?q?=E5=A4=8D=E8=B4=AD=E5=95=86=E5=93=81bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/person-through-rank.vue | 16 ++++++++-------- src/views/nutrition.vue | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/components/person-through-rank.vue b/src/components/person-through-rank.vue index b5b1896..a90a7ef 100644 --- a/src/components/person-through-rank.vue +++ b/src/components/person-through-rank.vue @@ -25,14 +25,14 @@ onMounted(() => { chartInstance.setOption(options); window.addEventListener("resize", resizeHandler); chartInstance.on("click", (params) => { - if (!params.name) return; - const _params = { - swingTimeList: [dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), dayjs().endOf("day").format("YYYY-MM-DD HH:mm:ss")], - personName: params.name, - isMainFloor: "1", - }; - console.log(`|点击跳转|-|今日出入机关楼次数排行|-|${params.name}|params:|{${JSON.stringify(_params)}}|`); - jumpAdminPath("door_record", _params); + // if (!params.name) return; + // const _params = { + // swingTimeList: [dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), dayjs().endOf("day").format("YYYY-MM-DD HH:mm:ss")], + // personName: params.name, + // isMainFloor: "1", + // }; + // console.log(`|点击跳转|-|今日出入机关楼次数排行|-|${params.name}|params:|{${JSON.stringify(_params)}}|`); + // jumpAdminPath("door_record", _params); }); }); diff --git a/src/views/nutrition.vue b/src/views/nutrition.vue index d2ca1b9..394f3a0 100644 --- a/src/views/nutrition.vue +++ b/src/views/nutrition.vue @@ -15,7 +15,7 @@ @@ -162,7 +162,19 @@ const getRepurchase = () => { if (code != 0) throw new Error("code!=0"); console.log("复购排行榜:", data); if (!data) return; - timerObj.repurchase.data = data + timerObj.repurchase.data = { + labels: data + ?.map((v) => { + return v.productName; + }) + .reverse() ?? [], + values: data + ?.map((v) => { + return v.buyProductCount; + }) + .reverse() ?? [], + } + } catch (error) { console.error("|复购排行榜|意外的错误:", error); }