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/Action.vue |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/CanadaMes-ui/src/views/Electrical/Action.vue b/CanadaMes-ui/src/views/Electrical/Action.vue
index ce204d6..6c6ef90 100644
--- a/CanadaMes-ui/src/views/Electrical/Action.vue
+++ b/CanadaMes-ui/src/views/Electrical/Action.vue
@@ -26,6 +26,7 @@
 </template>
  
 <script >
+import { SelectPassword } from "../../api/home";
 import LanguageMixin from '../../lang/LanguageMixin'
 let socket;
 export default {
@@ -108,6 +109,27 @@
   },
   created () {
     this.init();
+    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) {

--
Gitblit v1.8.0