From c07b4f92f7598b6f69d4c709d6651aeab24e69e1 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期一, 18 九月 2023 21:10:03 +0800
Subject: [PATCH] 增加修改电气密码

---
 CanadaMes-ui/src/views/Electrical/Parameter.vue |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/CanadaMes-ui/src/views/Electrical/Parameter.vue b/CanadaMes-ui/src/views/Electrical/Parameter.vue
index 40c48ee..5abab43 100644
--- a/CanadaMes-ui/src/views/Electrical/Parameter.vue
+++ b/CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -25,10 +25,19 @@
 
       </div>
     </el-form>
+
+    <div>
+   
   </div>
+  </div>
+
+
+  
 </template>
 
 <script>
+import { SelectPassword } from "../../api/home";
+
 let socket;
 import LanguageMixin from '../../lang/LanguageMixin'
 export default {
@@ -36,6 +45,8 @@
   mixins: [LanguageMixin],
   data () {
     return {
+      dialogVisible: true,
+      password: '',
       activeButton: '',
       record: {
         params: [100, 200, 10, 10, 10, 10],
@@ -69,8 +80,33 @@
   created () {
     this.initWebSocket();
     this.isButtonDisabled = true;
+    SelectPassword().then(res => {
+ this.password = res.data.password;
+});
+    this.$prompt(this.$t('Are you sure to perform this operation?'), this.$t('prompt'), {
+    inputType: 'password',
+    inputPlaceholder: this.$t('Please enter the password'),
+    confirmButtonText: this.$t('Yes'),
+    cancelButtonText: this.$t('No'),
+    type: 'warning'
+  }).then(({ value }) => {
+    if (this.password === value) {
+      // 瀵嗙爜姝g‘锛屾墽琛岀浉搴旀搷浣�
+    } else {
+      this.$message.success(this.$t('Password error')); // 瀵嗙爜閿欒
+    }
+  }).catch(() => {
+    this.$message({
+      type: 'info',
+      message: this.$t('Operation canceled')
+    });
+  });
+   
   },
   methods: {
+   
+    
+   
     setActiveButton(buttonName) {
       this.activeButton = buttonName;
     },

--
Gitblit v1.8.0