|
@@ -1021,6 +1021,16 @@
|
|
|
<!-- 放图形 -->
|
|
|
<div class="main_container">
|
|
|
<div class="main_model">
|
|
|
+ <div class="jindutiao" >
|
|
|
+ <!-- <el-progress :text-inside="true" :stroke-width="26" :percentage="70" /> -->
|
|
|
+ <div class="demo-progress" v-show="progressshow">
|
|
|
+ <el-progress :percentage="percentage" :stroke-width="15" :color="customColors">
|
|
|
+ <template #default="{ percentage }">
|
|
|
+ <span class="percentage-value">当前进度:{{ percentage }}%</span>
|
|
|
+ </template>
|
|
|
+ </el-progress>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="main_model" v-show='flowshow' >
|
|
|
<!-- //v-if="activeName=='Role'" -->
|
|
|
<vuefindex ref="vuefval" :Xfiol="dialog.Xfiol" :jboptimizer="dialog.jboptimizer" :optimizer="dialog.optimizer" @optimizerfalse="optimizerfalse($event)" ></vuefindex>
|
|
@@ -1059,6 +1069,7 @@
|
|
|
<bargraph ref="bargraphref" v-show="bargraphshow"/>
|
|
|
<echartLine ref="echartLineref" v-show="echartLineshow"/>
|
|
|
<BarChart ref="BarChartref" v-show="BarChartshow"/>
|
|
|
+ <scatter ref="scatterref" v-show="scattershow"/>
|
|
|
<radar ref="radarref" v-show="radarshow"/>
|
|
|
</div>
|
|
|
<!-- 可视化结束 -->
|
|
@@ -1343,7 +1354,10 @@
|
|
|
import bargraph from './echart/bargraph.vue'
|
|
|
import echartLine from './echart/echartLine.vue'
|
|
|
import BarChart from './echart/BarChart.vue'
|
|
|
+ import scatter from './echart/scatter.vue'
|
|
|
import radar from './echart/radar.vue'
|
|
|
+ let percentage=ref(0);
|
|
|
+ let progressshow=ref(true)
|
|
|
let flowshow=ref(true);
|
|
|
let jiankong=ref(false);
|
|
|
let echartshow=ref(false);
|
|
@@ -1351,11 +1365,13 @@
|
|
|
let echartLineshow=ref(false);
|
|
|
let BarChartshow=ref(false);
|
|
|
let bargraphshow=ref(false);
|
|
|
+ let scattershow=ref(false);
|
|
|
let radarshow=ref(false);
|
|
|
let bargraphref=ref();
|
|
|
let echartLineref=ref();
|
|
|
let BarChartref=ref();
|
|
|
let radarref=ref();
|
|
|
+ let scatterref=ref();
|
|
|
let echartzongshow=ref(false);
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
@@ -1691,43 +1707,13 @@ let options3=ref([
|
|
|
|
|
|
},
|
|
|
])
|
|
|
- // let tableDatalieb=ref([
|
|
|
- // {
|
|
|
- // x1:"02",
|
|
|
- // x2: '33456833',
|
|
|
- // x3:"02",
|
|
|
- // x4: '20160503',
|
|
|
- // x5:"02",
|
|
|
- // x6: '20160503',
|
|
|
- // x7:"02",
|
|
|
- // x8: '20160503',
|
|
|
- // x9:"02",
|
|
|
- // x10: '20160503',
|
|
|
- // x11:"02",
|
|
|
- // x12: '20160503',
|
|
|
- // x13:"02",
|
|
|
- // x14: '20160503',
|
|
|
- // x15: '20160503',
|
|
|
- // cd: '20160503',
|
|
|
- // },
|
|
|
- // {
|
|
|
- // x1:"02",
|
|
|
- // x2: '33456833',
|
|
|
- // x3:"02",
|
|
|
- // x4: '20160503',
|
|
|
- // x5:"02",
|
|
|
- // x6: '20160503',
|
|
|
- // x7:"02",
|
|
|
- // x8: '20160503',
|
|
|
- // x9:"02",
|
|
|
- // x10: '20160503',
|
|
|
- // x11:"02",
|
|
|
- // x12: '20160503',
|
|
|
- // x13:"02",
|
|
|
- // x14: '20160503',
|
|
|
- // cd: '20160503',
|
|
|
- // },
|
|
|
- // ])
|
|
|
+ const customColors = [
|
|
|
+ { color: '#f56c6c', percentage: 20 },
|
|
|
+ { color: '#e6a23c', percentage: 40 },
|
|
|
+ { color: '#d3f12f', percentage: 60 },
|
|
|
+ { color: '#1989fa', percentage: 80 },
|
|
|
+ { color: '#5cb87a', percentage: 100 },
|
|
|
+]
|
|
|
let name = ref("1")
|
|
|
let num = ref(1)
|
|
|
const getImgPath = (url) => {
|
|
@@ -1909,7 +1895,8 @@ console.log(route.query.pid);
|
|
|
echatsfunc();
|
|
|
break;
|
|
|
case "散点图":
|
|
|
- //echatsfunc();
|
|
|
+ // logsget();
|
|
|
+ echatsfunc();
|
|
|
break;
|
|
|
case "横条图":
|
|
|
echatsfunc();
|
|
@@ -1929,6 +1916,7 @@ console.log(route.query.pid);
|
|
|
echartLineref.value.echatinit();
|
|
|
BarChartref.value.echatinit();
|
|
|
radarref.value.echatinit();
|
|
|
+ scatterref.value.echatinit();
|
|
|
}
|
|
|
const echatsfunc=()=>{
|
|
|
//echartzongshow.value=true;
|
|
@@ -1940,6 +1928,7 @@ console.log(route.query.pid);
|
|
|
echartLineshow.value=false;
|
|
|
BarChartshow.value=false;
|
|
|
radarshow.value=false;
|
|
|
+ scattershow.value=false;
|
|
|
break;
|
|
|
case "柱状图":
|
|
|
areashow.value=false;
|
|
@@ -1947,6 +1936,7 @@ console.log(route.query.pid);
|
|
|
echartLineshow.value=false;
|
|
|
BarChartshow.value=false;
|
|
|
radarshow.value=false;
|
|
|
+ scattershow.value=false;
|
|
|
break;
|
|
|
case "饼状图":
|
|
|
areashow.value=false;
|
|
@@ -1954,6 +1944,7 @@ console.log(route.query.pid);
|
|
|
echartLineshow.value=false;
|
|
|
BarChartshow.value=false;
|
|
|
radarshow.value=false;
|
|
|
+ scattershow.value=false;
|
|
|
break;
|
|
|
case "折线图":
|
|
|
areashow.value=false;
|
|
@@ -1961,13 +1952,23 @@ console.log(route.query.pid);
|
|
|
echartLineshow.value=true;
|
|
|
BarChartshow.value=false;
|
|
|
radarshow.value=false;
|
|
|
+ scattershow.value=false;
|
|
|
break;
|
|
|
+ case "散点图":
|
|
|
+ areashow.value=false;
|
|
|
+ bargraphshow.value=false;
|
|
|
+ echartLineshow.value=false;
|
|
|
+ BarChartshow.value=false;
|
|
|
+ radarshow.value=false;
|
|
|
+ scattershow.value=true;
|
|
|
+ break
|
|
|
case "横条图":
|
|
|
areashow.value=false;
|
|
|
bargraphshow.value=false;
|
|
|
echartLineshow.value=false;
|
|
|
BarChartshow.value=true;
|
|
|
radarshow.value=false;
|
|
|
+ scattershow.value=false;
|
|
|
break
|
|
|
case "雷达图":
|
|
|
areashow.value=false;
|
|
@@ -1975,6 +1976,7 @@ console.log(route.query.pid);
|
|
|
echartLineshow.value=false;
|
|
|
BarChartshow.value=false;
|
|
|
radarshow.value=true;
|
|
|
+ scattershow.value=false;
|
|
|
break
|
|
|
default:
|
|
|
|
|
@@ -2588,6 +2590,7 @@ const logsget= ()=>{
|
|
|
echartLineref.value.getsockechart(echarr);
|
|
|
BarChartref.value.getsockechart(echarr);
|
|
|
radarref.value.getsockechart(echarr);
|
|
|
+ scatterref.value.getsockechart(echarr);
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -2608,7 +2611,9 @@ const logsget= ()=>{
|
|
|
}
|
|
|
}).filter(Boolean); // 过滤掉解析失败的对象
|
|
|
}
|
|
|
-
|
|
|
+function convertToPercentage(number) {
|
|
|
+ return (number * 100);
|
|
|
+}
|
|
|
|
|
|
//websockct的连接
|
|
|
function initWebSocket() {
|
|
@@ -2631,32 +2636,40 @@ function initWebSocket() {
|
|
|
// Websoket连接成功事件
|
|
|
const websocketonopen = (res) => {
|
|
|
console.log("WebSocket连接成功", res);
|
|
|
+
|
|
|
console.log()
|
|
|
start();
|
|
|
};
|
|
|
// Websoket接收消息事件
|
|
|
const websocketonmessage = (res) => {
|
|
|
+ progressshow.value=true;
|
|
|
arrobj.value=[];
|
|
|
if(res.data.indexOf('{') !== -1){
|
|
|
+ // return (number * 100) + '%';
|
|
|
+ // =(Number(JSON.parse(res.data).step))* 100;
|
|
|
+ let step=Number(JSON.parse(res.data).step);
|
|
|
+ percentage.value = Math.floor((step*100));
|
|
|
+ //percentage.value = convertToPercentage((Number(JSON.parse(res.data).step)));
|
|
|
echartdata.value=res.data;
|
|
|
- // console.log( echartdata.value);
|
|
|
arrobj.value.push(JSON.parse(res.data));
|
|
|
- //console.log( arrobj.value);
|
|
|
let vals=(JSON.parse(res.data).vals).split(" ");
|
|
|
tablefun(vals);
|
|
|
optmonitor1.value.getsockechart(arrobj.value);
|
|
|
- // curveLine();
|
|
|
- ///console.log(optmonitor1.value);
|
|
|
-
|
|
|
- // diaoyongfun();
|
|
|
- // curveLine();
|
|
|
- // optmonitor1.value.getsockechart()
|
|
|
}else{
|
|
|
+ if(res.data.indexOf('--成功') == -1){
|
|
|
+ const timer= setTimeout(function(){
|
|
|
+ //progressshow.value=false;
|
|
|
+ console.log('关闭定时器')
|
|
|
+ },20000)
|
|
|
+ clearTimeout(timer);
|
|
|
+
|
|
|
+ }
|
|
|
if( res.data.indexOf('msg=heartChec') == -1){
|
|
|
logs.value=logs.value+'"\n"'+res.data;
|
|
|
let textarea = document.getElementById("textarea_id");
|
|
|
textarea.scrollTop = textarea.scrollHeight;
|
|
|
}
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -2919,4 +2932,15 @@ border: 1px solid #2267B1;
|
|
|
right: 13px;
|
|
|
top: 5px;
|
|
|
}
|
|
|
+.jindutiao{
|
|
|
+
|
|
|
+ padding:0 0 2px 0px;
|
|
|
+ background: #9FCDFF;
|
|
|
+}
|
|
|
+.jindutiao .demo-progress{
|
|
|
+ width:80%;
|
|
|
+}
|
|
|
+.jindutiao .percentage-value{
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
</style>
|