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