|
@@ -68,7 +68,7 @@
|
|
|
</div>
|
|
|
<div class="mg-b-16 curStyle">
|
|
|
<panel :title="'健康状态'" :showLine="false">
|
|
|
- <MultipleLineChart :height="'250px'" />
|
|
|
+ <MultipleLineChart :list="statusData" :units="['']" :height="'250px'" />
|
|
|
</panel>
|
|
|
<div class="selections">
|
|
|
<div class="item" @click="changeStatus('1')" :class="{ active: status === '1' }">
|
|
@@ -99,6 +99,7 @@ export default {
|
|
|
status: "1",
|
|
|
healPieData: [],
|
|
|
stopPieData:[],
|
|
|
+ statusData:[],
|
|
|
barData:{
|
|
|
area: [],
|
|
|
legend: [],
|
|
@@ -216,8 +217,31 @@ export default {
|
|
|
|
|
|
let statusData = [];
|
|
|
|
|
|
+ const time = res.data.time;
|
|
|
+
|
|
|
+ for(let key in res.data){
|
|
|
+ if(key !== "name" && key !== "time"){
|
|
|
+ let item=res.data[key];
|
|
|
+
|
|
|
+ let statusItem = {
|
|
|
+ title: res.data.name[0][key],
|
|
|
+ yAxisIndex: 0,
|
|
|
+ value: []
|
|
|
+ }
|
|
|
+
|
|
|
+ time.forEach((text, index)=>{
|
|
|
+ statusItem.value.push({
|
|
|
+ text:res.data.name[0][key],
|
|
|
+ value:item[index]
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ statusData.push(statusItem);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ that.statusData = statusData;
|
|
|
|
|
|
- console.log(111,res);
|
|
|
}
|
|
|
});
|
|
|
},
|