张涛 11 个月前
父节点
当前提交
ecd025a9cd

+ 2
- 2
src/components/IssueCard/index.jsx 查看文件

@@ -6,7 +6,7 @@ import { APPLY_READY, getIssueStatus } from '@/utils/biz';
6 6
 import icon from '@/assets/icons/marker.png';
7 7
 import style from './style.module.less';
8 8
 
9
-const colors = [
9
+export const colors = [
10 10
   ['rgba(130, 176, 254, 0.08)', 'rgba(52, 121, 237, 1)'], // 未交办
11 11
   ['rgba(51, 218, 156, 0.08)', 'rgba(26, 117, 101, 1)'], // 已交办
12 12
   ['rgba(251, 157, 75, 0.08)', 'rgba(232, 116, 16, 1)'], // 已办结
@@ -27,7 +27,7 @@ export default (props) => {
27 27
     statusTxt,
28 28
   ] = React.useMemo(() => {
29 29
     if (!detail) return [];
30
-
30
+console.log(detail)
31 31
     // detail 有可能是申请信息
32 32
     const { value: bizStatus = 0, label: statusText } = getIssueStatus({
33 33
       ...detail || {},

+ 3
- 3
src/components/MenuIcon.jsx 查看文件

@@ -27,7 +27,7 @@ const txtStyle = {
27 27
 
28 28
 export default (props) => {
29 29
   
30
-  const { icon, text, link, request } = props;
30
+  const { icon, text, link, request ,user} = props;
31 31
 
32 32
   const [info, setInfo] = React.useState();
33 33
 
@@ -38,14 +38,14 @@ export default (props) => {
38 38
   }
39 39
 
40 40
   React.useEffect(() => {
41
-    if (request) {
41
+    if (request&&user) {
42 42
       request().then(res => {
43 43
         if (res) {
44 44
           res > 99 ? setInfo('99+') : setInfo(res);
45 45
         }
46 46
       });
47 47
     }
48
-  }, [request]);
48
+  }, [request,user]);
49 49
 
50 50
   return (
51 51
     <RatioView>

+ 1
- 0
src/pages/apply/detail/index.jsx 查看文件

@@ -10,6 +10,7 @@ import Issue from '../components/Issue';
10 10
 import useTitle from '../useTitle';
11 11
 
12 12
 const getVerifyStatus = (st) => {
13
+  console.log("***************st******************",st)
13 14
   if (!st || st == 'ready') return '未审批';
14 15
   return st == 'pass' ? '通过' : '驳回';
15 16
 }

+ 17
- 11
src/pages/apply/list/index.jsx 查看文件

@@ -1,11 +1,11 @@
1
-import React, { useState } from "react";
1
+import React, { useMemo, useRef, useState } from "react";
2 2
 import Taro from "@tarojs/taro";
3 3
 import { Tab, Tabs, Search } from "@antmjs/vantui";
4 4
 import Page from "@/layouts/index";
5 5
 import PowerList from "@/components/PowerList";
6 6
 import Card from "@/components/IssueCard";
7 7
 import { getTaIssueApply } from "@/services/taissueapply";
8
-import { ROLE_MANAGER, ROLE_ORG_MANAGER } from "@/utils/user";
8
+import { ROLE_INSPECTOR, ROLE_MANAGER, ROLE_ORG_MANAGER } from "@/utils/user";
9 9
 import { useModel } from "@/store";
10 10
 
11 11
 const tabStyle = {
@@ -20,9 +20,9 @@ const sid2 = Math.random().toString(36).substring(2, 8);
20 20
 export default (props) => {
21 21
   const router = Taro.useRouter();
22 22
   const { title, applyType = "" } = router.params;
23
+  const { user, duty } = useModel("user");
23 24
   const [issueId, setIssueId] = useState("");
24
-
25
-  const { duty } = useModel("user");
25
+const dutys=Taro.getStorageSync("duty")
26 26
 
27 27
   React.useMemo(() => {
28 28
     if (title) {
@@ -32,20 +32,26 @@ export default (props) => {
32 32
     }
33 33
   }, [title]);
34 34
 
35
-  const { user } = useModel("user");
36
-
35
+  
37 36
   const [param1, param2] = React.useMemo(() => {
37
+
38 38
     return [
39
-      { applyType, sourceType: "inspector", duty, issueId },
40
-      { applyType, sourceType: "feedback", duty }
41
-    ]
42
-  }, [applyType, issueId, duty]);
39
+      { applyType, sourceType: "inspector", duty:dutys, issueId },
40
+      { applyType, sourceType: "feedback", duty:dutys },
41
+    ];
42
+  }, [applyType, issueId, dutys]);
43
+
44
+
43 45
 
44 46
   const onClick = (item) => {
45 47
     if (!user) return;
46 48
 
47 49
     if (!item.verifyDate) {
48
-      if (duty != ROLE_MANAGER && duty != ROLE_ORG_MANAGER) {
50
+      if (
51
+        duty != ROLE_MANAGER &&
52
+        duty != ROLE_ORG_MANAGER &&
53
+        duty != ROLE_INSPECTOR
54
+      ) {
49 55
         Taro.navigateTo({
50 56
           url: `/pages/apply/detail/index?id=${item.applyId}&issueId=${item.issueId}&applyType=${item.applyType}`,
51 57
         });

+ 186
- 178
src/pages/home/index.jsx 查看文件

@@ -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>

+ 1
- 1
src/pages/org/issue/detail/index.jsx 查看文件

@@ -81,7 +81,7 @@ export default (props) => {
81 81
           readonly={readOnly}
82 82
           autosize={{ minHeight: '120px' }}
83 83
           value={orgIssue.result}
84
-          onChange={e => setFormData('result', e.detail)}
84
+          onChange={e =>{console.log(e); setFormData('result', e.detail.value||e.target.value||e.detail)}}
85 85
         />
86 86
       </CellGroup>
87 87
       <CellGroup style={{marginTop: '20px'}}>        

+ 55
- 15
src/pages/org/issue/detail2/components/Order.jsx 查看文件

@@ -1,9 +1,13 @@
1 1
 import { getTaOrgIssueId } from "@/services/taorgissue";
2
-import { Cell, CellGroup, Steps } from "@antmjs/vantui";
2
+import { Cell, CellGroup, Steps, Tag } from "@antmjs/vantui";
3 3
 import { View } from "@tarojs/components";
4
-import React, { useEffect, useState } from "react";
4
+import React, { useEffect, useMemo, useState } from "react";
5 5
 import dayjs from "dayjs";
6 6
 import styles from "../index.module.less";
7
+import { APPLY_READY, getIssueStatus } from "@/utils/biz";
8
+import Icon from "@/components/Icon";
9
+import { color } from "echarts";
10
+import { colors } from "@/components/IssueCard";
7 11
 
8 12
 export default (props) => {
9 13
   const { id } = props;
@@ -21,22 +25,58 @@ export default (props) => {
21 25
     }
22 26
   }, [id]);
23 27
 
24
-  return (
25
-    <CellGroup style={{ marginTop: "20px" }}>
26
-      <Cell title="交办历史" />
28
+  function SorySteps(params) {
29
+    const { steps } = params;
30
+
31
+    const sortedSteps = steps.sort((a, b) => {
32
+      if (a.createDate < b.createDate) return -1;
33
+      if (a.createDate > b.createDate) return 1;
34
+      return 0;
35
+    });
36
+    return sortedSteps.map((it, index, array) => {
37
+      const { value: bizStatus = 0, label: statusText } = getIssueStatus({
38
+        ...(it || {}),
39
+        expireDate: it?.createDate,
40
+        processNode: it?.processNode || it?.applyType,
41
+        processStatus: it?.processStatus || it?.verifyStatus || APPLY_READY,
42
+      });
43
+      const [bg1, bg2] = colors[bizStatus];
27 44
 
28
-      <View className={styles["page_order"]}>
29
-        {(steps || []).map((x) => {
30
-          return (
31
-            <View key={x.orgIssueId} className={styles["org_order"]}>
32
-              <View>单位:{x.orgName}</View>
45
+      let nextOrgName = null;
46
+      if (index == 0) {
47
+        nextOrgName = "平台管理员";
48
+      } else if (index <= array.length - 1) {
49
+        nextOrgName = array[index - 1].orgName;
50
+      }
51
+      return (
52
+        <View key={it.orgIssueId} className={styles["page_order"]}>
53
+          <Cell
54
+            value={dayjs(it.createDate).format("YYYY-MM-DD HH:mm:ss")}
55
+            renderTitle={
33 56
               <View>
34
-                时间:{dayjs(x.createDate).format("YYYY-MM-DD HH:mm:ss")}
57
+                
58
+
59
+                <View className="title">
60
+                  {nextOrgName} {"---->"} {it.orgName}
61
+                  <Tag plain={true} style={{ color: bg2 }}>{statusText}</Tag>
62
+                </View>
35 63
               </View>
36
-            </View>
37
-          );
38
-        })}
39
-      </View>
64
+            }
65
+          />
66
+          {/* <View className={styles["org_order"]}>
67
+            <div>
68
+              {nextOrgName} ----{it.orgName}
69
+            </div>
70
+            <div>{dayjs(it.createDate).format("YYYY-MM-DD HH:mm:ss")}</div>
71
+          </View> */}
72
+        </View>
73
+      );
74
+    });
75
+  }
76
+  return (
77
+    <CellGroup style={{ marginTop: "20px" }}>
78
+      <Cell title="交办历史" />
79
+      <SorySteps steps={steps} />
40 80
     </CellGroup>
41 81
   );
42 82
 };

+ 3
- 2
src/pages/org/issue/detail2/index.module.less 查看文件

@@ -1,13 +1,14 @@
1 1
 .page_order {
2
-    max-height: 200px;
2
+    max-height: 300px;
3 3
     width: 100%;
4 4
     background-color: #FFFFFF;
5 5
     overflow-y: scroll;
6
-    padding: 0 2.963vh;
6
+    padding: 0 0;
7 7
     .org_order {
8 8
         display: flex;
9 9
         justify-content: space-between;
10 10
         width: 100%;
11 11
         margin-top: 10px;
12
+        padding: 5px 0.725rem;
12 13
     }
13 14
 }

+ 1
- 1
src/pages/org/issue/list2/index.jsx 查看文件

@@ -4,7 +4,7 @@ import { Tab, Tabs, Search } from "@antmjs/vantui";
4 4
 import Page from "@/layouts/index";
5 5
 import PowerList from "@/components/PowerList";
6 6
 import Card from "@/components/IssueCard";
7
-import { getTaOrgIssue, getTaOrgIssues } from "@/services/taorgissue";
7
+import {  getTaOrgIssues } from "@/services/taorgissue";
8 8
 import { ROLE_MANAGER } from "@/utils/user";
9 9
 import { useModel } from "@/store";
10 10
 import { getIssueStatus } from "@/utils/biz";

+ 29
- 16
src/store/user.js 查看文件

@@ -31,23 +31,35 @@ export default function useUser() {
31 31
   };
32 32
 
33 33
   const updateDuty = (d = ROLE_CITIZEN) => {
34
-    setDuty(d);
35
-    Taro.setStorageSync("duty", d);
34
+    try {
35
+      setDuty(d);
36
+      Taro.setStorageSync("duty", d);
37
+    } catch (e) {
38
+      console.log(e);
39
+    }
36 40
   };
37 41
 
38 42
   const initDuty = (u) => {
39 43
     console.log(u);
40
-    const d = Taro.getStorageSync("duty");
41
-    console.log(d);
44
+    let d;
45
+    try {
46
+      d = Taro.getStorageSync("duty");
47
+    } catch (error) {
48
+      console.error("读取存储中'duty'失败:", error);
49
+      // 根据业务需求考虑是否需要进行错误处理或通知用户
50
+    }
42 51
     const dutyList = u?.dutyList || [];
52
+    const firstDuty = dutyList[0];
53
+
43 54
     if (d) {
44 55
       if (dutyList.indexOf(d) < 0) {
45
-        updateDuty(dutyList[0]);
56
+        console.log(firstDuty);
57
+        updateDuty(firstDuty);
46 58
       } else {
47 59
         updateDuty(d);
48 60
       }
49 61
     } else {
50
-      updateDuty(dutyList[0]);
62
+      updateDuty(firstDuty);
51 63
     }
52 64
   };
53 65
 
@@ -65,14 +77,16 @@ export default function useUser() {
65 77
 
66 78
   const maSignup = (data) => {
67 79
     return new Promise((resolve, reject) => {
68
-      signup(data).then(res => {
69
-        setPerson(res.person);
70
-        setUser(res.user);
71
-        initDuty(res.user);
72
-        resolve(res);
73
-      }).catch(reject);
80
+      signup(data)
81
+        .then((res) => {
82
+          setPerson(res.person);
83
+          setUser(res.user);
84
+          initDuty(res.user);
85
+          resolve(res);
86
+        })
87
+        .catch(reject);
74 88
     });
75
-  }
89
+  };
76 90
 
77 91
   const current = () => {
78 92
     return new Promise((resolve, reject) => {
@@ -109,7 +123,7 @@ export default function useUser() {
109 123
   };
110 124
 
111 125
   const signOut = () => {
112
-    console.log(111111)
126
+    console.log(111111);
113 127
     setPerson(null);
114 128
     setUser(null);
115 129
     initDuty(null);
@@ -127,8 +141,7 @@ export default function useUser() {
127 141
 
128 142
     changePassword(data)
129 143
       .then((res) => {
130
-        signOut()
131
-
144
+        signOut();
132 145
       })
133 146
       .catch((e) => {
134 147
         console.error(e);