Commit 062bfad7 by zhangxw

首页图标数量显示问题修复

1 parent dac7edae
...@@ -414,10 +414,6 @@ Component({ ...@@ -414,10 +414,6 @@ Component({
if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) { if (menuList.some((item) => item.menuText == "战败下单" && mode == 0)) {
menuList = menuList.filter((item) => item.menuText != "战败下单"); menuList = menuList.filter((item) => item.menuText != "战败下单");
} }
const auditIndex = menuList.findIndex(e => e.menuText == '待审批')
if (auditIndex > -1) {
this.getAwaitAuditCount(userInfo, auditIndex)
}
// console.log('menuList', mode, menuList,); // console.log('menuList', mode, menuList,);
// 将menuList排序 // 将menuList排序
menuList.sort((a, b) => a.sortVal - b.sortVal) menuList.sort((a, b) => a.sortVal - b.sortVal)
...@@ -607,15 +603,6 @@ Component({ ...@@ -607,15 +603,6 @@ Component({
icon: "mentorship-manage" icon: "mentorship-manage"
}); });
} }
// 区域运营角色退款审批入口
if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '待审批')) {
menuList.push({
menuText: '待审批',
path: 'tabWorkOrder.refundOperationList',
icon: 'refund_review_icon',
tipsNum: 0
})
}
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
// 隐藏待办事项模块 // 隐藏待办事项模块
...@@ -623,6 +610,7 @@ Component({ ...@@ -623,6 +610,7 @@ Component({
this.getTotal(this.data.dataActive); this.getTotal(this.data.dataActive);
let eventArr = [this.getYqStoreConfig(), this.getInspectionBadgeCode(), this.getBusiness(), this.getStoreList(), this.extractCheck()] let eventArr = [this.getYqStoreConfig(), this.getInspectionBadgeCode(), this.getBusiness(), this.getStoreList(), this.extractCheck()]
if (isStaff) eventArr.push(this.getStaffTargetTask(), this.getIsMentor()) if (isStaff) eventArr.push(this.getStaffTargetTask(), this.getIsMentor())
if (userInfo.loginRole == 3) eventArr.push(this.getAwaitAuditCount(userInfo))
Promise.all(eventArr).then(() => { Promise.all(eventArr).then(() => {
this.menuListRest(); // 解决融合和非融合互相切换导致战败按钮问题 this.menuListRest(); // 解决融合和非融合互相切换导致战败按钮问题
}) })
...@@ -631,7 +619,18 @@ Component({ ...@@ -631,7 +619,18 @@ Component({
// 非区域督导和超管角色 // 非区域督导和超管角色
if (!userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.loginRole != 6) this.getMerchantCarBrandList(); if (!userInfo?.isSuper && userInfo?.loginRole != 3 && userInfo?.loginRole != 6) this.getMerchantCarBrandList();
}, },
getAwaitAuditCount(userInfo, index) { getAwaitAuditCount(userInfo) {
let { menuList } = this.data
// 区域运营角色退款审批入口
if (userInfo?.loginRole == 3 && menuList.every(item => item.menuText != '待审批')) {
menuList.push({
menuText: '待审批',
path: 'tabWorkOrder.refundOperationList',
icon: 'refund_review_icon',
tipsNum: 0
})
}
let index = menuList.findIndex(e => e.menuText == '待审批')
getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => { getWaitAuditCountAPI({sceneType: userInfo?.sceneType}).then(res => {
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!