|
@@ -417,11 +417,16 @@
|
|
iotHardwareFindByType({subjectId:this.subjectData.subId}).then(response => {
|
|
iotHardwareFindByType({subjectId:this.subjectData.subId}).then(response => {
|
|
response.data.forEach((item)=>{
|
|
response.data.forEach((item)=>{
|
|
if(item.hardwareTypeKey == 'airConditioner'){
|
|
if(item.hardwareTypeKey == 'airConditioner'){
|
|
- if(item.reservedThree.indexOf('-') != -1){
|
|
|
|
|
|
+ if(item.reservedThree == 0){
|
|
|
|
+ item.switchType = 0;
|
|
|
|
+ }else if(item.reservedThree == 2){
|
|
|
|
+ item.switchType = 1;
|
|
|
|
+ item.functionType = 2;
|
|
|
|
+ }else if(item.reservedThree.indexOf('-') != -1){
|
|
let list = item.reservedThree.split('-');
|
|
let list = item.reservedThree.split('-');
|
|
- item.switchType = list[0]?list[0]:'';
|
|
|
|
- item.functionType = list[1]?list[1]:'';
|
|
|
|
- item.orderType = list[2]?list[2]:'';
|
|
|
|
|
|
+ item.switchType = 1;
|
|
|
|
+ item.functionType = list[0]==3?1:(list[0]==4?2:'');
|
|
|
|
+ item.orderType = list[1]?list[1]:'';
|
|
}else{
|
|
}else{
|
|
item.switchType = '';
|
|
item.switchType = '';
|
|
item.functionType = '';
|
|
item.functionType = '';
|
|
@@ -602,10 +607,24 @@
|
|
list.forEach((item)=>{
|
|
list.forEach((item)=>{
|
|
if(item.hardwareNo == data.hardwareNo){
|
|
if(item.hardwareNo == data.hardwareNo){
|
|
if(item.hardwareTypeKey == 'airConditioner'){
|
|
if(item.hardwareTypeKey == 'airConditioner'){
|
|
- let list = data.command.split('-');
|
|
|
|
- item.switchType = list[0]?list[0]:'';
|
|
|
|
- item.functionType = list[1]?list[1]:'';
|
|
|
|
- item.orderType = list[2]?list[2]:'';
|
|
|
|
|
|
+ if(data.command == 0){
|
|
|
|
+ item.switchType = 0;
|
|
|
|
+ item.functionType = '';
|
|
|
|
+ item.orderType = '';
|
|
|
|
+ }else if(data.command == 2){
|
|
|
|
+ item.switchType = 1;
|
|
|
|
+ item.functionType = 3;
|
|
|
|
+ item.orderType = '';
|
|
|
|
+ }else if(data.command.indexOf('-') != -1){
|
|
|
|
+ let list = data.command.split('-');
|
|
|
|
+ item.switchType = 1;
|
|
|
|
+ item.functionType = list[0]==3?1:(list[0]==4?2:'');
|
|
|
|
+ item.orderType = list[1]?list[1]:'';
|
|
|
|
+ }else{
|
|
|
|
+ item.switchType = '';
|
|
|
|
+ item.functionType = '';
|
|
|
|
+ item.orderType = '';
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
item.operatingState = data.operatingState;
|
|
item.operatingState = data.operatingState;
|
|
item.online = data.online;
|
|
item.online = data.online;
|
|
@@ -658,10 +677,12 @@
|
|
dialogSubmit(){
|
|
dialogSubmit(){
|
|
let text = '';
|
|
let text = '';
|
|
if(this.infraredControllerForm.switchType == 1){
|
|
if(this.infraredControllerForm.switchType == 1){
|
|
- if(this.infraredControllerForm.functionType != 3){
|
|
|
|
- text = '1-' + this.infraredControllerForm.functionType + '-' + this.infraredControllerForm.orderType;
|
|
|
|
- }else {
|
|
|
|
- text = '1-3';
|
|
|
|
|
|
+ if(this.infraredControllerForm.functionType == 1){
|
|
|
|
+ text = '3-' + this.infraredControllerForm.orderType;
|
|
|
|
+ }else if(this.infraredControllerForm.functionType == 2){
|
|
|
|
+ text = '4-' + this.infraredControllerForm.orderType;
|
|
|
|
+ }else if(this.infraredControllerForm.functionType == 3){
|
|
|
|
+ text = '2';
|
|
}
|
|
}
|
|
}else if(this.infraredControllerForm.switchType == 0){
|
|
}else if(this.infraredControllerForm.switchType == 0){
|
|
text = '0';
|
|
text = '0';
|