|
@@ -46,10 +46,10 @@ const TopNavRight: React.FC<topNavRightProps> = ({
|
|
|
var filterSpaceArr = mapList.filter((item) => {
|
|
|
return item[selNavObj.id] !== 1;
|
|
|
});
|
|
|
- var filterSpaceArr2 = filterSpaceArr.filter((item) => {
|
|
|
- return item.localName == '图书休闲区' || item.localName == '上格云3';
|
|
|
- });
|
|
|
- console.log('开启filterSpaceArr', filterSpaceArr2);
|
|
|
+ // var filterSpaceArr2 = filterSpaceArr.filter((item) => {
|
|
|
+ // return item.localName == '图书休闲区' || item.localName == '上格云3';
|
|
|
+ // });
|
|
|
+ console.log('开启filterSpaceArr', filterSpaceArr);
|
|
|
function getDeviceStatus() {
|
|
|
var interval = setInterval(() => {
|
|
|
queryDeviceManage();
|
|
@@ -62,13 +62,13 @@ const TopNavRight: React.FC<topNavRightProps> = ({
|
|
|
//如果是空调
|
|
|
if (filterSpaceArr.length == 0) return;
|
|
|
if (selNavObj.id == 'airConditioner') {
|
|
|
- changeAllAir(filterSpaceArr2, getDeviceStatus, '打开', projectId);
|
|
|
+ changeAllAir(filterSpaceArr, getDeviceStatus, '打开', projectId);
|
|
|
}
|
|
|
if (selNavObj.id == 'light') {
|
|
|
- changeLight('all', filterSpaceArr2, getDeviceStatus, '打开');
|
|
|
+ changeLight('all', filterSpaceArr, getDeviceStatus, '打开');
|
|
|
}
|
|
|
if (selNavObj.id == 'curtain') {
|
|
|
- changeCurtain('all', filterSpaceArr2, getDeviceStatus, '打开'); // '关闭' : '打开';
|
|
|
+ changeCurtain('all', filterSpaceArr, getDeviceStatus, '打开'); // '关闭' : '打开';
|
|
|
}
|
|
|
},
|
|
|
onCancel() {
|
|
@@ -90,10 +90,10 @@ const TopNavRight: React.FC<topNavRightProps> = ({
|
|
|
var filterSpaceArr = mapList.filter((item) => {
|
|
|
return item[selNavObj.id] !== 0;
|
|
|
});
|
|
|
- var filterSpaceArr2 = filterSpaceArr.filter((item) => {
|
|
|
- return item.localName == '图书休闲区' || item.localName == '上格云3';
|
|
|
- });
|
|
|
- console.log('关闭filterSpaceArr', filterSpaceArr2);
|
|
|
+ // var filterSpaceArr2 = filterSpaceArr.filter((item) => {
|
|
|
+ // return item.localName == '图书休闲区' || item.localName == '上格云3';
|
|
|
+ // });
|
|
|
+ console.log('关闭filterSpaceArr', filterSpaceArr);
|
|
|
//return;
|
|
|
function getDeviceStatus() {
|
|
|
var interval = setInterval(() => {
|
|
@@ -106,13 +106,13 @@ const TopNavRight: React.FC<topNavRightProps> = ({
|
|
|
}
|
|
|
//如果是空调
|
|
|
if (selNavObj.id == 'airConditioner') {
|
|
|
- changeAllAir(filterSpaceArr2, getDeviceStatus, '打开', projectId);
|
|
|
+ changeAllAir(filterSpaceArr, getDeviceStatus, '关闭', projectId);
|
|
|
}
|
|
|
if (selNavObj.id == 'light') {
|
|
|
- changeLight('all', filterSpaceArr2, getDeviceStatus, '关闭');
|
|
|
+ changeLight('all', filterSpaceArr, getDeviceStatus, '关闭');
|
|
|
}
|
|
|
if (selNavObj.id == 'curtain') {
|
|
|
- changeCurtain('all', filterSpaceArr2, getDeviceStatus, '关闭');
|
|
|
+ changeCurtain('all', filterSpaceArr, getDeviceStatus, '关闭');
|
|
|
}
|
|
|
},
|
|
|
onCancel() {
|