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

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

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