@@ -150,7 +133,7 @@
import _ from 'lodash'
import dayjs from 'dayjs'
import { mapActions } from 'vuex'
- import { pie, bar } from './chartConfig'
+ import { pie, bar, simple } from './chartConfig'
import Chart from '~/@analysys/ana-charts'
import mSpin from '@/module/components/spin/spin'
import mNoData from '@/module/components/noData/noData'
@@ -166,6 +149,7 @@
processStateList: [],
defineUserList: [],
commandStateList: [],
+ queueList: [],
searchParams: {
projectId: this.id,
startDate: '',
@@ -203,7 +187,6 @@
}
})
},
-
_handleTaskCtatus (res) {
let data = res.data.taskCountDtos
this.taskCtatusList = _.map(data, v => {
@@ -263,10 +246,32 @@
}
},
_handleCommandState (res) {
-
+ let data = []
+ _.forEach(res.data, (v, i) => {
+ let key = _.keys(v)
+ if (key[0] === 'errorCount') {
+ data.push({ typeName: '错误指令数', key: v.commandState, value: v.errorCount })
+ }
+ })
+ _.forEach(res.data, (v, i) => {
+ let key = _.keys(v)
+ if (key[1] === 'normalCount') {
+ data.push({ typeName: '正常指令数', key: v.commandState, value: v.normalCount })
+ }
+ })
+ const myChart = Chart.bar('#command-state-bar', data, {
+ title: ''
+ })
+ myChart.echart.setOption(simple)
+ },
+ _handleQueue (res) {
+ _.forEach(res.data, (v, k) => this.queueList.push({
+ key: k === 'taskQueue' ? '等待执行任务' : '等待kill任务',
+ value: v
+ }))
+ const myChart = Chart.pie('#queue-pie', this.queueList, { title: '' })
+ myChart.echart.setOption(pie)
},
- _handleQueue () {},
-
_getData (is = true) {
this.isLoading = true
let ioList = [