|
|
@@ -58,6 +58,19 @@ export default {
|
|
|
this.getDpdevicedpkzgjuanmoList();
|
|
|
this.getDataSource();
|
|
|
},
|
|
|
+ async optDevctl(payload) {
|
|
|
+ const res = await this.$myRequest({
|
|
|
+ url: '/api/v2/iot/mobile/device/dpkzg/devctl/',
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ devBid: this.devBid,
|
|
|
+ data: payload,
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
async getDataSource() {
|
|
|
const res = await this.$myRequest({
|
|
|
url: '/api/v2/iot/mobile/device/dpkzg/info/',
|
|
|
@@ -66,7 +79,6 @@ export default {
|
|
|
devBid: this.devBid,
|
|
|
},
|
|
|
});
|
|
|
- console.log(res, 'resresress');
|
|
|
this.dataSource = res;
|
|
|
},
|
|
|
runStatusHandler(dourceData) {
|
|
|
@@ -78,6 +90,13 @@ export default {
|
|
|
'down_status',
|
|
|
dourceData.down_status === '1' ? '0' : '1'
|
|
|
);
|
|
|
+ const payload = {
|
|
|
+ code: dourceData.code,
|
|
|
+ type: 'juanmo',
|
|
|
+ op_type: 'down',
|
|
|
+ value: dourceData.down_status,
|
|
|
+ };
|
|
|
+ this.optDevctl(payload);
|
|
|
},
|
|
|
closeStatusHandler(dourceData) {
|
|
|
if (dourceData.up_status === '0' && dourceData.down_status === '1') {
|
|
|
@@ -88,6 +107,13 @@ export default {
|
|
|
'up_status',
|
|
|
dourceData.up_status === '1' ? '0' : '1'
|
|
|
);
|
|
|
+ const payload = {
|
|
|
+ code: dourceData.code,
|
|
|
+ type: 'juanmo',
|
|
|
+ op_type: 'up',
|
|
|
+ value: dourceData.up_status,
|
|
|
+ };
|
|
|
+ this.optDevctl(payload);
|
|
|
},
|
|
|
toNavigation() {
|
|
|
const roundedLongitude =
|