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 | 22 ++-
CanadaMes-ui/src/views/Electrical/alarm.vue | 22 ++-
CanadaMes-ui/src/views/Electrical/State.vue | 22 ++-
CanadaMes-ui/src/views/Electrical/Action.vue | 22 ++-
CanadaMes-ui/src/views/Electrical/Parameter.vue | 24 ++-
CanadaMes-ui/src/views/register/index.vue | 184 +++++++++++++++---------------
CanadaMes-ui/src/lang/locales/en-US.json | 28 ++++
CanadaMes-ui/src/layout/index.vue | 2
CanadaMes-ui/src/lang/locales/zh-CN.json | 23 +++
springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java | 2
10 files changed, 218 insertions(+), 133 deletions(-)
diff --git a/CanadaMes-ui/src/lang/locales/en-US.json b/CanadaMes-ui/src/lang/locales/en-US.json
index ad35a8e..e69ec1d 100644
--- a/CanadaMes-ui/src/lang/locales/en-US.json
+++ b/CanadaMes-ui/src/lang/locales/en-US.json
@@ -171,5 +171,31 @@
"State": "State",
"Alarm": "Alarm",
"Distribute": "Distribute",
- "Search": "Search"
+ "Search": "Search",
+
+
+ "langUsernameLabel": "Username",
+
+ "langPasswordLabel": "Password",
+ "langPasswordPlaceholder": "Please enter your password",
+ "langConfirmPasswordLabel": "Confirm Password",
+ "langConfirmPasswordPlaceholder": "Please confirm your password",
+ "langEmailLabel": "Email",
+
+ "langQQLabel": "QQ",
+ "langQQPlaceholder": "Please enter your QQ number",
+ "langPhoneNumberLabel": "Phone Number",
+ "langPhoneNumberPlaceholder": "Please enter your phone number",
+ "langUsernameRequiredMessage": "Please enter your username",
+ "langUsernameLengthMessage": "Username length should be between 5 and 15 characters",
+ "langPasswordRequiredMessage": "Please enter your password",
+ "langPasswordLengthMessage": "Password length should be between 5 and 15 characters",
+ "langEmailRequiredMessage": "Please enter your email",
+ "langEmailFormatMessage": "Invalid email format",
+ "langRegisterButton": "Register",
+ "langResetButton": "Reset",
+ "langCancelButton": "Cancel",
+ "langRegisterSuccessMessage": "Registration successful"
+
+
}
\ No newline at end of file
diff --git a/CanadaMes-ui/src/lang/locales/zh-CN.json b/CanadaMes-ui/src/lang/locales/zh-CN.json
index 30c0b8c..f3129cf 100644
--- a/CanadaMes-ui/src/lang/locales/zh-CN.json
+++ b/CanadaMes-ui/src/lang/locales/zh-CN.json
@@ -171,5 +171,26 @@
"State": "State",
"Alarm": "鎶ヨ淇℃伅",
"Distribute": "涓嬪彂",
- "Search": "鎼滅储"
+ "Search": "鎼滅储",
+ "langUsernameLabel": "鐢ㄦ埛鍚�",
+ "langPasswordLabel": "瀵嗙爜",
+ "langPasswordPlaceholder": "璇疯緭鍏ュ瘑鐮�",
+ "langConfirmPasswordLabel": "纭瀵嗙爜",
+ "langConfirmPasswordPlaceholder": "璇风‘璁ゅ瘑鐮�",
+ "langEmailLabel": "閭",
+
+ "langQQLabel": "QQ",
+ "langQQPlaceholder": "璇疯緭鍏Q鍙风爜",
+ "langPhoneNumberLabel": "鎵嬫満鍙风爜",
+ "langPhoneNumberPlaceholder": "璇疯緭鍏ユ墜鏈哄彿鐮�",
+ "langUsernameRequiredMessage": "璇疯緭鍏ョ敤鎴峰悕",
+ "langUsernameLengthMessage": "鐢ㄦ埛鍚嶉暱搴﹀湪5鍒�15涓瓧绗︿箣闂�",
+ "langPasswordRequiredMessage": "璇疯緭鍏ュ瘑鐮�",
+ "langPasswordLengthMessage": "瀵嗙爜闀垮害鍦�5鍒�15涓瓧绗︿箣闂�",
+ "langEmailRequiredMessage": "璇疯緭鍏ラ偖绠�",
+ "langEmailFormatMessage": "閭鏍煎紡涓嶆纭�",
+ "langRegisterButton": "娉ㄥ唽",
+ "langResetButton": "閲嶇疆",
+ "langCancelButton": "鍙栨秷",
+ "langRegisterSuccessMessage": "娉ㄥ唽鎴愬姛"
}
\ No newline at end of file
diff --git a/CanadaMes-ui/src/layout/index.vue b/CanadaMes-ui/src/layout/index.vue
index ee09077..b029768 100644
--- a/CanadaMes-ui/src/layout/index.vue
+++ b/CanadaMes-ui/src/layout/index.vue
@@ -1,5 +1,5 @@
<template>
- <el-container style="flex: 1;">
+ <el-container style="flex: 1;height:100%;">
<div style="width: 200px;background-color: #222f3e" :style="{width: isCollapse?'70px':'250px'}">
<el-aside :width="isCollapse?'70px':'250px'">
<el-col :gutter="20">
diff --git a/CanadaMes-ui/src/views/Electrical/Action.vue b/CanadaMes-ui/src/views/Electrical/Action.vue
index b53055a..9fe7ec2 100644
--- a/CanadaMes-ui/src/views/Electrical/Action.vue
+++ b/CanadaMes-ui/src/views/Electrical/Action.vue
@@ -2,13 +2,12 @@
<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">Electrical</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>Action</div>
<el-form label-width="100px" style="display: flex;flex-wrap: wrap;" :model="{ messagepack }">
@@ -31,10 +30,11 @@
import LanguageMixin from '../../lang/LanguageMixin'
let socket;
export default {
- name: "action",
+ name: "Action",
mixins: [LanguageMixin],
data () {
return {
+ activeButton: '',
record: {
params: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
canshu: [
@@ -111,6 +111,9 @@
this.init();
},
methods: {
+ setActiveButton(buttonName) {
+ this.activeButton = buttonName;
+ },
init () {
let viewname = "action";
@@ -203,4 +206,7 @@
.el-input__inner {
border: none;
}
+.blue-button {
+ background-color: skyblue;
+}
</style>
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/Electrical/Parameter.vue b/CanadaMes-ui/src/views/Electrical/Parameter.vue
index 8dfa62b..0ef74f9 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -2,13 +2,11 @@
<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">Electrical</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>Parameter</div>
@@ -31,11 +29,13 @@
<script>
let socket;
-
+import LanguageMixin from '../../lang/LanguageMixin'
export default {
name: "Parameter",
+ mixins: [LanguageMixin],
data () {
return {
+ activeButton: '',
record: {
params: [100, 200, 10, 10, 10, 10],
xyData: [
@@ -70,6 +70,9 @@
this.isButtonDisabled = true;
},
methods: {
+ setActiveButton(buttonName) {
+ this.activeButton = buttonName;
+ },
initWebSocket () {
let viewname = "Parameter";
@@ -156,7 +159,10 @@
border: none;
}
-
+.blue-button {
+ background-color: skyblue;
+ color: #fff;
+}
#btn_div {
width: 100%;
}
diff --git a/CanadaMes-ui/src/views/Electrical/Sign.vue b/CanadaMes-ui/src/views/Electrical/Sign.vue
index 0dfacd4..cf7c311 100644
--- a/CanadaMes-ui/src/views/Electrical/Sign.vue
+++ b/CanadaMes-ui/src/views/Electrical/Sign.vue
@@ -2,13 +2,11 @@
<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">{{ $t('Electrical') }}</el-button>
- <router-link to="/Electrical/Parameter" tag="el-button" type="text">{{ $t('Parameter') }}</router-link>
- <router-link to="/Electrical/Action" tag="el-button" type="text">{{ $t('Action') }}</router-link>
- <router-link to="/Electrical/Sign" tag="el-button" type="text">{{ $t('Sign') }}</router-link>
- <router-link to="/Electrical/State" tag="el-button" type="text">{{ $t('State') }}</router-link>
- <router-link to="/Electrical/alarm" tag="el-button" type="text">{{ $t('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">
@@ -32,6 +30,7 @@
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,
@@ -148,6 +147,12 @@
this.init();
},
methods: {
+ onButtonClick() {
+ this.isButtonClicked = true; // 灏嗘寜閽鑹茶缃负钃濊壊
+ setTimeout(() => {
+ this.isButtonClicked = false; // 閲嶇疆鎸夐挳棰滆壊
+ }, 500); // 杩欓噷鐨�500姣鏄牴鎹偍甯屾湜鎸夐挳棰滆壊鎸佺画澶氶暱鏃堕棿鏉ュ畾鐨勶紝鍙互鏍规嵁闇�姹傝繘琛岃皟鏁�
+ },
//鏍规嵁璇诲彇PLC鐨勫�硷紝鏍规嵁鍚嶇О鏀瑰彉棰滆壊
getStatusClass (zhuangtai) {
// if (mc === "LED.green" && zhuangtai === 0) {
@@ -306,4 +311,7 @@
.yellow {
background-color: yellow;
}
+.blue-button {
+ background-color: skyblue;
+}
</style>
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/Electrical/State.vue b/CanadaMes-ui/src/views/Electrical/State.vue
index daaed80..dda1bad 100644
--- a/CanadaMes-ui/src/views/Electrical/State.vue
+++ b/CanadaMes-ui/src/views/Electrical/State.vue
@@ -2,13 +2,11 @@
<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">{{ $t('Electrical') }}</el-button>
- <router-link to="/Electrical/Parameter" tag="el-button" type="text">{{ $t('Parameter') }}</router-link>
- <router-link to="/Electrical/Action" tag="el-button" type="text">{{ $t('Action') }}</router-link>
- <router-link to="/Electrical/Sign" tag="el-button" type="text">{{ $t('Sign') }}</router-link>
- <router-link to="/Electrical/State" tag="el-button" type="text">{{ $t('State') }}</router-link>
- <router-link to="/Electrical/alarm" tag="el-button" type="text">{{ $t('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>State</div>
@@ -38,6 +36,7 @@
mixins: [LanguageMixin],
data () {
return {
+ activeButton: '',
record: {
params: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0,],
xyData: [
@@ -82,6 +81,12 @@
this.init();
},
methods: {
+ onButtonClick() {
+ this.isButtonClicked = true; // 灏嗘寜閽鑹茶缃负钃濊壊
+ setTimeout(() => {
+ this.isButtonClicked = false; // 閲嶇疆鎸夐挳棰滆壊
+ }, 500); // 杩欓噷鐨�500姣鏄牴鎹偍甯屾湜鎸夐挳棰滆壊鎸佺画澶氶暱鏃堕棿鏉ュ畾鐨勶紝鍙互鏍规嵁闇�姹傝繘琛岃皟鏁�
+ },
init () {
let viewname = "State";
@@ -176,4 +181,7 @@
#btn_div .el-button {
float: right;
}
+.blue-button {
+ background-color: skyblue;
+}
</style>
diff --git a/CanadaMes-ui/src/views/Electrical/alarm.vue b/CanadaMes-ui/src/views/Electrical/alarm.vue
index 7b20441..946a1e2 100644
--- a/CanadaMes-ui/src/views/Electrical/alarm.vue
+++ b/CanadaMes-ui/src/views/Electrical/alarm.vue
@@ -2,13 +2,11 @@
<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">{{ $t('Electrical') }}</el-button>
- <router-link to="/Electrical/Parameter" tag="el-button" type="text">{{ $t('Parameter') }}</router-link>
- <router-link to="/Electrical/Action" tag="el-button" type="text">{{ $t('Action') }}</router-link>
- <router-link to="/Electrical/Sign" tag="el-button" type="text">{{ $t('Sign') }}</router-link>
- <router-link to="/Electrical/State" tag="el-button" type="text">{{ $t('State') }}</router-link>
- <router-link to="/Electrical/alarm" tag="el-button" type="text">{{ $t('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>Alarm</div>
<div class="block">
@@ -49,6 +47,7 @@
mixins: [LanguageMixin],
data () {
return {
+ activeButton: '',
record: {
params: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
@@ -110,6 +109,12 @@
},
methods: {
+ onButtonClick() {
+ this.isButtonClicked = true; // 灏嗘寜閽鑹茶缃负钃濊壊
+ setTimeout(() => {
+ this.isButtonClicked = false; // 閲嶇疆鎸夐挳棰滆壊
+ }, 500); // 杩欓噷鐨�500姣鏄牴鎹偍甯屾湜鎸夐挳棰滆壊鎸佺画澶氶暱鏃堕棿鏉ュ畾鐨勶紝鍙互鏍规嵁闇�姹傝繘琛岃皟鏁�
+ },
load () {
setAll().then(res => {
@@ -232,4 +237,7 @@
th div {
text-align: center;
}
+.blue-button {
+ background-color: skyblue;
+}
</style>
\ No newline at end of file
diff --git a/CanadaMes-ui/src/views/register/index.vue b/CanadaMes-ui/src/views/register/index.vue
index 2deef30..ef2f0b6 100644
--- a/CanadaMes-ui/src/views/register/index.vue
+++ b/CanadaMes-ui/src/views/register/index.vue
@@ -1,58 +1,60 @@
<template>
<div class="login_container">
- <div class="login_box">
- <!--澶村儚鍖哄煙-->
- <div class="avatar_box">
- <img src="../../assets/emi.png">
- </div>
- <el-form ref="registerRef" :model="registerForm" label-width="80px" :rules="registerRules"
- class="login_form">
- <el-form-item label="鐢ㄦ埛鍚�" prop="username">
- <el-input v-model="registerForm.username" placeholder="璇疯緭鍏ョ敤鎴峰悕"></el-input>
- </el-form-item>
- <el-form-item label="瀵嗙爜" prop="password1">
- <el-input v-model="registerForm.password1" placeholder="璇疯緭鍏ュ瘑鐮�" type="password"></el-input>
- </el-form-item>
- <el-form-item label="纭瀵嗙爜" prop="password">
- <el-input v-model="registerForm.password" placeholder="璇峰啀娆¤緭鍏ョ敤鎴峰悕" type="password"></el-input>
- </el-form-item>
- <el-form-item label="閭" prop="email">
- <el-input v-model="registerForm.email" placeholder="璇疯緭鍏ラ偖绠�" type="text"></el-input>
- </el-form-item>
- <el-form-item label="QQ" prop="qq">
- <el-input v-model="registerForm.qq" placeholder="璇疯緭鍏Q" type="text"></el-input>
- </el-form-item>
- <el-form-item label="鎵嬫満鍙风爜" prop="phone">
- <el-input v-model="registerForm.phone" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" type="text"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="register">娉ㄥ唽</el-button>
- <el-button @click="reset">閲嶈</el-button>
- <el-button @click="toLogin">鍙栨秷</el-button>
- </el-form-item>
- </el-form>
- </div>
+ <div class="login_box">
+ <!--澶村儚鍖哄煙-->
+ <div class="avatar_box">
+ <img src="../../assets/emi.png">
</div>
-</template>
-
-<script>
-import {register} from '../../api/user'
-
-export default {
+ <el-form ref="registerRef" :model="registerForm" label-width="80px" :rules="registerRules"
+ class="login_form">
+ <el-form-item :label="$t('langUsernameLabel')" prop="username">
+ <el-input v-model="registerForm.username" :placeholder="$t('langUsernamePlaceholder')"></el-input>
+ </el-form-item>
+ <el-form-item :label="$t('langPasswordLabel')" prop="password1">
+ <el-input v-model="registerForm.password1" :placeholder="$t('langPasswordPlaceholder')" type="password"></el-input>
+ </el-form-item>
+ <el-form-item :label="$t('langConfirmPasswordLabel')" prop="password">
+ <el-input v-model="registerForm.password" :placeholder="$t('langConfirmPasswordPlaceholder')" type="password"></el-input>
+ </el-form-item>
+ <el-form-item :label="$t('langEmailLabel')" prop="email">
+ <el-input v-model="registerForm.email" :placeholder="$t('langEmailPlaceholder')" type="text"></el-input>
+ </el-form-item>
+ <el-form-item :label="$t('langQQLabel')" prop="qq">
+ <el-input v-model="registerForm.qq" :placeholder="$t('langQQPlaceholder')" type="text"></el-input>
+ </el-form-item>
+ <el-form-item :label="$t('langPhoneNumberLabel')" prop="phone">
+ <el-input v-model="registerForm.phone" :placeholder="$t('langPhoneNumberPlaceholder')" type="text"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="register">{{$t('langRegisterButton')}}</el-button>
+ <el-button @click="reset">{{$t('langResetButton')}}</el-button>
+ <el-button @click="toLogin">{{$t('langCancelButton')}}</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ </div>
+ </template>
+
+ <script>
+ import {register} from '../../api/user'
+ import LanguageMixin from '../../lang/LanguageMixin'
+
+ export default {
name: 'Register',
+ mixins: [LanguageMixin],
data() {
- // 鑷畾涔夋牎楠岃鍒�
- const validatePassword = (rule, value, callback) => {
- if (this.registerForm.password1 !== this.registerForm.password) {
- callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!"));
- } else {
- callback();
- }
- };
- return {
- registerForm: {},
- registerRules: {
- username: [
+ // 鑷畾涔夋牎楠岃鍒�
+ const validatePassword = (rule, value, callback) => {
+ if (this.registerForm.password1 !== this.registerForm.password) {
+ callback(new Error("涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!"));
+ } else {
+ callback();
+ }
+ };
+ return {
+ registerForm: {},
+ registerRules: {
+ username: [
{required: true, message: '璇疯緭鍏ョ敤鎴峰悕', trigger: 'blur'},
{min: 5, max: 15, message: '闀垮害鍦� 5 鍒� 5 涓瓧绗�', trigger: 'blur'}
],
@@ -70,8 +72,8 @@
{required: false, message: '璇疯緭鍏ラ偖绠�', trigger: 'blur'},
{type: 'email', message: '璇疯緭鍏ユ纭牸寮忕殑閭鍦板潃', trigger: 'blur'}
]
- }
- }
+ }
+ }
},
methods: {
register() {
@@ -83,23 +85,23 @@
});
})
},
- reset() {
- this.$refs['registerRef'].resetFields();
- },
- toLogin() {
- this.$router.push('/login')
- }
+ reset() {
+ this.refs['registerRef'].resetFields();
+ },
+ toLogin() {
+ this.router.push('/login')
}
-}
-</script>
-
-<style scoped lang="less">
-.login_container {
+ }
+ }
+ </script>
+
+ <style scoped lang="less">
+ .login_container {
background-color: #2b4b6b;
height: 100%;
-}
-
-.login_box {
+ }
+
+ .login_box {
width: 450px;
height: 550px;
background-color: #fff;
@@ -108,38 +110,38 @@
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-
+
.avatar_box {
- height: 130px;
- width: 130px;
- border: 1px solid #eee;
+ height: 130px;
+ width: 130px;
+ border: 1px solid #eee;
+ border-radius: 50%;
+ padding: 10px;
+ box-shadow: 0 0 10px #ddd;
+ position: absolute;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ background-color: #fff;
+
+ img {
+ width: 100%;
+ height: 100%;
border-radius: 50%;
- padding: 10px;
- box-shadow: 0 0 10px #ddd;
- position: absolute;
- left: 50%;
- transform: translate(-50%, -50%);
- background-color: #fff;
-
- img {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- background-color: #eee;
- }
+ background-color: #eee;
}
-}
-
-.btns {
+ }
+ }
+
+ .btns {
display: flex;
justify-content: flex-end;
-}
-
-.login_form {
+ }
+
+ .login_form {
position: absolute;
bottom: 0;
width: 100%;
padding: 0 20px;
box-sizing: border-box;
-}
-</style>
+ }
+ </style>
\ No newline at end of file
diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
index e05f235..ee35614 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcaction.java
@@ -70,7 +70,7 @@
// 灏嗘秷鎭�艰浆鎹负甯冨皵鍒楄〃
List<Boolean> messageBooleans = new ArrayList<>();
for (Integer value : messageValues) {
- messageBooleans.add(value == 0 ? true : false);
+ messageBooleans.add(value == 1 ? true : false);
}
// 灏嗗竷灏斿垪琛ㄥ啓鍏� PLC
--
Gitblit v1.8.0