wu
2023-11-03 17b8d077f7efe3db20344987cdad9da9d9ab3de6
CanadaMes-ui/src/views/Electrical/Parameter.vue
@@ -13,7 +13,7 @@
    <el-form label-width="100px" style="display: flex; flex-wrap: wrap;" :model="messagepack.data">
      <div id="btn_div">
        <el-button type="primary" @click="send()" id="xiafa" :disabled="isButtonDisabled">下发参数</el-button>
        <el-button type="primary" @click="send()" id="xiafa" :disabled="isButtonDisabled">{{ $t('Distribute parameters') }}</el-button>
      </div>
      <div class="kuai_div" v-for="(item, index) in record.xyData" :key="index">
@@ -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: {