|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="newQueryTable">
|
|
|
<template v-if="istableChild">
|
|
|
- <el-table ref="table" v-el-table-infinite-scroll="load" :data="dealedTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" :show-summary="showSummary" :header-cell-class-name="headerCellClass" :cell-class-name="cellClass" height="100%" class="table infinite-list" stripe border @cell-click="cellClick">
|
|
|
+ <el-table ref="table" v-el-table-infinite-scroll="load" :data="dealedTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" :show-summary="showSummary" :header-cell-class-name="headerCellClass" :row-class-name="rowClass" :cell-class-name="cellClass" height="100%" class="table infinite-list" stripe border @cell-click="cellClick">
|
|
|
<el-table-column v-for="col in tableColsCopy" :key="col.columnName" :prop="col.columnName" :label="col.groupName" align="center">
|
|
|
- <el-table-column v-for="childCol in col.children" :key="childCol.columnName" :prop="childCol.columnName" :label="childCol.columnLabel" :formatter="formatter">
|
|
|
+ <el-table-column v-for="childCol in col.children" :key="childCol.columnName" :width="childCol.nameLength ? Number(childCol.nameLength) : ''" :prop="childCol.columnName" :label="childCol.columnLabel" :formatter="formatter">
|
|
|
<template #header>
|
|
|
<el-tooltip :content="childCol.columnDescribe || childCol.columnLabel" placement="top">
|
|
|
<TableHeaderCell :label="childCol.columnLabel" :filter-options="tableDataFilters[childCol.columnName]" :filter-values.sync="filterValues[childCol.columnName]" :sortable="childCol.needSort" :sort-rule.sync="tableDataSortRules[childCol.columnName]" />
|
|
@@ -14,8 +14,8 @@
|
|
|
</el-table>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <el-table ref="table" v-el-table-infinite-scroll="load" :data="dealedTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" :show-summary="showSummary" :header-cell-class-name="headerCellClass" :cell-class-name="cellClass" height="100%" class="table infinite-list" border stripe @cell-click="cellClick">
|
|
|
- <el-table-column v-for="(item, index) in tableColsCopy" :key="index" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip" :formatter="formatter">
|
|
|
+ <el-table ref="table" v-el-table-infinite-scroll="load" :data="dealedTableData" :summary-method="getSummaries" :span-method="tableSpanMethod" :show-summary="showSummary" :header-cell-class-name="headerCellClass" :row-class-name="rowClass" :cell-class-name="cellClass" height="100%" class="table infinite-list" border stripe @cell-click="cellClick">
|
|
|
+ <el-table-column v-for="(item, index) in tableColsCopy" :key="index" :width="item.nameLength ? Number(item.nameLength) : ''" :prop="item.columnName" :label="item.columnLabel" :show-overflow-tooltip="showOverflowTooltip" :formatter="formatter">
|
|
|
<template #header>
|
|
|
<el-tooltip :content="item.columnDescribe || item.columnLabel" placement="top">
|
|
|
<TableHeaderCell :label="item.columnLabel" :filter-options="tableDataFilters[item.columnName]" :filter-values.sync="filterValues[item.columnName]" :sortable="item.needSort" :sort-rule.sync="tableDataSortRules[item.columnName]" />
|
|
@@ -137,7 +137,9 @@ export default {
|
|
|
tableOptions: {}, // 弹框-下来数据缓存
|
|
|
showSummary: false, // 是否显示统计
|
|
|
tableDataSortRules: {},
|
|
|
- tableCath: []
|
|
|
+ tableCath: [],
|
|
|
+ leaveCount: 0,
|
|
|
+ checkPath: ['/newDeparture', '/newTransfer/in', '/newTransfer/out', '/newArrival']
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -421,6 +423,17 @@ export default {
|
|
|
// }
|
|
|
// }
|
|
|
})
|
|
|
+ if (this.$route.path == '/newDeparture') {
|
|
|
+ this.leaveCount = 0
|
|
|
+ const nTableData = [...this.tableData]
|
|
|
+ const cData = nTableData.filter(item => Number(item['NO_BSM_number']) + Number(item['check_in_baggage_number']) > 0)
|
|
|
+ cData.forEach(item => {
|
|
|
+ if (item.normalState == 'DEP' || item.normalState == 'ARR') {
|
|
|
+ this.leaveCount++
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.tableData = _.orderBy([...cData], ["scheduleTakeOffTime", "normalState"], ["asc", "desc"]);
|
|
|
+ }
|
|
|
const dats = this.setTableFilters(this.tableData, this.tableDataFilters)
|
|
|
this.tableDataFilters = _.cloneDeep(dats)
|
|
|
this.tableGroup(this.tableData)
|
|
@@ -552,6 +565,35 @@ export default {
|
|
|
if (this.authBtnColName.includes(column.property)) {
|
|
|
return 'is-click-btn'
|
|
|
}
|
|
|
+ if (this.$route.path == '/newDeparture') {
|
|
|
+ if (column.property === 'NO_check_number' && Number(row['NO_check_number']) > 0) {
|
|
|
+ return 'cell-toUnload'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 表格-设置行样式
|
|
|
+ rowClass ({ row, rowIndex }) {
|
|
|
+ const classes = []
|
|
|
+ if (this.checkPath.includes(this.$route.path)) {
|
|
|
+ const { abnormalState, normalState } = row
|
|
|
+ if (abnormalState) {
|
|
|
+ if (abnormalState == 'DLY') {
|
|
|
+ classes.push('bgl-delayed')
|
|
|
+ }
|
|
|
+ if (abnormalState == 'CAN') {
|
|
|
+ classes.push('bgl-canceled')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (normalState) {
|
|
|
+ if (normalState == 'DEP' || normalState == 'ARR') {
|
|
|
+ classes.push('bgl-hui')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (rowIndex === this.leaveCount - 1) {
|
|
|
+ classes.push("redBorder");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return classes
|
|
|
},
|
|
|
// 表格-单元格点击
|
|
|
cellClick (row, column) {
|
|
@@ -621,6 +663,41 @@ export default {
|
|
|
line-height: 34px;
|
|
|
}
|
|
|
}
|
|
|
+ tr.bgl-delayed td {
|
|
|
+ background: #fcf0b1;
|
|
|
+ }
|
|
|
+ tr.bgl-canceled td {
|
|
|
+ background: #f7babe;
|
|
|
+ }
|
|
|
+ tr.bgl-hui td {
|
|
|
+ background: #d2d6df;
|
|
|
+ }
|
|
|
+ .redBorder {
|
|
|
+ position: relative;
|
|
|
+ &::after {
|
|
|
+ content: "";
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 2px;
|
|
|
+ background: #e83f82;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ td.cell-toUnload {
|
|
|
+ background: lightcoral !important;
|
|
|
+ position: relative;
|
|
|
+ &::after {
|
|
|
+ content: "";
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ border: 2px dashed red;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.btns {
|
|
|
position: absolute;
|