|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="robotRanking flex-col">
|
|
|
+ <div class="robotRanking flex-col" v-if="showRobotRankingDiv">
|
|
|
<div class="box1 flex-col">
|
|
|
<s-header :name="$t('robotRanking.machineSalesRanking')" :noback="true" :isFixed="false"></s-header>
|
|
|
<div class="box3 flex-col">
|
|
@@ -726,6 +726,12 @@ export default {
|
|
|
});
|
|
|
};
|
|
|
const user = getLoginUser();
|
|
|
+ // 默认能看到机器排行
|
|
|
+ const showRobotRankingDiv = ref(true);
|
|
|
+ console.log("user.menuCodeList>>>", user.menuCodeList);
|
|
|
+ console.log("user.type>>>", user.type);
|
|
|
+ const isM11Included = user.menuCodeList.some((item) => item === "M11");
|
|
|
+
|
|
|
// 日、周、月、年的图表
|
|
|
const dayChartBox = ref();
|
|
|
const weekChartBox = ref();
|
|
@@ -745,6 +751,10 @@ export default {
|
|
|
return item === "M4";
|
|
|
})
|
|
|
|
|
|
+ if (user.type > 2 && !isM11Included) {
|
|
|
+ showRobotRankingDiv.value = false;
|
|
|
+ }
|
|
|
+
|
|
|
// 如果是type为admin或者商家或者是有订单数据权限M4的子商家才可以查看
|
|
|
if (user.type === 0 || user.type === 2 || isOrderData) {
|
|
|
init();
|
|
@@ -873,6 +883,8 @@ export default {
|
|
|
maTypeDefaIdx,
|
|
|
chgTypeDefaIdx,
|
|
|
isAdmin,
|
|
|
+
|
|
|
+ showRobotRankingDiv,
|
|
|
};
|
|
|
},
|
|
|
components: { sHeader, kTabs, kDialog, kNoData },
|