| | |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | export const sendAudio = (id,data: any) => { |
| | | return request({ |
| | | url: `/temp/iotdata/audio/?sn=${id}`, |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | |
| | | |
| | | <script> |
| | | import telephoneBox from "@/pages/internetData/components/telephoneBox"; |
| | | import { getHelemtData } from "@/api/helemt"; |
| | | import { getHelemtData, sendAudio } from "@/api/helemt"; |
| | | |
| | | let voiceText = ""; |
| | | export default { |
| | | name: "helemtTable", |
| | | data() { |
| | |
| | | done(); |
| | | }, |
| | | }).then((action) => { |
| | | target.isSend = false; |
| | | if (action == "confirm") { |
| | | if (!voiceText) { |
| | | this.$message({ |
| | | message: "指令不能为空", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | console.log(voiceText); |
| | | sendAudio(target.device_sn, voiceText).then((res) => { |
| | | this.$message({ |
| | | message: "指令发送成功", |
| | | type: "success", |
| | | }); |
| | | }); |
| | | target.isSend = false; |
| | | } else { |
| | | target.isSend = false; |
| | | } |
| | | }); |
| | | }, |
| | | telephone(target) { |
| | |
| | | }, |
| | | onCommentInputChange() { |
| | | let value = document.querySelector("#commentContent").value; |
| | | console.log(value); |
| | | voiceText = value; |
| | | let cont = 20 - value.length; |
| | | document.querySelector( |
| | | "#comment_info" |
| | |
| | | console.log(res); |
| | | }, |
| | | async saveList() { |
| | | // this.loraForm.powerRate = `${this.loraForm.powerRate}`; |
| | | this.loraForm.hz = `${this.loraForm.hz}`; |
| | | // this.loraForm.workMode = `${this.loraForm.workMode}`; |
| | | const res = await saveLora(this.loraForm); |
| | | console.log(res); |
| | | }, |
| | |
| | | }, |
| | | |
| | | async saveList() { |
| | | this.wifiForm.powerRate = `${this.wifiForm.powerRate}`; |
| | | const res = await saveWifi(this.wifiForm); |
| | | console.log(res); |
| | | }, |
| | |
| | | |
| | | // const serverUrl = "http://58.118.225.79:41243" // 羊五 |
| | | const serverUrl = "http://192.168.8.10:7009"; |
| | | //const serverUrl = "http://192.168.20.10:9000"; |
| | | // const serverUrl = "http://192.168.20.10:9000"; |
| | | |
| | | // const cir = require("circular-dependency-plugin"); |
| | | |