|
@@ -96,13 +96,36 @@
|
|
|
fit
|
|
|
height="100%"
|
|
|
class="upload-table"
|
|
|
+ :cell-class-name="cellClass"
|
|
|
>
|
|
|
<el-table-column
|
|
|
v-for="column in tableColumns"
|
|
|
:key="column.key"
|
|
|
:prop="column.prop"
|
|
|
:label="column.prop"
|
|
|
+ :formatter="formatter"
|
|
|
/>
|
|
|
+ <el-table-column
|
|
|
+ prop="message"
|
|
|
+ label="message"
|
|
|
+ width="200"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ placement="top-start"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ slot="content"
|
|
|
+ class="tooltip-content"
|
|
|
+ >
|
|
|
+ {{ row.message }}
|
|
|
+ </div>
|
|
|
+ <div class="tooltip-trigger">{{ row.message }}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<template #empty>
|
|
|
<NoData
|
|
|
:image-width="230"
|
|
@@ -299,10 +322,27 @@ export default {
|
|
|
dateRangeDisabled(date) {
|
|
|
return this.pickedDate ? Math.abs(date - this.pickedDate) > 2 * 24 * 60 * 60 * 1000 : false
|
|
|
},
|
|
|
+ cellClass({ row, column, rowIndex, columnIndex }) {
|
|
|
+ const classes = []
|
|
|
+ if (column.property === 'createtime') {
|
|
|
+ classes.push('pre-line')
|
|
|
+ }
|
|
|
+ return classes.join(' ')
|
|
|
+ },
|
|
|
+ formatter(row, column, cellValue) {
|
|
|
+ const value = String(cellValue ?? '').trim()
|
|
|
+ switch (column.property) {
|
|
|
+ case 'createtime':
|
|
|
+ return value.replace('T', '\n')
|
|
|
+ default:
|
|
|
+ return cellValue
|
|
|
+ }
|
|
|
+ },
|
|
|
async getTableData() {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
- const dataContent = [this.flightDate[0], this.flightDate[1]]
|
|
|
+ // const dataContent = [this.flightDate[0], this.flightDate[1]]
|
|
|
+ const dataContent = [`${this.flightDate[0]} 00:00:00`, `${this.flightDate[1]} 23:59:59`]
|
|
|
const {
|
|
|
code,
|
|
|
returnData: { listValues }
|
|
@@ -418,6 +458,9 @@ export default {
|
|
|
font-family: Helvetica, 'Microsoft YaHei';
|
|
|
letter-spacing: 0;
|
|
|
}
|
|
|
+ .pre-line .cell {
|
|
|
+ white-space: pre-line;
|
|
|
+ }
|
|
|
.el-table__header-wrapper,
|
|
|
.el-table__fixed-header-wrapper {
|
|
|
.cell {
|
|
@@ -427,4 +470,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.tooltip-content {
|
|
|
+ max-width: 500px;
|
|
|
+}
|
|
|
+.tooltip-trigger {
|
|
|
+ padding: 0 10px;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
</style>
|