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)