This commit is contained in:
2022-10-09 13:16:55 +08:00
parent 1047dd78ec
commit 089a6517d3
4 changed files with 22 additions and 6 deletions

View File

@@ -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)

View File

@@ -24,7 +24,7 @@
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="dictName" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
<el-table-column prop="dictType" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
<el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center"></el-table-column>
<!-- <el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center">
<template slot-scope="scope">
<el-button type="text" @click="childHandle(scope.row)">{{ scope.row.dictType }}</el-button>