参数设置 卷膜开关计算风口长度
parent
551e5bcbd8
commit
e679b97a68
|
|
@ -62,3 +62,10 @@ export function addAgriMobile(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function switchAgriMode(imei, code) {
|
||||||
|
return request({
|
||||||
|
url: '/assets/agri/switchAgriMode/' + imei,
|
||||||
|
method: 'post',
|
||||||
|
param: code
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -72,7 +72,7 @@ const SENSOR_MAP = {
|
||||||
const MQTT_TOPIC_SUFFIX = { UP: "/+", DOWN: "/control" };
|
const MQTT_TOPIC_SUFFIX = { UP: "/+", DOWN: "/control" };
|
||||||
|
|
||||||
import mqttUtil from '@/utils/mqtt';
|
import mqttUtil from '@/utils/mqtt';
|
||||||
import {listAgri} from "../../../api/system/assets/agri";
|
import {listAgri, switchAgriMode} from "../../../api/system/assets/agri";
|
||||||
import {getNewSpecialData} from "../../../api/data/specialData";
|
import {getNewSpecialData} from "../../../api/data/specialData";
|
||||||
import store from "../../../store";
|
import store from "../../../store";
|
||||||
import {getRemarkByImei} from "../../../api/system/assets/remark";
|
import {getRemarkByImei} from "../../../api/system/assets/remark";
|
||||||
|
|
@ -166,6 +166,7 @@ export default {
|
||||||
this.value = agriInfo.imei;
|
this.value = agriInfo.imei;
|
||||||
this.selectedText = agriInfo.agriName;
|
this.selectedText = agriInfo.agriName;
|
||||||
this.agriId = agriInfo.agriId;
|
this.agriId = agriInfo.agriId;
|
||||||
|
this.currentMode = (agriInfo.workMode === 1)
|
||||||
this.change(this.value)
|
this.change(this.value)
|
||||||
}
|
}
|
||||||
// 定义所有互斥的键对:[k键, g键]
|
// 定义所有互斥的键对:[k键, g键]
|
||||||
|
|
@ -515,11 +516,15 @@ export default {
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
// todo 修改大棚模式
|
// todo 修改大棚模式
|
||||||
|
switchAgriMode(this.imei, {code:(mode?1:0)}).then(response => {
|
||||||
|
if (response.code===200) {
|
||||||
this.currentMode = mode
|
this.currentMode = mode
|
||||||
if (!mode) {
|
if (!mode) {
|
||||||
this.change(this.imei)
|
this.change(this.imei)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,8 @@ export default {
|
||||||
{
|
{
|
||||||
imei:item.imei,
|
imei:item.imei,
|
||||||
agriName:item.agriName,
|
agriName:item.agriName,
|
||||||
agriId:item.id
|
agriId:item.id,
|
||||||
|
workMode: item.workMode
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.$tab.navigateTo('/pages/home/control/index?agriInfo='+encodeURIComponent(agri))
|
this.$tab.navigateTo('/pages/home/control/index?agriInfo='+encodeURIComponent(agri))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue