| | |
| | | }, |
| | | /** |
| | | * 设定电压和电流 |
| | | * 参数:id, num, val |
| | | * 参数:id, num, val, input |
| | | * input 为输入框输入值 |
| | | */ |
| | | giveVal(id, dev_name, num, val) { |
| | | giveVal(id, dev_name, num, val, input) { |
| | | let data = { |
| | | electric_id: id, |
| | | dev_name: dev_name, |
| | |
| | | case 13: |
| | | // 设定电压确认 |
| | | data.givevol = val; |
| | | data.groupgivevol = input; |
| | | break; |
| | | case 14: |
| | | // 设定电流确认 |
| | | data.givecurr = val; |
| | | data.groupgivecurr = input; |
| | | break; |
| | | } |
| | | return axios({ |
| | |
| | | this.giveVal.vol = form.dcvol; |
| | | // 设置给定的电压值 |
| | | this.giveVal.volset = this.getVal(form.dcvol, 'vol'); |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, this.itemName, 13, this.giveVal.volset).then((res) => { |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, this.itemName, 13, this.giveVal.volset, this.giveVal.vol).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | if (res.code) { |
| | | this.$message({ |
| | |
| | | // 设置给定电流的值 |
| | | this.giveVal.currset = this.getVal(form.dccurr, 'curr'); |
| | | |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, this.itemName, 14, this.giveVal.currset).then((res) => { |
| | | this.$api.electric.giveVal(this.item1.data.electric_id, this.itemName, 14, this.giveVal.currset, this.giveVal.curr).then((res) => { |
| | | res = JSON.parse(res.data.result); |
| | | if (res.code) { |
| | | this.$message({ |