Compare commits

..

No commits in common. "3492bcff3c50c136ded9ec7e62f613df5c75d4ab" and "79aceb1e013a78f8020ce5124db6e3721fefd2cb" have entirely different histories.

5 changed files with 73 additions and 69 deletions

View File

@ -96,7 +96,7 @@ const onExport = () => {
<div className='time-line-item'> <div className='time-line-item'>
<div style={{width:100}}> <div style={{width:100}}>
<span>{item.eventsDate}</span> <span>{item.eventsDate}</span>
<div className='dsj'>{item.typeName}</div> <div className='dsj'>大事记</div>
</div> </div>
<div className='item-right'> <div className='item-right'>

View File

@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { Form, Select, Button, DatePicker } from 'antd'; import { Form, Input, Button, DatePicker } from 'antd';
import moment from 'moment'; import moment from 'moment';
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
@ -25,10 +25,8 @@ const ToolBar = ({ setSearchVal, onExport, storeData, role }) => {
<> <>
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}> <Form form={form} className='toolbarBox' layout="inline" onFinish={onFinish}>
<Form.Item label="类型" name="types"> <Form.Item label="名称" name="name">
<Select options={[ <Input allowClear style={{ width: '150px' }} />
{value:1,label:'大事记'}, {value:2,label:'调度指令'}, {value:3,label:'维修养护'},{value:4,label:'安全鉴定'}, {value:5,label:"除险加固"}, {value:6,label:'白蚁普查'}
]} allowClear mode='tags' style={{ width: "400px" }}/>
</Form.Item> </Form.Item>
<Form.Item label="发生日期" name="tm"> <Form.Item label="发生日期" name="tm">
<RangePicker <RangePicker

View File

@ -36,31 +36,18 @@ const Page = ({ title = '标题' }) => {
} }
}, },
series: { series: {
name: '执行情况', name: '圆环图系列名称',
type: 'pie', type: 'pie',
// center: ['50%', '50%'], // center: ['50%', '50%'],
// radius: ['35%', '50%'], // radius: ['35%', '50%'],
// hoverAnimation: true, hoverAnimation: true,
data: plandata, data: plandata,
label: { label: {
normal: { normal: {
show: true, show: true,
position: 'outside', position: 'outside',
formatter: '{c}', formatter: '{c}'
} }
},
itemStyle:{
color: function (colors) {
var colorList = [
'#5b8ff9',
'#5ad8a6',
'#5d7092',
'#f6bd16',
'#6f5ef9',
];
return colorList[colors.dataIndex];
}
} }
} }

View File

@ -49,30 +49,18 @@ const Page = ({ title = '标题' }) => {
} }
}, },
series: { series: {
name: '案件来源', name: '圆环图系列名称',
type: 'pie', type: 'pie',
center: ['50%', '50%'], center: ['50%', '50%'],
radius: ['60%', '80%'], radius: ['60%', '80%'],
// hoverAnimation: true, hoverAnimation: true,
data: plandata, data: plandata,
label: { label: {
normal: { normal: {
show: true, show: true,
position: 'outside', position: 'outside',
formatter: '{c}', formatter: '{c}'
}, }
},
itemStyle:{
color: function (colors) {
var colorList = [
'#5b8ff9',
'#5ad8a6',
'#5d7092',
'#f6bd16',
'#6f5ef9',
];
return colorList[colors.dataIndex];
}
} }
} }

View File

@ -23,48 +23,79 @@ const Page = ({ title = '标题' }) => {
const [sumTotal, setSum] = useState(0) const [sumTotal, setSum] = useState(0)
const getPlanOption = useMemo((name, data) => { const getPlanOption = useMemo((name, data) => {
// let total = 0
// for (let i = 0; i < data.length; i++) {
// total = total + Number(data[i].value)
// }
return { return {
legend: { legend: {
data: Object.values(obj), data: Object.values(obj)
type: 'scroll'
},
tooltip: {},
polar: {
radius: [0, '80%']
},
radiusAxis: {
min: 0,
max: Math.max.apply(null, Object.values(plandata)),
axisLine:{
show:false
},
}, },
angleAxis: { angleAxis: {
type: 'category', type: 'category',
data: Object.values(obj), data: Object.values(obj)
// startAngle: 75,
}, },
// radar: [
// {
// indicator: [
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// { text: '' },
// ],
// radius: '80%',
// splitNumber: 12,
// shape: 'circle',
// splitArea: {
// areaStyle: {
// color: '#fff',
// }
// },
// axisLine: {
// lineStyle: {
// color: '#d4d4d4'
// }
// },
// },
// ],
radiusAxis: {
min: 0,
max: 20,
interval: 2,
// 刻度
axisTick: {
show: false
},
//刻度数值
axisLabel: {
show: false
},
// 线
axisLine: {
show: false
},
},
polar: {},
series: [ series: [
{ {
name: '案件类型', stack: 'a',
type: 'bar', type: 'pie',
coordinateSystem: 'polar', center: ['50%', '50%'],
itemStyle: { selectedOffset: 0,
radius: [0, 140],
roseType: 'area',
itemStyle: {  //去除饼图的指示折线label
normal: { normal: {
color: function (colors) { label: {
var colorList = [ show: false,
'#5b8ff9', },
'#5ad8a6', borderRadius: 8
'#5d7092',
'#f6bd16',
'#6f5ef9',
];
return colorList[colors.dataIndex];
}
}, },
}, },
data: Object.values(plandata) data: plandata
} }
] ]
} }