Browse Source

激光 工作模式修改

develop
王兴琳 22 hours ago
parent
commit
e812e1d4f4
  1. 37
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceParam.vue

37
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/FatigueWakesUp/components/DeviceParam.vue

@ -287,17 +287,34 @@ export default {
// } // }
}, },
async requestURL(functionId, options = {}) { async requestURL(functionId, options = {}) {
let result = await request({
url: `/business/device/functions/${this.deviceId}/${functionId}`, const url = `/business/device/functions/${this.deviceId}/${functionId}`;
method: "post", if (!this.deviceId) {
data: options, throw new Error("设备ID为空,无法发送请求");
}); }
console.log("工作模式") let result = await request({
console.log(result) url,
if (result.code != 200) return Message.error(result?.msg); method: "post",
//SETMDASKMDSETTMASKTMSETDFASKDF data: options,
return result; headers: {
'Content-Type': 'application/json',
// 'Authorization': 'Bearer ' + getToken()
}
});
console.log("完整响应:", result);
console.log("JSON:", JSON.stringify(result));
if (!result || result.code !== 200) {
Message.error(result?.msg || "请求失败");
return null;
}
return result;
}, },
async tabClick() { async tabClick() {
if (this.activeName == "second") { if (this.activeName == "second") {
if (this.isMultiControl) if (this.isMultiControl)

Loading…
Cancel
Save