Commit 233168c4 authored by 李志鸣's avatar 李志鸣

fix(表格组件): 表格组件错位问题修复

parent 6098f48c
......@@ -114,18 +114,14 @@ export default {
watch: {
tableConfig: {
handler (newVal, oldVal) {
this.tableConfig = newVal
}
// deep: true
},
'tableConfig.fieldList': {
handler (newVal, oldVal) {
this.tableConfig = newVal;
// 当数据有所变动时,强制刷新表格组件
this.tableForceUpdateToggle = false
this.tableForceUpdateToggle = false;
this.$nextTick(() => {
this.tableForceUpdateToggle = true
})
}
this.tableForceUpdateToggle = true;
});
},
deep: true
},
$route (to, from) {
// 如果路由发生变化时,强制刷新表格组件
......
<template>
<el-dialog
title="烘干室监控折线图"
title="烘干室温度折线图"
:show-close="false"
:close-on-press-escape="false"
:close-on-click-modal="false"
......
......@@ -52,24 +52,23 @@
@onCurrentPageChange="onCurrentPageChange">
<template slot="beginTime">
<el-table-column
label="开始时间"
width="150">
label="开始时间">
<template slot-scope="scope">
{{ formatTime(scope.row.beginTime, 'YYYY-MM-DD') }}
{{ formatTime(scope.row.beginTime, 'YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
</template>
<template slot="endTime">
<el-table-column
label="结束时间"
width="150">
label="结束时间">
<template slot-scope="scope">
{{ formatTime(scope.row.endTime, 'YYYY-MM-DD') }}
{{ formatTime(scope.row.endTime, 'YYYY-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
</template>
<template slot="operationColumn">
<el-table-column
fixed="right"
label="操作"
width="55">
<template slot-scope="scope">
......@@ -125,7 +124,6 @@
height: 0,
data: [],
fieldList: [
{ label: '设备名称', value: 'alias' },
{ label: '设备编号', value: 'equipCode' },
{ label: '开始时间', value: 'beginTime', slot: 'beginTime' },
{ label: '结束时间', value: 'endTime', slot: 'endTime' }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment