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 @@
+
+
+ {{ parseTime(scope.row.alarmEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}
+
+
+
@@ -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