李志伟 3 anni fa
parent
commit
794dcd56c1

+ 7
- 1
config/routes.js Vedi File

@@ -26,7 +26,7 @@ export default [
26 26
   },
27 27
   {
28 28
     path: '/',
29
-    name: '工作台',
29
+    name: '工作台',//暂定
30 30
     redirect: '/resume-work/form',
31 31
     hideInMenu: true,
32 32
   },
@@ -60,6 +60,12 @@ export default [
60 60
         name: '复工申请表',
61 61
         component: '@/pages/resumework/form/index.jsx',
62 62
       },
63
+      {
64
+        path: '/resume-work/abnormal',
65
+        name: '异常复工申请表',
66
+        component: '@/pages/resumework/abnormal/index.jsx',
67
+        hideInMenu:true,
68
+      },
63 69
     ],
64 70
   },
65 71
   // {

+ 6
- 2
src/pages/dashboard/index.jsx Vedi File

@@ -1,6 +1,7 @@
1 1
 import { useEffect, useState } from 'react';
2 2
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
3 3
 import moment from 'moment';
4
+import { history } from 'umi';
4 5
 import { Card, Row, Col, Empty } from 'antd'
5 6
 import { getList as getOrgList } from '@/services/org'
6 7
 import { getList as getResumeWorkList } from '@/services/work'
@@ -33,6 +34,9 @@ export default (props) => {
33 34
       <Col span={2} style={{ textAlign: 'right' }}>{nowDate()}</Col>
34 35
     </Row>
35 36
   )
37
+  const goDashboard=()=>{
38
+    history.push('../resume-work/abnormal');
39
+  }
36 40
 
