CN-332 feat :Dashboard--dns 仪表盘图表开发

This commit is contained in:
zhangxiaolong
2022-03-02 16:13:55 +08:00
parent 80bcf559c1
commit 6e33638715
12 changed files with 249 additions and 59 deletions

View File

@@ -210,21 +210,20 @@ export default {
this.table.tableColumns = this.getTableTitle(response.data.result)
this.table.currentPageData = this.getTargetPageData(1, this.table.pageSize, this.table.tableData)
this.resultType = response.data.resultType
if(this.chartInfo.type === 12){
if (this.chartInfo.type === 12) {
const newArr = []
_.forEach(this.chartData,function(value,key){
_.forEach(value.values,function(value,key){
_.forEach(this.chartData, function (value, key) {
_.forEach(value.values, function (value, key) {
newArr.push(value[0])
})
})
const Arr = newArr.sort()
_.forEach(this.chartData,function(value,key){
console.log(_.head(value.values[0]));
if(_.head(value.values[0]) !== _.head(Arr)){
value.values.unshift([_.head(Arr),0])
_.forEach(this.chartData, function (value, key) {
if (_.head(value.values[0]) !== _.head(Arr)) {
value.values.unshift([_.head(Arr), 0])
}
if((_.last(value.values[0]) !== _.last(Arr))){
value.values.push([_.last(Arr),0])
if ((_.last(value.values[0]) !== _.last(Arr))) {
value.values.push([_.last(Arr), 0])
}
})
}