Commit 2ec1043c by 张立顺

feat 督导日报

1 parent 7666c796
...@@ -168,7 +168,7 @@ Component({ ...@@ -168,7 +168,7 @@ Component({
menuText: "培训资料", menuText: "培训资料",
icon: "peixun_icon", icon: "peixun_icon",
path: "packageEquity.trainingMaterials", path: "packageEquity.trainingMaterials",
}, ], },],
loginRoleLabel: { loginRoleLabel: {
1: "超管", 1: "超管",
2: "商户管理员", 2: "商户管理员",
...@@ -388,7 +388,7 @@ Component({ ...@@ -388,7 +388,7 @@ 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 != "战败下单");
} }
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)
this.setData({ this.setData({
...@@ -539,6 +539,15 @@ Component({ ...@@ -539,6 +539,15 @@ Component({
let index = menuList?.findIndex((val) => val.menuText == "交车目标"); let index = menuList?.findIndex((val) => val.menuText == "交车目标");
index > -1 && menuList.splice(index, 1); index > -1 && menuList.splice(index, 1);
} }
// userInfo?.loginRole == 3 && 督导
if (menuList.every((item) => item.name != '督导日报')) {
menuList.push({
menuText: "督导日报",
path: "pages.supervisorDaily",
icon: "supervisorDaily",
})
}
this.checkIsPadOrNot(); this.checkIsPadOrNot();
this.getData(); this.getData();
// 隐藏待办事项模块 // 隐藏待办事项模块
...@@ -820,7 +829,7 @@ Component({ ...@@ -820,7 +829,7 @@ Component({
}); });
} }
}) })
.catch((err) => {}); .catch((err) => { });
}, },
getStaffTargetTask() { getStaffTargetTask() {
return new Promise(resolve => { return new Promise(resolve => {
...@@ -871,7 +880,7 @@ Component({ ...@@ -871,7 +880,7 @@ Component({
.setTaskDialog({ .setTaskDialog({
id: data[0]?.id, id: data[0]?.id,
}) })
.then(() => {}); .then(() => { });
} }
} else { } else {
wx.$util.showToast(message); wx.$util.showToast(message);
...@@ -1327,10 +1336,10 @@ Component({ ...@@ -1327,10 +1336,10 @@ Component({
wx.$router.go('packageEquity.receptionRecords') wx.$router.go('packageEquity.receptionRecords')
wx.$track.setTrackData(0, 'see_more') wx.$track.setTrackData(0, 'see_more')
}, },
onHide(){ onHide() {
this.onPageHide() this.onPageHide()
}, },
onUnload(){ onUnload() {
this.onPageHide() this.onPageHide()
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!