2023-03-17 04:55:02 +08:00
|
|
|
const switchTab = "switchTab";
|
|
|
|
const navigateTo = "navigateTo";
|
2023-03-18 17:52:56 +08:00
|
|
|
const redirectTo = "redirectTo";
|
2023-03-17 04:55:02 +08:00
|
|
|
let id = 0;
|
|
|
|
|
|
|
|
let menuItemDict = {
|
|
|
|
'login': {
|
|
|
|
for: ['unknown'],
|
|
|
|
title: "登录",
|
|
|
|
image: "code.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: '/pages/index/login',
|
|
|
|
},
|
|
|
|
'code': {
|
|
|
|
for: ['visitor', 'user'],
|
|
|
|
title: "进出码",
|
|
|
|
image: "code.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: '/pages/residents/code'
|
|
|
|
},
|
|
|
|
'report': {
|
|
|
|
for: ['user'],
|
|
|
|
title: "体温上报",
|
|
|
|
image: "report.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: '/pages/residents/report'
|
|
|
|
},
|
2023-03-18 17:52:56 +08:00
|
|
|
'shop': {
|
|
|
|
for: ['user'],
|
|
|
|
title: "生活物资",
|
|
|
|
image: "shopping.svg",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: '/pages/shop/shop'
|
|
|
|
},
|
2023-03-17 04:55:02 +08:00
|
|
|
'apply-record': {
|
2023-03-18 17:52:56 +08:00
|
|
|
for: ['visitor'],
|
2023-03-17 04:55:02 +08:00
|
|
|
title: "申请记录",
|
|
|
|
image: "apply.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'apply-approval': {
|
|
|
|
for: ['admin'],
|
|
|
|
title: "申请审批",
|
|
|
|
image: "apply.png", // ApplyReplay
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'visitor-apply': {
|
|
|
|
for: ['admin'],
|
|
|
|
title: "访客审批",
|
|
|
|
image: "visitor.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'abnormal': {
|
|
|
|
for: ['admin'],
|
|
|
|
title: "异常人员",
|
|
|
|
image: "danger.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'feedback-submit': {
|
2023-03-18 17:52:56 +08:00
|
|
|
for: ['visitor'],
|
2023-03-17 04:55:02 +08:00
|
|
|
title: "提交反馈",
|
|
|
|
image: "fk.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'feedback-list': {
|
2023-03-18 17:52:56 +08:00
|
|
|
for: ['visitor'],
|
2023-03-17 04:55:02 +08:00
|
|
|
title: "反馈查看",
|
|
|
|
image: "feedback.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'feedback-reply': {
|
|
|
|
for: ['admin'],
|
|
|
|
title: "反馈回复",
|
|
|
|
image: "feedback.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
2023-03-18 17:52:56 +08:00
|
|
|
'person': {
|
|
|
|
for: ['admin', 'user'],
|
|
|
|
title: "个人中心",
|
|
|
|
image: "person.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: '/pages/person/person'
|
|
|
|
},
|
2023-03-17 04:55:02 +08:00
|
|
|
'update-password': {
|
|
|
|
for: ['user', 'admin'],
|
|
|
|
title: "密码修改",
|
|
|
|
image: "updPwd.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'assign': {
|
|
|
|
for: ['admin'],
|
|
|
|
title: "分配账号",
|
|
|
|
image: "count.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
},
|
|
|
|
'unfinish': {
|
|
|
|
for: ['admin'],
|
|
|
|
title: "今日未填", // RedList
|
|
|
|
image: "_report.png",
|
|
|
|
switchFunc: switchTab,
|
|
|
|
url: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let keys = Object.keys(menuItemDict);
|
|
|
|
for (let key of keys) {
|
|
|
|
menuItemDict[key].id = id++;
|
|
|
|
menuItemDict[key].addDot = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = menuItemDict
|