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); }