|
@@ -1027,7 +1027,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="maxh221">
|
|
<div class="maxh221">
|
|
<!-- 中间部分 -->
|
|
<!-- 中间部分 -->
|
|
- <div class="conter_mian classtable " v-if="activeName=='Three'&&tabactive=='列表监控'||activeName=='Three'&&tabactive=='开始'">
|
|
|
|
|
|
+ <div class="conter_mian classtable " v-show="jiankong">
|
|
<!-- <el-table :data="tableDatalieb" border style="display: flex; flex: 1; overflow: auto;" max-height="600">
|
|
<!-- <el-table :data="tableDatalieb" border style="display: flex; flex: 1; overflow: auto;" max-height="600">
|
|
<el-table-column type="index" width="30" />
|
|
<el-table-column type="index" width="30" />
|
|
<el-table-column prop="x1" label="x1" />
|
|
<el-table-column prop="x1" label="x1" />
|
|
@@ -1059,14 +1059,14 @@
|
|
<!-- <div @click="tablefun()">点击</div> -->
|
|
<!-- <div @click="tablefun()">点击</div> -->
|
|
</div>
|
|
</div>
|
|
<!-- 曲线监控 -->
|
|
<!-- 曲线监控 -->
|
|
- <div class="conter_mian classtable " v-if="activeName=='Three'&&tabactive=='曲线监控'">
|
|
|
|
|
|
+ <div class="conter_mian classtable " v-show="echartshow">
|
|
<!-- <el-form-item label="" >
|
|
<!-- <el-form-item label="" >
|
|
<el-select v-model="quval" :suffix-icon="CaretBottom" placeholder="请选择">
|
|
<el-select v-model="quval" :suffix-icon="CaretBottom" placeholder="请选择">
|
|
<el-option v-for="item in quxian" :key="item.value" :label="item.label" :value="item.value">
|
|
<el-option v-for="item in quxian" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
- <optmonitor ref="optmonitor1" :echartdata="echartdata" :selval="quval" :curvedata="curvedata"/>
|
|
|
|
|
|
+ <optmonitor ref="optmonitor1" :echartdata="echartdata" :selval="quval" :curvedata="curvedata" />
|
|
</div>
|
|
</div>
|
|
<!-- 过程监控 -->
|
|
<!-- 过程监控 -->
|
|
<div class="conter_mian classtable conter_flex" v-if="activeName=='Three'&&tabactive=='过程监控'">
|
|
<div class="conter_mian classtable conter_flex" v-if="activeName=='Three'&&tabactive=='过程监控'">
|
|
@@ -1350,6 +1350,8 @@
|
|
import vuefindex from './vuetree/index.vue'
|
|
import vuefindex from './vuetree/index.vue'
|
|
import Sidebar from './vuetree/Sidebar.vue'
|
|
import Sidebar from './vuetree/Sidebar.vue'
|
|
let flowshow=ref(true);
|
|
let flowshow=ref(true);
|
|
|
|
+ let jiankong=ref(false);
|
|
|
|
+ let echartshow=ref(false);
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
let youhua=ref({
|
|
let youhua=ref({
|
|
@@ -1769,10 +1771,11 @@ console.log(route.query.pid);
|
|
flowshow.value=true;
|
|
flowshow.value=true;
|
|
console.log(11111)
|
|
console.log(11111)
|
|
}else{
|
|
}else{
|
|
-
|
|
|
|
flowshow.value=false;
|
|
flowshow.value=false;
|
|
console.log( flowshow.value)
|
|
console.log( flowshow.value)
|
|
}
|
|
}
|
|
|
|
+ ifjiankong();
|
|
|
|
+
|
|
dialogcolse()
|
|
dialogcolse()
|
|
}
|
|
}
|
|
//表格点击事件
|
|
//表格点击事件
|
|
@@ -1826,6 +1829,7 @@ console.log(route.query.pid);
|
|
console.log(key);
|
|
console.log(key);
|
|
console.log(name);
|
|
console.log(name);
|
|
tabactive.value=name;
|
|
tabactive.value=name;
|
|
|
|
+
|
|
dialogbolen();
|
|
dialogbolen();
|
|
}
|
|
}
|
|
const dialogbolen=()=>{
|
|
const dialogbolen=()=>{
|
|
@@ -1876,14 +1880,34 @@ console.log(route.query.pid);
|
|
vuefval.value.linestrokeWidth(3);
|
|
vuefval.value.linestrokeWidth(3);
|
|
break;
|
|
break;
|
|
case "开始":
|
|
case "开始":
|
|
- runok();
|
|
|
|
|
|
+ optmonitor1.value.echatinit();
|
|
|
|
+ runok();
|
|
|
|
+ break;
|
|
|
|
+ case "列表监控":
|
|
|
|
+ ifjiankong()
|
|
break;
|
|
break;
|
|
case "曲线监控":
|
|
case "曲线监控":
|
|
|
|
+ ifjiankong()
|
|
curveLine();
|
|
curveLine();
|
|
|
|
|
|
default:
|
|
default:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // ||activeName.value=='Three'&&tabactive.value=='开始'
|
|
|
|
+ const ifjiankong=()=>{;
|
|
|
|
+ if(activeName.value=='Three'&&tabactive.value=='列表监控'||activeName.value=='Three'&&tabactive.value=='开始'){
|
|
|
|
+ jiankong.value=true;
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ jiankong.value=false;
|
|
|
|
+ }
|
|
|
|
+ if(activeName.value=='Three'&&tabactive.value=='曲线监控'||activeName.value=='Three'&&tabactive.value=='曲线监控'){
|
|
|
|
+ echartshow.value=true;
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+ echartshow.value=false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// 求解
|
|
// 求解
|
|
const runok= ()=>{
|
|
const runok= ()=>{
|
|
const params = {
|
|
const params = {
|
|
@@ -1917,7 +1941,7 @@ console.log(route.query.pid);
|
|
.then((res) => {
|
|
.then((res) => {
|
|
curvedata.value=JSON.stringify(res.rows);
|
|
curvedata.value=JSON.stringify(res.rows);
|
|
// console.log(curvedata.value);
|
|
// console.log(curvedata.value);
|
|
- optmonitor1.value.getshuju(curvedata.value);
|
|
|
|
|
|
+ // optmonitor1.value.getshuju(curvedata.value);
|
|
// optmonitor1.value.getsockechart();
|
|
// optmonitor1.value.getsockechart();
|
|
|
|
|
|
|
|
|
|
@@ -1927,10 +1951,6 @@ console.log(route.query.pid);
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
ElMessage.error(err.returnMsg)
|
|
ElMessage.error(err.returnMsg)
|
|
})
|
|
})
|
|
- }
|
|
|
|
- const diaoyongfun=()=>{
|
|
|
|
- console.log(optmonitor1.value);
|
|
|
|
- //optmonitor1.value.getshuju();
|
|
|
|
}
|
|
}
|
|
//进化优化器
|
|
//进化优化器
|
|
const getoptimize = () => {
|
|
const getoptimize = () => {
|
|
@@ -2436,7 +2456,7 @@ const params = {
|
|
// 表格
|
|
// 表格
|
|
function tablefun(vals){
|
|
function tablefun(vals){
|
|
let arrtable=vals;
|
|
let arrtable=vals;
|
|
- console.log(arrtable);
|
|
|
|
|
|
+ //console.log(arrtable);
|
|
let obj2={}
|
|
let obj2={}
|
|
let heaarr= arrobj.value[0].vars.split(",");
|
|
let heaarr= arrobj.value[0].vars.split(",");
|
|
//let heaarr=['x1', 'x2', 'x3', 'x4', 'x5', 'f1']
|
|
//let heaarr=['x1', 'x2', 'x3', 'x4', 'x5', 'f1']
|
|
@@ -2448,6 +2468,7 @@ function tablefun(vals){
|
|
let result = heaarr.map((key, index) => {
|
|
let result = heaarr.map((key, index) => {
|
|
return { [key]: arrtable[index] };
|
|
return { [key]: arrtable[index] };
|
|
});
|
|
});
|
|
|
|
+
|
|
const mergedObject = result.reduce((accumulator, currentValue) => {
|
|
const mergedObject = result.reduce((accumulator, currentValue) => {
|
|
return { ...accumulator, ...currentValue };
|
|
return { ...accumulator, ...currentValue };
|
|
}, {});
|
|
}, {});
|
|
@@ -2465,11 +2486,14 @@ const logsget= ()=>{
|
|
.then((res) => {
|
|
.then((res) => {
|
|
logs.value=res.logs;
|
|
logs.value=res.logs;
|
|
const results = extractBracesContent( logs.value);
|
|
const results = extractBracesContent( logs.value);
|
|
- console.log(results);
|
|
|
|
for(let i=0;i<results.length;i++){
|
|
for(let i=0;i<results.length;i++){
|
|
arrobj.value.push(results[i]);
|
|
arrobj.value.push(results[i]);
|
|
let vals=(results[i].vals).split(" ");
|
|
let vals=(results[i].vals).split(" ");
|
|
tablefun(vals);
|
|
tablefun(vals);
|
|
|
|
+ let echarr=[];
|
|
|
|
+ echarr.push(results[i])
|
|
|
|
+ optmonitor1.value.getsockechart(echarr);
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
@@ -2521,13 +2545,14 @@ function initWebSocket() {
|
|
arrobj.value=[];
|
|
arrobj.value=[];
|
|
if(res.data.indexOf('{') !== -1){
|
|
if(res.data.indexOf('{') !== -1){
|
|
echartdata.value=res.data;
|
|
echartdata.value=res.data;
|
|
|
|
+ // console.log( echartdata.value);
|
|
arrobj.value.push(JSON.parse(res.data));
|
|
arrobj.value.push(JSON.parse(res.data));
|
|
- console.log( arrobj.value);
|
|
|
|
|
|
+ //console.log( arrobj.value);
|
|
let vals=(JSON.parse(res.data).vals).split(" ");
|
|
let vals=(JSON.parse(res.data).vals).split(" ");
|
|
tablefun(vals);
|
|
tablefun(vals);
|
|
-
|
|
|
|
|
|
+ optmonitor1.value.getsockechart(arrobj.value);
|
|
// curveLine();
|
|
// curveLine();
|
|
- //console.log(optmonitor1.value);
|
|
|
|
|
|
+ ///console.log(optmonitor1.value);
|
|
|
|
|
|
// diaoyongfun();
|
|
// diaoyongfun();
|
|
// curveLine();
|
|
// curveLine();
|
|
@@ -2602,6 +2627,12 @@ function initWebSocket() {
|
|
footerShow.value = !footerShow.value;
|
|
footerShow.value = !footerShow.value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // watch(() =>echartdata.value, (newValue, oldValue) => {
|
|
|
|
+ // // 这里处理 echartData 变化的逻辑
|
|
|
|
+ // console.log('echartData changed:', newValue);
|
|
|
|
+ // // console.log(optmonitor1.value);
|
|
|
|
+ // });
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
|