37 41
   useEffect(() => {
38 42
     getcomm().then((res) => {
@@ -99,7 +103,7 @@ export default (props) => {
99 103
               {cardData?.todayNormalNum || 0}
100 104
             </div>
101 105
           </Card>
102
-          <Card className='dashboardCard' style={{ marginTop: '24px' }}>
106
+          <Card className='dashboardCard' style={{ marginTop: '24px' }} onClick={goDashboard}>
103 107
             <div>
104 108
               今日异常人数
105 109
             </div>
@@ -111,7 +115,7 @@ export default (props) => {
111 115
       </Row>
112 116
       <Row>
113 117
         <Col span={12}>
114
-          <Card style={{ marginTop: '16px', height: '736px' }} title='企业数据总览'>            
118
+          <Card style={{ marginTop: '16px', height: '736px' }} title='企业数据总览'>
115 119
             {orgList != [] ?
116 120
               <OrgScollList list={orgList} /> :
117 121
               <div style={{ height: '624px', display: 'flex', justifyContent: 'center', alignItems: 'center' }}>

+ 80
- 0
src/pages/resumework/abnormal/index.jsx Vedi File

@@ -0,0 +1,80 @@
1
+
2
+import React, { useRef } from 'react'
3
+import moment from 'moment';
4
+import { Badge, Image, DatePicker } from 'antd';
5
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
+import { getList } from '@/services/work'
7
+import PageTable from '@/components/PageTable'
8
+import OrgSearch from '@/components/OrgSearch';
9
+
10
+const { RangePicker } = DatePicker;
11
+
12
+const formatterTime = (val) => {
13
+  return val ? moment(val).format('YYYY-MM-DD HH:mm') : '';
14
+};
15
+
16
+export default (props) => {
17
+  const columns = [
18
+    {
19
+      title: '企业名称',
20
+      dataIndex: 'orgId',
21
+      key: 'orgId',
22
+    },
23
+    {
24
+      title: '申请人',
25
+      dataIndex: 'userName',
26
+      key: 'userName',
27
+    },
28
+    {
29
+      title: '抗原截图',
30
+      dataIndex: 'antigenImage',
31
+      key: 'antigenImage',
32
+      render: t => {t?<Image src={t} width="64px" height="64px" />:''}
33
+    },
34
+    {
35
+      title: '抗原结果',
36
+      dataIndex: 'antigenIsNormal',
37
+      key: 'antigenIsNormal',
38
+      render: t => (
39
+        <span>
40
+          {t ? <Badge status="success" text="正常" /> : <Badge status="error" text="异常" />}
41
+        </span>
42
+      )
43
+    },
44
+    {
45
+      title: '核酸截图',
46
+      dataIndex: 'nucleicImage',
47
+      key: 'nucleicImage',
48
+      render: t => <Image src={t} width="64px" height="64px" />
49
+    },
50
+    {
51
+      title: '核酸结果',
52
+      dataIndex: 'nucleicIsNormal',
53
+      key: 'nucleicIsNormal',
54
+      render: t => (
55
+        <span>
56
+        {t ? <Badge status="success" text="正常" /> : <Badge status="error" text="异常" />}
57
+        </span>
58
+      )
59
+    },
60
+    {
61
+      title: '申请时间',
62
+      dataIndex: 'createDate',
63
+      key: 'createDate',
64
+      render: (t) => formatterTime(t),
65
+    },
66
+  ]
67
+
68
+
69
+  return (
70
+    <PageHeaderWrapper>
71
+      <PageTable
72
+        columns={columns}
73
+        request={getList}
74
+        search={false}
75
+        options={false}
76
+        rowKey="formId"
77
+      />
78
+    </PageHeaderWrapper>
79
+  )
80
+}

+ 11
- 25
src/pages/resumework/form/index.jsx Vedi File

@@ -1,25 +1,21 @@
1 1
 
2
-import React, { useCallback, useEffect, useRef, useState } from 'react'
2
+import React, { useRef } from 'react'
3 3
 import moment from 'moment';
4
-import { Badge, Image, DatePicker, Select } from 'antd';
4
+import { Badge, Image, DatePicker } from 'antd';
5 5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6 6
 import { getList, exportList } from '@/services/work'
7 7
 import PageTable from '@/components/PageTable'
8
-import useOrgList from '@/utils/hooks/useOrgList';
9 8
 import OrgSearch from '@/components/OrgSearch';
10 9
 
11 10
 const { RangePicker } = DatePicker;
12
-const { Option } = Select;
13 11
 
14 12
 const formatterTime = (val) => {
15 13
   return val ? moment(val).format('YYYY-MM-DD HH:mm') : '';
16 14
 };
17 15
 
18
-
19 16
 export default (props) => {
20 17
   const initDate = useRef(moment())
21 18
   const actionRef = useRef();
22
-  // const { orgList } = useOrgList()
23 19
 
24 20
   const handleBeforSearch = (params) => {
25 21
     const { createDate, ...others } = params;
@@ -43,25 +39,16 @@ export default (props) => {
43 39
       dataIndex: 'orgId',
44 40
       key: 'orgId',
45 41
       search: true,
46
-      // render: t => orgList.filter(x => x.orgId === t)[0]?.orgName,
42
+      hideInTable:true,
47 43
       renderFormItem: () => (
48
-        // <Select>
49
-        //   {orgList.map((item) => (
50
-        //     <Option value={item.orgId} key={item.orgId}>
51
-        //       {item.orgName}
52
-        //     </Option>
53
-        //   ))}
54
-        // </Select>
55
-        <OrgSearch />
56
-      ),
57
-      formItemProps: {
58
-        rules: [
59
-          {
60
-            required: true,
61
-            message: '请选择企业',
62
-          },
63
-        ],
64
-      },
44
+        <OrgSearch placeholder='请输入企业名称' />
45
+      )
46
+    },
47
+    {
48
+      title: '企业名称',
49
+      dataIndex: 'orgName',
50
+      key: 'orgName',
51
+      search: false,      
65 52
     },
66 53
     {
67 54
       title: '申请人',
@@ -123,7 +110,6 @@ export default (props) => {
123 110
         request={getList}
124 111
         expfunc={exportList}
125 112
         options={false}
126
-        // onReset={handleReset}
127 113
         form={{ ignoreRules: false }}
128 114
         manualRequest={true}
129 115
         revalidateOnFocus={false}