|
@@ -11,7 +11,7 @@ import { mapGetters } from 'vuex'
|
|
|
import { commonTableCellClass } from '@/utils/table'
|
|
|
|
|
|
export default {
|
|
|
- data() {
|
|
|
+ data () {
|
|
|
return {
|
|
|
// 表格数据
|
|
|
tableData: [],
|
|
@@ -24,18 +24,18 @@ export default {
|
|
|
computedTableHeight: undefined
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.setFilterAndSort(this.tableCols)
|
|
|
},
|
|
|
- updated() {
|
|
|
+ updated () {
|
|
|
this.setTableHeight()
|
|
|
},
|
|
|
- activated() {
|
|
|
+ activated () {
|
|
|
this.setTableHeight()
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters(['clickedCells']),
|
|
|
- dealedTableData() {
|
|
|
+ dealedTableData () {
|
|
|
const filtered = this.tableData.filter(item => {
|
|
|
let flag = true
|
|
|
Object.entries(this.filterValues).forEach(([key, arr]) => {
|
|
@@ -61,7 +61,7 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
dealedTableData: {
|
|
|
- handler(val) {
|
|
|
+ handler (val) {
|
|
|
this.spanArr = []
|
|
|
let contactDot = this.contactDot
|
|
|
val.forEach((item, index, arr) => {
|
|
@@ -86,7 +86,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
// 设置表格高度
|
|
|
- setTableHeight() {
|
|
|
+ setTableHeight () {
|
|
|
const headerHeight = 80
|
|
|
const bottomBlankHeight = 41
|
|
|
const formWrapHeight = this.$refs['formWrap'].offsetHeight
|
|
@@ -96,7 +96,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 设置筛选和排序
|
|
|
- setFilterAndSort(tableCols) {
|
|
|
+ setFilterAndSort (tableCols) {
|
|
|
const self = this
|
|
|
Object.values(tableCols).forEach(({ prop, filterable, sortable, children }) => {
|
|
|
if (children) {
|
|
@@ -113,7 +113,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 合计行
|
|
|
- summaryMethod({ columns, data }) {
|
|
|
+ summaryMethod ({ columns, data }) {
|
|
|
const sums = []
|
|
|
if (columns.length > 0) {
|
|
|
columns.forEach((column, index) => {
|
|
@@ -194,7 +194,7 @@ export default {
|
|
|
}
|
|
|
return sums
|
|
|
},
|
|
|
- cellClass({ row, column, rowIndex, columnIndex }) {
|
|
|
+ cellClass ({ row, column, rowIndex, columnIndex }) {
|
|
|
const classes = commonTableCellClass({ row, column, rowIndex, columnIndex })
|
|
|
if (
|
|
|
[
|
|
@@ -240,7 +240,7 @@ export default {
|
|
|
}
|
|
|
return classes.join(' ')
|
|
|
},
|
|
|
- cellClickHandler(row, column, cell, event) {
|
|
|
+ cellClickHandler (row, column, cell, event) {
|
|
|
if (
|
|
|
[
|
|
|
'flightNO',
|
|
@@ -509,7 +509,7 @@ export default {
|
|
|
endDate: row.flightDate,
|
|
|
departureStation: row.departureAirport,
|
|
|
destination: this.formData.currentAirport,
|
|
|
- status: '装机',
|
|
|
+ status: '装车',
|
|
|
canceled: 0
|
|
|
}
|
|
|
})
|