- {exhibition.current?.analyse?.map((v, index) => {
- let startValue = ''
- if (v.key !== 'problemAnalysis') {
- switch (v.key) {
- case 'videoException':
- let videos = videoBI?.filter(u => moment(moment().day(moment().day() - 30).format('YYYY-MM-DD')).isBefore(u.day)) || []
- if (videos.length) {
- startValue = videos[0]?.day
- } else {
- startValue = videoBI?.slice(-1)[0]?.day
- }
- break;
- case 'appAbnormal':
- let apps = appBI?.filter(u => moment(moment().day(moment().day() - 30).format('YYYY-MM-DD')).isBefore(u.day)) || []
- if (apps.length) {
- startValue = apps[0]?.day
- } else {
- startValue = appBI?.slice(-1)[0]?.day
- }
- break;
- default:
- let datas = dataBI[v.key]?.filter(u => moment(moment().day(moment().day() - 30).format('YYYY-MM-DD')).isBefore(u.day)) || []
- if (datas.length) {
- startValue = datas[0]?.day
- } else {
- startValue = dataBI[v.key]?.slice(-1)[0]?.day
- }
- break;
+
+ {exhibition.current?.analyse?.map((v, index) => {
+ let startValue = ''
+ if (v.key !== 'problemAnalysis') {
+ switch (v.key) {
+ case 'videoException':
+ let videos = videoBI?.filter(u => moment(moment().day(moment().day() - 30).format('YYYY-MM-DD')).isBefore(u.day)) || []
+ if (videos.length) {
+ startValue = videos[0]?.day
+ } else {
+ startValue = videoBI?.slice(-1)[0]?.day
+ }
+ break;
+ case 'appAbnormal':
+ let apps = appBI?.filter(u => moment(moment().day(moment().day() - 30).format('YYYY-MM-DD')).isBefore(u.day)) || []
+ if (apps.length) {
+ startValue = apps[0]?.day
+ } else {
+ startValue = appBI?.slice(-1)[0]?.day
+ }
+ break;
+ default:
+ let datas = dataBI[v.key]?.filter(u => moment(moment().day(moment().day() - 30).format('YYYY-MM-DD')).isBefore(u.day)) || []
+ if (datas.length) {
+ startValue = datas[0]?.day
+ } else {
+ startValue = dataBI[v.key]?.slice(-1)[0]?.day
+ }
+ break;
+ }
}
- }
- // console.log(startValue);
- return v.key == 'problemAnalysis' ?
-
-
- :
+ return v.key == 'problemAnalysis' ?
u.day) : v.key == 'appAbnormal' ? appBI?.map(u => u.day) : dataBI[v.key]?.map(u => u.day) || []
+ boundaryGap: true,
+ deduplication: null,
+ data: ['当日处理', '3日内', '7日内', '15日内', '30日内', '超过30日']
},
yAxis: {
+ min: 0,
+ max: 100,
type: 'value',
- name: "条数",
+ axisLabel: {
+ show: true,
+ interval: 0,
+ formatter: '{value}%'
+ }
},
series: [
{
- type: 'line',
+ data: [efficiencyBI?.day1, efficiencyBI?.day3, efficiencyBI?.day7, efficiencyBI?.day15, efficiencyBI?.day30, efficiencyBI?.day30m],
+ type: 'bar',
name: v.name,
smooth: true,
- areaStyle: {
- color: '#0e9cff26',
+ barWidth: '30%',
+ label: {
+ normal: {
+ show: true,
+ position: 'top'
+ }
},
- data: v.key == 'videoException' ? videoBI?.map(u => u.total) : v.key == 'appAbnormal' ? appBI?.map(u => u.total) : dataBI[v.key]?.map(u => u.total) || []
- },
- {
- type: 'line',
- name: '已处理(含自动恢复)',
- smooth: true,
areaStyle: {
- color: '#0e9cff26',
+ color: '#0F7EFB',
},
- data: v.key == 'videoException' ? videoBI?.map(u => u.done) : v.key == 'appAbnormal' ? appBI?.map(u => u.done) : dataBI[v.key]?.map(u => u.done) || []
+ emphasis: {
+ color: '#E8F3FF',
+ }
+ // data: []
},
-
]
}}
notMerge={true}
@@ -761,10 +780,78 @@ const Control = (props) => {
// opts={}
/>
- })}
-
+ :
+ u.day) : v.key == 'appAbnormal' ? appBI?.map(u => u.day) : dataBI[v.key]?.map(u => u.day) || []
+ },
+ yAxis: {
+ type: 'value',
+ name: "条数",
+ },
+ series: [
+ {
+ type: 'line',
+ name: v.name,
+ smooth: true,
+ areaStyle: {
+ color: '#0e9cff26',
+ },
+ data: v.key == 'videoException' ? videoBI?.map(u => u.total) : v.key == 'appAbnormal' ? appBI?.map(u => u.total) : dataBI[v.key]?.map(u => u.total) || []
+ },
+ {
+ type: 'line',
+ name: '已处理(含自动恢复)',
+ smooth: true,
+ areaStyle: {
+ color: '#0e9cff26',
+ },
+ data: v.key == 'videoException' ? videoBI?.map(u => u.done) : v.key == 'appAbnormal' ? appBI?.map(u => u.done) : dataBI[v.key]?.map(u => u.done) || []
+ },
-
+ ]
+ }}
+ notMerge={true}
+ lazyUpdate={true}
+ theme={'ReactEChart' + index}
+ // onChartReady={this.onChartReadyCallback}
+ // onEvents={EventsDict}
+ // opts={}
+ />
+