fix: modify

develop
时启龙 2024-10-29 17:56:32 +08:00
parent 2af63eb68c
commit beeed54ea2
2 changed files with 14 additions and 11 deletions

View File

@ -22,9 +22,10 @@ import LineCharts from './echarts/LineCharts.vue'
import ItemCard from './ItemCard.vue'
import { getSevenDayWarnTrend } from 'services/system/dashboard'
import echarts from '@cmp/cmp-echarts/hooks/echarts'
export const colorMap = ['rgba(24, 144, 255, 1)', 'rgba(18, 185, 242, 1)', 'rgba(245, 167, 45, 1)', 'rgba(255, 0, 0, 1)', , ,]
export const colorMap = ['rgba(255, 0, 0, 1)', 'rgba(245, 167, 45, 1)', 'rgba(18, 185, 242, 1)', 'rgba(24, 144, 255, 1)']
export const lineColorMap = ['rgba(24, 144, 255, 1)', 'rgba(18, 185, 242, 1)', 'rgba(245, 167, 45, 1)', 'rgba(255, 0, 0, 1)']
const chartSetting = {
color: colorMap,
color: lineColorMap,
legend: {
right: 0,
textStyle: {
@ -69,10 +70,10 @@ export default {
}
if (!names.length) return
//
countData.value[0].value = res.data[1].reduce((total, { count }) => count + total, 0)
countData.value[1].value = res.data[2].reduce((total, { count }) => count + total, 0)
countData.value[2].value = res.data[3].reduce((total, { count }) => count + total, 0)
countData.value[3].value = res.data[4].reduce((total, { count }) => count + total, 0)
countData.value[0].value = res.data[4].reduce((total, { count }) => count + total, 0)
countData.value[1].value = res.data[3].reduce((total, { count }) => count + total, 0)
countData.value[2].value = res.data[2].reduce((total, { count }) => count + total, 0)
countData.value[3].value = res.data[1].reduce((total, { count }) => count + total, 0)
//
const result = {
keys: res.data[names[0]].map(({ date }) => date),

View File

@ -98,11 +98,13 @@ export default {
getItemList() {
getWarnList(this.params).then(data => {
if (data.success) {
this.tableList = data.data.map(item => {
item.createTime = dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss')
item.updateTime = dayjs(item.updateTime).format('YYYY-MM-DD HH:mm:ss')
return item
})
this.tableList = data.data
.map(item => {
item.createTime = dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss')
item.updateTime = dayjs(item.updateTime).format('YYYY-MM-DD HH:mm:ss')
return item
})
.slice(0, 20)
// this.total = data.data.total
}
})