From 831cfa4c439c6d073d706a82d2a439f8b1818498 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 18 十一月 2025 16:59:50 +0800
Subject: [PATCH] Merge branch 'new' of http://www.beijingsoft.cn:9090/r/smart-web into new
---
src/views/mdc/components/StationLiveSpeed.vue | 69 +++++++++++++++++++---------------
1 files changed, 38 insertions(+), 31 deletions(-)
diff --git a/src/views/mdc/components/StationLiveSpeed.vue b/src/views/mdc/components/StationLiveSpeed.vue
index 02b2e04..291f1ea 100644
--- a/src/views/mdc/components/StationLiveSpeed.vue
+++ b/src/views/mdc/components/StationLiveSpeed.vue
@@ -1,24 +1,26 @@
<!--
* @Date: 2024-04-18 21:52:18
- * @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-11-10 19:30:59
- * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/components/TimeAlarm.vue
+ * @LastEditors: 鏉庡枂(寮�鍙戠粍) lzhe@yxqiche.com
+ * @LastEditTime: 2025-11-18 16:54:41
+ * @FilePath: /cps-web/src/views/mdc/components/StationLiveSpeed.vue
-->
<template>
<div class="speed">
- <div id="c" style="width: 30%;height:200px;"></div>
- <div id="d" style="width: 30%;height:200px;"></div>
- <div id="e" style="width: 30%;height:200px;"></div>
+ <div ref="c" style="width: 30%;height:200px;"></div>
+ <div ref="d" style="width: 30%;height:200px;"></div>
+ <div ref="e" style="width: 30%;height:200px;"></div>
</div>
<div class="dataHr">鍔犲伐鏁版嵁</div>
<el-row :gutter="20" style="padding-right: 12px;padding-left: 12px;">
<!-- 涓昏酱璐熻浇(SpindleLoad),涓昏酱鍊嶇巼(SpindleRate),杩涚粰鍊嶇巼(FeedRate) 涓嶅湪杩欓噷灞曠ず -->
<el-col :span="12" v-for="item in dmpList" style="margin-bottom: 12px;">
- <div v-if="item.dpName != 'SpindleLoad' && item.dpName != 'SpindleRate' && item.dpName != 'FeedRate'">
- <div class="inlineDiv">{{item.dpLabel}}</div>
- <el-input v-model="item.codeName" :disabled="true" class="inlineInput" :title="item.codeName"></el-input>
+ <!-- v-show="item.dpName.toLowerCase() != 'spindleload' && item.dpName.toLowerCase() != 'spindlerate' && item.dpName.toLowerCase() != 'feedrate'" -->
+ <div>
+ <div class="inlineDiv">{{ item.dpLabel }}</div>
+ <el-input v-model="item.codeName" :disabled="true" class="inlineInput"
+ :title="item.codeName"></el-input>
</div>
-
+
</el-col>
</el-row>
</template>
@@ -38,10 +40,11 @@
}
},
components: {
-
+
},
data() {
return {
+ isspeed: false,
input: '',
option: {
graphic: {
@@ -50,7 +53,7 @@
style: { opacity: 0 }// 娣″叆
},
enterAnimation: {
- duration: 1300//鍔ㄧ敾鏃堕暱
+ duration: 1300//鍔ㄧ敾鏃堕暱
},
left: 'center',
top: 'bottom',
@@ -80,7 +83,7 @@
},
pointer: {
itemStyle: {
- color: 'auto'
+ color: 'auto'
}
},
axisTick: { //鍒诲害
@@ -95,8 +98,8 @@
distance: -14, //鍒诲害璺濈琛ㄧ洏鐨勮窛绂�
length: 10,
lineStyle: {
- color: '#fff',
- width: 2 //姣忎釜閿娇绾垮
+ color: '#fff',
+ width: 2 //姣忎釜閿娇绾垮
}
},
axisLabel: { //琛ㄧ洏鍐呭埢搴�
@@ -109,7 +112,7 @@
}
}
]
- }
+ }
}
},
methods: {
@@ -117,36 +120,36 @@
if(this.dmpList.length == 0) return;
var a,b,c;
this.dmpList.forEach(item=> {
- if(item.dpName == "SpindleLoad") {
+ if(item.dpName.toLowerCase() == "spindleload") {
a = item.codeName;
- }else if(item.dpName == "SpindleRate") {
+ }else if(item.dpName.toLowerCase() == "spindlerate") {
b = item.codeName;
- }else if(item.dpName == "FeedRate") {
+ }else if(item.dpName.toLowerCase() == "feedrate") {
c = item.codeName;
}
})
this.showCharts(a,b,c);
},
- showCharts(a,b,c) {
- var myChartA = echarts.init(document.getElementById('c'));
- var myChartB = echarts.init(document.getElementById('d'));
- var myChartC = echarts.init(document.getElementById('e'));
+ showCharts(a, b, c) {
+ var myChartA = echarts.init(this.$refs.c);
+ var myChartB = echarts.init(this.$refs.d);
+ var myChartC = echarts.init(this.$refs.e);
var optionA = JSON.parse(JSON.stringify(this.option));
var optionB = JSON.parse(JSON.stringify(this.option));
var optionC = JSON.parse(JSON.stringify(this.option));
- optionA.graphic.style.text= ['涓昏酱璐熻浇'+a+'%',].join('\n');
- optionB.graphic.style.text= ['涓昏酱鍊嶇巼'+b+'%',].join('\n');
- optionC.graphic.style.text= ['缁欒繘鍊嶇巼'+c+'%',].join('\n');
- optionA.series[0].data = [{value: a}];
- optionB.series[0].data = [{value: b}];
- optionC.series[0].data = [{value: c}];
+ optionA.graphic.style.text = ['涓昏酱璐熻浇' + a + '%',].join('\n');
+ optionB.graphic.style.text = ['涓昏酱鍊嶇巼' + b + '%',].join('\n');
+ optionC.graphic.style.text = ['杩涚粰鍊嶇巼' + c + '%',].join('\n');
+ optionA.series[0].data = [{ value: a }];
+ optionB.series[0].data = [{ value: b }];
+ optionC.series[0].data = [{ value: c }];
myChartA.setOption(optionA);
myChartB.setOption(optionB);
myChartC.setOption(optionC);
}
},
mounted() {
- this.showCharts(0,0,0);
+ this.showCharts(0, 0, 0);
}
}
</script>
@@ -156,9 +159,11 @@
display: flex;
justify-content: center;
}
-.speed > div {
+
+.speed>div {
flex: 1;
}
+
.dataHr {
background-color: #48ACF8;
height: 30px;
@@ -171,11 +176,13 @@
margin-top: 12px;
margin-bottom: 12px;
}
+
.inlineDiv {
display: inline-block;
width: 70px;
text-align: left;
}
+
.inlineInput {
width: calc(100% - 76px);
margin-left: 6px;
--
Gitblit v1.9.3