diff --git a/pages/home/control/automatic.vue b/pages/home/control/automatic.vue index 35f02b7..b0331c9 100644 --- a/pages/home/control/automatic.vue +++ b/pages/home/control/automatic.vue @@ -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() { diff --git a/pages/news/subpages/deviceLog/log.vue b/pages/news/subpages/deviceLog/log.vue index 5a84c09..6aca6a5 100644 --- a/pages/news/subpages/deviceLog/log.vue +++ b/pages/news/subpages/deviceLog/log.vue @@ -16,7 +16,7 @@ - + 请选择大棚: @@ -27,6 +27,7 @@ :current="current" :bold="true" @change="switchTab" + class="subsection" v-if="logList.length>0" :height="80"> - 监测时段:{{ item.monitor_period }} - 当前温度:{{ item.current_temp }} ℃ - 参考温度:{{ item.ref_temp }} ℃ - 温度适宜:{{ item.suitable_temp === 1 ? '是' : '否' }} - 执行指令:{{ item.exec_cmd }} + 大棚:{{ agriName }} + 卷膜:卷膜{{ current+1 }} + 监测时段:{{ item.monitorPeriod }} + 执行时间:{{ item.createTime }} + 当时温度:{{ item.currentTemp }}℃ + 参考温度计:{{ item.refTemp.replace('20','温度') }} + 适宜温度:{{ item.suitableTemp }}℃ + 运行风口:{{ item.fanStatus }}cm + 是否最后一个条件:{{ item.isLast? '是' : '否' }} + 执行指令:{{ item.execCmd }} @@ -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; +} \ No newline at end of file