From fb406e7bb33182de6727a6f11a2a6afd3eadbb31 Mon Sep 17 00:00:00 2001 From: yinq Date: Mon, 15 Apr 2024 16:51:23 +0800 Subject: [PATCH] =?UTF-8?q?update=20-=20=E8=AE=BE=E5=A4=87=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/report/deviceAlarmRecord/index.vue | 44 +++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src/views/report/deviceAlarmRecord/index.vue b/src/views/report/deviceAlarmRecord/index.vue index 546b6d1..0b9495e 100644 --- a/src/views/report/deviceAlarmRecord/index.vue +++ b/src/views/report/deviceAlarmRecord/index.vue @@ -9,8 +9,18 @@ + + + + + - + + @@ -131,6 +142,12 @@ + + + + @@ -232,6 +249,7 @@ import { } from '@/api/report/deviceAlarmRecord' import { getDeviceLedgerList } from '@//api/base/deviceLedger' import { parseTime } from '@//utils/ruoyi' +import { findProductLineList } from '@//api/base/productLine' export default { name: 'DeviceAlarmRecord', @@ -262,6 +280,7 @@ export default { queryParams: { pageNum: 1, pageSize: 10, + productLineCode: 'CX_02', deviceCode: null, deviceName: null, deviceType: null, @@ -290,13 +309,27 @@ export default { { key: 10, label: `批次标识`, visible: false }, { key: 11, label: `参数编号`, visible: false }, { key: 12, label: `参数值`, visible: false }, + { key: 13, label: `报警结束时间`, visible: true}, + { key: 14, label: `报警时长(分钟)`, visible: true}, + { key: 15, label: `产线`, visible: true}, ], // 设备下拉框 deviceLedgerList: [], + // 产线选项 + productLineList: [] } }, + watch: { + 'queryParams.productLineCode': function(newVal, oldVal) { + // 执行方法,可以在这里调用你的方法 + this.getDeviceList() + }, + }, created() { - getDeviceLedgerList().then(response => { + findProductLineList({ productLineType: 1 }).then(response => { + this.productLineList = response.data + }) + getDeviceLedgerList({productLineCode: this.queryParams.productLineCode}).then(response => { this.deviceLedgerList = response.data }) const nowDate = parseTime(new Date(), '{y}-{m}-{d}') @@ -319,6 +352,13 @@ export default { this.loading = false }) }, + /** 获取工位方法 */ + getDeviceList() { + this.queryParams.deviceCode = null + getDeviceLedgerList({productLineCode: this.queryParams.productLineCode}).then(response => { + this.deviceLedgerList = response.data + }) + }, // 取消按钮 cancel() { this.open = false