Yansen 2 gadus atpakaļ
vecāks
revīzija
793e569586

+ 4
- 3
src/pages/statis/charts.jsx Parādīt failu

3
 import Sumary from './components/Sumary';
3
 import Sumary from './components/Sumary';
4
 import Task from './components/Task';
4
 import Task from './components/Task';
5
 import DeviceType from './components/DeviceType';
5
 import DeviceType from './components/DeviceType';
6
-import StoreCost from './components/StoreCost';
6
+import StoreType from './components/StoreType';
7
 import User from './components/User';
7
 import User from './components/User';
8
+import StoreCost from './components/StoreCost';
8
 import Styles from './style.module.less';
9
 import Styles from './style.module.less';
9
 
10
 
10
 const mtp = {
11
 const mtp = {
27
       </Row>
28
       </Row>
28
       <Row gutter={gutter} style={mtp}>
29
       <Row gutter={gutter} style={mtp}>
29
         <Col span={12}>
30
         <Col span={12}>
30
-          <StoreCost />
31
+          <StoreType />
31
         </Col>
32
         </Col>
32
         <Col span={12}>
33
         <Col span={12}>
33
           <User />
34
           <User />
35
       </Row>
36
       </Row>
36
       <Row gutter={gutter} style={mtp}>
37
       <Row gutter={gutter} style={mtp}>
37
         <Col span={24}>
38
         <Col span={24}>
38
-          <Task />
39
+          <StoreCost />
39
         </Col>
40
         </Col>
40
       </Row>
41
       </Row>
41
     </div>
42
     </div>

+ 18
- 11
src/pages/statis/components/Age.jsx Parādīt failu

1
 import React from 'react';
1
 import React from 'react';
2
 import * as echarts from 'echarts/core';
2
 import * as echarts from 'echarts/core';
3
 import Chart from '@/components/chart';
3
 import Chart from '@/components/chart';
4
+import { getUserAge } from '@/services/statis';
4
 
5
 
5
 let dataIndex = 0;
6
 let dataIndex = 0;
6
 export default (props) => {
7
 export default (props) => {
7
 
8
 
8
   const chartRef = React.useRef();
9
   const chartRef = React.useRef();
9
-  const option = getOption({"20(含)至29岁": 10, "20(含)至39岁": 20, "40(含)至49岁": 30, "50(含)岁以上": 40});
10
+  const [option, setOption] = React.useState({});
10
 
11
 
11
   React.useEffect(() => {
12
   React.useEffect(() => {
12
-    const t = setTimeout(() => {
13
-      const chart = chartRef.current;
14
-      chart.on('mousemove', function(e) {
15
-        chart.dispatchAction({ type: 'downplay', dataIndex });
16
-        chart.dispatchAction({ type: 'highlight', dataIndex: e.dataIndex });
17
-        dataIndex = e.dataIndex
18
-      });
19
-      chart.dispatchAction({ type: 'highlight', dataIndex });
20
-      clearTimeout(t);
21
-    }, 300);
13
+    getUserAge().then(res => {
14
+      // [{ age: 'xxx', cnt: 12 }] => { 'xxx': 12 }
15
+      const dataSource = (res || []).reduce((acc, x) => ({ ...acc, [x.age]: x.cnt }), {});
16
+      setOption(getOption(dataSource));
17
+
18
+      const t = setTimeout(() => {
19
+        const chart = chartRef.current;
20
+        chart.on('mousemove', function(e) {
21
+          chart.dispatchAction({ type: 'downplay', dataIndex });
22
+          chart.dispatchAction({ type: 'highlight', dataIndex: e.dataIndex });
23
+          dataIndex = e.dataIndex
24
+        });
25
+        chart.dispatchAction({ type: 'highlight', dataIndex });
26
+        clearTimeout(t);
27
+      }, 300);
28
+    });
22
   }, []);
29
   }, []);
23
 
30
 
24
   const onInited = (chart) => chartRef.current = chart;
31
   const onInited = (chart) => chartRef.current = chart;

+ 19
- 11
src/pages/statis/components/DeviceType.jsx Parādīt failu

2
 import * as echarts from 'echarts/core';
2
 import * as echarts from 'echarts/core';
3
 import icon from '@/assets/images/statistic/设备分类统计.png';
3
 import icon from '@/assets/images/statistic/设备分类统计.png';
4
 import Chart from '@/components/chart';
4
 import Chart from '@/components/chart';
5
+import { getDeviceType } from '@/services/statis';
5
 import StatisCard from './StatisCard';
6
 import StatisCard from './StatisCard';
6
 
7
 
7
 let dataIndex = 0;
8
 let dataIndex = 0;
9
 export default (props) => {
10
 export default (props) => {
10
 
11
 
11
   const chartRef = React.useRef();
12
   const chartRef = React.useRef();
12
-  const option = getOption({ "制餐设备": 20, "运输设备": 33, "野外保障设备": 10 });
13
+  const [option, setOption] = React.useState({});
13
 
14
 
14
   React.useEffect(() => {
15
   React.useEffect(() => {
15
-    const t = setTimeout(() => {
16
-      const chart = chartRef.current;
17
-      chart.on('mousemove', function(e) {
18
-        chart.dispatchAction({ type: 'downplay', dataIndex });
19
-        chart.dispatchAction({ type: 'highlight', dataIndex: e.dataIndex });
20
-        dataIndex = e.dataIndex
21
-      });
22
-      chart.dispatchAction({ type: 'highlight', dataIndex });
23
-      clearTimeout(t);
24
-    }, 300);
16
+    getDeviceType().then(res => {
17
+      // 转换 [{ name: 'aaa', cnt: 10 }] 为 { 'aa': 10 }
18
+      const dataSource = (res || []).reduce((acc, x) => ({ ...acc, [x.name]: x.cnt }), {})
19
+      setOption(getOption(dataSource));
20
+
21
+      const t = setTimeout(() => {
22
+        const chart = chartRef.current;
23
+        chart.on('mousemove', function(e) {
24
+          chart.dispatchAction({ type: 'downplay', dataIndex });
25
+          chart.dispatchAction({ type: 'highlight', dataIndex: e.dataIndex });
26
+          dataIndex = e.dataIndex
27
+        });
28
+        chart.dispatchAction({ type: 'highlight', dataIndex });
29
+        clearTimeout(t);
30
+      }, 300);
31
+    });
32
+
25
   }, []);
33
   }, []);
26
 
34
 
27
   const onInited = (chart) => chartRef.current = chart;
35
   const onInited = (chart) => chartRef.current = chart;

+ 10
- 1
src/pages/statis/components/Edu.jsx Parādīt failu

1
 import React from 'react';
1
 import React from 'react';
2
 import * as echarts from 'echarts/core';
2
 import * as echarts from 'echarts/core';
3
 import Chart from '@/components/chart';
3
 import Chart from '@/components/chart';
4
+import { getUserEdu } from '@/services/statis';
4
 
5
 
5
 export default (props) => {
6
 export default (props) => {
6
 
7
 
7
-  const option = getOption(["本科以上", "本科及大专", "大专以下"], [10, 20, 30]);
8
+  const [option, setOption] = React.useState({});
9
+
10
+  React.useEffect(() => {
11
+    getUserEdu().then(res => {
12
+      const keys = (res || []).map(x => x.name);
13
+      const vals = (res || []).map(x => x.cnt);
14
+      setOption(getOption(keys, vals));
15
+    });
16
+  }, [])
8
 
17
 
9
   return (
18
   return (
10
     <Chart option={option} style={{ height: '300px' }} />
19
     <Chart option={option} style={{ height: '300px' }} />

+ 41
- 17
src/pages/statis/components/Filter.jsx Parādīt failu

5
 import locale from 'antd/es/date-picker/locale/zh_CN';
5
 import locale from 'antd/es/date-picker/locale/zh_CN';
6
 
6
 
7
 const { RangePicker } = DatePicker;
7
 const { RangePicker } = DatePicker;
8
-const radioOptions = [
8
+const radioDateOptions = [
9
   { label: '本月', value: '1' },
9
   { label: '本月', value: '1' },
10
   // { label: '本季', value: '2' },
10
   // { label: '本季', value: '2' },
11
   { label: '本年', value: '3' },
11
   { label: '本年', value: '3' },
12
 ];
12
 ];
13
+const radioUnitOptions = [
14
+  { label: '按天', value: '1' },
15
+  { label: '按月', value: '2' },
16
+];
13
 
17
 
14
-export const last30Days = [
15
-  moment().subtract(30, 'days'),
18
+export const lastDays = [
19
+  moment().subtract(15, 'days'),
16
   moment(),
20
   moment(),
17
 ];
21
 ];
18
 
22
 
30
 ]
34
 ]
31
 
35
 
32
 export default (props) => {
36
 export default (props) => {
33
-  const [dateRange, setDateRange] = React.useState([]);
37
+  const [dateRange, setDateRange] = React.useState(lastDays);
34
   const [radioValue, setRadioValue] = React.useState();
38
   const [radioValue, setRadioValue] = React.useState();
35
-
36
-  const onChange = (val) => {
37
-    console.log(val);
38
-    if (typeof props.onChange === 'function') {
39
-      props.onChange(getStrValue(val));
40
-    }
41
-  }
39
+  const [unitValue, setUnitValue] = React.useState('1');
42
 
40
 
43
   const onPickerChange = val => {
41
   const onPickerChange = val => {
44
     setDateRange(val);
42
     setDateRange(val);
45
     setRadioValue();
43
     setRadioValue();
46
-    onChange(val);
47
   }
44
   }
48
 
45
 
49
   const onRadioChange = e => {
46
   const onRadioChange = e => {
59
         break;
56
         break;
60
       case '3':
57
       case '3':
61
         dateRange = yearRange;
58
         dateRange = yearRange;
59
+        setUnitValue('2');
62
         break;
60
         break;
63
       default:
61
       default:
64
         break;
62
         break;
65
     }
63
     }
66
     
64
     
67
     setDateRange(dateRange);
65
     setDateRange(dateRange);
68
-    onChange(dateRange);
69
   }
66
   }
70
 
67
 
68
+  const onUnitChange = e => {
69
+    const val = e.target.value;
70
+    setUnitValue(val);
71
+  }
72
+
73
+  React.useEffect(() => {
74
+    if (typeof props.onChange === 'function') {
75
+      const dt = getStrValue(dateRange);
76
+      props.onChange({
77
+        startDate: dt[0],
78
+        endDate: dt[1],
79
+        unit: unitValue,
80
+      });
81
+    }
82
+  }, [dateRange, unitValue, props.onChange]);
83
+
71
   return (
84
   return (
72
-    <Row style={{ width: '460px' }} gutter={8}>
73
-      <Col span={14}>
74
-        <RangePicker locale={locale} value={dateRange} onChange={onPickerChange} />
85
+    <Row style={{ width: '500px' }} gutter={8}>
86
+      <Col span={7}>
87
+        {
88
+          !props.hideUnit && (
89
+            <Radio.Group
90
+              options={radioUnitOptions}
91
+              value={unitValue}
92
+              onChange={onUnitChange}
93
+            />
94
+          )
95
+        }
75
       </Col>
96
       </Col>
76
       <Col span={10}>
97
       <Col span={10}>
98
+        <RangePicker locale={locale} value={dateRange} onChange={onPickerChange} />
99
+      </Col>
100
+      <Col span={7}>
77
         <Radio.Group
101
         <Radio.Group
78
-          options={radioOptions}
102
+          options={radioDateOptions}
79
           value={radioValue}
103
           value={radioValue}
80
           onChange={onRadioChange}
104
           onChange={onRadioChange}
81
           optionType="button"
105
           optionType="button"

+ 67
- 36
src/pages/statis/components/StoreCost.jsx Parādīt failu

1
 import React from 'react';
1
 import React from 'react';
2
-import icon from '@/assets/images/statistic/社会保障机构分类统计.png';
2
+import * as echarts from 'echarts/core';
3
+import icon from '@/assets/images/statistic/任务统计.png';
3
 import Chart from '@/components/chart';
4
 import Chart from '@/components/chart';
5
+import { getStoreCosts } from '@/services/statis';
4
 import StatisCard from './StatisCard';
6
 import StatisCard from './StatisCard';
5
 import Filter from './Filter';
7
 import Filter from './Filter';
6
 
8
 
7
 export default (props) => {
9
 export default (props) => {
8
 
10
 
9
-  const [year, setYear] = React.useState();
10
-  const option = getOption(["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], [0, 0, 0, 0, 0, 0, 8, 9, 10, 1, 1, 6])
11
+  const [filter, setFilter] = React.useState();
12
+  const [option, setOption] = React.useState({});
13
+  // const option = getOption(["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], [0, 0, 0, 0, 0, 0, 8, 9, 10, 1, 1, 6])
14
+
15
+  React.useEffect(() => {
16
+    if (filter) {
17
+      getStoreCosts(filter).then(res => {
18
+        const { purchase, taskCosts } = res;
19
+
20
+        const keys = (purchase || []).map(x => x.dt);
21
+        const data1 = (purchase || []).map(x => x.price / 100); // 数据返回的单位是 分
22
+        const data2 = (taskCosts || []).map(x => x.price / 100);
23
+  
24
+        const opt = getOption(keys, data1, data2);
25
+        const dataZoom = keys.length > 31 ? { show: true, height: 20, bottom: 6 } : { show: false };
26
+  
27
+        setOption({ ...opt, dataZoom });
28
+      });
29
+    }
30
+  }, [filter]);
11
 
31
 
12
   return (
32
   return (
13
     <StatisCard
33
     <StatisCard
14
       title="成本分析"
34
       title="成本分析"
15
       icon={icon}
35
       icon={icon}
16
-      extra={<Filter />}
36
+      extra={<Filter onChange={setFilter} />}
17
     >
37
     >
18
       <Chart option={option} style={{ height: '300px' }} />
38
       <Chart option={option} style={{ height: '300px' }} />
19
     </StatisCard>
39
     </StatisCard>
20
   )
40
   )
21
 }
41
 }
22
 
42
 
23
-function getOption(xAxisData, seriesData) {
43
+function getOption(xAxisData, data1, data2) {
24
   var axisLabel = {
44
   var axisLabel = {
25
     fontSize: 14,
45
     fontSize: 14,
26
-    color: 'rgba(255,255,255, .6)'
46
+    color: 'rgba(255,255,255, .6)',
27
   };
47
   };
28
   var lineStyle = {
48
   var lineStyle = {
29
     color: 'rgba(255,255,255, .16)',
49
     color: 'rgba(255,255,255, .16)',
31
   };
51
   };
32
 
52
 
33
   return {
53
   return {
54
+    tooltip : {
55
+      trigger: 'axis',
56
+      axisPointer : {
57
+        type : 'shadow'
58
+      },
59
+      valueFormatter: v => `¥ ${v}`
60
+    },
34
     xAxis: {
61
     xAxis: {
35
       type: 'category',
62
       type: 'category',
36
-      axisLabel: Object.assign({
37
-        rotate: 45
38
-      }, axisLabel),
63
+      axisLabel: { ...axisLabel, rotate: 45 },
39
       axisLine: {
64
       axisLine: {
40
         show: true,
65
         show: true,
41
         lineStyle: lineStyle
66
         lineStyle: lineStyle
42
       },
67
       },
43
       data: xAxisData
68
       data: xAxisData
44
     },
69
     },
45
-    yAxis: {
46
-      axisLabel: axisLabel,
47
-      axisLine: {
48
-        show: true,
49
-        lineStyle: lineStyle
50
-      },
51
-      splitLine: {
52
-        lineStyle: lineStyle
70
+    yAxis: [
71
+      {
72
+        type: 'value',
73
+        axisLabel: axisLabel,
74
+        axisLine: {
75
+          show: true,
76
+          lineStyle: lineStyle
77
+        },
78
+        splitLine: {
79
+          lineStyle: lineStyle
80
+        },
53
       },
81
       },
54
-      type: 'value'
55
-    },
56
-    tooltip : {
57
-      trigger: 'axis',
58
-      axisPointer : {
59
-        type : 'shadow'
60
-      }
61
-    },
82
+    ],
83
+    // dataZoom: [
84
+    //   {
85
+    //     show: true,
86
+    //   }
87
+    // ],
62
     grid: {
88
     grid: {
63
       top: 20,
89
       top: 20,
64
       left: 50,
90
       left: 50,
65
       right: 20,
91
       right: 20,
66
-      bottom: 70,
92
+      bottom: 100,
67
     },
93
     },
68
-    color: ['#9242D1'],
69
-    animationEasing: 'elasticOut',
70
     series: [
94
     series: [
71
       {
95
       {
72
-        data: seriesData,
73
-        type: 'pictorialBar',
74
-        barWidth: 16,
75
-        symbol: 'rect',
76
-        symbolRepeat: true,
77
-        animationDuration: 6000,
78
-        animationDelay: function (dataIndex, params) {
79
-          return params.index * 30;
96
+        name: '用料成本',
97
+        data: data1,
98
+        type: 'line',
99
+        smooth: true,
100
+        itemStyle: {
101
+          color: '#1EAED1'
102
+        }
103
+      },
104
+      {
105
+        name: '采购成本',
106
+        data: data2,
107
+        type: 'line',
108
+        smooth: true,
109
+        itemStyle: {
110
+          color: '#6F39B9'
80
         }
111
         }
81
       }
112
       }
82
     ]
113
     ]

+ 99
- 0
src/pages/statis/components/StoreType.jsx Parādīt failu

1
+import React from 'react';
2
+import icon from '@/assets/images/statistic/社会保障机构分类统计.png';
3
+import Chart from '@/components/chart';
4
+import { getStoreType } from '@/services/statis';
5
+import StatisCard from './StatisCard';
6
+import Filter from './Filter';
7
+
8
+export default (props) => {
9
+
10
+  const [filter, setFilter] = React.useState();
11
+  const [option, setOption] = React.useState({});
12
+
13
+  React.useEffect(() => {
14
+    if (filter) {
15
+      getStoreType(filter).then(res => {
16
+        const keys = (res || []).map(x => x.name);
17
+        const vals = (res || []).map(x => x.cnt);
18
+        
19
+        const dataZoom = res.length > 31 ? { show: true, height: 20, bottom: 6 } : { show: false };
20
+        const opt = getOption(keys, vals);
21
+
22
+        setOption({ ...opt, dataZoom });
23
+      });
24
+    }
25
+  }, [filter]);
26
+
27
+  return (
28
+    <StatisCard
29
+      title="物资分析"
30
+      icon={icon}
31
+      extra={<Filter hideUnit onChange={setFilter} />}
32
+    >
33
+      <Chart option={option} style={{ height: '300px' }} />
34
+    </StatisCard>
35
+  )
36
+}
37
+
38
+function getOption(xAxisData, seriesData) {
39
+  var axisLabel = {
40
+    fontSize: 14,
41
+    color: 'rgba(255,255,255, .6)'
42
+  };
43
+  var lineStyle = {
44
+    color: 'rgba(255,255,255, .16)',
45
+    type: 'dashed'
46
+  };
47
+
48
+  return {
49
+    xAxis: {
50
+      type: 'category',
51
+      axisLabel: Object.assign({
52
+        rotate: 45
53
+      }, axisLabel),
54
+      axisLine: {
55
+        show: true,
56
+        lineStyle: lineStyle
57
+      },
58
+      data: xAxisData
59
+    },
60
+    yAxis: {
61
+      axisLabel: axisLabel,
62
+      axisLine: {
63
+        show: true,
64
+        lineStyle: lineStyle
65
+      },
66
+      splitLine: {
67
+        lineStyle: lineStyle
68
+      },
69
+      type: 'value'
70
+    },
71
+    tooltip : {
72
+      trigger: 'axis',
73
+      axisPointer : {
74
+        type : 'shadow'
75
+      }
76
+    },
77
+    grid: {
78
+      top: 20,
79
+      left: 50,
80
+      right: 20,
81
+      bottom: 70,
82
+    },
83
+    color: ['#9242D1'],
84
+    animationEasing: 'elasticOut',
85
+    series: [
86
+      {
87
+        data: seriesData,
88
+        type: 'pictorialBar',
89
+        barWidth: 16,
90
+        symbol: 'rect',
91
+        symbolRepeat: true,
92
+        animationDuration: 6000,
93
+        animationDelay: function (dataIndex, params) {
94
+          return params.index * 30;
95
+        }
96
+      }
97
+    ]
98
+  }
99
+}

+ 15
- 13
src/pages/statis/components/Task.jsx Parādīt failu

4
 import Chart from '@/components/chart';
4
 import Chart from '@/components/chart';
5
 import { getTaskInfo } from '@/services/statis';
5
 import { getTaskInfo } from '@/services/statis';
6
 import StatisCard from './StatisCard';
6
 import StatisCard from './StatisCard';
7
-import Filter, { last30Days, getStrValue } from './Filter';
7
+import Filter from './Filter';
8
 
8
 
9
-const defaultValue = getStrValue(last30Days);
10
 export default (props) => {
9
 export default (props) => {
11
 
10
 
12
-  const [dateRange, setDateRange] = React.useState(defaultValue);
11
+  const [filter, setFilter] = React.useState();
13
   const [option, setOption] = React.useState({});
12
   const [option, setOption] = React.useState({});
14
   // const option = getOption(["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], [0, 0, 0, 0, 0, 0, 8, 9, 10, 1, 1, 6])
13
   // const option = getOption(["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], [0, 0, 0, 0, 0, 0, 8, 9, 10, 1, 1, 6])
15
 
14
 
16
   React.useEffect(() => {
15
   React.useEffect(() => {
17
-    getTaskInfo({ startDate: dateRange[0], endDate: dateRange[1] }).then(res => {
18
-      const keys = res.map(x => x.dt);
19
-      const vals = res.map(x => x.cnt);
20
-
21
-      const opt = getOption(keys, vals);
22
-
23
-      setOption(res.length > 30 ? { ...opt, dataZoom: { height: 20, bottom: 6 } } : opt);
24
-    });
25
-  }, [dateRange]);
16
+    if (filter) {
17
+      getTaskInfo(filter).then((res = []) => {
18
+        const keys = res.map(x => x.dt);
19
+        const vals = res.map(x => x.cnt);
20
+  
21
+        const opt = getOption(keys, vals);
22
+        const dataZoom = res.length > 31 ? { show: true, height: 20, bottom: 6 } : { show: false };
23
+  
24
+        setOption({ ...opt, dataZoom });
25
+      });
26
+    }
27
+  }, [filter]);
26
 
28
 
27
   return (
29
   return (
28
     <StatisCard
30
     <StatisCard
29
       title="任务统计"
31
       title="任务统计"
30
       icon={icon}
32
       icon={icon}
31
-      extra={<Filter onChange={setDateRange} />}
33
+      extra={<Filter onChange={setFilter} />}
32
     >
34
     >
33
       <Chart option={option} style={{ height: '300px' }} />
35
       <Chart option={option} style={{ height: '300px' }} />
34
     </StatisCard>
36
     </StatisCard>

+ 1
- 1
src/pages/statis/components/style.global.less Parādīt failu

13
     border-bottom: none;
13
     border-bottom: none;
14
   }
14
   }
15
 
15
 
16
-  .ant-picker, .ant-radio-button-wrapper, .ant-picker-separator {
16
+  .ant-picker, .ant-radio-wrapper, .ant-radio-button-wrapper, .ant-picker-separator {
17
     background: transparent !important;
17
     background: transparent !important;
18
     color: #bbb !important;
18
     color: #bbb !important;
19
   }
19
   }

+ 9
- 0
src/pages/stock/edit/index.jsx Parādīt failu

91
             allowClear={false}
91
             allowClear={false}
92
             width={460}
92
             width={460}
93
           />
93
           />
94
+          <ProFormText
95
+            initialValue={1}
96
+            name="warnAmount"
97
+            label="预警库存"
98
+            extra="库存低于此设置将会自动预警"
99
+            placeholder="请输入预警库存"
100
+            allowClear={false}
101
+            width={460}
102
+          />
94
           <ProFormText
103
           <ProFormText
95
             name="amount"
104
             name="amount"
96
             label="库存"
105
             label="库存"

+ 9
- 4
src/pages/stockClassification/list/index.jsx Parādīt failu

26
       title: '分类名称',
26
       title: '分类名称',
27
       dataIndex: 'name',
27
       dataIndex: 'name',
28
     },
28
     },
29
-
30
     {
29
     {
31
-      title: '排序',
30
+      title: '是否食材',
32
       dataIndex: 'isFood',
31
       dataIndex: 'isFood',
33
-      search: false,
34
       valueEnum: {
32
       valueEnum: {
35
         1: '是',
33
         1: '是',
36
         0: '否',
34
         0: '否',
37
       },
35
       },
38
     },
36
     },
39
-
37
+    {
38
+      title: '是否设备',
39
+      dataIndex: 'isDevice',
40
+      valueEnum: {
41
+        1: '是',
42
+        0: '否',
43
+      },
44
+    },
40
     {
45
     {
41
       title: '操作',
46
       title: '操作',
42
       valueType: 'option',
47
       valueType: 'option',

+ 9
- 11
src/pages/user/Edit.jsx Parādīt failu

152
             style={{ width: '100%' }}
152
             style={{ width: '100%' }}
153
             placeholder="请选择文化程度"
153
             placeholder="请选择文化程度"
154
           >
154
           >
155
-            <Option value="半文盲">半文盲</Option>
156
-            <Option value="文盲">文盲</Option>
157
-            <Option value="小学">小学</Option>
158
-            <Option value="初中">初中</Option>
159
-            <Option value="高中">高中</Option>
160
-            <Option value="中专">中专</Option>
161
-            <Option value="大专">大专</Option>
162
-            <Option value="本科">本科</Option>
163
-            <Option value="硕士">硕士</Option>
164
-            <Option value="博士">博士</Option>
165
-            <Option value="博士后">博士后</Option>
155
+            <Option value="90">文盲/半文盲</Option>
156
+            <Option value="80">小学</Option>
157
+            <Option value="70">初中</Option>
158
+            <Option value="60">高中</Option>
159
+            <Option value="40">中专</Option>
160
+            <Option value="30">大专</Option>
161
+            <Option value="20">本科</Option>
162
+            <Option value="10">硕士</Option>
163
+            <Option value="1">博士/博士后</Option>
166
           </Select>
164
           </Select>
167
         </Form.Item>
165
         </Form.Item>
168
         <Form.Item
166
         <Form.Item

+ 10
- 0
src/services/statis.js Parādīt failu

3
 export const getSummary = () => request('/statis/summary', { successTip: false });
3
 export const getSummary = () => request('/statis/summary', { successTip: false });
4
 
4
 
5
 export const getTaskInfo = (params) => request('/statis/taskInfo', { params, successTip: false });
5
 export const getTaskInfo = (params) => request('/statis/taskInfo', { params, successTip: false });
6
+
7
+export const getDeviceType = () => request('/statis/deviceType', { successTip: false });
8
+
9
+export const getStoreType = (params) => request('/statis/deviceType', { params, successTip: false });
10
+
11
+export const getUserEdu = () => request('/statis/userEdu', { successTip: false });
12
+
13
+export const getUserAge = () => request('/statis/userAge', { successTip: false });
14
+
15
+export const getStoreCosts = (params) => request('/statis/store-cost', { params, successTip: false });