新建题库07030836

更新时间: 试题数量: 购买人数: 提供作者:

有效期: 个月

章节介绍: 共有个章节

收藏
搜索
题库预览
以下是vue文件部分代码

<template>

  <div>

    <el-form :model="opcuaSlaveForm" " ref="opcuaSlaveForm" label-width="150px">

      <!-- 从设备 IP 地址 -->

      <el-form-item label="OPC UA 服务器IP" prop="slaveOpcuaIp">

        <el-input v-model="opcuaSlaveForm.slaveOpcuaIp" placeholder="请输入设备 OPC UA 服务器IP地址"></el-input>

…………

      </el-form-item>

      <!-- 操作按钮 -->

      <el-form-item>

        <el-button type="primary" @click="submitSlaveForm">修改配置</el-button>

      </el-form-item>

    </el-form>

  </div>

</template>

<script>



export default {

  data() {

    return {

      __________: {},

     

    };

  },

  methods: {

    ___________() {

      let params = this.opcuaSlaveForm;

      modifySalveConfInfo(params).then((res) => {

        if (res.data.code == 200) {

          this.$$message.success(res.data.msg);

        } else {

          this.$$message.error(res.data.msg);

        }

      }).catch(function (error) {

        console.log(error);

      }).finally(() => {

        this.getOpcuaSlaveSet();

      });

    },


    getOpcuaSlaveSet() {

      getOpcuaSlaveConfInfo().then((res) => {

        if (res.data.code == 200) {

          this.opcuaSlaveForm = res.data.data;

        } else {

          this.$message.error(res.data.msg);

        }

      }).catch(function (error) {

        console.log(error);

      });

    }

  },

  created() {

    ____________

  }

};

</script>

1 2