|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
-<div>
|
|
|
+<div class="X-echats">
|
|
|
|
|
|
<div class="x-bar" v-show="container_show">
|
|
|
<div id="container"></div>
|
|
@@ -13,6 +13,7 @@ import Highcharts from "highcharts"; //必须引入
|
|
|
import { kgReplace, ugread } from "./Util.js";
|
|
|
import { options } from 'runjs';
|
|
|
import { request } from "@/utils/request";
|
|
|
+import { Message, MessageBox } from "element-ui";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -148,6 +149,7 @@ export default {
|
|
|
request(params)
|
|
|
.then((res) => {
|
|
|
console.log(res);
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -167,6 +169,7 @@ export default {
|
|
|
// websocket
|
|
|
getwebsocket() {
|
|
|
// 初始化weosocket
|
|
|
+ this.$emit('statechange','1');
|
|
|
this.numlist=[];
|
|
|
this.option.series=[];
|
|
|
this.convergeDate.value=[];
|
|
@@ -184,6 +187,7 @@ export default {
|
|
|
this.getlog();
|
|
|
this.historydata()
|
|
|
// }
|
|
|
+
|
|
|
},
|
|
|
websocketonerror() {
|
|
|
//连接建立失败重连
|
|
@@ -191,11 +195,13 @@ export default {
|
|
|
},
|
|
|
websocketonmessage(e) {
|
|
|
//数据接收
|
|
|
+
|
|
|
try{
|
|
|
const redata = JSON.parse(e.data);
|
|
|
if(typeof redata==='object'&& redata){
|
|
|
|
|
|
if(redata.type == "log"){
|
|
|
+ // this.$emit('statechange','1');
|
|
|
this.$emit('getthislog',redata.stats+redata.value);
|
|
|
}
|
|
|
if (redata.type == "iter") {
|
|
@@ -330,4 +336,7 @@ export default {
|
|
|
// .x-bar{
|
|
|
// margin-top: 120px;
|
|
|
// }
|
|
|
+.x-bar{
|
|
|
+ margin-top: 130px;
|
|
|
+}
|
|
|
</style>
|