|
@@ -1,4 +1,5 @@
|
1
|
|
-import React from "react";
|
|
1
|
+import React, { useMemo } from "react";
|
|
2
|
+import Taro from "@tarojs/taro";
|
2
|
3
|
import { View, Text, Image } from "@tarojs/components";
|
3
|
4
|
import Page from "@/layouts/index";
|
4
|
5
|
import { useModel } from "@/store";
|
|
@@ -30,188 +31,195 @@ import "./index.less";
|
30
|
31
|
const getRejctApply = () => getApplyNum({ applyType: PROCESS_APPLY_REJECT });
|
31
|
32
|
const getDelayApply = () => getApplyNum({ applyType: PROCESS_APPLY_DELAY });
|
32
|
33
|
const getVerifyApply = () => getApplyNum({ applyType: PROCESS_APPLY_VERIFY });
|
33
|
|
-const getEdnApply = () => getApplyNum({ applyType: PROCESS_APPLY_END });
|
|
34
|
+const getEdnApply = (duty) =>
|
|
35
|
+ getApplyNum({ applyType: PROCESS_APPLY_END, duty });
|
34
|
36
|
|
35
|
|
-const menus = {
|
36
|
|
- // 督查员
|
37
|
|
- [ROLE_INSPECTOR]: [
|
38
|
|
- {
|
39
|
|
- icon: "icon9",
|
40
|
|
- text: "我的上报",
|
41
|
|
- link: "/pages/issue/list/index?mine=true",
|
42
|
|
- },
|
43
|
|
- { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
44
|
|
- { icon: "icon10", text: "模拟测评", link: "/pages/check/list/index" },
|
45
|
|
-
|
46
|
|
- ],
|
|
37
|
+export default (props) => {
|
|
38
|
+ const userModel = useModel("user");
|
|
39
|
+ const { user, duty, signOut, changePwd } = userModel || {};
|
|
40
|
+ const menus = useMemo(() => {
|
|
41
|
+ return {
|
|
42
|
+ // 督查员
|
|
43
|
+ [ROLE_INSPECTOR]: [
|
|
44
|
+ {
|
|
45
|
+ icon: "icon9",
|
|
46
|
+ text: "我的上报",
|
|
47
|
+ link: "/pages/issue/list/index?mine=true",
|
|
48
|
+ },
|
|
49
|
+ { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
|
50
|
+ { icon: "icon10", text: "模拟测评", link: "/pages/check/list/index" },
|
|
51
|
+ {
|
|
52
|
+ icon: "icon4",
|
|
53
|
+ text: "消单申请",
|
|
54
|
+ request: () => getEdnApply(duty),
|
|
55
|
+ link: `/pages/apply/list/index?title=消单申请&applyType=${PROCESS_APPLY_END}`,
|
|
56
|
+ },
|
|
57
|
+ ],
|
47
|
58
|
|
48
|
|
- // 平台管理员
|
49
|
|
- [ROLE_MANAGER]: [
|
50
|
|
- {
|
51
|
|
- icon: "icon1",
|
52
|
|
- text: "待 交 办",
|
53
|
|
- link: `/pages/issue/list2/index?title=待交办&bizStatus=${PROCESS_START}`,
|
54
|
|
- },
|
55
|
|
- {
|
56
|
|
- icon: "icon2",
|
57
|
|
- text: "已 交 办",
|
58
|
|
- link: `/pages/issue/list2/index?title=已交办&bizStatus=${PROCESS_ASSIGNED}`,
|
59
|
|
- },
|
60
|
|
- {
|
61
|
|
- icon: "icon3",
|
62
|
|
- text: "已 办 结",
|
63
|
|
- link: `/pages/issue/list2/index?title=已办结&bizStatus=${PROCESS_END}`,
|
64
|
|
- },
|
65
|
|
- {
|
66
|
|
- icon: "icon4",
|
67
|
|
- text: "消单申请",
|
68
|
|
- request: getEdnApply,
|
69
|
|
- link: `/pages/apply/list/index?title=消单申请&applyType=${PROCESS_APPLY_END}`,
|
70
|
|
- },
|
71
|
|
- {
|
72
|
|
- icon: "icon5",
|
73
|
|
- text: "逾期警告",
|
74
|
|
- link: `/pages/issue/list2/index?title=逾期警告&bizStatus=expired`,
|
75
|
|
- },
|
76
|
|
- {
|
77
|
|
- icon: "icon6",
|
78
|
|
- text: "延期申请",
|
79
|
|
- request: getDelayApply,
|
80
|
|
- link: `/pages/apply/list/index?title=延期申请&applyType=${PROCESS_APPLY_DELAY}`,
|
81
|
|
- },
|
82
|
|
- {
|
83
|
|
- icon: "icon12",
|
84
|
|
- text: "驳回申请",
|
85
|
|
- request: getRejctApply,
|
86
|
|
- link: `/pages/apply/list/index?title=驳回申请&applyType=${PROCESS_APPLY_REJECT}`,
|
87
|
|
- },
|
88
|
|
- {
|
89
|
|
- icon: "icon7",
|
90
|
|
- text: "统计查询",
|
91
|
|
- link: "/subpkg1/pages/statistics/index",
|
92
|
|
- },
|
93
|
|
- {
|
94
|
|
- icon: "icon9",
|
95
|
|
- text: "我的上报",
|
96
|
|
- link: "/pages/issue/list2/index?title=我的上报&mine=true",
|
97
|
|
- },
|
98
|
|
- { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
99
|
|
- ],
|
|
59
|
+ // 平台管理员
|
|
60
|
+ [ROLE_MANAGER]: [
|
|
61
|
+ {
|
|
62
|
+ icon: "icon1",
|
|
63
|
+ text: "待 交 办",
|
|
64
|
+ link: `/pages/issue/list2/index?title=待交办&bizStatus=${PROCESS_START}`,
|
|
65
|
+ },
|
|
66
|
+ {
|
|
67
|
+ icon: "icon2",
|
|
68
|
+ text: "已 交 办",
|
|
69
|
+ link: `/pages/issue/list2/index?title=已交办&bizStatus=${PROCESS_ASSIGNED}`,
|
|
70
|
+ },
|
|
71
|
+ {
|
|
72
|
+ icon: "icon3",
|
|
73
|
+ text: "已 办 结",
|
|
74
|
+ link: `/pages/issue/list2/index?title=已办结&bizStatus=${PROCESS_END}`,
|
|
75
|
+ },
|
|
76
|
+ {
|
|
77
|
+ icon: "icon4",
|
|
78
|
+ text: "消单申请",
|
|
79
|
+ request: getEdnApply,
|
|
80
|
+ link: `/pages/apply/list/index?title=消单申请&applyType=${PROCESS_APPLY_END}`,
|
|
81
|
+ },
|
|
82
|
+ {
|
|
83
|
+ icon: "icon5",
|
|
84
|
+ text: "逾期警告",
|
|
85
|
+ link: `/pages/issue/list2/index?title=逾期警告&bizStatus=expired`,
|
|
86
|
+ },
|
|
87
|
+ {
|
|
88
|
+ icon: "icon6",
|
|
89
|
+ text: "延期申请",
|
|
90
|
+ request: getDelayApply,
|
|
91
|
+ link: `/pages/apply/list/index?title=延期申请&applyType=${PROCESS_APPLY_DELAY}`,
|
|
92
|
+ },
|
|
93
|
+ {
|
|
94
|
+ icon: "icon12",
|
|
95
|
+ text: "驳回申请",
|
|
96
|
+ request: getRejctApply,
|
|
97
|
+ link: `/pages/apply/list/index?title=驳回申请&applyType=${PROCESS_APPLY_REJECT}`,
|
|
98
|
+ },
|
|
99
|
+ {
|
|
100
|
+ icon: "icon7",
|
|
101
|
+ text: "统计查询",
|
|
102
|
+ link: "/subpkg1/pages/statistics/index",
|
|
103
|
+ },
|
|
104
|
+ {
|
|
105
|
+ icon: "icon9",
|
|
106
|
+ text: "我的上报",
|
|
107
|
+ link: "/pages/issue/list2/index?title=我的上报&mine=true",
|
|
108
|
+ },
|
|
109
|
+ { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
|
110
|
+ ],
|
100
|
111
|
|
101
|
|
- // 责任单位用户
|
102
|
|
- [ROLE_ORG_USER]: [
|
103
|
|
- {
|
104
|
|
- icon: "icon2",
|
105
|
|
- text: "处 理 中",
|
106
|
|
- link: `/pages/org/issue/list/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}`,
|
107
|
|
- },
|
108
|
|
- {
|
109
|
|
- icon: "icon3",
|
110
|
|
- text: "已 办 结",
|
111
|
|
- link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}`,
|
112
|
|
- },
|
113
|
|
- {
|
114
|
|
- icon: "icon5",
|
115
|
|
- text: "已 逾 期",
|
116
|
|
- link: "/pages/org/issue/list/index?title=已逾期&bizStatus=expired",
|
117
|
|
- },
|
118
|
|
- { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
119
|
|
- {
|
120
|
|
- icon: "icon10",
|
121
|
|
- text: "我的上报",
|
122
|
|
- link: `/pages/feedback/issuelist/index?title=我的上报&bizStatus=`,
|
123
|
|
- },
|
124
|
|
- {
|
125
|
|
- icon: "icon12",
|
126
|
|
- text: "交办历史",
|
127
|
|
- link: "/pages/org/issue/list2/index?mine=true",
|
128
|
|
- },
|
129
|
|
-
|
130
|
|
- ],
|
|
112
|
+ // 责任单位用户
|
|
113
|
+ [ROLE_ORG_USER]: [
|
|
114
|
+ {
|
|
115
|
+ icon: "icon2",
|
|
116
|
+ text: "处 理 中",
|
|
117
|
+ link: `/pages/org/issue/list/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}`,
|
|
118
|
+ },
|
|
119
|
+ {
|
|
120
|
+ icon: "icon3",
|
|
121
|
+ text: "已 办 结",
|
|
122
|
+ link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}`,
|
|
123
|
+ },
|
|
124
|
+ {
|
|
125
|
+ icon: "icon5",
|
|
126
|
+ text: "已 逾 期",
|
|
127
|
+ link: "/pages/org/issue/list/index?title=已逾期&bizStatus=expired",
|
|
128
|
+ },
|
|
129
|
+ { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
|
130
|
+ {
|
|
131
|
+ icon: "icon10",
|
|
132
|
+ text: "我的上报",
|
|
133
|
+ link: `/pages/feedback/issuelist/index?title=我的上报&bizStatus=`,
|
|
134
|
+ },
|
|
135
|
+ {
|
|
136
|
+ icon: "icon12",
|
|
137
|
+ text: "交办历史",
|
|
138
|
+ link: "/pages/org/issue/list2/index?mine=true",
|
|
139
|
+ },
|
|
140
|
+ ],
|
131
|
141
|
|
132
|
|
- // 责任交办单位管理员
|
133
|
|
- [ROLE_ORG_MANAGER]: [
|
134
|
|
- {
|
135
|
|
- icon: "icon2",
|
136
|
|
- text: "处 理 中",
|
137
|
|
- link: `/pages/org/issue/list/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}`,
|
138
|
|
- },
|
139
|
|
- {
|
140
|
|
- icon: "icon3",
|
141
|
|
- text: "已 办 结",
|
142
|
|
- link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}`,
|
143
|
|
- },
|
144
|
|
- {
|
145
|
|
- icon: "icon5",
|
146
|
|
- text: "已 逾 期",
|
147
|
|
- link: "/pages/org/issue/list/index?title=已逾期&bizStatus=expired",
|
148
|
|
- },
|
149
|
|
- {
|
150
|
|
- icon: "icon9",
|
151
|
|
- text: "审核申请",
|
152
|
|
- request: getVerifyApply,
|
153
|
|
- link: `/pages/apply/list/index?title=审核申请&applyType=${PROCESS_APPLY_VERIFY}`,
|
154
|
|
- },
|
155
|
|
- { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
156
|
|
- { icon: "person", text: "人员管理", link: "/pages/user/list/index" },
|
157
|
|
- {
|
158
|
|
- icon: "icon12",
|
159
|
|
- text: "交办历史",
|
160
|
|
- link: "/pages/org/issue/list2/index?mine=true",
|
161
|
|
- },
|
162
|
|
- ],
|
|
142
|
+ // 责任交办单位管理员
|
|
143
|
+ [ROLE_ORG_MANAGER]: [
|
|
144
|
+ {
|
|
145
|
+ icon: "icon2",
|
|
146
|
+ text: "处 理 中",
|
|
147
|
+ link: `/pages/org/issue/list/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}`,
|
|
148
|
+ },
|
|
149
|
+ {
|
|
150
|
+ icon: "icon3",
|
|
151
|
+ text: "已 办 结",
|
|
152
|
+ link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}`,
|
|
153
|
+ },
|
|
154
|
+ {
|
|
155
|
+ icon: "icon5",
|
|
156
|
+ text: "已 逾 期",
|
|
157
|
+ link: "/pages/org/issue/list/index?title=已逾期&bizStatus=expired",
|
|
158
|
+ },
|
|
159
|
+ {
|
|
160
|
+ icon: "icon9",
|
|
161
|
+ text: "审核申请",
|
|
162
|
+ request: getVerifyApply,
|
|
163
|
+ link: `/pages/apply/list/index?title=审核申请&applyType=${PROCESS_APPLY_VERIFY}`,
|
|
164
|
+ },
|
|
165
|
+ { icon: "icon11", text: "消息通知", link: "/pages/message/list/index" },
|
|
166
|
+ { icon: "person", text: "人员管理", link: "/pages/user/list/index" },
|
|
167
|
+ {
|
|
168
|
+ icon: "icon12",
|
|
169
|
+ text: "交办历史",
|
|
170
|
+ link: "/pages/org/issue/list2/index?mine=true",
|
|
171
|
+ },
|
|
172
|
+ ],
|
163
|
173
|
|
164
|
|
- // 查询人员
|
165
|
|
- [ROLE_QUERY_PERSON]: [
|
166
|
|
- {
|
167
|
|
- icon: "icon1",
|
168
|
|
- text: "未 处 理",
|
169
|
|
- link: `/pages/issue/list2/index?title=未处理&bizStatus=${PROCESS_START}`,
|
170
|
|
- },
|
171
|
|
- {
|
172
|
|
- icon: "icon2",
|
173
|
|
- text: "处 理 中",
|
174
|
|
- link: `/pages/issue/list2/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}`,
|
175
|
|
- },
|
176
|
|
- {
|
177
|
|
- icon: "icon3",
|
178
|
|
- text: "已 办 结",
|
179
|
|
- link: `/pages/issue/list2/index?title=已办结&bizStatus=${PROCESS_END}`,
|
180
|
|
- },
|
181
|
|
- {
|
182
|
|
- icon: "icon5",
|
183
|
|
- text: "逾期警告",
|
184
|
|
- link: `/pages/issue/list2/index?title=逾期警告&bizStatus=expired`,
|
185
|
|
- },
|
186
|
|
- {
|
187
|
|
- icon: "icon7",
|
188
|
|
- text: "统计查询",
|
189
|
|
- link: "/subpkg1/pages/statistics/index",
|
190
|
|
- },
|
191
|
|
- ],
|
|
174
|
+ // 查询人员
|
|
175
|
+ [ROLE_QUERY_PERSON]: [
|
|
176
|
+ {
|
|
177
|
+ icon: "icon1",
|
|
178
|
+ text: "未 处 理",
|
|
179
|
+ link: `/pages/issue/list2/index?title=未处理&bizStatus=${PROCESS_START}`,
|
|
180
|
+ },
|
|
181
|
+ {
|
|
182
|
+ icon: "icon2",
|
|
183
|
+ text: "处 理 中",
|
|
184
|
+ link: `/pages/issue/list2/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}`,
|
|
185
|
+ },
|
|
186
|
+ {
|
|
187
|
+ icon: "icon3",
|
|
188
|
+ text: "已 办 结",
|
|
189
|
+ link: `/pages/issue/list2/index?title=已办结&bizStatus=${PROCESS_END}`,
|
|
190
|
+ },
|
|
191
|
+ {
|
|
192
|
+ icon: "icon5",
|
|
193
|
+ text: "逾期警告",
|
|
194
|
+ link: `/pages/issue/list2/index?title=逾期警告&bizStatus=expired`,
|
|
195
|
+ },
|
|
196
|
+ {
|
|
197
|
+ icon: "icon7",
|
|
198
|
+ text: "统计查询",
|
|
199
|
+ link: "/subpkg1/pages/statistics/index",
|
|
200
|
+ },
|
|
201
|
+ ],
|
192
|
202
|
|
193
|
|
- // 市民
|
194
|
|
- [ROLE_CITIZEN]: [
|
195
|
|
- {
|
196
|
|
- icon: "icon1",
|
197
|
|
- text: "未处理",
|
198
|
|
- link: `/pages/feedback/issuelist/index?title=未处理&bizStatus=${PROCESS_START}`,
|
199
|
|
- },
|
200
|
|
- {
|
201
|
|
- icon: "icon2",
|
202
|
|
- text: "已处理",
|
203
|
|
- link: `/pages/feedback/issuelist/index?title=已处理&bizStatus=${PROCESS_ASSIGNED}`,
|
204
|
|
- },
|
205
|
|
- {
|
206
|
|
- icon: "icon12",
|
207
|
|
- text: "已打回",
|
208
|
|
- link: `/pages/feedback/issuelist/index?title=已打回&bizStatus=${APPLY_REJECT}`,
|
209
|
|
- },
|
210
|
|
- ],
|
211
|
|
-};
|
212
|
|
-export default (props) => {
|
213
|
|
- const userModel = useModel("user");
|
214
|
|
- const { user, duty, signOut, changePwd } = userModel || {};
|
|
203
|
+ // 市民
|
|
204
|
+ [ROLE_CITIZEN]: [
|
|
205
|
+ {
|
|
206
|
+ icon: "icon1",
|
|
207
|
+ text: "未处理",
|
|
208
|
+ link: `/pages/feedback/issuelist/index?title=未处理&bizStatus=${PROCESS_START}`,
|
|
209
|
+ },
|
|
210
|
+ {
|
|
211
|
+ icon: "icon2",
|
|
212
|
+ text: "已处理",
|
|
213
|
+ link: `/pages/feedback/issuelist/index?title=已处理&bizStatus=${PROCESS_ASSIGNED}`,
|
|
214
|
+ },
|
|
215
|
+ {
|
|
216
|
+ icon: "icon12",
|
|
217
|
+ text: "已打回",
|
|
218
|
+ link: `/pages/feedback/issuelist/index?title=已打回&bizStatus=${APPLY_REJECT}`,
|
|
219
|
+ },
|
|
220
|
+ ],
|
|
221
|
+ };
|
|
222
|
+ }, [duty]);
|
215
|
223
|
|
216
|
224
|
const menuArr = React.useMemo(() => {
|
217
|
225
|
if (!duty) return [];
|
|
@@ -227,7 +235,7 @@ export default (props) => {
|
227
|
235
|
|
228
|
236
|
<View className="menu-icons">
|
229
|
237
|
{menuArr.map((x) => (
|
230
|
|
- <MenuIcon key={x.text} {...x} />
|
|
238
|
+ <MenuIcon user={user} key={x.text} {...x} />
|
231
|
239
|
))}
|
232
|
240
|
</View>
|
233
|
241
|
</Page>
|