diff --git a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue index 0a56b47..0023725 100644 --- a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue +++ b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue @@ -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), diff --git a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue index 285ce23..0fbcdf9 100644 --- a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue +++ b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue @@ -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 } })