From 089a6517d37c203c4ae6b2bde8b13eff533db3ae Mon Sep 17 00:00:00 2001 From: g7hoo Date: Sun, 9 Oct 2022 13:16:55 +0800 Subject: [PATCH] update --- src/i18n/en.js | 3 ++- src/i18n/zh-CN.js | 3 ++- .../monitoring/qualityInspectionCurrent.vue | 20 ++++++++++++++++--- src/views/modules/sys/dict-type.vue | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/i18n/en.js b/src/i18n/en.js index c90a580..5a42fed 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -35,6 +35,7 @@ t.routes['报表设计'] = 'Report Design' t.routes['报表预览'] = 'Report Preview' t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data' t.routes['当前检测数据'] = 'Current Inspection Data' +t.routes['检测统计数据'] = 'Statistics Data' t.routes['质量检查信息记录'] = 'Quality Inspection Records' t.routes['用户管理'] = 'User Management' t.routes['部门管理'] = 'Department Management' @@ -232,7 +233,7 @@ t.inspect.typetotal = 'Total Inspection Types' t.inspect.typename = 'Inspection Type' t.inspect.typecode = 'Inspection Code' t.inspect.ioTotal = 'Data of input/output and total inspections' -t.inspect.plTotal = 'Inspection types per line' +t.inspect.plTotal = 'Inspection contents in each line' t.inspect.inTotal = 'Up Sum' t.inspect.outTotal = 'Down Sum' t.inspect.checkTotal = 'Total Inspections' diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index 402ecce..4cbf1a4 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -36,6 +36,7 @@ t.routes['报表设计'] = '报表设计' t.routes['报表预览'] = '报表预览' t.routes['质量检测基础数据'] = '质量检测基础数据' t.routes['当前检测数据'] = '当前检测数据' +t.routes['检测统计数据'] = '检测统计数据' t.routes['质量检查信息记录'] = '质量检查信息记录' t.routes['用户管理'] = '用户管理' t.routes['部门管理'] = '部门管理' @@ -234,7 +235,7 @@ t.inspect.typetotal = '检测类型总数' t.inspect.typename = '检测类型名称' t.inspect.typecode = '检测类型编码' t.inspect.ioTotal = '上下片及检测总数统计' -t.inspect.plTotal = '各产线检测类型统计' +t.inspect.plTotal = '各产线检测内容统计' t.inspect.inTotal = '上片总数' t.inspect.outTotal = '下片总数' t.inspect.checkTotal = '检测总数' diff --git a/src/views/modules/monitoring/qualityInspectionCurrent.vue b/src/views/modules/monitoring/qualityInspectionCurrent.vue index 97e8599..4ac4f16 100644 --- a/src/views/modules/monitoring/qualityInspectionCurrent.vue +++ b/src/views/modules/monitoring/qualityInspectionCurrent.vue @@ -221,11 +221,25 @@ export default { ] }, echartCategories: null, - echartCheckTypes: [] + echartCheckTypes: [], + interval: null } }, mounted() { this.getDataList() + + this.interval = setInterval(() => { + this.$message.info(i18n.t('refresh')) + this.dataListStatic.splice(0) + this.dataListDynamic.splice(0) + this.getDataList() + }, 1000 * 5 * 60) + }, + deactivated() { + if (this.interval) { + clearInterval(this.interval) + this.interval = null + } }, methods: { handleOperations() {}, @@ -251,12 +265,12 @@ export default { /** [1] 获取上下片数据 */ this.fetchList('sx', startTime, endTime).then(({ data: res }) => { - console.log('sx: ', res) + // console.log('sx: ', res) this.dataListStatic = res.data || [] }) /** [2] 获取产线检测类型 */ this.fetchList('pl', startTime, endTime).then(({ data: res }) => { - console.log('pl: ', res) + // console.log('pl: ', res) /** TODO: 解析 nameData */ this.parseTableProps(res.data.nameData) diff --git a/src/views/modules/sys/dict-type.vue b/src/views/modules/sys/dict-type.vue index 8688878..c913de1 100644 --- a/src/views/modules/sys/dict-type.vue +++ b/src/views/modules/sys/dict-type.vue @@ -24,7 +24,7 @@ - +