李志伟 3 лет назад
Родитель
Сommit
927f73964b

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

@@ -30,6 +30,18 @@ export default [
30 30
     redirect: '/person',
31 31
     hideInMenu: true,
32 32
   },
33
+  {
34
+    path: '/applicationList',
35
+    name: '申请列表',
36
+    icon: 'apartment',
37
+    component: '@/pages/applicationList',
38
+  },
39
+  {
40
+    path: '/applicationList/detail.jsx',
41
+    name: '申请详情',
42
+    icon: 'apartment',
43
+    component: '@/pages/applicationList/detail.jsx',
44
+  },
33 45
   {
34 46
     path: '/examine',
35 47
     name: '审核列表',
@@ -42,6 +54,12 @@ export default [
42 54
     icon: 'apartment',
43 55
     component: '@/pages/examine/detail.jsx',
44 56
   },
57
+  {
58
+    path: '/certificateIssuance',
59
+    name: '证件发放',
60
+    icon: 'apartment',
61
+    component: '@/pages/certificateIssuance',
62
+  },
45 63
   {
46 64
     path: '/banner',
47 65
     name: '轮播图列表',
@@ -54,7 +72,6 @@ export default [
54 72
     hideInMenu: true,
55 73
     component: '@/pages/banner/edit.jsx',
56 74
   },
57
-
58 75
   {
59 76
     path: '/notice',
60 77
     name: '通知列表',
@@ -67,6 +84,12 @@ export default [
67 84
     hideInMenu: true,
68 85
     component: '@/pages/notice/edit.jsx',
69 86
   },
87
+  {
88
+    path: '/userList',
89
+    name: '注册列表',
90
+    icon: 'apartment',
91
+    component: '@/pages/userList',
92
+  },
70 93
   {
71 94
     path: '/person',
72 95
     name: '人员列表',

+ 58
- 0
src/pages/applicationList/detail.jsx Просмотреть файл

@@ -0,0 +1,58 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Card, Form, Button } from 'antd';
3
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
+import { getWithdrawalDetail } from '@/services/withdrawal'
5
+import { history } from 'umi';
6
+
7
+const FormItem = Form.Item;
8
+const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
9
+const goBack = () => {
10
+  history.goBack();
11
+};
12
+export default (props) => {
13
+  const { location } = props;
14
+  const { id } = location.query;
15
+  const [withdrawal, setWithdrawal] = useState();
16
+
17
+  useEffect(() => {
18
+    getWithdrawalDetail(id).then((res) => {
19
+      setWithdrawal(res)
20
+    }).catch((err) => {
21
+      console.log(err.message)
22
+    });
23
+  }, [id])
24
+  return (
25
+    <PageHeaderWrapper    >
26
+      <Card>
27
+        <Form {...formItemLayout}>
28
+          <FormItem label="申请人">
29
+            {withdrawal?.userName}
30
+          </FormItem>
31
+          <FormItem label="犬主">
32
+            {withdrawal?.phone}
33
+          </FormItem>
34
+          <FormItem label="犬名">
35
+            {withdrawal?.orgName}
36
+          </FormItem>
37
+          <FormItem label="犬种">
38
+            {withdrawal?.amountLeft / 100}
39
+          </FormItem>
40
+          <FormItem label="毛色">
41
+            {withdrawal?.bankCard.ownerBank}
42
+          </FormItem>
43
+          <FormItem label="照片">
44
+            {withdrawal?.bankCard.cardNo}
45
+          </FormItem>
46
+          <FormItem label="养狗地址">
47
+            {withdrawal?.money / 100}
48
+          </FormItem>
49
+          <FormItem label=" " colon={false}>
50
+            <Button type="default" onClick={() => goBack()}>
51
+              返回
52
+            </Button>
53
+          </FormItem>
54
+        </Form>
55
+      </Card>
56
+    </PageHeaderWrapper>
57
+  );
58
+};

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

@@ -0,0 +1,95 @@
1
+import React, { useRef } from 'react'
2
+import { useModel } from 'umi';
3
+import moment from 'moment';
4
+import { DatePicker, Button } from 'antd';
5
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
+import PageTable from '@/components/PageTable'
7
+import { getList } from '@/services/work'
8
+
9
+const { RangePicker } = DatePicker;
10
+
11
+const formatterTime = (val) => {
12
+  return val ? moment(val).format('YYYY-MM-DD HH:mm') : '';
13
+};
14
+
15
+export default (props) => {
16
+  const initDate = useRef(moment())
17
+  const actionRef = useRef();
18
+  const { initialState } = useModel('@@initialState');
19
+
20
+  const handleBeforSearch = (params) => {
21
+    const { createDate, ...others } = params;
22
+
23
+    let start, end, orgId;
24
+    if (!createDate || createDate.length < 1) {
25
+      // 默认时间是今天
26
+      start = moment().format('YYYY-MM-DD')
27
+      end = start
28
+    } else {
29
+      start = moment(createDate[0]).format('YYYY-MM-DD')
30
+      end = moment(createDate[1]).format('YYYY-MM-DD')
31
+    }
32
+    if (initialState.currentUser.orgId) {
33
+      orgId = initialState.currentUser.orgId
34
+      return { ...others, start, end, orgId };
35
+    }
36
+    return { ...others, start, end };
37
+  }
38
+  const columns = [
39
+    {
40
+      title: '申请人',
41
+      dataIndex: 'userName',
42
+      key: 'userName',
43
+      search: true,
44
+    },
45
+    {
46
+      title: '申请时间',
47
+      dataIndex: 'createDate',
48
+      key: 'createDate',
49
+      render: (t) => formatterTime(t),
50
+      renderFormItem: (_, record) => <RangePicker defaultValue={[initDate.current, initDate.current]} placeholder={['开始日期', '结束日期']} format='YYYY-MM-DD' />
51
+    },
52
+    {
53
+      title: '订单状态',
54
+      dataIndex: 'userName',
55
+      key: 'userName',
56
+      search: true,//已支付 待支付
57
+    },
58
+    {
59
+      title: '审核状态',
60
+      dataIndex: 'userName',
61
+      key: 'userName',
62
+      search: true,
63
+    },
64
+    {
65
+      title: '操作',
66
+      valueType: 'option',
67
+      width: 160,
68
+      render: (_, record) => [
69
+        <Button key={1} style={{ padding: 0 }} type="link">
70
+          详情
71
+        </Button>
72
+      ],
73
+    },
74
+  ]
75
+
76
+
77
+  return (
78
+    <PageHeaderWrapper>
79
+      <PageTable
80
+        actionRef={actionRef}
81
+        columns={columns}
82
+        request={getList}
83
+        options={false}
84
+        search={{
85
+          defaultCollapsed: false
86
+        }}
87
+        form={{ ignoreRules: false }}
88
+        manualRequest={true}
89
+        revalidateOnFocus={false}
90
+        beforeSearchSubmit={handleBeforSearch}
91
+        rowKey="formId"
92
+      />
93
+    </PageHeaderWrapper>
94
+  )
95
+}

+ 26
- 7
src/pages/certificateIssuance/index.jsx Просмотреть файл

@@ -36,12 +36,31 @@ export default (props) => {
36 36
     return { ...others, start, end };
37 37
   }
38 38
   const columns = [
39
+    
39 40
     {
40
-      title: '申请人',
41
+      title: '证件号',
41 42
       dataIndex: 'userName',
42 43
       key: 'userName',
43 44
       search: true,
44 45
     },
46
+    {
47
+      title: '犬主',
48
+      dataIndex: 'userName',
49
+      key: 'userName',
50
+      search: true,
51
+    },
52
+    {
53
+      title: '犬名',
54
+      dataIndex: 'userName',
55
+      key: 'userName',
56
+      search: true,
57
+    },
58
+    {
59
+      title: '申领方式',
60
+      dataIndex: 'userName',//快递到家,上门自取
61
+      key: 'userName',
62
+      search: true,
63
+    },
45 64
     {
46 65
       title: '申请时间',
47 66
       dataIndex: 'createDate',
@@ -50,19 +69,19 @@ export default (props) => {
50 69
       renderFormItem: (_, record) => <RangePicker defaultValue={[initDate.current, initDate.current]} placeholder={['开始日期', '结束日期']} format='YYYY-MM-DD' />
51 70
     },
52 71
     {
53
-      title: '审核状态',
72
+      title: '状态',
54 73
       dataIndex: 'userName',
55 74
       key: 'userName',
56
-      search: true,
75
+      search: true,//待发放 已发放
57 76
     },
58 77
     {
59
-      title: '审核人',
78
+      title: '发放人',
60 79
       dataIndex: 'userName',
61 80
       key: 'userName',
62
-      search: true,
81
+      search: true,//待发放 已发放
63 82
     },
64 83
     {
65
-      title: '审核时间',
84
+      title: '发放时间',
66 85
       dataIndex: 'createDate',
67 86
       key: 'createDate',
68 87
       render: (t) => formatterTime(t),
@@ -74,7 +93,7 @@ export default (props) => {
74 93
       width: 160,
75 94
       render: (_, record) => [
76 95
         <Button key={1} style={{ padding: 0 }} type="link">
77
-          详情
96
+          发放
78 97
         </Button>
79 98
       ],
80 99
     },

+ 103
- 0
src/pages/certificateIssuance/issuance.jsx Просмотреть файл

@@ -0,0 +1,103 @@
1
+import React, { useState, useEffect } from 'react';
2
+import { Card, Form, Button, message, Input } from 'antd';
3
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
+import { getWithdrawalDetail, updateWithdrawal } from '@/services/withdrawal'
5
+import { history } from 'umi';
6
+
7
+const { TextArea } = Input;
8
+const FormItem = Form.Item;
9
+const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
10
+const goBack = () => {
11
+  history.goBack();
12
+};
13
+export default (props) => {
14
+  const { location } = props;
15
+  const { id } = location.query;
16
+  const [withdrawal, setWithdrawal] = useState();
17
+  const [remarks, setRemarks] = useState()
18
+  const [loading, setLoading] = useState(false)
19
+
20
+  const handleAudit = (val) => {
21
+    if (remarks) {
22
+      setLoading(true)
23
+      updateWithdrawal(withdrawal.withdrawalId, { ...withdrawal, auditStatus: val, auditRemark: remarks }).then(() => {
24
+        message.success('操作成功');
25
+        goBack()
26
+        setLoading(false)
27
+      }).catch(err => {
28
+        console.log(err.message)
29
+        setLoading(false)
30
+      })
31
+    }
32
+    else {
33
+      message.success('请输入处理结果');
34
+    }
35
+  }
36
+  useEffect(() => {
37
+    getWithdrawalDetail(id).then((res) => {
38
+      setWithdrawal(res)
39
+      setRemarks(res.auditRemark)
40
+    }).catch((err) => {
41
+      console.log(err.message)
42
+    });
43
+  }, [id])
44
+  return (
45
+    <PageHeaderWrapper    >
46
+      <Card>
47
+        <Form {...formItemLayout}>
48
+          <FormItem label="申请人">
49
+            {withdrawal?.userName}
50
+          </FormItem>
51
+          <FormItem label="犬主">
52
+            {withdrawal?.phone}
53
+          </FormItem>
54
+          <FormItem label="犬名">
55
+            {withdrawal?.orgName}
56
+          </FormItem>
57
+          <FormItem label="犬种">
58
+            {withdrawal?.amountLeft / 100}
59
+          </FormItem>
60
+          <FormItem label="毛色">
61
+            {withdrawal?.bankCard.ownerBank}
62
+          </FormItem>
63
+          <FormItem label="照片">
64
+            {withdrawal?.bankCard.cardNo}
65
+          </FormItem>
66
+          <FormItem label="养狗地址">
67
+            {withdrawal?.money / 100}
68
+          </FormItem>
69
+          <FormItem label="领取方式">
70
+            {withdrawal?.money / 100}
71
+          </FormItem>
72
+          <FormItem label="快递公司">
73
+            {
74
+              withdrawal?.auditStatus == 0 ?
75
+                <TextArea placeholder='请输入处理结果(必填)' rows='3' style={{ width: '350px' }} value={remarks} onChange={(e) => setRemarks(e.target.value)} /> :
76
+                remarks
77
+            }
78
+          </FormItem>
79
+          <FormItem label="快递单号">
80
+            {
81
+              withdrawal?.auditStatus == 0 ?
82
+                <TextArea placeholder='请输入处理结果(必填)' rows='3' style={{ width: '350px' }} value={remarks} onChange={(e) => setRemarks(e.target.value)} /> :
83
+                remarks
84
+            }
85
+          </FormItem>
86
+          <FormItem label=" " colon={false}>
87
+            {
88
+              withdrawal?.auditStatus == 0 &&
89
+              <>
90
+                <Button type="primary" loading={loading} style={{ marginRight: '16px' }} onClick={() => handleAudit(1)}>
91
+                  发放
92
+                </Button>
93
+              </>
94
+            }
95
+            <Button type="default" onClick={() => goBack()}>
96
+              返回
97
+            </Button>
98
+          </FormItem>
99
+        </Form>
100
+      </Card>
101
+    </PageHeaderWrapper>
102
+  );
103
+};

+ 0
- 111
src/pages/dashboard/components/OrgDashboard/components/BannerStatis.jsx Просмотреть файл

@@ -1,111 +0,0 @@
1
-import { useEffect, useState } from 'react';
2
-import { history } from 'umi';
3
-import { Card, Row, Col } from 'antd'
4
-import { AppstoreOutlined, MacCommandOutlined, TeamOutlined, UsergroupDeleteOutlined, UsergroupAddOutlined } from '@ant-design/icons'
5
-import { getOrgComm } from '@/services/statis';
6
-import StatisCard from './StatisCard';
7
-import StatisGroup from './StatisGroup';
8
-
9
-const colorList = [
10
-  { backColor: '#126BAE', frontColor: '#fff' },
11
-  { backColor: '#66A9C9', frontColor: '#fff' },
12
-  { backColor: '#08507b', frontColor: '#fff' },
13
-]
14
-
15
-export default (props) => {
16
-  const [cardData, setCardData] = useState({})
17
-
18
-  const toAbnormal = () => {
19
-    history.push('../resume-work/abnormal');
20
-  }
21
-
22
-  useEffect(() => {
23
-    getOrgComm().then((res) => {
24
-      setCardData(res || {});
25
-    })
26
-  }, [])
27
-
28
-  const abnormalNum = (cardData.todayReportNum || 0) - (cardData.todayNormalNum || 0)
29
-
30
-  return (
31
-    <Row justify='space-around' gutter={24} >
32
-      <Col span={8}>
33
-        <StatisGroup
34
-          title="企业"
35
-          data1={{ title: '历史提交总数', value: cardData.orgTotalNum || 0 }}
36
-          data2={{ title: ' ', value: -1 }}
37
-          {...colorList[0]}
38
-          icon={<AppstoreOutlined />}
39
-        />
40
-      </Col>
41
-      <Col span={8}>
42
-        <StatisGroup
43
-          title="上报人次"
44
-          data1={{ title: '今日提交', value: cardData.todayReportNum || 0 }}
45
-          data2={{ title: '昨日提交', value: cardData.yestodayReportNum || 0 }}
46
-          {...colorList[1]}
47
-          icon={<TeamOutlined />}
48
-        />
49
-      </Col>
50
-      <Col span={8}>
51
-        <StatisGroup
52
-          title="今日概况"
53
-          data1={{ title: '正常人次', value: cardData.todayNormalNum || 0 }}
54
-          data2={{ title: '异常人次', value: abnormalNum }}
55
-          {...colorList[2]}
56
-          icon={<UsergroupDeleteOutlined />}
57
-          onClick2={toAbnormal}
58
-        />
59
-      </Col>
60
-      {/* <Col span={4}>
61
-        <StatisCard
62
-          title="企业总数"
63
-          value={cardData?.orgTotalNum || 0}
64
-          icon={<AppstoreOutlined />}
65
-          {...colorList[0]}
66
-        />
67
-      </Col>
68
-      <Col span={4}>
69
-        <StatisCard
70
-          title="无数据企业"
71
-          value={`${cardData?.noDataOrgNum || 0} / ${cardData?.orgTotalNum || 0}`}
72
-          icon={<MacCommandOutlined />}
73
-          {...colorList[1]}
74
-        />
75
-      </Col>
76
-      <Col span={4}>
77
-        <StatisCard
78
-          title="今日提交总人数"
79
-          value={cardData?.todayReportNum || 0}
80
-          icon={<TeamOutlined />}
81
-          {...colorList[2]}
82
-        />
83
-      </Col>
84
-      <Col span={4}>
85
-        <StatisCard
86
-          title="昨日提交总人数"
87
-          value={cardData?.yestodayReportNum || 0}
88
-          icon={<TeamOutlined />}
89
-          {...colorList[3]}
90
-        />
91
-      </Col>
92
-      <Col span={4}>
93
-        <StatisCard
94
-          title="今日正常人数"
95
-          value={cardData?.todayNormalNum || 0}
96
-          icon={<UsergroupDeleteOutlined />}
97
-          {...colorList[4]}
98
-        />
99
-      </Col>
100
-      <Col span={4}>
101
-        <StatisCard
102
-          title="今日异常人数"
103
-          value={(cardData?.todayReportNum || 0) - (cardData?.todayNormalNum || 0)}
104
-          icon={<UsergroupAddOutlined />}
105
-          {...colorList[5]}
106
-          onClick={toAbnormal}
107
-        />
108
-      </Col> */}
109
-    </Row>
110
-  )
111
-}

+ 0
- 130
src/pages/dashboard/components/OrgDashboard/components/OrgSummary.jsx Просмотреть файл

@@ -1,130 +0,0 @@
1
-import { useEffect, useState, useCallback } from 'react';
2
-import Echart from '@/components/echart/echart'
3
-import { Card } from 'antd'
4
-import { getAllOrgLine } from '@/services/statis'
5
-import { useModel } from 'umi'
6
-import moment from 'moment';
7
-
8
-const lineOption = {
9
-  tooltip: {
10
-    trigger: 'axis',
11
-    axisPointer: {
12
-      type: 'shadow'
13
-    },
14
-    // formatter: (params) => `截止:${params[0].data.name} <br />正常: ${params[0].data.value}`
15
-    // formatter: (params) => `人次: ${params[0].data.value || 0}`
16
-  },
17
-
18
-  grid: {
19
-    containLabel: true,
20
-    left: 0,
21
-    top: 8,
22
-    right: 60,
23
-    bottom: 0,
24
-  },
25
-  yAxis: {
26
-    type: 'value',
27
-  },
28
-
29
-  xAxis: {
30
-    type: 'category',
31
-
32
-  },
33
-
34
-
35
-  dataset: [
36
-    {
37
-      dimensions: ['name', 'value'],
38
-      source: [],
39
-    },
40
-    {
41
-      dimensions: ['name', 'value'],
42
-      source: [],
43
-    }
44
-  ],
45
-  series: [
46
-    {
47
-      name: '正常',
48
-      type: 'line',
49
-      datasetIndex: 0,
50
-      itemStyle: {
51
-        normal: {
52
-          color: "#08507b",
53
-          lineStyle: {
54
-            color: "#08507b"
55
-          }
56
-        }
57
-      }
58
-
59
-
60
-
61
-    },
62
-    {
63
-      name: '异常',
64
-      type: 'line',
65
-      datasetIndex: 1,
66
-      itemStyle: {
67
-        normal: {
68
-          color: "red",
69
-          lineStyle: {
70
-            color: "red"
71
-          }
72
-        }
73
-      }
74
-
75
-      // lineStyle: {
76
-      //   color: 'red',
77
-      // },
78
-    }
79
-  ]
80
-}
81
-
82
-
83
-export default (props) => {
84
-  const [loading, setLoading] = useState(false)
85
-  const [list, setList] = useState({})
86
-  const { initialState } = useModel('@@initialState');
87
-
88
-  const dataset = [
89
-    {
90
-      dimensions: ['name', 'value'],
91
-      source: list.normal || [],
92
-    },
93
-    {
94
-      dimensions: ['name', 'value'],
95
-      source: list.abnormal || [],
96
-    }
97
-  ]
98
-
99
-  const option = {
100
-    ...lineOption,
101
-    dataset,
102
-  }
103
-  console.log('dataset', dataset);
104
-
105
-
106
-  useEffect(() => {
107
-    // queryList()
108
-    setLoading(true)
109
-
110
-    getAllOrgLine({
111
-      days: 7,
112
-      startDate: moment().subtract(7, 'day').format('YYYY-MM-DD'),
113
-      orgId: initialState.currentUser.orgId,
114
-    }).then((res) => {
115
-      setLoading(false)
116
-      setList(res)
117
-
118
-    }).catch(err => {
119
-      setLoading(false)
120
-
121
-    })
122
-
123
-  }, [])
124
-
125
-  return (
126
-    <Card title='企业数据总览' loading={loading} bodyStyle={{ height: 600 }}>
127
-      <Echart option={option} />
128
-    </Card>
129
-  )
130
-}

+ 0
- 124
src/pages/dashboard/components/OrgDashboard/components/ReportList.jsx Просмотреть файл

@@ -1,124 +0,0 @@
1
-import moment from 'moment'
2
-import { Card, List, Badge, Space, Carousel } from 'antd'
3
-import { useCallback, useEffect, useMemo, useState } from 'react'
4
-import { getList } from '@/services/work'
5
-import { random } from '@/utils/number'
6
-import { useModel } from 'umi'
7
-
8
-const colorList = [
9
-  '#a8071a',
10
-  '#ad2102',
11
-  '#ad4e00',
12
-  '#ad6800',
13
-  '#ad8b00',
14
-  '#5b8c00',
15
-  '#237804',
16
-  '#006d75',
17
-  '#0050b3',
18
-  '#10239e',
19
-  '#391085',
20
-  '#9e1068',
21
-]
22
-
23
-const Avatar = (props) => {
24
-  const style = useMemo(() => {
25
-    let r = random(0, colorList.length)
26
-    if (r >= 12) r = 0;
27
-    const color = colorList[r];
28
-
29
-    return {
30
-      background: color,
31
-      color: '#fff',
32
-      width: '48px',
33
-      height: '48px',
34
-      fontSize: '1.8em',
35
-      lineHeight: '48px',
36
-      textAlign: 'center',
37
-    }
38
-  }, [])
39
-
40
-  return <div style={style}>{props.children}</div>
41
-}
42
-
43
-
44
-const Content = (props) => {
45
-  const { item } = props;
46
-
47
-  const abnormal = item.antigenIsNormal === 0 || item.nucleicIsNormal === 0
48
-  const status = abnormal ? 'error' : 'success'
49
-
50
-  return (
51
-    <Space size="large">
52
-      <span><Badge status={status} /> {abnormal ? '异常' : '正常'}</span>
53
-      <span>{moment(item.createDate).format('HH:mm')}</span>
54
-    </Space>
55
-  )
56
-}
57
-
58
-const showNum = 8;
59
-
60
-export default (props) => {
61
-  const [loading, setLoading] = useState(false)
62
-  const [list, setList] = useState([])
63
-  const [disabled, setDisabled] = useState(false)
64
-  const { initialState } = useModel('@@initialState');
65
-
66
-
67
-  const queryList = useCallback(() => {
68
-    setLoading(true)
69
-    getList(
70
-      {
71
-        pageSize: 50, // 过多会很卡
72
-        start: moment().format('YYYY-MM-DD'),
73
-        end: moment().format('YYYY-MM-DD'),
74
-        isAll: true,
75
-        orgId: initialState.currentUser.orgId,
76
-      }).then(res => {
77
-        setLoading(false)
78
-        setList((res.records || []).reverse())
79
-      }).catch(er => {
80
-        setLoading(false)
81
-      })
82
-  }, [])
83
-
84
-  useEffect(() => {
85
-    queryList()
86
-  }, [])
87
-
88
-  useEffect(() => {
89
-    setDisabled(!list || list.length <= showNum)
90
-  }, [list])
91
-
92
-  return (
93
-    <Card title="今日提交记录" loading={loading} bodyStyle={{ height: '600px' }}>
94
-      <List style={{ height: '100%', overflow: 'hidden' }} itemLayout="horizontal">
95
-        <Carousel
96
-          autoplay={!disabled}
97
-          infinite={!disabled}
98
-          rtl
99
-          slidesToShow={showNum}
100
-          slidesToScroll={1}
101
-          dot={false}
102
-          dotPosition="right"
103
-          style={{ height: '100%' }}
104
-        >
105
-          {
106
-            list.map(item => (
107
-              <div key={item.formId} style={{ display: 'flex' }}>
108
-                <List.Item>
109
-                  <List.Item.Meta
110
-                    avatar={<Avatar>{item.orgName.substring(0, 1)}</Avatar>}
111
-                    title={item.userName}
112
-                    con
113
-                    description={item.orgName}
114
-                  />
115
-                  <Content item={item} />
116
-                </List.Item>
117
-              </div>
118
-            ))
119
-          }
120
-        </Carousel>
121
-      </List>
122
-    </Card>
123
-  )
124
-}

+ 0
- 41
src/pages/dashboard/components/OrgDashboard/components/StatisCard.jsx Просмотреть файл

@@ -1,41 +0,0 @@
1
-import React from 'react'
2
-import { Statistic, Card } from 'antd';
3
-
4
-const iconDivStyle = {
5
-  position: 'absolute',
6
-  top: 20,
7
-  right: 20,
8
-}
9
-
10
-const iconStyle = {
11
-  fontSize: '5em',
12
-  color: '#fff',
13
-  opacity: 0.3,
14
-}
15
-
16
-export default (props) => {
17
-  const { title, value, icon, backColor = '#fff', frontColor='#000', onClick } = props
18
-
19
-  const bodyStyle = {
20
-    background: backColor,
21
-    overflow: 'hidden',
22
-    position: 'relative',
23
-  }
24
-
25
-  return (
26
-    <Card bodyStyle={bodyStyle} onClick={onClick}>
27
-      <Statistic
28
-        title={title}
29
-        value={value}
30
-        valueStyle={{ color: frontColor }}
31
-      />
32
-      {
33
-        icon && (
34
-          <div style={iconDivStyle}>
35
-            {React.cloneElement(icon, { style: iconStyle })}
36
-          </div>
37
-        )
38
-      }
39
-    </Card>
40
-  )
41
-}

+ 0
- 78
src/pages/dashboard/components/OrgDashboard/components/StatisGroup.jsx Просмотреть файл

@@ -1,78 +0,0 @@
1
-import React, { useState } from 'react';
2
-import { StatisticCard } from '@ant-design/pro-card';
3
-
4
-const { Divider } = StatisticCard;
5
-const iconDivStyle = {
6
-  position: 'absolute',
7
-  top: '4px',
8
-  right: '-30px',
9
-}
10
-
11
-const iconStyle = {
12
-  fontSize: '10em',
13
-  color: '#fff',
14
-  opacity: 0.45,
15
-}
16
-
17
-export default (props) => {
18
-  const { title, data1, data2, icon, onClick1, onClick2, backColor = '#fff', frontColor = '#000' } = props
19
-
20
-  const headStyle = {
21
-    background: backColor,
22
-    color: frontColor,
23
-  }
24
-
25
-  const bodyStyle = {
26
-    background: backColor,
27
-    color: frontColor,
28
-    position: 'relative',
29
-    overflow: 'hidden',
30
-  }
31
-
32
-  const groupBodyStyle = {
33
-    ...bodyStyle,
34
-    padding: 0,
35
-  }
36
-
37
-  const valueStyle = {
38
-    color: frontColor
39
-  }
40
-
41
-  const headTitleStyle = {
42
-    color: frontColor,
43
-    fontSize: '19px',
44
-    fontWeight: 700,
45
-    letterSpacing: '2px',
46
-  }
47
-
48
-  const titleStyle = {
49
-    color: frontColor,
50
-  }
51
-
52
-  return (
53
-    <StatisticCard.Group title={<div style={headTitleStyle}>{title}</div>} headStyle={headStyle} bodyStyle={groupBodyStyle}>
54
-      <StatisticCard
55
-        bodyStyle={bodyStyle}
56
-        statistic={{ ...data1, title: (<div style={titleStyle}>{data1.title}</div>), valueStyle }}
57
-        onClick={onClick1}
58
-      />
59
-      <Divider type="vertical" />
60
-      <StatisticCard
61
-        bodyStyle={bodyStyle}
62
-        statistic={
63
-          data2.value == -1 ?
64
-            { ...data2, value: ' ', title: (<div style={titleStyle}>{data2.title}</div>), valueStyle }
65
-            :
66
-            { ...data2, title: (<div style={titleStyle}>{data2.title}</div>), valueStyle }}
67
-        onClick={onClick2}
68
-      />
69
-      {
70
-        icon && (
71
-          <div style={iconDivStyle}>
72
-            {React.cloneElement(icon, { style: iconStyle })}
73
-          </div>
74
-        )
75
-      }
76
-    </StatisticCard.Group>
77
-  )
78
-}

+ 0
- 20
src/pages/dashboard/components/OrgDashboard/index.jsx Просмотреть файл

@@ -1,20 +0,0 @@
1
-import React from 'react';
2
-import { Space, Row, Col } from 'antd'
3
-import ReportList from './components/ReportList';
4
-import OrgSummary from './components/OrgSummary';
5
-import BannerStatis from './components/BannerStatis';
6
-
7
-export default (props) => {  
8
-  return (
9
-    <Space direction="vertical" size="large" style={{ width: '100%' }}>
10
-      <BannerStatis />
11
-
12
-      <Row gutter={24}>
13
-        <Col span={12}><OrgSummary /></Col>
14
-        <Col span={12}>
15
-          <ReportList />
16
-        </Col>
17
-      </Row>
18
-    </Space>
19
-  )
20
-}

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

@@ -0,0 +1,79 @@
1
+import React, { useRef } from 'react'
2
+import { useModel } from 'umi';
3
+import moment from 'moment';
4
+import { DatePicker, Button } from 'antd';
5
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
+import PageTable from '@/components/PageTable'
7
+import { getList } from '@/services/work'
8
+
9
+const { RangePicker } = DatePicker;
10
+
11
+const formatterTime = (val) => {
12
+  return val ? moment(val).format('YYYY-MM-DD HH:mm') : '';
13
+};
14
+
15
+export default (props) => {
16
+  const initDate = useRef(moment())
17
+  const actionRef = useRef();
18
+  const { initialState } = useModel('@@initialState');
19
+
20
+  const handleBeforSearch = (params) => {
21
+    const { createDate, ...others } = params;
22
+
23
+    let start, end, orgId;
24
+    if (!createDate || createDate.length < 1) {
25
+      // 默认时间是今天
26
+      start = moment().format('YYYY-MM-DD')
27
+      end = start
28
+    } else {
29
+      start = moment(createDate[0]).format('YYYY-MM-DD')
30
+      end = moment(createDate[1]).format('YYYY-MM-DD')
31
+    }
32
+    if (initialState.currentUser.orgId) {
33
+      orgId = initialState.currentUser.orgId
34
+      return { ...others, start, end, orgId };
35
+    }
36
+    return { ...others, start, end };
37
+  }
38
+  const columns = [
39
+    
40
+    {
41
+      title: '姓名',
42
+      dataIndex: 'userName',
43
+      key: 'userName',
44
+      search: true,
45
+    },
46
+    {
47
+      title: '手机号',
48
+      dataIndex: 'userName',
49
+      key: 'userName',
50
+      search: true,
51
+    },
52
+    {
53
+      title: '注册时间',
54
+      dataIndex: 'createDate',
55
+      key: 'createDate',
56
+      render: (t) => formatterTime(t),
57
+      renderFormItem: (_, record) => <RangePicker defaultValue={[initDate.current, initDate.current]} placeholder={['开始日期', '结束日期']} format='YYYY-MM-DD' />
58
+    },
59
+  ]
60
+
61
+  return (
62
+    <PageHeaderWrapper>
63
+      <PageTable
64
+        actionRef={actionRef}
65
+        columns={columns}
66
+        request={getList}
67
+        options={false}
68
+        search={{
69
+          defaultCollapsed: false
70
+        }}
71
+        form={{ ignoreRules: false }}
72
+        manualRequest={true}
73
+        revalidateOnFocus={false}
74
+        beforeSearchSubmit={handleBeforSearch}
75
+        rowKey="formId"
76
+      />
77
+    </PageHeaderWrapper>
78
+  )
79
+}