From ce9c0f9d76cf6ef1a305d1c1360bf509615ff75f Mon Sep 17 00:00:00 2001 From: g7hoo Date: Thu, 8 Sep 2022 14:50:09 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=AE=BE=E5=A4=87=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/en.js | 14 +++++- src/i18n/zh-CN.js | 14 +++++- .../monitoring/equipmentCurrentState.vue | 47 ++++++++++++++----- 3 files changed, 62 insertions(+), 13 deletions(-) diff --git a/src/i18n/en.js b/src/i18n/en.js index ef841b2..221f782 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -50,7 +50,8 @@ t.routes['工段'] = 'Work Sections' t.routes['设备类型'] = 'Equipment Types' t.routes['设备分组'] = 'Equipment Groups' t.routes['设备信息'] = 'Equipment Details' -t.routes['设备当前状态'] = 'Current Equipment State' +t.routes['设备参数状态监控'] = 'Current Equipment State' +t.routes['设备分组报警信息'] = 'Equipment Group Alarm' t.routes['质量检测类型'] = 'Quality Inpection Types' t.routes['质量检测信息'] = 'Quality Inpection Details' @@ -237,6 +238,17 @@ t.realtime.num = 'scrap quantity' t.realtime.rate = 'scrap rate' t.realtime.total = 'total production' t.realtime.goodrate = 'Passed Rate' +t.realtime.runState = '是否运行' +t.realtime.state = '状态' +t.realtime.hasFault = '是否故障' +t.realtime.alarmRecords = '报警记录' +t.realtime.viewAlarmRecords = '查看报警记录' +t.realtime.input = '投入数' +t.realtime.output = '产出数' +t.realtime.eqName = '设备名称' +t.realtime.eqCode = '设备编码' +t.realtime.productionSnapshotTime = '生产量记录时间' +t.realtime.statusSnapshotTime = '状态记录时间' t.ws = {} diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index 27ba8e3..7ec3a57 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -51,7 +51,8 @@ t.routes['工段'] = '工段' t.routes['设备类型'] = '设备类型' t.routes['设备分组'] = '设备分组' t.routes['设备信息'] = '设备信息' -t.routes['设备当前状态'] = '设备当前状态' +t.routes['设备参数状态监控'] = '设备参数状态监控' +t.routes['设备分组报警信息'] = '设备分组报警信息' t.routes['质量检测类型'] = '质量检测类型' t.routes['质量检测信息'] = '质量检测信息' @@ -242,6 +243,17 @@ t.realtime.num = '报废数量' t.realtime.rate = '报废比例' t.realtime.total = '总产量' t.realtime.goodrate = '良品率' +t.realtime.runState = '是否运行' +t.realtime.state = '状态' +t.realtime.hasFault = '是否故障' +t.realtime.alarmRecords = '报警记录' +t.realtime.viewAlarmRecords = '查看报警记录' +t.realtime.input = '投入数' +t.realtime.output = '产出数' +t.realtime.eqName = '设备名称' +t.realtime.eqCode = '设备编码' +t.realtime.productionSnapshotTime = '生产量记录时间' +t.realtime.statusSnapshotTime = '状态记录时间' t.ws = {} diff --git a/src/views/modules/monitoring/equipmentCurrentState.vue b/src/views/modules/monitoring/equipmentCurrentState.vue index d9614e4..54f666b 100644 --- a/src/views/modules/monitoring/equipmentCurrentState.vue +++ b/src/views/modules/monitoring/equipmentCurrentState.vue @@ -2,10 +2,10 @@
- + - + {{ $t('query') }} @@ -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) {