fix:营养分析复购商品bug
This commit is contained in:
1 parent
5d5e1606a4
commit
f722106984
2 files changed
+22
-10
No files matched your search
@@ -25,14 +25,14 @@ onMounted(() => {
|
|||||||
chartInstance.setOption(options);
|
chartInstance.setOption(options);
|
||||||
window.addEventListener("resize", resizeHandler);
|
window.addEventListener("resize", resizeHandler);
|
||||||
chartInstance.on("click", (params) => {
|
chartInstance.on("click", (params) => {
|
||||||
if (!params.name) return;
|
// if (!params.name) return;
|
||||||
const _params = {
|
// const _params = {
|
||||||
swingTimeList: [dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), dayjs().endOf("day").format("YYYY-MM-DD HH:mm:ss")],
|
// swingTimeList: [dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"), dayjs().endOf("day").format("YYYY-MM-DD HH:mm:ss")],
|
||||||
personName: params.name,
|
// personName: params.name,
|
||||||
isMainFloor: "1",
|
// isMainFloor: "1",
|
||||||
};
|
// };
|
||||||
console.log(`|点击跳转|-|今日出入机关楼次数排行|-|${params.name}|params:|{${JSON.stringify(_params)}}|`);
|
// console.log(`|点击跳转|-|今日出入机关楼次数排行|-|${params.name}|params:|{${JSON.stringify(_params)}}|`);
|
||||||
jumpAdminPath("door_record", _params);
|
// jumpAdminPath("door_record", _params);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+14
-2
@@ -15,7 +15,7 @@
|
|||||||
</AsideBlock>
|
</AsideBlock>
|
||||||
<AsideBlock>
|
<AsideBlock>
|
||||||
<template #header>
|
<template #header>
|
||||||
<span>今日菜品喜好排行(top5)</span>
|
<span>今日菜品复购排行(top5)</span>
|
||||||
</template>
|
</template>
|
||||||
<PersonThroughRank :data="timerObj.repurchase.data" />
|
<PersonThroughRank :data="timerObj.repurchase.data" />
|
||||||
</AsideBlock>
|
</AsideBlock>
|
||||||
@@ -162,7 +162,19 @@ const getRepurchase = () => {
|
|||||||
if (code != 0) throw new Error("code!=0");
|
if (code != 0) throw new Error("code!=0");
|
||||||
console.log("复购排行榜:", data);
|
console.log("复购排行榜:", data);
|
||||||
if (!data) return;
|
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) {
|
} catch (error) {
|
||||||
console.error("|复购排行榜|意外的错误:", error);
|
console.error("|复购排行榜|意外的错误:", error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user