李志伟 3 лет назад
Родитель
Сommit
794dcd56c1
4 измененных файлов: 104 добавлений и 28 удалений
  1. 7
    1
      config/routes.js
  2. 6
    2
      src/pages/dashboard/index.jsx
  3. 80
    0
      src/pages/resumework/abnormal/index.jsx
  4. 11
    25
      src/pages/resumework/form/index.jsx

+ 7
- 1
config/routes.js Просмотреть файл

26
   },
26
   },
27
   {
27
   {
28
     path: '/',
28
     path: '/',
29
-    name: '工作台',
29
+    name: '工作台',//暂定
30
     redirect: '/resume-work/form',
30
     redirect: '/resume-work/form',
31
     hideInMenu: true,
31
     hideInMenu: true,
32
   },
32
   },
60
         name: '复工申请表',
60
         name: '复工申请表',
61
         component: '@/pages/resumework/form/index.jsx',
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 Просмотреть файл

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

+ 80
- 0
src/pages/resumework/abnormal/index.jsx Просмотреть файл

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 Просмотреть файл

1
 
1
 
2
-import React, { useCallback, useEffect, useRef, useState } from 'react'
2
+import React, { useRef } from 'react'
3
 import moment from 'moment';
3
 import moment from 'moment';
4
-import { Badge, Image, DatePicker, Select } from 'antd';
4
+import { Badge, Image, DatePicker } from 'antd';
5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
 import { getList, exportList } from '@/services/work'
6
 import { getList, exportList } from '@/services/work'
7
 import PageTable from '@/components/PageTable'
7
 import PageTable from '@/components/PageTable'
8
-import useOrgList from '@/utils/hooks/useOrgList';
9
 import OrgSearch from '@/components/OrgSearch';
8
 import OrgSearch from '@/components/OrgSearch';
10
 
9
 
11
 const { RangePicker } = DatePicker;
10
 const { RangePicker } = DatePicker;
12
-const { Option } = Select;
13
 
11
 
14
 const formatterTime = (val) => {
12
 const formatterTime = (val) => {
15
   return val ? moment(val).format('YYYY-MM-DD HH:mm') : '';
13
   return val ? moment(val).format('YYYY-MM-DD HH:mm') : '';
16
 };
14
 };
17
 
15
 
18
-
19
 export default (props) => {
16
 export default (props) => {
20
   const initDate = useRef(moment())
17
   const initDate = useRef(moment())
21
   const actionRef = useRef();
18
   const actionRef = useRef();
22
-  // const { orgList } = useOrgList()
23
 
19
 
24
   const handleBeforSearch = (params) => {
20
   const handleBeforSearch = (params) => {
25
     const { createDate, ...others } = params;
21
     const { createDate, ...others } = params;
43
       dataIndex: 'orgId',
39
       dataIndex: 'orgId',
44
       key: 'orgId',
40
       key: 'orgId',
45
       search: true,
41
       search: true,
46
-      // render: t => orgList.filter(x => x.orgId === t)[0]?.orgName,
42
+      hideInTable:true,
47
       renderFormItem: () => (
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
       title: '申请人',
54
       title: '申请人',
123
         request={getList}
110
         request={getList}
124
         expfunc={exportList}
111
         expfunc={exportList}
125
         options={false}
112
         options={false}
126
-        // onReset={handleReset}
127
         form={{ ignoreRules: false }}
113
         form={{ ignoreRules: false }}
128
         manualRequest={true}
114
         manualRequest={true}
129
         revalidateOnFocus={false}
115
         revalidateOnFocus={false}