|
@@ -5,28 +5,22 @@
|
|
|
|
|
|
<div class="contour">
|
|
|
<span>
|
|
|
- <el-button style="margin-left: -160px;">阈值设置</el-button>
|
|
|
+ <el-button style="margin-left: 0px;" @click="show">阈值设置</el-button>
|
|
|
</span>
|
|
|
- <span><albox style="margin-left: 80px;color: #021722"></albox>
|
|
|
+ <span><albox @handlervalue="handlervalue" ></albox>
|
|
|
</span>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
+ <dia :visible="data.visible" @hide="hide" @handlervalue="handlervalue" ></dia>
|
|
|
|
|
|
<div class="contour">
|
|
|
- <span> <PieChart :value="data.paopian" title="跑偏" size="180px" :totalValue="100" :fakeData="false"></PieChart></span>
|
|
|
- <span> <PieChart :value="data.dahua" title="打滑" size="180px" :totalValue="100" :fakeData="false"></PieChart></span>
|
|
|
- <span> <PieChart :value="data.chaozai" title="超载" size="180px" :totalValue="100" :fakeData="false" ></PieChart></span>
|
|
|
- <span> <PieChart :value="data.duimei" title="堆煤" size="180px" :totalValue="100" :fakeData="false" ></PieChart></span>
|
|
|
+ <span> <PieChart :value="data.paopian" title="跑偏" size="180px" :totalValue="100" :fakeData="data.fakeData"></PieChart></span>
|
|
|
+ <span> <PieChart :value="data.dahua" title="打滑" size="180px" :totalValue="100" :fakeData="data.fakeData"></PieChart></span>
|
|
|
+ <span> <PieChart :value="data.chaozai" title="超载" size="180px" :totalValue="100" :fakeData="data.fakeData" ></PieChart></span>
|
|
|
+ <span> <PieChart :value="data.duimei" title="堆煤" size="180px" :totalValue="100" :fakeData="data.fakeData" ></PieChart></span>
|
|
|
</div>
|
|
|
|
|
|
- <!-- <ul class="flex-ul">
|
|
|
- <li>跑偏<span>:{{data.paopian}}</span>%</li>
|
|
|
- <li>打滑<span>:{{data.dahua}}</span>%</li>
|
|
|
- <li>超载<span>:{{data.chaozai}}</span>%</li>
|
|
|
- <li>堆煤<span>:{{data.duimei}}</span>%</li>
|
|
|
-
|
|
|
- </ul> -->
|
|
|
|
|
|
</div>
|
|
|
|
|
@@ -41,9 +35,11 @@ import albox from "../../../components/belt_diagnosis/failure_pre/albox.vue";
|
|
|
// import PieChart3 from "../../../components/belt_diagnosis/failure_pre/pieChart3.vue"
|
|
|
// import PieChart4 from "../../../components/belt_diagnosis/failure_pre/pieChart4.vue"
|
|
|
import PieChart from "../../../common/pieChart.vue";
|
|
|
+import dia from "./yuzhishezhi.vue";
|
|
|
|
|
|
export default {
|
|
|
pieChart,
|
|
|
+ dia,
|
|
|
data() {
|
|
|
return {
|
|
|
data: {
|
|
@@ -51,6 +47,11 @@ export default {
|
|
|
dahua: 20,
|
|
|
chaozai: 20,
|
|
|
duimei: 20,
|
|
|
+ isShow:false,
|
|
|
+ width:"60%",
|
|
|
+ height:"2000px",
|
|
|
+ visible:false,
|
|
|
+ fakeData:false,
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -60,6 +61,14 @@ export default {
|
|
|
this.initWebSocket();
|
|
|
},
|
|
|
methods: {
|
|
|
+ handlervalue(val) {
|
|
|
+ console.log('val :>> ', val);
|
|
|
+ this.data.paopian = this.getRandomNum(0, 80);
|
|
|
+ this.data.dahua = this.getRandomNum(0, 80);
|
|
|
+ this.data.duimei = this.getRandomNum(0, 80);
|
|
|
+ this.data.chaozai = this.getRandomNum(0, 80);
|
|
|
+
|
|
|
+ },
|
|
|
initWebSocket() {
|
|
|
// 连接错误
|
|
|
this.websocket.onerror = () => {
|
|
@@ -90,12 +99,23 @@ export default {
|
|
|
this.data.dahua = Number(data["dahua_after"])*100;
|
|
|
this.data.duimei = Number(data["jitouduimei_after"])*100;
|
|
|
this.data.chaozai = Number(data["chaozai_after"])*100;
|
|
|
- console.log("数据展示为:", this.data);
|
|
|
+ // console.log("数据展示为:", this.data);
|
|
|
},
|
|
|
close() {
|
|
|
this.websocket.close();
|
|
|
console.log("关闭websocket连接");
|
|
|
},
|
|
|
+ show(){
|
|
|
+ this.data.visible=true
|
|
|
+ },
|
|
|
+ hide(){
|
|
|
+ //更改为false模式,隐藏提示框
|
|
|
+ this.data.visible=false;
|
|
|
+ },
|
|
|
+ changeFakeData(){
|
|
|
+ this.data.fakeData=true;
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(["websocketIP"]),
|
|
@@ -103,6 +123,7 @@ export default {
|
|
|
components: {
|
|
|
PieChart,
|
|
|
albox,
|
|
|
+ dia,
|
|
|
// PieChart1,
|
|
|
// PieChart2,
|
|
|
// PieChart3,
|
|
@@ -113,8 +134,20 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
+
|
|
|
+.contour /deep/ .el-button{
|
|
|
+ background-color: transparent;
|
|
|
+ border: none;
|
|
|
+ font-size: 18px;
|
|
|
+ color: #4adefe;
|
|
|
+}
|
|
|
+
|
|
|
+.contour /deep/ .el-button:hover{
|
|
|
+ color: #f5e50d;
|
|
|
+}
|
|
|
+
|
|
|
.title {
|
|
|
- color: #fff;
|
|
|
+ color: #4adefe;
|
|
|
font-size: 20px;
|
|
|
font-weight: bolder;
|
|
|
text-align: center;
|
|
@@ -152,6 +185,9 @@ export default {
|
|
|
// }
|
|
|
}
|
|
|
}
|
|
|
+.buttoncolor{
|
|
|
+ color: rgb(126, 120, 120);
|
|
|
+}
|
|
|
.flex-ul {
|
|
|
display: flex;
|
|
|
// flex-direction: column;
|