update 设备参数状态监控,将‘参数近期值’导向“获取设备的历史参数值”(暂未实现)
This commit is contained in:
parent
ce9c0f9d76
commit
10e454eb2a
@ -24,7 +24,7 @@ export default {
|
||||
}
|
||||
},
|
||||
render: function (h) {
|
||||
// console.log(this)
|
||||
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.buttonContent || this.defaultText)])
|
||||
// console.log('button content:', this.injectData)
|
||||
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
|
||||
}
|
||||
}
|
@ -241,8 +241,8 @@ t.realtime.goodrate = 'Passed Rate'
|
||||
t.realtime.runState = '是否运行'
|
||||
t.realtime.state = '状态'
|
||||
t.realtime.hasFault = '是否故障'
|
||||
t.realtime.alarmRecords = '报警记录'
|
||||
t.realtime.viewAlarmRecords = '查看报警记录'
|
||||
t.realtime.recentParamValue = '参数近期值'
|
||||
t.realtime.view = '查看'
|
||||
t.realtime.input = '投入数'
|
||||
t.realtime.output = '产出数'
|
||||
t.realtime.eqName = '设备名称'
|
||||
|
@ -246,8 +246,8 @@ t.realtime.goodrate = '良品率'
|
||||
t.realtime.runState = '是否运行'
|
||||
t.realtime.state = '状态'
|
||||
t.realtime.hasFault = '是否故障'
|
||||
t.realtime.alarmRecords = '报警记录'
|
||||
t.realtime.viewAlarmRecords = '查看报警记录'
|
||||
t.realtime.recentParamValue = '参数近期值'
|
||||
t.realtime.view = '查看'
|
||||
t.realtime.input = '投入数'
|
||||
t.realtime.output = '产出数'
|
||||
t.realtime.eqName = '设备名称'
|
||||
|
@ -2,10 +2,14 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.lineId" :placeholder="'产线'" clearable></el-input>
|
||||
<el-select v-model="dataForm.lineId" :placeholder="'产线'" clearable>
|
||||
<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.equipmentId" :placeholder="'设备名称'" clearable></el-input>
|
||||
<el-select v-model="dataForm.equipmentId" :placeholder="'设备名称'" clearable>
|
||||
<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
@ -48,12 +52,30 @@ const tableConfigs = [
|
||||
{ prop: 'equipmentCode', name: i18n.t('realtime.eqCode') },
|
||||
{ prop: 'inputNum', name: i18n.t('realtime.input') },
|
||||
{ prop: 'outputNum', name: i18n.t('realtime.output') },
|
||||
{ prop: 'run', name: i18n.t('realtime.runState') },
|
||||
{ prop: 'status', name: i18n.t('realtime.state') },
|
||||
{ prop: 'error', name: i18n.t('realtime.hasFault') },
|
||||
{
|
||||
prop: 'run',
|
||||
name: i18n.t('realtime.runState'),
|
||||
filter: val => {
|
||||
if (val !== null && val !== undefined) return val ? '是' : '否'
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
name: i18n.t('realtime.state'),
|
||||
filter: val => {
|
||||
if (val !== null && val !== undefined) return ['正常', '计划停机', '故障'][+val]
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: 'error',
|
||||
name: i18n.t('realtime.hasFault'),
|
||||
filter: val => {
|
||||
if (val !== null && val !== undefined) return val ? '是' : '否'
|
||||
}
|
||||
},
|
||||
{ prop: 'quantityTime', name: i18n.t('realtime.productionSnapshotTime'), filter: timeFilter },
|
||||
{ prop: 'statusTime', name: i18n.t('realtime.statusSnapshotTime'), filter: timeFilter },
|
||||
{ prop: 'alarm', name: i18n.t('realtime.alarmRecords'), buttonContent: i18n.t('realtime.viewAlarmRecords'), subcomponent: TableTextComponent, actionName: 'view-alarm' }
|
||||
{ prop: 'alarm', name: i18n.t('realtime.recentParamValue'), buttonContent: i18n.t('realtime.view'), subcomponent: TableTextComponent, actionName: 'view-alarm' }
|
||||
// { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
@ -95,6 +117,7 @@ export default {
|
||||
},
|
||||
activated() {
|
||||
this.getEqList()
|
||||
this.getLineList()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
@ -112,7 +135,18 @@ export default {
|
||||
})
|
||||
},
|
||||
// 产线
|
||||
getLineList() {},
|
||||
getLineList() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/productionLine/list'),
|
||||
method: 'get'
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.lineList = data.data
|
||||
} else {
|
||||
this.lineList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.addOrUpdateVisible = false
|
||||
@ -123,8 +157,8 @@ export default {
|
||||
params: this.$http.adornParams({
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
equipmentId: this.dataForm.key,
|
||||
lineId: this.dataForm.key
|
||||
equipmentId: this.dataForm.equipmentId,
|
||||
lineId: this.dataForm.lineId
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user