Yansen 2 gadus atpakaļ
vecāks
revīzija
8b445e2ef8

+ 1
- 1
src/components/IssueCard/index.jsx Parādīt failu

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

+ 10
- 2
src/pages/home/index.jsx Parādīt failu

3
 import Page from '@/layouts/index';
3
 import Page from '@/layouts/index';
4
 import { useModel } from '@/store';
4
 import { useModel } from '@/store';
5
 import MenuIcon from '@/components/MenuIcon';
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
 import Head from './components/Head';
8
 import Head from './components/Head';
9
 import Banner from './components/Banner';
9
 import Banner from './components/Banner';
10
 import StatCard from './components/StatCard';
10
 import StatCard from './components/StatCard';
40
     { icon: 'icon11', text: '消息通知', link: '/pages/message/list/index' },
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
   [ROLE_QUERY_PERSON]: [
52
   [ROLE_QUERY_PERSON]: [
45
     { icon: 'icon1', text: '未 处 理', link: `/pages/issue/list2/index?title=未处理&bizStatus=${PROCESS_START}` },
53
     { icon: 'icon1', text: '未 处 理', link: `/pages/issue/list2/index?title=未处理&bizStatus=${PROCESS_START}` },

+ 1
- 1
src/pages/issue/components/Issue/IssueStatus.jsx Parādīt failu

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

+ 41
- 0
src/pages/org/issue/detail/components/IssueStatus.jsx Parādīt failu

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 Parādīt failu

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