|
@@ -20,7 +20,7 @@ export const changeLight = (type, itemarr, getDeviceStatus, status) => {
|
|
|
const setType = status === '打开' ? true : false; // 10关闭 12开启
|
|
|
var paramsArr = [];
|
|
|
itemarr.forEach((citem) => {
|
|
|
- citem.equipList.forEach((item) => {
|
|
|
+ (citem.equipList||[]).forEach((item) => {
|
|
|
if (item.equipType == 'light') {
|
|
|
paramsArr.push({
|
|
|
id: item.id,
|
|
@@ -38,7 +38,7 @@ export const changeCurtain = (type, itemarr, getDeviceStatus, status) => {
|
|
|
const setType = status === '打开' ? 'EquipOnSet' : 'EquipOffSet';
|
|
|
var paramsArr = [];
|
|
|
itemarr.forEach((citem) => {
|
|
|
- citem.equipList.forEach((item) => {
|
|
|
+ (citem.equipList||[]).forEach((item) => {
|
|
|
if (item.equipType == 'curtain') {
|
|
|
paramsArr.push({
|
|
|
equipmentCategory: 'CFSSES',
|