|
|
@ -17,7 +17,7 @@ |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<span>预警:</span> |
|
|
|
<el-switch active-value="1" inactive-value="0" v-model="deviceInfo.warning" active-color="#13ce66" |
|
|
|
<el-switch disabled active-value="1" inactive-value="0" v-model="deviceInfo.warning" active-color="#13ce66" |
|
|
|
inactive-color="#ff4949"> |
|
|
|
</el-switch> |
|
|
|
</div> |
|
|
@ -160,7 +160,20 @@ export default { |
|
|
|
co: this.form.co, // CO |
|
|
|
} |
|
|
|
sendAttribute({ |
|
|
|
"attributeParams": JSON.stringify(attributeParams), // 阈值JSON字符串 |
|
|
|
"attributeAndValues": [ |
|
|
|
{ |
|
|
|
"attributeIdentifier": "tempThreshold", |
|
|
|
"attributeValue": this.form.temperature |
|
|
|
}, |
|
|
|
{ |
|
|
|
"attributeIdentifier": "humiThreshold", |
|
|
|
"attributeValue": this.form.humidity |
|
|
|
}, |
|
|
|
{ |
|
|
|
"attributeIdentifier": "coThreshold", |
|
|
|
"attributeValue": this.form.co |
|
|
|
} |
|
|
|
], // 阈值JSON字符串 |
|
|
|
"deviceId": this.deviceId // 设备id |
|
|
|
}).then(response => { |
|
|
|
this.getAttributes(this.deviceId); // 根据设备id查找设备信息 |
|
|
|