From ea46f28356e2acb3bc7cc69b9af3c52fab38c0b0 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 18 一月 2024 16:56:47 +0800
Subject: [PATCH] 终止任务功能测试
---
CanadaMes-ui/src/views/Electrical/Sign.vue | 60 +++++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 39 insertions(+), 21 deletions(-)
diff --git a/CanadaMes-ui/src/views/Electrical/Sign.vue b/CanadaMes-ui/src/views/Electrical/Sign.vue
index a3151cf..160e9f0 100644
--- a/CanadaMes-ui/src/views/Electrical/Sign.vue
+++ b/CanadaMes-ui/src/views/Electrical/Sign.vue
@@ -7,20 +7,26 @@
}}</router-link>
<router-link to="/Electrical/State" tag="el-button" type="text" active-class="blue-button">{{ $t('State')
}}</router-link>
- <router-link to="/Electrical/Action" tag="el-button" type="text" active-class="blue-button">{{ $t('Action')
- }}</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/Parameter" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
+ }}</router-link> -->
<router-link to="/Electrical/Sign" tag="el-button" type="text" active-class="blue-button">{{ $t('Sign')
}}</router-link>
-
+ <router-link to="/Electrical/Servomanual" tag="el-button" type="text" active-class="blue-button">{{ $t('Parameter')
+ }}</router-link>
</el-breadcrumb>
<div>{{ $t('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)"></el-col>
- <el-input v-model="item.name" style="width: 280px;" class="in_mc"></el-input>
+ <span style="width: 100%;" class="in_mc">{{
+ item.unit
+ }}</span>
+ <span style="width: 100%;" class="in_mc">{{
+ item.name
+ }}</span>
</div>
@@ -58,9 +64,19 @@
}
},
created () {
- this.init();
+
//this.showdata();
},
+ activated(){
+ this.init();
+ this.record.xyData = this.jsonData.sign;
+ const language = this.$i18n.locale;
+ if (language === 'zh-CN') {
+ this.replaceChineseWithEnglish();
+ } else {
+ this.localizedRoles = [...this.record.xyData];
+ }
+ },
methods: {
showdata () {
console.log(1111);
@@ -94,7 +110,7 @@
} else {
//console.log("鎮ㄧ殑娴忚鍣ㄦ敮鎸乄ebSocket");
- let socketUrl = "ws://" + "localhost:8888" + "/springboot-vue3/api/talk/" + viewname;
+ let socketUrl = "ws://" + this.$t('ip')+":8888" + "/springboot-vue3/api/talk/" + viewname;
if (socket != null) {
socket.close();
socket = null;
@@ -113,7 +129,7 @@
this.record.params[0] = obj.sig[0];
this.record.xyData = this.jsonData.sign;
-
+ console.log(this.jsonData.sign)
for (let a = 0; a < this.record.xyData.length; a++) {
this.record.xyData[a].value = this.record.params[0][a];
@@ -127,7 +143,7 @@
const language = this.$i18n.locale;
- if (language === 'en-US') {
+ if (language === 'zh-CN') {
this.replaceChineseWithEnglish();
} else {
this.localizedRoles = [...this.record.xyData];
@@ -148,10 +164,14 @@
},
//璇█杞崲
replaceChineseWithEnglish () {
+
const translation = this.$t('Signlang');
- this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value }; });
- //console.log(translation);
+ if (translation != null) {
+ this.record.xyData = this.record.xyData.map(item => { return { name: translation[item.name] || item.name, value: item.value,unit:item.unit }; });
+ //console.log(translation);
+ }
+
}
}
@@ -185,9 +205,9 @@
}
.kuai_sb {
- text-align: center;
- width: 25%;
- margin-bottom: 15px;
+ text-align: left;
+ width:18%;
+ margin-bottom: 5px;
}
.el-input {
@@ -200,19 +220,17 @@
}
.in_mc {
- .el-input__inner {
- border: none;
- }
+ font-size: 13px;
}
.deng {
- margin-left: 40%;
+ margin-left: 1%;
display: inline-block;
background: #A0A0A0;
border: 0.1875em solid white;
border-radius: 50%;
- height: 5em;
- width: 5em;
+ height: 2em;
+ width: 2em;
box-shadow: 0.375em 0.375em 0 0 rgba(214, 214, 214, 0.125);
}
--
Gitblit v1.8.0