|
|
@ -130,7 +130,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleClose () { |
|
|
|
// this.disconnect() |
|
|
|
this.disconnect() |
|
|
|
this.visible = false |
|
|
|
this.$emit('refreshDataList') |
|
|
|
}, |
|
|
@ -147,9 +147,11 @@ export default { |
|
|
|
// }) |
|
|
|
this.connectStatus = true |
|
|
|
} else { |
|
|
|
this.connectStatus = false |
|
|
|
this.$message.error(res.errorMsg) |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.connectStatus = false |
|
|
|
this.$message.error('连接失败') |
|
|
|
}) |
|
|
|
}, |
|
|
@ -197,12 +199,7 @@ export default { |
|
|
|
disconnect () { |
|
|
|
axios.get(`http://127.0.0.1:19196/CloseDevice`).then(({ data: res }) => { |
|
|
|
if (res.resultFlag == 0) { |
|
|
|
this.$message(res.errorMsg) |
|
|
|
this.connectStatus = false |
|
|
|
this.btnAble = false |
|
|
|
this.visible = true |
|
|
|
this.$refs['dataForm'].resetFields() |
|
|
|
this.imageSrc = '' |
|
|
|
// this.$message(res.errorMsg) |
|
|
|
} else { |
|
|
|
this.$message.error(res.errorMsg) |
|
|
|
} |
|
|
|