This commit is contained in:
SelfRidicule 2024-08-22 18:38:57 +08:00
parent 2ef2928f3a
commit fd52d2df19
2 changed files with 18 additions and 0 deletions

View File

@ -56,6 +56,15 @@ export function getAllPanelInfoByRoomIdRq(id) {
}); });
} }
// 根据情景面板id 调用
export function callApiByPanelIdRq(data) {
return request({
url: `/api/wisdom/callApiByPanelId`,
method: "post",
data
});
}
// 根据设备id调用对接接口 // 根据设备id调用对接接口
//{ //{

View File

@ -3,6 +3,7 @@ const app = getApp()
import { import {
getAllDeviceInfoByRoomIdRq, getAllDeviceInfoByRoomIdRq,
getAllPanelInfoByRoomIdRq, getAllPanelInfoByRoomIdRq,
callApiByPanelIdRq,
callApiByDeviceIdRq, callApiByDeviceIdRq,
getDeviceInfoRq getDeviceInfoRq
} from "../../../api/meeting/equipment.js" } from "../../../api/meeting/equipment.js"
@ -163,6 +164,14 @@ Page({
sceneList = sceneList.map(item => { sceneList = sceneList.map(item => {
if (item.id == obj.id) { if (item.id == obj.id) {
item.isSelect = !item.isSelect item.isSelect = !item.isSelect
if (item.isSelect) {
callApiByPanelIdRq({
id: item.id
}).then(res => {
console.log('callApiByPanelIdRq', res);
})
}
} else { } else {
item.isSelect = false item.isSelect = false
} }