update - 设备报警页面

master
yinq 7 months ago
parent cd41aed13d
commit fb406e7bb3

@ -9,8 +9,18 @@
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="产线" prop="productLineCode">
<el-select v-model="queryParams.productLineCode" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="设备名称" prop="deviceCode">
<el-select v-model="form.deviceCode" placeholder="请选择设备名称" clearable filterable>
<el-select v-model="queryParams.deviceCode" placeholder="请选择设备名称" clearable filterable>
<el-option
v-for="item in deviceLedgerList"
:key="item.deviceCode"
@ -107,6 +117,7 @@
<el-table v-loading="loading" :data="deviceAlarmRecordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="产线" align="center" prop="productLineName" v-if="columns[15].visible"/>
<el-table-column label="设备编号" align="center" prop="deviceCode" v-if="columns[1].visible"/>
<el-table-column label="设备名称" align="center" prop="deviceName" v-if="columns[2].visible"/>
<el-table-column label="设备类型" align="center" prop="deviceType" v-if="columns[3].visible">
@ -131,6 +142,12 @@
<el-table-column label="批次标识" align="center" prop="batchId" v-if="columns[10].visible"/>
<el-table-column label="参数编号" align="center" prop="paramCode" v-if="columns[11].visible"/>
<el-table-column label="参数值" align="center" prop="paramValue" v-if="columns[12].visible"/>
<el-table-column label="报警结束时间" align="center" prop="alarmEndTime" v-if="columns[13].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.alarmEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="报警时长(分钟)" align="center" prop="alarmDuration" v-if="columns[14].visible"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
@ -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

Loading…
Cancel
Save