update 设备参数状态监控
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
<div class="mod-config">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.plId" :placeholder="'产线'" clearable></el-input>
|
||||
<el-input v-model="dataForm.lineId" :placeholder="'产线'" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.eqName" :placeholder="'设备名称'" clearable></el-input>
|
||||
<el-input v-model="dataForm.equipmentId" :placeholder="'设备名称'" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
@@ -36,7 +36,7 @@ import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
|
||||
// import AddOrUpdate from './equipmentGroup-add-or-update'
|
||||
import i18n from '@/i18n'
|
||||
import BaseTable from '@/components/base-table'
|
||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
// import TableOperateComponent from '@/components/base-table/components/operationComponent'
|
||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
|
||||
|
||||
const tableConfigs = [
|
||||
@@ -44,11 +44,16 @@ const tableConfigs = [
|
||||
type: 'index',
|
||||
name: i18n.t('index')
|
||||
},
|
||||
{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
|
||||
{ prop: 'name', name: i18n.t('eq.groupname') },
|
||||
{ prop: 'code', name: i18n.t('eq.groupcode') },
|
||||
{ prop: 'remark', name: i18n.t('remark') },
|
||||
{ prop: 'alarm', name: i18n.t('alarm.name'), buttonContent: i18n.t('alarm.view'), subcomponent: TableTextComponent, actionName: 'view-alarm' },
|
||||
{ prop: 'equipmentName', name: i18n.t('realtime.eqName') },
|
||||
{ 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: '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: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
|
||||
]
|
||||
|
||||
@@ -70,9 +75,12 @@ export default {
|
||||
calcMaxHeight,
|
||||
tableConfigs,
|
||||
dataForm: {
|
||||
key: ''
|
||||
equipmentId: '',
|
||||
lineId: ''
|
||||
},
|
||||
dataList: [],
|
||||
eqList: [],
|
||||
lineList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
@@ -86,20 +94,37 @@ export default {
|
||||
BaseTable
|
||||
},
|
||||
activated() {
|
||||
this.getEqList()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 设备
|
||||
getEqList() {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/equipment/page'),
|
||||
method: 'get'
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
this.eqList = data.data.list
|
||||
} else {
|
||||
this.eqList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 产线
|
||||
getLineList() {},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.addOrUpdateVisible = false
|
||||
this.dataListLoading = true
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/monitoring/equipmentGroup/page'),
|
||||
url: this.$http.adornUrl('/monitoring/equipmentValueMonitor/realTimePage'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
key: this.dataForm.key
|
||||
equipmentId: this.dataForm.key,
|
||||
lineId: this.dataForm.key
|
||||
})
|
||||
}).then(({ data }) => {
|
||||
if (data && data.code === 0) {
|
||||
|
||||
Reference in New Issue
Block a user