From eb967d7573a8297e493d455dfce2c77319215990 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期三, 13 九月 2023 08:31:25 +0800
Subject: [PATCH] 注册页面中英文替换 修改电气管理顶部导航栏布局
---
CanadaMes-ui/src/views/Electrical/Sign.vue | 62 +++++++++++++++++++------------
1 files changed, 38 insertions(+), 24 deletions(-)
diff --git a/CanadaMes-ui/src/views/Electrical/Sign.vue b/CanadaMes-ui/src/views/Electrical/Sign.vue
index 454bd45..cf7c311 100644
--- a/CanadaMes-ui/src/views/Electrical/Sign.vue
+++ b/CanadaMes-ui/src/views/Electrical/Sign.vue
@@ -2,19 +2,16 @@
<div class="app">
<!--闈㈠寘灞戝鑸尯鍩�-->
<el-breadcrumb separator-class="el-icon-arrow-right" class="el-breadcrumb">
- <router-link to="/home" tag="el-button" type="text">{{ $t('langHome') }}</router-link>
- <el-button type="text">璁惧绠$悊</el-button>
- <router-link to="/Electrical/Parameter" tag="el-button" type="text">Parameter</router-link>
- <router-link to="/Electrical/Action" tag="el-button" type="text">Action</router-link>
- <router-link to="/Electrical/Sign" tag="el-button" type="text">Sign</router-link>
- <router-link to="/Electrical/State" tag="el-button" type="text">State</router-link>
- <router-link to="/Electrical/alarm" tag="el-button" type="text">Alarm</router-link>
+ <router-link to="/Electrical/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter') }}</router-link>
+ <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action') }}</router-link>
+ <router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign') }}</router-link>
+ <router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State') }}</router-link>
+ <router-link to="/Electrical/alarm" tag="el-button" type="text" active-class="blue-button">{{ $t('Alarm') }}</router-link>
</el-breadcrumb>
<div>Sign</div>
<div style="padding-right: 30px;display: flex;flex-wrap: wrap;" class="neir">
<div class="kuai_sb" v-for="item in record.xyData" :key="item.name">
- <el-col class="deng" :class="getStatusClass(item.value, item.name)">
- <!-- <el-input v-model="item.value" style="width: 280px;" class="in_mc"></el-input> -->
+ <el-col class="deng" :class="getStatusClass(item.value)">
</el-col>
<el-input v-model="item.name" style="width: 280px;" class="in_mc"></el-input>
@@ -26,12 +23,16 @@
</template>
<script >
+import LanguageMixin from '../../lang/LanguageMixin'
let socket;
export default {
name: "Sign",
+ mixins: [LanguageMixin],
data () {
return {
+ activeButton: '',
record: {
+ //瀹氫箟鏁扮粍锛屽苟娣诲姞榛樿鍊�
params: [1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,],
xyData: [
@@ -146,18 +147,23 @@
this.init();
},
methods: {
- getStatusClass (zhuangtai, mc) {
-
-
- if (mc === "LED.green" && zhuangtai === 0) {
- return "green";
- }
- if (mc === "LED.red" && zhuangtai === 0) {
- return "red";
- }
- if (mc === "LED.yellow" && zhuangtai === 0) {
- return "yellow"
- }
+ onButtonClick() {
+ this.isButtonClicked = true; // 灏嗘寜閽鑹茶缃负钃濊壊
+ setTimeout(() => {
+ this.isButtonClicked = false; // 閲嶇疆鎸夐挳棰滆壊
+ }, 500); // 杩欓噷鐨�500姣鏄牴鎹偍甯屾湜鎸夐挳棰滆壊鎸佺画澶氶暱鏃堕棿鏉ュ畾鐨勶紝鍙互鏍规嵁闇�姹傝繘琛岃皟鏁�
+ },
+ //鏍规嵁璇诲彇PLC鐨勫�硷紝鏍规嵁鍚嶇О鏀瑰彉棰滆壊
+ getStatusClass (zhuangtai) {
+ // if (mc === "LED.green" && zhuangtai === 0) {
+ // return "green";
+ // }
+ // if (mc === "LED.red" && zhuangtai === 0) {
+ // return "red";
+ // }
+ // if (mc === "LED.yellow" && zhuangtai === 0) {
+ // return "yellow"
+ // }
if (zhuangtai === 0) {
@@ -198,7 +204,7 @@
let obj = JSON.parse(msg.data);
//this.$set(this.record.params, 0, obj.params[0]);
this.record.params[0] = obj.sig[0];
- for (let a = 0; a <= this.record.params.length; a++) {
+ for (let a = 0; a <= this.record.xyData[0] - 1; a++) {
if (!this.record.xyData[a]) {
this.record.xyData[a] = { name: this.record.canshu[a], value: this.record.params[0][a] };
} else {
@@ -239,10 +245,15 @@
padding: 0;
}
-/* .neir {
+.app {
height: 100%;
+}
+
+.neir {
+ /* height: 580px; */
+ height: 90%;
overflow-y: auto;
-} */
+}
.el-input__inner {
text-align: center;
@@ -300,4 +311,7 @@
.yellow {
background-color: yellow;
}
+.blue-button {
+ background-color: skyblue;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0