From 1c5e44cdff0f7900914a883056d93979265e306f Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期三, 20 九月 2023 08:20:16 +0800
Subject: [PATCH] 删除不需要的代码,parameter、action页不需要输入密码

---
 CanadaMes-ui/src/views/Electrical/Action.vue |   33 +--------------------------------
 1 files changed, 1 insertions(+), 32 deletions(-)

diff --git a/CanadaMes-ui/src/views/Electrical/Action.vue b/CanadaMes-ui/src/views/Electrical/Action.vue
index 1560ce5..db3b8da 100644
--- a/CanadaMes-ui/src/views/Electrical/Action.vue
+++ b/CanadaMes-ui/src/views/Electrical/Action.vue
@@ -17,7 +17,7 @@
 
       <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
         <el-input v-model="item.name" style="width: 240px;" class="in_mc" readonly></el-input>
-        <el-switch v-model="item.value" active-value="1" inactive-value="0"  @change="send()"></el-switch>
+        <el-switch v-model="item.value" active-value="1" inactive-value="0" @change="send()"></el-switch>
       </div>
     </el-form>
 
@@ -27,7 +27,6 @@
  
 <script > 
 import LanguageMixin from '../../lang/LanguageMixin'
-import { SelectPassword } from "../../api/home";
 let socket;
 export default {
   name: "Action",
@@ -35,7 +34,6 @@
   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],
         canshu: [
@@ -109,9 +107,7 @@
     }
   },
   created () {
-
     this.init(); 
-
   },
   methods: {
     setActiveButton(buttonName) {
@@ -170,36 +166,9 @@
 
     },
     send () {
-      
-      
-      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‘锛屾墽琛岀浉搴旀搷浣�
-  
       this.messagepack.data = this.record.xyData.map(item => parseInt(item.value)); // 杞崲涓烘暣鏁版暟缁�
       //console.log(this.messagepack);
       socket?.send(JSON.stringify(this.messagepack));
-    } else {
-   
-      this.$message.success(this.$t('Password error')); // 瀵嗙爜閿欒
-   
-    }
-  }).catch(() => {
-    this.$message({
-      type: 'info',
-      message: this.$t('Operation canceled')
-    });
-  });
-     
     }
 
   }

--
Gitblit v1.8.0