设备日志提交
parent
682338094e
commit
4c3df3dd90
|
|
@ -340,7 +340,6 @@ export default {
|
|||
dicts: ['sys_data_map'],
|
||||
name: "manual",
|
||||
props: {
|
||||
// 尺寸
|
||||
value: {
|
||||
type: String,
|
||||
default: "1"
|
||||
|
|
@ -1163,7 +1162,13 @@ export default {
|
|||
})
|
||||
} else if (e.index===1) {
|
||||
// this.$refs.logDialog.open();
|
||||
this.$tab.navigateTo('/pages/news/subpages/deviceLog/log');
|
||||
var logInfo = JSON.stringify(
|
||||
{
|
||||
imei: this.value,
|
||||
agriName: this.selectedText
|
||||
}
|
||||
);
|
||||
this.$tab.navigateTo('/pages/news/subpages/deviceLog/log?logInfo='+encodeURIComponent(logInfo));
|
||||
}
|
||||
},
|
||||
closeLogDialog() {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<!-- 日期标题 + 分类筛选(靠右) -->
|
||||
<view class="filter-bar">
|
||||
<uni-dateformat :date="date" format="MM-dd" />
|
||||
<uni-dateformat style="font-size: 40rpx;line-height: 60rpx;font-weight: bolder" :date="date" format="MM-dd" />
|
||||
<view class="category-tabs" v-if="isShowSelect">
|
||||
请选择大棚:<uni-data-select align="left" :clear="false" v-model="imei" :localdata="range" @change="getLogInfo" />
|
||||
</view>
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
:current="current"
|
||||
:bold="true"
|
||||
@change="switchTab"
|
||||
class="subsection"
|
||||
v-if="logList.length>0"
|
||||
:height="80"></tn-subsection>
|
||||
<swiper :current="current" :acceleration="true"
|
||||
|
|
@ -43,15 +44,21 @@
|
|||
<uni-collapse-item
|
||||
v-for="(item, index) in tabList"
|
||||
:key="index"
|
||||
:title="item.create_time"
|
||||
:title="`【${agriName}】于${formatDate(item.createTime,'hh:mm:ss')}触发自动化条件执行卷膜${current+1}${item.execCmd}!`"
|
||||
title-border="show"
|
||||
:border="true"
|
||||
>
|
||||
<view class="content">
|
||||
<view>监测时段:{{ item.monitor_period }}</view>
|
||||
<view>当前温度:{{ item.current_temp }} ℃</view>
|
||||
<view>参考温度:{{ item.ref_temp }} ℃</view>
|
||||
<view>温度适宜:{{ item.suitable_temp === 1 ? '是' : '否' }}</view>
|
||||
<view>执行指令:{{ item.exec_cmd }}</view>
|
||||
<view>大棚:{{ agriName }}</view>
|
||||
<view>卷膜:卷膜{{ current+1 }}</view>
|
||||
<view>监测时段:{{ item.monitorPeriod }}</view>
|
||||
<view>执行时间:{{ item.createTime }}</view>
|
||||
<view>当时温度:{{ item.currentTemp }}℃</view>
|
||||
<view>参考温度计:{{ item.refTemp.replace('20','温度') }} </view>
|
||||
<view>适宜温度:{{ item.suitableTemp }}℃</view>
|
||||
<view>运行风口:{{ item.fanStatus }}cm</view>
|
||||
<view>是否最后一个条件:{{ item.isLast? '是' : '否' }}</view>
|
||||
<view>执行指令:{{ item.execCmd }}</view>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
|
|
@ -91,7 +98,7 @@ export default {
|
|||
},
|
||||
status: 'more',
|
||||
loading: false,
|
||||
activeIndex: '', // 手风琴当前展开项
|
||||
agriName: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -99,11 +106,25 @@ export default {
|
|||
// this.videoList = this.getDateList1();
|
||||
},
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onLoad(option) {
|
||||
|
||||
if (option.logInfo) {
|
||||
const decodedStr = decodeURIComponent(option.logInfo);
|
||||
const logInfo = JSON.parse(decodedStr); // 反序列化为原对象
|
||||
this.imei=logInfo.imei;
|
||||
console.info(this.imei)
|
||||
this.agriName = logInfo.agriName;
|
||||
this.getLogInfo();
|
||||
this.isShowSelect = false;
|
||||
}
|
||||
if (!this.imei) {
|
||||
this.getImeiList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatDate,
|
||||
handleDateClick(item) {
|
||||
this.dateList = this.dateList.map(d => ({...d, active: d === item}))
|
||||
var number = new Date();
|
||||
|
|
@ -154,6 +175,9 @@ export default {
|
|||
},
|
||||
|
||||
getLogInfo() {
|
||||
if (!this.agriName) {
|
||||
this.agriName = this.range.find(item => item.value === this.imei).text || null
|
||||
}
|
||||
if (!this.imei || !this.date) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -179,134 +203,134 @@ export default {
|
|||
{
|
||||
id: 1,
|
||||
imei: "868402051234567",
|
||||
roll_film: "jm1",
|
||||
monitor_period: "08:00-12:00",
|
||||
current_temp: 25.3,
|
||||
ref_temp: "26.0",
|
||||
suitable_temp: 1,
|
||||
fan_status: 1.0,
|
||||
is_last: 0,
|
||||
exec_cmd: "rollerjm1: 开棚",
|
||||
log_id: 1001,
|
||||
create_time: "2026-03-30 09:15:22"
|
||||
rollFilm: "jm1",
|
||||
monitorPeriod: "08:00-12:00",
|
||||
currentTemp: 25.3,
|
||||
refTemp: "202",
|
||||
suitableTemp: 25.9,
|
||||
fanStatus: 1.0,
|
||||
isLast: 0,
|
||||
execCmd: "开",
|
||||
logId: 1001,
|
||||
createTime: "2026-03-30 09:15:22"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
imei: "868402051234567",
|
||||
roll_film: "jm1",
|
||||
monitor_period: "12:00-16:00",
|
||||
current_temp: 28.7,
|
||||
ref_temp: "26.0",
|
||||
suitable_temp: 0,
|
||||
fan_status: 1.0,
|
||||
is_last: 0,
|
||||
exec_cmd: "jm1: 关棚",
|
||||
log_id: 1002,
|
||||
create_time: "2026-03-30 13:20:45"
|
||||
rollFilm: "jm1",
|
||||
monitorPeriod: "12:00-16:00",
|
||||
currentTemp: 28.7,
|
||||
refTemp: "201",
|
||||
suitableTemp: 28.7,
|
||||
fanStatus: 1.0,
|
||||
isLast: 0,
|
||||
execCmd: "关",
|
||||
logId: 1002,
|
||||
createTime: "2026-03-30 13:20:45"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
imei: "868402051234567",
|
||||
roll_film: "jm1",
|
||||
monitor_period: "16:00-20:00",
|
||||
current_temp: 26.2,
|
||||
ref_temp: "26.0",
|
||||
suitable_temp: 1,
|
||||
fan_status: 0.5,
|
||||
is_last: 1,
|
||||
exec_cmd: "rollerjm1: 开棚",
|
||||
log_id: 1003,
|
||||
create_time: "2026-03-30 17:40:18"
|
||||
rollFilm: "jm1",
|
||||
monitorPeriod: "16:00-20:00",
|
||||
currentTemp: 26.2,
|
||||
refTemp: "202",
|
||||
suitableTemp: 28.2,
|
||||
fanStatus: 0.5,
|
||||
isLast: 1,
|
||||
execCmd: "开",
|
||||
logId: 1003,
|
||||
createTime: "2026-03-30 17:40:18"
|
||||
},
|
||||
// jm2 卷膜数据
|
||||
{
|
||||
id: 4,
|
||||
imei: "868402057654321",
|
||||
roll_film: "jm2",
|
||||
monitor_period: "08:00-12:00",
|
||||
current_temp: 24.1,
|
||||
ref_temp: "24.0",
|
||||
suitable_temp: 1,
|
||||
fan_status: 0.0,
|
||||
is_last: 0,
|
||||
exec_cmd: "rollerjm2: 开棚",
|
||||
log_id: 1004,
|
||||
create_time: "2026-03-30 10:05:11"
|
||||
rollFilm: "jm2",
|
||||
monitorPeriod: "08:00-12:00",
|
||||
currentTemp: 24.1,
|
||||
refTemp: "202",
|
||||
suitableTemp: 34.2,
|
||||
fanStatus: 0.0,
|
||||
isLast: 0,
|
||||
execCmd: "开",
|
||||
logId: 1004,
|
||||
createTime: "2026-03-30 10:05:11"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
imei: "868402057654321",
|
||||
roll_film: "jm2",
|
||||
monitor_period: "12:00-16:00",
|
||||
current_temp: 25.8,
|
||||
ref_temp: "24.0",
|
||||
suitable_temp: 1,
|
||||
fan_status: 0.5,
|
||||
is_last: 0,
|
||||
exec_cmd: "rollerjm2: 关棚",
|
||||
log_id: 1005,
|
||||
create_time: "2026-03-30 14:35:33"
|
||||
rollFilm: "jm2",
|
||||
monitorPeriod: "12:00-16:00",
|
||||
currentTemp: 25.8,
|
||||
refTemp: "203",
|
||||
suitableTemp: 24.1,
|
||||
fanStatus: 0.5,
|
||||
isLast: 0,
|
||||
execCmd: "关",
|
||||
logId: 1005,
|
||||
createTime: "2026-03-30 14:35:33"
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
imei: "868402057654321",
|
||||
roll_film: "jm2",
|
||||
monitor_period: "16:00-20:00",
|
||||
current_temp: 23.9,
|
||||
ref_temp: "24.0",
|
||||
suitable_temp: 1,
|
||||
fan_status: 0.0,
|
||||
is_last: 1,
|
||||
exec_cmd: "rollerjm2: 开棚",
|
||||
log_id: 1006,
|
||||
create_time: "2026-03-30 18:22:09"
|
||||
rollFilm: "jm2",
|
||||
monitorPeriod: "16:00-20:00",
|
||||
currentTemp: 23.9,
|
||||
refTemp: "204",
|
||||
suitableTemp: 35.2,
|
||||
fanStatus: 0.0,
|
||||
isLast: 1,
|
||||
execCmd: "开",
|
||||
logId: 1006,
|
||||
createTime: "2026-03-30 18:22:09"
|
||||
},
|
||||
// jm3 卷膜数据
|
||||
{
|
||||
id: 7,
|
||||
imei: "868402059876543",
|
||||
roll_film: "jm3",
|
||||
monitor_period: "08:00-12:00",
|
||||
current_temp: 23.5,
|
||||
ref_temp: "25.0",
|
||||
suitable_temp: 1,
|
||||
fan_status: 0.0,
|
||||
is_last: 0,
|
||||
exec_cmd: "rollerjm3: 开棚",
|
||||
log_id: 1007,
|
||||
create_time: "2026-03-30 08:45:33"
|
||||
rollFilm: "jm3",
|
||||
monitorPeriod: "08:00-12:00",
|
||||
currentTemp: 23.5,
|
||||
refTemp: "203",
|
||||
suitableTemp: 27,
|
||||
fanStatus: 0.0,
|
||||
isLast: 0,
|
||||
execCmd: "开",
|
||||
logId: 1007,
|
||||
createTime: "2026-03-30 08:45:33"
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
imei: "868402059876543",
|
||||
roll_film: "jm3",
|
||||
monitor_period: "12:00-16:00",
|
||||
current_temp: 27.4,
|
||||
ref_temp: "25.0",
|
||||
suitable_temp: 0,
|
||||
fan_status: 1.0,
|
||||
is_last: 0,
|
||||
exec_cmd: "rollerjm3: 关棚",
|
||||
log_id: 1008,
|
||||
create_time: "2026-03-30 12:50:27"
|
||||
rollFilm: "jm3",
|
||||
monitorPeriod: "12:00-16:00",
|
||||
currentTemp: 27.4,
|
||||
refTemp: "202",
|
||||
suitableTemp: 23.3,
|
||||
fanStatus: 1.0,
|
||||
isLast: 0,
|
||||
execCmd: "关",
|
||||
logId: 1008,
|
||||
createTime: "2026-03-30 12:50:27"
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
imei: "868402059876543",
|
||||
roll_film: "jm3",
|
||||
monitor_period: "16:00-20:00",
|
||||
current_temp: 25.1,
|
||||
ref_temp: "25.0",
|
||||
suitable_temp: 1,
|
||||
fan_status: 0.5,
|
||||
is_last: 1,
|
||||
exec_cmd: "rollerjm3: 开棚",
|
||||
log_id: 1009,
|
||||
create_time: "2026-03-30 16:10:55"
|
||||
rollFilm: "jm3",
|
||||
monitorPeriod: "16:00-20:00",
|
||||
currentTemp: 25.1,
|
||||
refTemp: "202",
|
||||
suitableTemp: 26.5,
|
||||
fanStatus: 0.5,
|
||||
isLast: 1,
|
||||
execCmd: "开",
|
||||
logId: 1009,
|
||||
createTime: "2026-03-30 16:10:55"
|
||||
}
|
||||
];
|
||||
if (this.logList && this.logList.length>0) {
|
||||
this.tabList = this.logList.filter(item => item.roll_film === `jm${this.current+1}`);
|
||||
this.tabList = this.logList.filter(item => item.rollFilm === `jm${this.current+1}`);
|
||||
}
|
||||
this.loading = false;
|
||||
}, 1000);
|
||||
|
|
@ -316,7 +340,7 @@ export default {
|
|||
},
|
||||
change(e) {
|
||||
this.current=e.detail.current
|
||||
this.tabList = this.logList.filter(item => item.roll_film === `jm${this.current+1}`);
|
||||
this.tabList = this.logList.filter(item => item.rollFilm === `jm${this.current+1}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -395,4 +419,14 @@ export default {
|
|||
/deep/ .uni-swiper-wrapper {
|
||||
height: calc(100vh - 300rpx);
|
||||
}
|
||||
.subsection {
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
/deep/ .uni-collapse-item__title-box {
|
||||
padding: 0;
|
||||
|
||||
}
|
||||
/deep/.uni-collapse-item__title-text {
|
||||
font-size: 25rpx!important;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue