Commit f5f49121 by 姜雷

添加设备告警中设备状态

parent bd56efbc
......@@ -130,6 +130,24 @@ Component({
console.log(err);
});
},
openEquipment: function (e) {
var _this = this;
var _a = e.currentTarget.dataset, code = _a.code, type = _a.type;
console.log(code);
fetch_1.deviceFetch({
url: "/device/" + code + "/" + type + "/enable",
method: 'POST',
})
.then(function (res) {
wx.showToast({
title: res.msg || '操作成功',
});
_this.refreshList();
})
.catch(function (err) {
console.log(err);
});
},
closeEquipment: function (e) {
var _this = this;
var _a = e.currentTarget.dataset, code = _a.code, type = _a.type;
......@@ -150,4 +168,4 @@ Component({
},
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXF1aXBtZW50V2FybmluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIkVxdWlwbWVudFdhcm5pbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRDQUFpRDtBQUdqRCxTQUFTLENBQUM7SUFDUixTQUFTLEVBQUU7UUFDVCxRQUFRO1lBQ04sRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztnQkFDaEMsSUFBSSxDQUFDLHFCQUFxQixFQUFFLENBQUM7WUFDL0IsQ0FBQztRQUNILENBQUM7S0FDRjtJQUlELFVBQVUsRUFBRTtRQUNWLE1BQU0sRUFBRTtZQUNOLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQUFFLENBQUM7WUFDUixRQUFRLFlBQUMsTUFBTTtnQkFDYixJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7WUFDckIsQ0FBQztTQUNGO0tBQ0Y7SUFLRCxJQUFJLEVBQUU7UUFDSixpQkFBaUIsRUFBRSxFQUFFO1FBQ3JCLGNBQWMsRUFBRSxFQUFFO1FBQ2xCLFNBQVMsRUFBRSxDQUFDO1FBQ1osY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biAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIGdldE1vcmVMaXN0SXRlbSgpIHtcbiAgICAgIHd4LnNob3dMb2FkaW5nKHtcbiAgICAgICAgdGl0bGU6ICfliqDovb3kuK0nLFxuICAgICAgfSk7XG4gICAgICBsZXQgbmV4dFBhZ2UgPSB0aGlzLmRhdGEucGFnZU51bSArIDE7XG4gICAgICB0aGlzLmZldGNoTGlzdCh7XG4gICAgICAgIHBhZ2VOdW06IG5leHRQYWdlLFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gICAgICAgICAgY29uc3QgeyBsaXN0LCBwYWdlTnVtIH0gPSByZXMuZGF0YTtcbiAgICAgICAgICBpZiAobGlzdCAmJiBsaXN0Lmxlbmd0aCkge1xuICAgICAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICAgICAgZGF0YUxpc3Q6IFsuLi50aGlzLmRhdGEuZGF0YUxpc3QsIC4uLmxpc3RdLFxuICAgICAgICAgICAgICBwYWdlTnVtLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgY2xvc2VFcXVpcG1lbnQoZSkge1xuICAgICAgY29uc3QgeyBjb2RlLCB0eXBlIH0gPSBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldDtcbiAgICAgIGNvbnNvbGUubG9nKGNvZGUpO1xuICAgICAgZGV2aWNlRmV0Y2goe1xuICAgICAgICB1cmw6IGAvZGV2aWNlLyR7Y29kZX0vJHt0eXBlfS9mb3JiaWRkZW5gLFxuICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgIH0pXG4gICAgICAgIC50aGVuKHJlcyA9PiB7XG4gICAgICAgICAgd3guc2hvd1RvYXN0KHtcbiAgICAgICAgICAgIHRpdGxlOiByZXMubXNnIHx8ICfmk43kvZzmiJDlip8nLFxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHRoaXMucmVmcmVzaExpc3QoKTtcbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgY29uc29sZS5sb2coZXJyKTtcbiAgICAgICAgfSk7XG4gICAgfSxcbiAgfSxcbn0pO1xuIl19
\ No newline at end of file
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRXF1aXBtZW50V2FybmluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIkVxdWlwbWVudFdhcm5pbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLDRDQUFpRDtBQUdqRCxTQUFTLENBQUM7SUFDUixTQUFTLEVBQUU7UUFDVCxRQUFRO1lBQ04sRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztnQkFDaEMsSUFBSSxDQUFDLHFCQUFxQixFQUFFLENBQUM7WUFDL0IsQ0FBQztRQUNILENBQUM7S0FDRjtJQUlELFVBQVUsRUFBRTtRQUNWLE1BQU0sRUFBRTtZQUNOLElBQUksRUFBRSxNQUFNO1lBQ1osS0FBSyxFQUFFLENBQUM7WUFDUixRQUFRLFlBQUMsTUFBTTtnQkFDYixJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7W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bjtcbiAgICAgIH1cbiAgICAgIHJldHVybiBkZXZpY2VGZXRjaCh7XG4gICAgICAgIHVybDogJy9kZXZpY2Uvd2FybmluZy9wYWdpbmcnLFxuICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgZGF0YToge1xuICAgICAgICAgIGFyZWFJZDogdGhpcy5kYXRhLmFyZWFJZCxcbiAgICAgICAgICBwYWdlTnVtOiB0aGlzLmRhdGEucGFnZU51bSxcbiAgICAgICAgICBwYWdlU2l6ZTogdGhpcy5kYXRhLnBhZ2VTaXplLFxuICAgICAgICAgIC4uLmVudGl0eSxcbiAgICAgICAgfSxcbiAgICAgIH0pO1xuICAgIH0sXG4gICAgcmVmcmVzaExpc3QoKSB7XG4gICAgICB3eC5zaG93TG9hZGluZyh7XG4gICAgICAgIHRpdGxlOiAn5Yqg6L295LitJyxcbiAgICAgIH0pO1xuICAgICAgdGhpcy5mZXRjaExpc3QoKVxuICAgICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICAgIHd4LmhpZGVMb2FkaW5nKCk7XG4gICAgICAgICAgY29uc29sZS5sb2cocmVzKTtcbiAgICAgICAgICBjb25zdCB7IGxpc3QgfSA9IHJlcy5kYXRhO1xuICAgICAgICAgIGlmIChsaXN0ICYmIGxpc3QubGVuZ3RoKSB7XG4gICAgICAgICAgICB0aGlzLnNldERhdGEoe1xuICAgICAgICAgICAgICBkYXRhTGlzdDogbGlzdCxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfSlcbiAgICAgICAgLmNhdGNoKGVyciA9PiB7XG4gICAgICAgICAgd3guaGlkZUxvYWRpbmcoKTtcbiAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIGdldE1vcmVMaXN0SXRlbSgpIHtcbiAgICAgIHd4LnNob3dMb2FkaW5nKHtcbiAgICAgICAgdGl0bGU6ICfliqDovb3kuK0nLFxuICAgICAgfSk7XG4gICAgICBsZXQgbmV4dFBhZ2UgPSB0aGlzLmRhdGEucGFnZU51bSArIDE7XG4gICAgICB0aGlzLmZldGNoTGlzdCh7XG4gICAgICAgIHBhZ2VOdW06IG5leHRQYWdlLFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICAgIGNvbnNvbGUubG9nKHJlcyk7XG4gICAgICAgICAgY29uc3QgeyBsaXN0LCBwYWdlTnVtIH0gPSByZXMuZGF0YTtcbiAgICAgICAgICBpZiAobGlzdCAmJiBsaXN0Lmxlbmd0aCkge1xuICAgICAgICAgICAgdGhpcy5zZXREYXRhKHtcbiAgICAgICAgICAgICAgZGF0YUxpc3Q6IFsuLi50aGlzLmRhdGEuZGF0YUxpc3QsIC4uLmxpc3RdLFxuICAgICAgICAgICAgICBwYWdlTnVtLFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICB3eC5oaWRlTG9hZGluZygpO1xuICAgICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIH0pO1xuICAgIH0sXG4gICAgb3BlbkVxdWlwbWVudChlKSB7XG4gICAgICBjb25zdCB7IGNvZGUsIHR5cGUgfSA9IGUuY3VycmVudFRhcmdldC5kYXRhc2V0O1xuICAgICAgY29uc29sZS5sb2coY29kZSk7XG4gICAgICBkZXZpY2VGZXRjaCh7XG4gICAgICAgIHVybDogYC9kZXZpY2UvJHtjb2RlfS8ke3R5cGV9L2VuYWJsZWAsXG4gICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgfSlcbiAgICAgICAgLnRoZW4ocmVzID0+IHtcbiAgICAgICAgICB3eC5zaG93VG9hc3Qoe1xuICAgICAgICAgICAgdGl0bGU6IHJlcy5tc2cgfHwgJ+aTjeS9nOaIkOWKnycsXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgdGhpcy5yZWZyZXNoTGlzdCgpO1xuICAgICAgICB9KVxuICAgICAgICAuY2F0Y2goZXJyID0+IHtcbiAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpO1xuICAgICAgICB9KTtcbiAgICB9LFxuICAgIGNsb3NlRXF1aXBtZW50KGUpIHtcbiAgICAgIGNvbnN0IHsgY29kZSwgdHlwZSB9ID0gZS5jdXJyZW50VGFyZ2V0LmRhdGFzZXQ7XG4gICAgICBjb25zb2xlLmxvZyhjb2RlKTtcbiAgICAgIGRldmljZUZldGNoKHtcbiAgICAgICAgdXJsOiBgL2RldmljZS8ke2NvZGV9LyR7dHlwZX0vZm9yYmlkZGVuYCxcbiAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICB9KVxuICAgICAgICAudGhlbihyZXMgPT4ge1xuICAgICAgICAgIHd4LnNob3dUb2FzdCh7XG4gICAgICAgICAgICB0aXRsZTogcmVzLm1zZyB8fCAn5pON5L2c5oiQ5YqfJyxcbiAgICAgICAgICB9KTtcbiAgICAgICAgICB0aGlzLnJlZnJlc2hMaXN0KCk7XG4gICAgICAgIH0pXG4gICAgICAgIC5jYXRjaChlcnIgPT4ge1xuICAgICAgICAgIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIH0pO1xuICAgIH0sXG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
......@@ -134,6 +134,23 @@ Component({
console.log(err);
});
},
openEquipment(e) {
const { code, type } = e.currentTarget.dataset;
console.log(code);
deviceFetch({
url: `/device/${code}/${type}/enable`,
method: 'POST',
})
.then(res => {
wx.showToast({
title: res.msg || '操作成功',
});
this.refreshList();
})
.catch(err => {
console.log(err);
});
},
closeEquipment(e) {
const { code, type } = e.currentTarget.dataset;
console.log(code);
......
......@@ -14,9 +14,12 @@
<view class="EquipmentWarning-listItem-title">
<view class="EquipmentWarning-listItem-titleCode">{{item.deviceCode}}</view>
<view class="EquipmentWarning-listItem-titleLocation">{{item.deviceLocation}}</view>
<view class="EquipmentWarning-listItem-titleState" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="closeEquipment">
<view wx:if="{{item.status === 1}}" class="EquipmentWarning-listItem-titleState Close" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="closeEquipment">
禁用
</view>
<view wx:if="{{item.status === 0}}" class="EquipmentWarning-listItem-titleState Open" data-code="{{item.deviceCode}}" data-type="{{item.deviceType}}" bind:tap="openEquipment">
启用
</view>
</view>
<view class="EquipmentWarning-listItem-info">
<view class="EquipmentWarning-listItem-infoErr">{{item.operationName}}</view>
......
......@@ -67,9 +67,15 @@
width: 80rpx;
height: 60rpx;
line-height: 60rpx;
margin-left: 120rpx;
}
.EquipmentWarning-listItem-titleState.Open {
background-color: #e6f9ec;
color: #6edb8f;
}
.EquipmentWarning-listItem-titleState.Close {
background-color: #ffe5e5;
color: #fe6868;
margin-left: 120rpx;
}
.EquipmentWarning-listItem-info {
display: flex;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment