控制器样式调整

wx-program
pangdundun 2024-01-11 10:51:08 +08:00
parent 57cae4997b
commit 01b3d0e4a3
4 changed files with 135 additions and 127 deletions

View File

@ -1594,9 +1594,11 @@
}; };
}, },
onReady(){ onReady(){
setTimeout(() => { if(this.purviewList.indexOf('10')!=-1){
this.$refs.collapseView.init(); setTimeout(() => {
}, 500); this.$refs.collapseView.init();
}, 1000);
}
}, },
onLoad(options) { onLoad(options) {
console.log(options); console.log(options);
@ -1986,75 +1988,76 @@
res.data.forEach((el, index) => { res.data.forEach((el, index) => {
this.purviewList.push(el.id.toString()) this.purviewList.push(el.id.toString())
}) })
}
//
this.getControl_getState();
clearInterval(this.statusInterval) && this.statusInterval
this.statusInterval = setInterval(() => {
this.getControl_getState()
}, 3000);
// //
if (this.purviewList.indexOf('10') != -1) { this.getControl_getState();
// clearInterval(this.statusInterval) && this.statusInterval
this.getcontrol_wxgetpermission(); this.statusInterval = setInterval(() => {
this.$http({ this.getControl_getState()
url: this.api.readJinHuaControl_reg + '?deviceId=' + deviceId, }, 3000);
method: 'POST',
}).then(res => { //
// console.log(res, 'deviceId'); if (this.purviewList.indexOf('10') != -1) {
if (res.code == 200) { //
uni.hideLoading() this.getcontrol_wxgetpermission();
uni.stopPullDownRefresh(); this.$http({
this.inputData = res.data url: this.api.readJinHuaControl_reg + '?deviceId=' + deviceId,
for (let i = 0; i < this.itemList.length; i++) { method: 'POST',
if (!this.itemList[i].type_2) { }).then(res => {
this.itemList[i].open_value = this.inputData[Number('21681') + // console.log(res, 'deviceId');
i * if (res.code == 200) {
3] uni.hideLoading()
this.itemList[i].close_value = this.inputData[Number('21682') + uni.stopPullDownRefresh();
i * this.inputData = res.data
3] for (let i = 0; i < this.itemList.length; i++) {
this.getType((21680 + i * 3), 1) if (!this.itemList[i].type_2) {
} else { this.itemList[i].open_value = this.inputData[Number('21681') +
this.itemList[i].value = this.inputData[21711 + (i - 10) * 2] i *
this.getType((21710 + (i - 10) * 2), 2) 3]
this.itemList[i].close_value = this.inputData[Number('21682') +
i *
3]
this.getType((21680 + i * 3), 1)
} else {
this.itemList[i].value = this.inputData[21711 + (i - 10) * 2]
this.getType((21710 + (i - 10) * 2), 2)
}
} }
// this.getType('21680')
// this.getType('21683')
// this.getType('21686')
// this.getType('21689')
// this.getType('21692')
} }
})
}
//
// if (this.purviewList.indexOf('9') != -1) {
// // this.getControl_getState()
// // this.getReadControlliShuiControl()
// // clearInterval(this.statusInterval) && this.statusInterval
// // this.statusInterval = setInterval(() => {
// // this.getControl_getState()
// // }, 3000);
// }
// this.getType('21680') //
// this.getType('21683') // if (this.purviewList.indexOf('8') != -1) {
// this.getType('21686')
// this.getType('21689') // }
// this.getType('21692')
//
} // if(this.purviewList.indexOf('20') != -1){
})
// };
//
// if(this.purviewList.indexOf('21') != -1){};
} }
//
// if (this.purviewList.indexOf('9') != -1) {
// // this.getControl_getState()
// // this.getReadControlliShuiControl()
// // clearInterval(this.statusInterval) && this.statusInterval
// // this.statusInterval = setInterval(() => {
// // this.getControl_getState()
// // }, 3000);
// }
//
// if (this.purviewList.indexOf('8') != -1) {
// }
//
// if(this.purviewList.indexOf('20') != -1){
// };
//
// if(this.purviewList.indexOf('21') != -1){};
})) }))
}, },
@ -2650,10 +2653,12 @@
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background-color: #F5F6FA; background-color: #F5F6FA;
box-sizing: border-box;
padding: 30rpx;
.content { .content {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx; // padding: 30rpx;
::v-deep .uicon-arrow-down { ::v-deep .uicon-arrow-down {
width: 16rpx; width: 16rpx;

File diff suppressed because one or more lines are too long

View File

@ -1903,9 +1903,11 @@ var _default = {
}, },
onReady: function onReady() { onReady: function onReady() {
var _this = this; var _this = this;
setTimeout(function () { if (this.purviewList.indexOf('10') != -1) {
_this.$refs.collapseView.init(); setTimeout(function () {
}, 500); _this.$refs.collapseView.init();
}, 1000);
}
}, },
onLoad: function onLoad(options) { onLoad: function onLoad(options) {
console.log(options); console.log(options);
@ -2278,69 +2280,69 @@ var _default = {
res.data.forEach(function (el, index) { res.data.forEach(function (el, index) {
_this5.purviewList.push(el.id.toString()); _this5.purviewList.push(el.id.toString());
}); });
}
// 控制器状态获取 // 控制器状态获取
_this5.getControl_getState();
clearInterval(_this5.statusInterval) && _this5.statusInterval;
_this5.statusInterval = setInterval(function () {
_this5.getControl_getState(); _this5.getControl_getState();
}, 3000); clearInterval(_this5.statusInterval) && _this5.statusInterval;
_this5.statusInterval = setInterval(function () {
_this5.getControl_getState();
}, 3000);
//查看金华权限 //查看金华权限
if (_this5.purviewList.indexOf('10') != -1) { if (_this5.purviewList.indexOf('10') != -1) {
// 小程序手机控制权限数据 // 小程序手机控制权限数据
_this5.getcontrol_wxgetpermission(); _this5.getcontrol_wxgetpermission();
_this5.$http({ _this5.$http({
url: _this5.api.readJinHuaControl_reg + '?deviceId=' + deviceId, url: _this5.api.readJinHuaControl_reg + '?deviceId=' + deviceId,
method: 'POST' method: 'POST'
}).then(function (res) { }).then(function (res) {
// console.log(res, 'deviceId读取所有寄存器的状态值'); // console.log(res, 'deviceId读取所有寄存器的状态值');
if (res.code == 200) { if (res.code == 200) {
uni.hideLoading(); uni.hideLoading();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
_this5.inputData = res.data; _this5.inputData = res.data;
for (var i = 0; i < _this5.itemList.length; i++) { for (var i = 0; i < _this5.itemList.length; i++) {
if (!_this5.itemList[i].type_2) { if (!_this5.itemList[i].type_2) {
_this5.itemList[i].open_value = _this5.inputData[Number('21681') + i * 3]; _this5.itemList[i].open_value = _this5.inputData[Number('21681') + i * 3];
_this5.itemList[i].close_value = _this5.inputData[Number('21682') + i * 3]; _this5.itemList[i].close_value = _this5.inputData[Number('21682') + i * 3];
_this5.getType(21680 + i * 3, 1); _this5.getType(21680 + i * 3, 1);
} else { } else {
_this5.itemList[i].value = _this5.inputData[21711 + (i - 10) * 2]; _this5.itemList[i].value = _this5.inputData[21711 + (i - 10) * 2];
_this5.getType(21710 + (i - 10) * 2, 2); _this5.getType(21710 + (i - 10) * 2, 2);
}
} }
// this.getType('21680')
// this.getType('21683')
// this.getType('21686')
// this.getType('21689')
// this.getType('21692')
} }
});
}
//查看丽水权限
// if (this.purviewList.indexOf('9') != -1) {
// // this.getControl_getState()
// // this.getReadControlliShuiControl()
// // clearInterval(this.statusInterval) && this.statusInterval
// // this.statusInterval = setInterval(() => {
// // this.getControl_getState()
// // }, 3000);
// }
// this.getType('21680') // 查看五防项目权限
// this.getType('21683') // if (this.purviewList.indexOf('8') != -1) {
// this.getType('21686')
// this.getType('21689') // }
// this.getType('21692')
} // 读取(补光灯)控制器
}); // if(this.purviewList.indexOf('20') != -1){
// };
// 环流风扇
// if(this.purviewList.indexOf('21') != -1){};
} }
//查看丽水权限
// if (this.purviewList.indexOf('9') != -1) {
// // this.getControl_getState()
// // this.getReadControlliShuiControl()
// // clearInterval(this.statusInterval) && this.statusInterval
// // this.statusInterval = setInterval(() => {
// // this.getControl_getState()
// // }, 3000);
// }
// 查看五防项目权限
// if (this.purviewList.indexOf('8') != -1) {
// }
// 读取(补光灯)控制器
// if(this.purviewList.indexOf('20') != -1){
// };
// 环流风扇
// if(this.purviewList.indexOf('21') != -1){};
}); });
}, },
// getReadControlliShuiControl() { // getReadControlliShuiControl() {

View File

@ -28,10 +28,11 @@
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background-color: #F5F6FA; background-color: #F5F6FA;
box-sizing: border-box;
padding: 30rpx;
} }
.controller .content.data-v-a456d474 { .controller .content.data-v-a456d474 {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx;
} }
.controller .content.data-v-a456d474 .uicon-arrow-down { .controller .content.data-v-a456d474 .uicon-arrow-down {
width: 16rpx; width: 16rpx;