李志伟 2 lat temu
rodzic
commit
d641b4968e

+ 1
- 2
config/routes.js Wyświetl plik

@@ -27,9 +27,8 @@ export default [
27 27
   },  
28 28
   {
29 29
     path: '/',
30
-    name: '工作台',//暂定
31 30
     access:'admin',
32
-    redirect: '/person',
31
+    redirect: '/dashboard',
33 32
     hideInMenu: true,
34 33
   },
35 34
   {

+ 0
- 63
src/components/OrgSearch/index.jsx Wyświetl plik

@@ -1,63 +0,0 @@
1
-import { useEffect, useState } from 'react';
2
-import { Select } from 'antd'
3
-import { getDetail } from '@/services/org'
4
-import { getList } from '@/services/org'
5
-
6
-const Option = Select.Option;
7
-export default (props) => {
8
-  const { value, onChange, ...otherProps } = props;
9
-
10
-  const showType = 0; // 不显示报错
11
-
12
-  const [list, setList] = useState([])
13
-
14
-  const searchData = (val) => { 
15
-    getList({ pageSize: 999,orgName:val }, showType).then(res => {
16
-      setList(res.records || [])
17
-    })    
18
-  }
19
-
20
-  const handleSearch = (text) => {
21
-    if (text) {
22
-      searchData(text)
23
-    }else{
24
-      getList({ pageSize: 999 }, showType).then(res => {
25
-        setList(res.records || [])
26
-      })
27
-    }
28
-  }
29
-
30
-  useEffect(() => {
31
-    if (value) {
32
-      getDetail(value).then((res) => {
33
-        setList([res])
34
-      })
35
-    }else{
36
-      getList({ pageSize: 999 }, showType).then(res => {
37
-        setList(res.records || [])
38
-      })
39
-    }
40
-  }, [value])
41
-
42
-  return (
43
-    <Select
44
-      showSearch
45
-      value={value}
46
-      defaultActiveFirstOption={false}
47
-      showArrow={false}
48
-      filterOption={false}
49
-      onSearch={handleSearch}
50
-      onChange={onChange}
51
-      notFoundContent={null}
52
-      {...otherProps}
53
-    >
54
-      {
55
-        list.map((item) => {
56
-          return (
57
-            <Option key={item.orgId} value={item.orgId}>{item.orgName}</Option>
58
-          )
59
-        })
60
-      }
61
-    </Select>
62
-  )
63
-}

+ 0
- 70
src/components/QRCode/index.jsx Wyświetl plik

@@ -1,70 +0,0 @@
1
-import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useImperativeHandle } from 'react'
2
-import classNames from 'classnames'
3
-import QRCode from 'qrcode'
4
-import html2canvas from 'html2canvas'
5
-import styles from './style.less'
6
-
7
-export default forwardRef((props, ref) => {
8
-  const { className, width = 430, border, content, title, fileName, onError } = props
9
-
10
-  const rootRef = useRef()
11
-  const canvasRef = useRef()
12
-
13
-  const { style1, style2 } = useMemo(() => {
14
-    return {
15
-      style1: {
16
-        border: border ? '2px solid rgba(0,0,0)' : 'none',
17
-        borderRadius: border ? '8px' : 'none'
18
-      },
19
-      style2: {
20
-        width: `${width}px`,
21
-        height: `${width}px`,
22
-      }
23
-    }
24
-  }, [width, border])
25
-
26
-  const qrOption = useMemo(() => ({
27
-    margin: 0,
28
-    width: width,
29
-    errorCorrectionLevel: 'M'
30
-  }), [width])
31
-
32
-  useEffect(() => {
33
-    if (content) {
34
-      QRCode.toCanvas(canvasRef.current, content, qrOption, onError)
35
-    }
36
-  }, [content, qrOption, onError])
37
-
38
-  useImperativeHandle(ref, () => ({
39
-    download: () => {
40
-      return new Promise((resolve, reject) => {
41
-        html2canvas(rootRef.current).then((canvas) => {
42
-          const imageData = canvas.toDataURL('image/png', .8);
43
-          const link = document.createElement('a');
44
-          link.download = `${fileName || 'qrcode'}.png`
45
-          link.href = imageData
46
-          link.click()
47
-          resolve()
48
-        }).catch(reject)
49
-      })
50
-    },
51
-    getCanvas: () => {
52
-      return new Promise((resolve, reject) => {
53
-        html2canvas(rootRef.current).then((canvas) => {
54
-          resolve(canvas)
55
-        }).catch(reject)
56
-      })
57
-    }
58
-  }), [fileName])
59
-
60
-  return (
61
-    <div className={classNames(className, styles['qrcode-box'])} ref={rootRef}>
62
-      <div className={styles['qrcode-container']} style={style1}>
63
-        <canvas ref={canvasRef} style={style2}/>
64
-      </div>
65
-      {
66
-        title && <h3>{title}</h3>
67
-      }
68
-    </div>
69
-  )
70
-})

+ 0
- 18
src/components/QRCode/style.less Wyświetl plik

@@ -1,18 +0,0 @@
1
-
2
-.qrcode-box {
3
-  display: flex;
4
-  align-items: center;
5
-  justify-content: center;
6
-  flex-direction: column;
7
-
8
-  .qrcode-container {
9
-    padding: 16px;
10
-    flex: none;
11
-  }
12
-
13
-  h3 {
14
-    font-size: 24px;
15
-    font-weight: bold;
16
-    line-height: 3em;
17
-  }
18
-}

+ 1
- 2
src/components/echart/echart.jsx Wyświetl plik

@@ -2,7 +2,7 @@ import React, { useEffect, useRef } from 'react'
2 2
 // 引入 echarts 核心模块,核心模块提供了 echarts 使用必须要的接口。
3 3
 import * as echarts from 'echarts/core';
4 4
 // 引入柱状图图表,图表后缀都为 Chart
5
-import { BarChart, LineChart } from 'echarts/charts';
5
+import { LineChart } from 'echarts/charts';
6 6
 // 引入提示框,标题,直角坐标系,数据集,内置数据转换器组件,组件后缀都为 Component
7 7
 import {
8 8
   TitleComponent,
@@ -27,7 +27,6 @@ echarts.use([
27 27
   DatasetComponent,
28 28
   DataZoomComponent,
29 29
   TransformComponent,
30
-  BarChart,
31 30
   LineChart,//折线图
32 31
   LabelLayout,
33 32
   UniversalTransition,

+ 1
- 1
src/pages/banner/edit.jsx Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 import { history } from 'umi';
2
-import { Input, Card, Form, Button, message, InputNumber } from 'antd';
2
+import { Card, Form, Button, message, InputNumber } from 'antd';
3 3
 import { useEffect, useState } from 'react';
4 4
 import ProCard from '@ant-design/pro-card';
5 5
 import { UploadImage } from '@/components/Upload';

+ 2
- 2
src/pages/cardList/index.jsx Wyświetl plik

@@ -33,8 +33,8 @@ export default (props) => {
33 33
       title: '有效期',
34 34
       dataIndex: 'createDate',
35 35
       key: 'createDate',
36
-      render: (t, record) => record.startDate + (record.expireDate!=null?'~' + record.expireDate:''),
37
-      search:false
36
+      render: (t, record) => record.startDate + (record.expireDate != null ? '~' + record.expireDate : ''),
37
+      search: false
38 38
     },
39 39
     {
40 40
       title: '操作',

+ 1
- 1
src/pages/cardNoList/index.jsx Wyświetl plik

@@ -66,7 +66,7 @@ export default (props) => {
66 66
       <PageTable
67 67
         columns={columns}
68 68
         request={getCardNoList}
69
-        rowKey="bannerId"
69
+        rowKey="qrId"
70 70
         options={false}
71 71
         toolBarRender={actions}
72 72
         actionRef={actionRef}

+ 1
- 1
src/pages/certificateIssuance/index.jsx Wyświetl plik

@@ -1,10 +1,10 @@
1 1
 import React, { useRef } from 'react'
2 2
 import moment from 'moment';
3
+import { history } from 'umi';
3 4
 import { DatePicker, Button } from 'antd';
4 5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
5 6
 import PageTable from '@/components/PageTable'
6 7
 import { getMakeList } from '@/services/application'
7
-import { history } from 'umi';
8 8
 
9 9
 const { RangePicker } = DatePicker;
10 10
 

+ 1
- 1
src/pages/certificateIssuance/issuance.jsx Wyświetl plik

@@ -1,8 +1,8 @@
1 1
 import React, { useState, useEffect } from 'react';
2
+import { history } from 'umi';
2 3
 import { Card, Form, Button, message, Input, Image } from 'antd';
3 4
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
4 5
 import { getApplicationDetail, updateMake } from '@/services/application'
5
-import { history } from 'umi';
6 6
 
7 7
 const FormItem = Form.Item;
8 8
 const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };

+ 6
- 6
src/pages/dashboard/components/BannerStatis.jsx Wyświetl plik

@@ -32,8 +32,8 @@ export default (props) => {
32 32
       <Col span={8}>
33 33
         <StatisGroup
34 34
           title="总数"
35
-          data1={{ title: '总注册数', value:cardData? cardData[0].value:0 }}
36
-          data2={{ title: '证牌发放数', value: cardData?cardData[1].value:0}}
35
+          data1={{ title: '总注册数', value: cardData ? cardData[0].value : 0 }}
36
+          data2={{ title: '证牌发放数', value: cardData ? cardData[1].value : 0 }}
37 37
           {...colorList[0]}
38 38
           icon={<AppstoreOutlined />}
39 39
         />
@@ -41,8 +41,8 @@ export default (props) => {
41 41
       <Col span={8}>
42 42
         <StatisGroup
43 43
           title="审核"
44
-          data1={{ title: '待审核数', value: cardData?cardData[2].value :0}}
45
-          data2={{ title: '审核驳回数', value:cardData? cardData[3].value :0}}
44
+          data1={{ title: '待审核数', value: cardData ? cardData[2].value : 0 }}
45
+          data2={{ title: '审核驳回数', value: cardData ? cardData[3].value : 0 }}
46 46
           {...colorList[1]}
47 47
           icon={<AuditOutlined />
48 48
           }
@@ -53,8 +53,8 @@ export default (props) => {
53 53
       <Col span={8}>
54 54
         <StatisGroup
55 55
           title="提交"
56
-          data1={{ title: '今日提交数', value: cardData?cardData[4].value :0}}
57
-          data2={{ title: '本月提交数', value: cardData?cardData[5].value :0}}
56
+          data1={{ title: '今日提交数', value: cardData ? cardData[4].value : 0 }}
57
+          data2={{ title: '本月提交数', value: cardData ? cardData[5].value : 0 }}
58 58
           {...colorList[2]}
59 59
           icon={<FieldTimeOutlined />}
60 60
           onClick1={toApplichtion}

+ 1
- 1
src/pages/dashboard/components/OrgSummary.jsx Wyświetl plik

@@ -1,8 +1,8 @@
1 1
 import { useEffect, useState, useCallback } from 'react';
2 2
 import Echart from '@/components/echart/echart'
3 3
 import { Card } from 'antd'
4
-import {getApplyDaily} from '@/services/statis'
5 4
 import moment from 'moment';
5
+import { getApplyDaily } from '@/services/statis'
6 6
 
7 7
 const lineOption = {
8 8
   tooltip: {

+ 14
- 15
src/pages/dashboard/components/ReportList.jsx Wyświetl plik

@@ -1,11 +1,10 @@
1 1
 import moment from 'moment'
2 2
 import { Card, List, Image, Space, Carousel } from 'antd'
3 3
 import { useEffect, useMemo, useState } from 'react'
4
-import { history } from 'umi';
5 4
 import { getApplicationList } from '@/services/application'
6 5
 
7 6
 const Avatar = (props) => {
8
-  const style = useMemo(() => {   
7
+  const style = useMemo(() => {
9 8
     return {
10 9
       width: '48px',
11 10
       height: '48px',
@@ -34,26 +33,26 @@ export default (props) => {
34 33
   useEffect(() => {
35 34
     setDisabled(!list || list.length <= showNum)
36 35
   }, [list])
37
-  useEffect(()=>{
36
+  useEffect(() => {
38 37
     setLoading(true)
39
-    getApplicationList({pageSize:50}).then((res)=>{
40
-      setList(res.records.map(item=>{
41
-        if (item.applyType=='first') {
42
-          item.applyTypeName='办证'
43
-        }else if(item.applyType=='renewal') {
44
-          item.applyTypeName='续期'
45
-        }else{
46
-          item.applyTypeName='补办'
38
+    getApplicationList({ pageSize: 50 }).then((res) => {
39
+      setList(res.records.map(item => {
40
+        if (item.applyType == 'first') {
41
+          item.applyTypeName = '办证'
42
+        } else if (item.applyType == 'renewal') {
43
+          item.applyTypeName = '续期'
44
+        } else {
45
+          item.applyTypeName = '补办'
47 46
         }
48 47
         return item
49 48
       })
50 49
       )
51 50
       setLoading(false)
52
-    }).catch(err=>{
51
+    }).catch(err => {
53 52
       console.log(err);
54 53
       setLoading(false)
55 54
     })
56
-  },[])
55
+  }, [])
57 56
 
58 57
   return (
59 58
     <Card title="近期提交记录" loading={loading} bodyStyle={{ height: '616px' }}>
@@ -70,12 +69,12 @@ export default (props) => {
70 69
         >
71 70
           {
72 71
             list.map(item => (
73
-              <div key={item.formId} style={{ display: 'flex' }}>
72
+              <div key={item.applyId} style={{ display: 'flex' }}>
74 73
                 <List.Item>
75 74
                   <List.Item.Meta
76 75
                     avatar={<Avatar item={item} />}
77 76
                     title={item.petName}
78
-                    description={item.applyTypeName+`  申请人(`+item.personName+')'}
77
+                    description={item.applyTypeName + `  申请人(` + item.personName + ')'}
79 78
                   />
80 79
                   <Content item={item} />
81 80
                 </List.Item>

+ 2
- 2
src/pages/dashboard/components/StatisGroup.jsx Wyświetl plik

@@ -1,4 +1,4 @@
1
-import React, { useState } from 'react';
1
+import React from 'react';
2 2
 import { StatisticCard } from '@ant-design/pro-card';
3 3
 
4 4
 const { Divider } = StatisticCard;
@@ -15,7 +15,7 @@ const iconStyle = {
15 15
 }
16 16
 
17 17
 export default (props) => {
18
-  const { title, data1, data2, icon, onClick1, onClick2, backColor = '#fff', frontColor='#000' } = props
18
+  const { title, data1, data2, icon, onClick1, onClick2, backColor = '#fff', frontColor = '#000' } = props
19 19
 
20 20
   const headStyle = {
21 21
     background: backColor,

+ 1
- 1
src/pages/dashboard/index.jsx Wyświetl plik

@@ -4,7 +4,7 @@ import ReportList from './components/ReportList';
4 4
 import OrgSummary from './components/OrgSummary';
5 5
 import BannerStatis from './components/BannerStatis';
6 6
 
7
-export default (props) => {  
7
+export default (props) => {
8 8
   return (
9 9
     <Space direction="vertical" size="large" style={{ width: '100%' }}>
10 10
       <BannerStatis />

+ 16
- 16
src/pages/examine/detail.jsx Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 import React, { useState, useEffect } from 'react';
2 2
 import { Card, Form, Button, Image, Input, message } from 'antd';
3 3
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
4
-import { getApplicationDetail, updateAudit,getPetCardNo } from '@/services/application'
4
+import { getApplicationDetail, updateAudit, getPetCardNo } from '@/services/application'
5 5
 import { history } from 'umi';
6 6
 
7 7
 const { TextArea } = Input;
@@ -17,28 +17,28 @@ export default (props) => {
17 17
   const [rejectReason, setRejectReason] = useState();
18 18
   const [loading, setLoading] = useState(false)
19 19
 
20
-  const getAudit=(val)=>{
20
+  const getAudit = (val) => {
21 21
     setLoading(true)
22
-      updateAudit(id, { rejectReason: rejectReason, verifyStatus: val }).then(() => {
23
-        message.success('操作成功');
24
-        goBack()
25
-        setLoading(false)
26
-      }).catch(err => {
27
-        console.log(err.message)
28
-        setLoading(false)
29
-      })
22
+    updateAudit(id, { rejectReason: rejectReason, verifyStatus: val }).then(() => {
23
+      message.success('操作成功');
24
+      goBack()
25
+      setLoading(false)
26
+    }).catch(err => {
27
+      console.log(err.message)
28
+      setLoading(false)
29
+    })
30 30
   }
31 31
   const handleAudit = (val) => {
32 32
     if ((val == 2 && rejectReason) || val == 1) {
33
-      if (val==1&&application.applyType == 'first') {
34
-        getPetCardNo(application.petId).then((res)=>{
35
-          if(!res){
33
+      if (val == 1 && application.applyType == 'first') {
34
+        getPetCardNo(application.petId).then((res) => {
35
+          if (!res) {
36 36
             getAudit(val);
37
-          }else{
37
+          } else {
38 38
             message.info('该宠物已有犬证,请驳回犬主申请');
39 39
           }
40 40
         })
41
-      }else{
41
+      } else {
42 42
         getAudit(val);
43 43
       }
44 44
     }
@@ -127,7 +127,7 @@ export default (props) => {
127 127
               <TextArea placeholder='请输入驳回原因' rows='3'
128 128
                 style={{ width: '350px' }}
129 129
                 value={rejectReason}
130
-                readOnly={application.verifyStatus==2}
130
+                readOnly={application.verifyStatus == 2}
131 131
                 onChange={(e) => setRejectReason(e.target.value)}
132 132
               />
133 133
             </FormItem>

+ 1
- 1
src/pages/examine/index.jsx Wyświetl plik

@@ -1,10 +1,10 @@
1 1
 import React, { useRef } from 'react'
2 2
 import moment from 'moment';
3
+import { history } from 'umi';
3 4
 import { DatePicker, Button } from 'antd';
4 5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
5 6
 import PageTable from '@/components/PageTable'
6 7
 import { getAuditList } from '@/services/application'
7
-import { history } from 'umi';
8 8
 
9 9
 
10 10
 const { RangePicker } = DatePicker;

+ 1
- 1
src/pages/notice/edit.jsx Wyświetl plik

@@ -1,6 +1,6 @@
1
-import { Input, Card, Select, Button, Form, InputNumber, message } from 'antd';
2 1
 import { useEffect, useState, useRef } from 'react';
3 2
 import { history } from 'umi';
3
+import { Input, Card, Select, Button, Form, InputNumber, message } from 'antd';
4 4
 import ProCard from '@ant-design/pro-card';
5 5
 import { addNotice, updateNotice, getNoticeDetail } from '@/services/notice'
6 6
 import RichEditor from "@/components/rich-editor";

+ 2
- 2
src/pages/notice/index.jsx Wyświetl plik

@@ -1,10 +1,10 @@
1 1
 import React, { useRef } from 'react';
2 2
 import { history } from 'umi';
3
-import { Button, Popconfirm, message,  Modal } from 'antd';
3
+import moment from 'moment';
4
+import { Button, Popconfirm, message, Modal } from 'antd';
4 5
 import { PlusOutlined } from '@ant-design/icons';
5 6
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6 7
 import PageTable from '@/components/PageTable';
7
-import moment from 'moment';
8 8
 import { getNoticeList, deleteNotice, updateNotice } from '@/services/notice';
9 9
 
10 10
 const formatterTime = (val) => {

+ 3
- 3
src/pages/person/index.jsx Wyświetl plik

@@ -9,6 +9,9 @@ import {
9 9
   Select,
10 10
 } from 'antd';
11 11
 import { PlusOutlined } from '@ant-design/icons';
12
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
13
+import PageTable from '@/components/PageTable';
14
+import md5 from 'md5';
12 15
 import {
13 16
   getUserList,
14 17
   addUser,
@@ -16,10 +19,7 @@ import {
16 19
   updateUser,
17 20
   getUserDetail,
18 21
 } from '@/services/user';
19
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
20
-import PageTable from '@/components/PageTable';
21 22
 import './index.less';
22
-import md5 from 'md5';
23 23
 
24 24
 const FormItem = Form.Item;
25 25
 const { Option } = Select;

+ 2
- 3
src/pages/userList/index.jsx Wyświetl plik

@@ -1,7 +1,6 @@
1 1
 import React, { useRef } from 'react'
2
-import { useModel } from 'umi';
3 2
 import moment from 'moment';
4
-import { DatePicker, Button } from 'antd';
3
+import { DatePicker } from 'antd';
5 4
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6 5
 import PageTable from '@/components/PageTable'
7 6
 import { getPersonList } from '@/services/person'
@@ -15,7 +14,7 @@ const formatterTime = (val) => {
15 14
 export default (props) => {
16 15
 
17 16
   const actionRef = useRef();
18
-  const columns = [    
17
+  const columns = [
19 18
     {
20 19
       title: '姓名',
21 20
       dataIndex: 'nickName',

+ 0
- 20
src/services/org.js Wyświetl plik

@@ -1,20 +0,0 @@
1
-import request from '@/utils/request';
2
-
3
-// 获取列表
4
-export const getList = (params, showType) => request('/org', { params, showType });
5
-
6
-// 获取详情
7
-export const getDetail = (id) => request(`/org/${id}`);
8
-
9
-// 新增保存
10
-export const saveOrg = (data) => request('/org', { data, method: 'post' });
11
-
12
-// 更新信息
13
-export const updateOrg = (id, data) => request(`/org/${id}`, { data, method: 'put' });
14
-
15
-
16
-// 新增管理员
17
-export const saveOrgUser = (id,data) => request(`/org/${id}/user`, { data, method: 'post' });
18
-
19
-// 获取企业管理员详情
20
-export const getOrgAdminDetail = (id) => request(`/org/${id}/admin`);

+ 0
- 8
src/services/statis.js Wyświetl plik

@@ -5,11 +5,3 @@ export const getcomm = () => request('/statis/common');
5 5
 
6 6
 // 获取近期提交
7 7
 export const getApplyDaily = (params) => request('/statis/applyDaily', { params });
8
-
9
-// org工作台--企业数据总览
10
-export const getAllOrgLine = (params) => request('/statis/org/daily', { params, method: 'GET' });
11
-
12
-
13
-// org工作台--企业工作台数据
14
-export const getOrgComm = (params) => request('/statis/org/comm', { params });
15
-

+ 0
- 19
src/services/withdrawal.js Wyświetl plik

@@ -1,19 +0,0 @@
1
-import request from '@/utils/request';
2
-
3
-/**
4
- * 审批
5
- * @param {*} data
6
- * @returns
7
- */
8
-export const updateWithdrawal = (id, data) => request(`/withdrawal/${id}`, { method: 'put', data });
9
-
10
-/**
11
- * 查询提现列表
12
- * @param {*} params
13
- * @returns
14
- */
15
-export const getWithdrawalList = (params) => request('/withdrawal', { params });
16
-/**
17
- * 查询提现详情
18
- */
19
-export const getWithdrawalDetail = (id) => request(`/withdrawal/${id}`);

+ 0
- 32
src/services/work.js Wyświetl plik

@@ -1,32 +0,0 @@
1
-import request from '@/utils/request';
2
-import moment from 'moment';
3
-import { getIsAllParams } from '@/utils';
4
-
5
-// 获取列表
6
-export const getList = (params) => request('/resume-work-form', { params });
7
-
8
-// 导出
9
-export const exportList = (params) => request('/resume-work-form/export', { params });
10
-
11
-// 获取异常列表
12
-export const getAbnormalList = (params) =>{
13
-  return request(
14
-    `/resume-work-form?start=${moment(Date.now()).format('YYYY-MM-DD')}&end=${moment(
15
-      Date.now(),
16
-    ).format('YYYY-MM-DD')}&isAbnormal=true`,
17
-    {params:getIsAllParams(params)},
18
-  );
19
-    }
20
-// 获取删除列表
21
-export const getDeleteformList = (params) =>{
22
-  return request(`/resume-work-form?isDelete=true`, {
23
-    params:getIsAllParams(params),
24
-  });
25
-}
26
-
27
-/**
28
- * 删除提交记录
29
- * @param {*} data
30
- * @returns
31
- */
32
-export const deleteworkForm = (id) => request(`/resume-work-form/${id}`, { method: 'delete' });

+ 0
- 18
src/utils/color.js Wyświetl plik

@@ -1,18 +0,0 @@
1
-export function hex2Rgb(hex) {
2
-  let color = hex.toLowerCase();
3
-
4
-  // 如果只有三位的值,需变成六位,如:#fff => #ffffff
5
-  if (color.length === 4) {
6
-    let colorNew = '#';
7
-    for (var i = 1; i < 4; i += 1) {
8
-      colorNew += color.slice(i, i + 1).concat(color.slice(i, i + 1));
9
-    }
10
-    color = colorNew;
11
-  }
12
-  // 处理六位的颜色值,转为RGB
13
-  const colors = [];
14
-  for (var i = 1; i < 7; i += 2) {
15
-    colors.push(parseInt('0x' + color.slice(i, i + 2)));
16
-  }
17
-  return colors;
18
-}

+ 0
- 15
src/utils/hooks/useOrgList.js Wyświetl plik

@@ -1,15 +0,0 @@
1
-import { useState, useEffect } from "react";
2
-import { getList } from '@/services/org'
3
-
4
-export default function useOrgList() {
5
-  const showType = 0; // 不显示报错
6
-  const [orgList, setOrgList] = useState([])
7
-
8
-  useEffect(() => {
9
-    getList({ pageSize: 999 }, showType).then(res => {
10
-      setOrgList(res.records || [])
11
-    })
12
-  }, [])
13
-
14
-  return { orgList }
15
-}

+ 0
- 17
src/utils/hooks/useResize.js Wyświetl plik

@@ -1,17 +0,0 @@
1
-import { useEffect, useRef } from 'react';
2
-
3
-export default (fn) => {
4
-  const fnRef = useRef();
5
-  fnRef.current = fn;
6
-
7
-  useEffect(() => {
8
-    const resize = () => {
9
-      const { clientWidth, clientHeight } = document.documentElement;
10
-      fnRef.current(clientWidth, clientHeight);
11
-    };
12
-
13
-    window.addEventListener('resize', resize);
14
-
15
-    return () => window.removeEventListener('resize', resize);
16
-  }, []);
17
-};

+ 0
- 9
src/utils/index.js Wyświetl plik

@@ -1,9 +0,0 @@
1
-
2
-export const getIsAllParams=(params)=>{
3
-  if (!params.myOrgId) {
4
-    params.isAll=true
5
-  } else {
6
-    params.orgId=params.myOrgId
7
-  }
8
-  return params
9
-}

+ 0
- 7
src/utils/number.js Wyświetl plik

@@ -1,7 +0,0 @@
1
-
2
-
3
-export function random (min, max) {
4
-  const range = max - min;
5
-  const rand = Math.random()
6
-  return min + Math.floor(Math.round(rand * range))
7
-}