Yansen 2 년 전
부모
커밋
8b445e2ef8

+ 1
- 1
src/components/IssueCard/index.jsx 파일 보기

@@ -38,7 +38,7 @@ export default (props) => {
38 38
       (detail.issueContent || detail.content || '').replace('\r\n', '<br>').replace('\n', '<br>'),
39 39
       dayjs(detail.createDate).format('YYYY-MM-DD HH:mm'),
40 40
       colors[color ?? bizStatus],
41
-      stText || statusText,
41
+      statusText,
42 42
     ];
43 43
   }, [detail, color, stText]);
44 44
   

+ 10
- 2
src/pages/home/index.jsx 파일 보기

@@ -3,8 +3,8 @@ import { View, Text, Image } from '@tarojs/components'
3 3
 import Page from '@/layouts/index';
4 4
 import { useModel } from '@/store';
5 5
 import MenuIcon from '@/components/MenuIcon';
6
-import { ROLE_CITIZEN, ROLE_INSPECTOR, ROLE_MANAGER, ROLE_ORG_USER, ROLE_QUERY_PERSON } from '@/utils/user';
7
-import { PROCESS_APPLY_DELAY, PROCESS_APPLY_END, PROCESS_APPLY_REJECT, PROCESS_ASSIGNED, PROCESS_END, PROCESS_START } from '@/utils/biz';
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 } from '@/utils/biz';
8 8
 import Head from './components/Head';
9 9
 import Banner from './components/Banner';
10 10
 import StatCard from './components/StatCard';
@@ -40,6 +40,14 @@ const menus = {
40 40
     { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index' },
41 41
   ],
42 42
 
43
+  [ROLE_ORG_MANAGER]: [
44
+    { icon: 'icon2', text: '处 理 中', link: `/pages/org/issue/list/index?title=处理中&bizStatus=${PROCESS_ASSIGNED}` },
45
+    { icon: 'icon3', text: '已 办 结', link: `/pages/org/issue/list/index?title=已办结&bizStatus=${PROCESS_END}` },
46
+    { icon: 'icon5', text: '已 逾 期', link: '/pages/org/issue/list/index?title=已办结&bizStatus=expired' },
47
+    { icon: 'icon9', text: '审核申请', link: `/pages/apply/list/index?title=审核申请&applyType=${PROCESS_APPLY_VERIFY}` },
48
+    { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index' },
49
+  ],
50
+
43 51
   // 查询人员
44 52
   [ROLE_QUERY_PERSON]: [
45 53
     { icon: 'icon1', text: '未 处 理', link: `/pages/issue/list2/index?title=未处理&bizStatus=${PROCESS_START}` },

+ 1
- 1
src/pages/issue/components/Issue/IssueStatus.jsx 파일 보기

@@ -24,7 +24,7 @@ export default (props) => {
24 24
     <>
25 25
       <Cell title="状态" value={bizStatus?.label}></Cell>
26 26
       {
27
-        issueProcess?.verifyDesc && (
27
+        issueProcess?.processResult && (
28 28
           <>
29 29
             <Cell title="驳回原因" />
30 30
             <Field

+ 41
- 0
src/pages/org/issue/detail/components/IssueStatus.jsx 파일 보기

@@ -0,0 +1,41 @@
1
+import React from 'react';
2
+import { Field, Cell } from '@antmjs/vantui';
3
+import { getIssueStatus } from '@/utils/biz';
4
+import { getIssueProcess } from '@/services/taissue';
5
+
6
+export default (props) => {
7
+
8
+  const { issue } = props;
9
+  const [bizStatus, setBizStatus] = React.useState();
10
+  const [issueProcess, setIssueProcess] = React.useState();
11
+
12
+  React.useEffect(() => {
13
+    if (issue) {
14
+      setBizStatus(getIssueStatus(issue));
15
+
16
+      // 取最新的流程日志记录
17
+      getIssueProcess({ pageSize: 1, issueId: issue.issueId }).then(res => {
18
+        setIssueProcess((res.records || [])[0]);
19
+      })
20
+    }
21
+  }, [issue]);
22
+
23
+  return (
24
+    <>
25
+      <Cell title="状态" value={bizStatus?.label}></Cell>
26
+      {
27
+        issueProcess?.processResult && (
28
+          <>
29
+            <Cell title="驳回原因" />
30
+            <Field
31
+              readonly
32
+              type="textarea"
33
+              autosize={{ minHeight: '120px' }}
34
+              value={issueProcess.processResult}
35
+            />
36
+          </>
37
+        )
38
+      }
39
+    </>
40
+  )
41
+}

+ 7
- 5
src/pages/org/issue/detail/index.jsx 파일 보기

@@ -16,6 +16,9 @@ import {
16 16
   PROCESS_ASSIGNED,
17 17
   APPLY_READY,
18 18
 } from '@/utils/biz';
19
+import { ROLE_ORG_MANAGER } from '@/utils/user';
20
+import { useModel } from '@/store';
21
+import IssueStatus from './components/IssueStatus';
19 22
 import IssueInfo from '../../components/issue-info';
20 23
 import Apply from './components/Apply';
21 24
 
@@ -23,6 +26,7 @@ export default (props) => {
23 26
 
24 27
   const router = Taro.useRouter();
25 28
   const { id, act } = router.params;
29
+  const { duty } = useModel('user');
26 30
 
27 31
   const [loading, setLoading] = React.useState(false);
28 32
   const [issue, setIssue] = React.useState();
@@ -30,7 +34,6 @@ export default (props) => {
30 34
 
31 35
   const [
32 36
     readOnly,
33
-    statusTxt,
34 37
     showApplyVerify,
35 38
     showApplyEnd,
36 39
   ] = React.useMemo(() => {
@@ -38,12 +41,11 @@ export default (props) => {
38 41
 
39 42
     return [
40 43
       orgIssue?.processStatus == APPLY_READY || orgIssue?.processNode == PROCESS_END,
41
-      issue ? getIssueStatus(issue).label : '',
42
-      orgIssue.processNode == PROCESS_ASSIGNED,
44
+      orgIssue.processNode == PROCESS_ASSIGNED && duty != ROLE_ORG_MANAGER,
43 45
       orgIssue.processNode != PROCESS_END && orgIssue.processNode != PROCESS_APPLY_END ,
44 46
     ]
45 47
 
46
-  }, [issue, orgIssue]);
48
+  }, [orgIssue, duty]);
47 49
 
48 50
   const setFormData = (key, value) => {
49 51
     setOrgIssue({
@@ -94,7 +96,7 @@ export default (props) => {
94 96
       </CellGroup>
95 97
       
96 98
       <CellGroup style={{marginTop: '20px'}}>
97
-        <Cell title="状态" value={statusTxt} />
99
+        <IssueStatus issue={issue} />
98 100
       </CellGroup>
99 101
 
100 102
       {