CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -35,8 +35,7 @@
  
</template>
<script>
import { SelectPassword } from "../../api/home";
<script>
let socket;
import LanguageMixin from '../../lang/LanguageMixin'
@@ -79,29 +78,7 @@
  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) {
      // 密码正确,执行相应操作
    } else {
      this.$message.success(this.$t('Password error')); // 密码错误
    }
  }).catch(() => {
    this.$message({
      type: 'info',
      message: this.$t('Operation canceled')
    });
  });
    this.isButtonDisabled = true;
  },
  methods: {