|
@@ -3,12 +3,35 @@
|
|
|
<div class="advance__head flex">
|
|
|
<div class="flex-wrap interfaceLog_head_time">
|
|
|
<div class="manageTitle">高级查询</div>
|
|
|
- <el-date-picker v-model="flightDate" size="small" type="daterange" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="dateRangePickerOptions" :clearable="false" />
|
|
|
+ <el-date-picker
|
|
|
+ v-model="flightDate"
|
|
|
+ size="small"
|
|
|
+ type="daterange"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ :picker-options="dateRangePickerOptions"
|
|
|
+ :clearable="false"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <Search ref="search" class="advanced-search" :is-title="false" :is-slot="true" :search-tooltip="'请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)'" @getSearchData="getSearchData" @clearSearchData="clearSearchData">
|
|
|
+ <Search
|
|
|
+ ref="search"
|
|
|
+ class="advanced-search"
|
|
|
+ :is-title="false"
|
|
|
+ :is-slot="true"
|
|
|
+ :search-tooltip="'请输入航班号(示例:CA1234)或行李牌号(示例:1234567890)'"
|
|
|
+ @getSearchData="getSearchData"
|
|
|
+ @clearSearchData="clearSearchData"
|
|
|
+ >
|
|
|
<div class="flex-wrap">
|
|
|
- <button class="btnAn" @click="dialogShow">高级查询</button>
|
|
|
- <button class="btnAn" @click="toOldAdvance">切换</button>
|
|
|
+ <button
|
|
|
+ class="btnAn"
|
|
|
+ @click="dialogShow"
|
|
|
+ >高级搜索</button>
|
|
|
+ <button
|
|
|
+ class="btnAn"
|
|
|
+ @click="toOldAdvance"
|
|
|
+ >切换</button>
|
|
|
<!-- <div
|
|
|
class="setting"
|
|
|
@click="show"
|
|
@@ -18,56 +41,165 @@
|
|
|
</div>
|
|
|
<!--表格-->
|
|
|
<div class="advance__table">
|
|
|
- <SimpleTable :loading="loading" :table-cols="tableCols" :data="tableData" :header-cell-class-name="headerCellClass" :row-class-name="rowClass" :cell-class-name="cellClass" :formatter="tableFormatter" show-summary @load="load" />
|
|
|
+ <SimpleTable
|
|
|
+ :loading="loading"
|
|
|
+ :table-cols="tableCols"
|
|
|
+ :data="tableData"
|
|
|
+ :header-cell-class-name="headerCellClass"
|
|
|
+ :row-class-name="rowClass"
|
|
|
+ :cell-class-name="cellClass"
|
|
|
+ :formatter="tableFormatter"
|
|
|
+ show-summary
|
|
|
+ @load="load"
|
|
|
+ />
|
|
|
</div>
|
|
|
<!--高级查询-->
|
|
|
- <Dialog :flag="dialogFlag" width="852px">
|
|
|
- <div id="dialogSearch" ref="dialog" :tabindex="0" @keyup.self.esc="dialogHide">
|
|
|
+ <Dialog
|
|
|
+ :flag="dialogFlag"
|
|
|
+ width="852px"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ id="dialogSearch"
|
|
|
+ ref="dialog"
|
|
|
+ :tabindex="0"
|
|
|
+ @keyup.self.esc="dialogHide"
|
|
|
+ >
|
|
|
<div class="title">
|
|
|
- <span>高级查询</span>
|
|
|
- <i class="el-icon-close" @click="dialogHide" />
|
|
|
+ <span>高级搜索</span>
|
|
|
+ <i
|
|
|
+ class="el-icon-close"
|
|
|
+ @click="dialogHide"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
<div class="btns">
|
|
|
- <el-button type="primary" size="small" plain @click="addParamsHandler">新增</el-button>
|
|
|
- <el-button type="primary" size="small" @click="advancedQueryHandler">查询</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ plain
|
|
|
+ @click="addParamsHandler"
|
|
|
+ >新增</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="advancedQueryHandler"
|
|
|
+ >查询</el-button>
|
|
|
</div>
|
|
|
- <el-form ref="paramsForm" class="query-params" :model="paramsForm" :rules="paramsForm.validateRules" :inline="true">
|
|
|
- <el-table :data="paramsForm.params" height="370" border stripe>
|
|
|
- <el-table-column type="index" label="行号" :index="index => index + 1" align="center" width="60" />
|
|
|
- <el-table-column v-for="(col, index) in paramsTableCols" :key="index" :label="col.label" :align="col.align || 'center'">
|
|
|
+ <el-form
|
|
|
+ ref="paramsForm"
|
|
|
+ class="query-params"
|
|
|
+ :model="paramsForm"
|
|
|
+ :rules="paramsForm.validateRules"
|
|
|
+ :inline="true"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ :data="paramsForm.params"
|
|
|
+ height="370"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="行号"
|
|
|
+ :index="index => index + 1"
|
|
|
+ align="center"
|
|
|
+ width="60"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ v-for="(col, index) in paramsTableCols"
|
|
|
+ :key="index"
|
|
|
+ :label="col.label"
|
|
|
+ :align="col.align || 'center'"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item :prop="'params.' + scope.$index + '.' + col.prop">
|
|
|
- <template v-if="col.prop === 'comparisonOperators' && col.inputType === 'select' || col.inputType[scope.$index] === 'select'">
|
|
|
- <el-select v-model="scope.row[col.prop]" placeholder="请选择">
|
|
|
- <el-option v-for="(option, index) in col.options[scope.$index]" :key="index" :value="option.value" :label="option.label" />
|
|
|
+ <template v-if="col.prop === 'comparisonOperator' || col.inputType[scope.$index] === 'select'">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row[col.prop]"
|
|
|
+ placeholder="请选择"
|
|
|
+ :disabled="scope.$index < 2 && col.prop === 'comparisonOperator' || col.prop === 'paramValue' && paramsForm.disabled[scope.$index]"
|
|
|
+ @change="value => { selectChangeHandler(value, scope.$index, index) }"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(option, index) in col.options[scope.$index]"
|
|
|
+ :key="index"
|
|
|
+ :value="option.value"
|
|
|
+ :label="option.label"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<template v-else-if="col.inputType === 'select'">
|
|
|
- <el-select v-model="scope.row[col.prop]" placeholder="请选择" @change="value => { selectChangeHandler(value, scope.$index, index) }">
|
|
|
- <el-option v-for="(option, index) in col.options" :key="index" :value="option.value" :label="option.label" />
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row[col.prop]"
|
|
|
+ placeholder="请选择"
|
|
|
+ :disabled="scope.$index < 2 && ['paramKey', 'connector'].includes(col.prop)"
|
|
|
+ @change="value => { selectChangeHandler(value, scope.$index, index) }"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(option, index) in col.options"
|
|
|
+ :key="index"
|
|
|
+ :value="option.value"
|
|
|
+ :label="option.label"
|
|
|
+ />
|
|
|
</el-select>
|
|
|
</template>
|
|
|
- <template v-else-if="col.inputType[scope.$index] === 'text'">
|
|
|
- <el-input v-model="scope.row[col.prop]" placeholder="请输入" />
|
|
|
+ <template v-else-if="['varchar', 'text', 'longtext'].includes(col.inputType[scope.$index])">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row[col.prop]"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="col.prop === 'paramValue' && paramsForm.disabled[scope.$index]"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template v-else-if="col.inputType[scope.$index] === 'number'">
|
|
|
- <el-input v-model="scope.row[col.prop]" placeholder="请输入" @keydown.native="inputHold(scope.row[col.prop])" @input="inputLimit(scope.row[col.prop], scope.$index)" @blur="inputFix(scope.row[col.prop], scope.$index)" />
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row[col.prop]"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="col.prop === 'paramValue' && paramsForm.disabled[scope.$index]"
|
|
|
+ @keydown.native="inputHold(scope.row[col.prop])"
|
|
|
+ @input="inputLimit(scope.row[col.prop], scope.$index)"
|
|
|
+ @blur="inputFix(scope.row[col.prop], scope.$index)"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template v-else-if="col.inputType[scope.$index] === 'date'">
|
|
|
- <el-date-picker v-model="scope.row[col.prop]" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="请选择" />
|
|
|
+ <el-date-picker
|
|
|
+ v-model="scope.row[col.prop]"
|
|
|
+ type="date"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请选择"
|
|
|
+ :clearable="false"
|
|
|
+ />
|
|
|
</template>
|
|
|
<template v-else-if="col.inputType[scope.$index] === 'datetime'">
|
|
|
- <el-date-picker v-model="scope.row[col.prop]" type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" />
|
|
|
+ <el-date-picker
|
|
|
+ v-model="scope.row[col.prop]"
|
|
|
+ type="datetime"
|
|
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ placeholder="请选择"
|
|
|
+ :clearable="false"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="80" align="center">
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ width="80"
|
|
|
+ align="center"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-popconfirm title="是否要删除这一行?" @confirm="deleteParam(scope.$index)">
|
|
|
- <span slot="reference" class="clickable-delete">删除</span>
|
|
|
+ <el-popconfirm
|
|
|
+ v-if="scope.$index > 1"
|
|
|
+ title="是否要删除这一行?"
|
|
|
+ @confirm="deleteParam(scope.$index)"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ slot="reference"
|
|
|
+ class="clickable-delete"
|
|
|
+ >删除</span>
|
|
|
</el-popconfirm>
|
|
|
+ <span v-else>固定</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -128,10 +260,10 @@ const comparisonOperatorOptions = [
|
|
|
export default {
|
|
|
name: 'AdvancedNew',
|
|
|
components: { Search, SimpleTable, Dialog },
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
queryString: '',
|
|
|
- flightDate: [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')],
|
|
|
+ flightDate: new Array(2).fill(parseTime(new Date(), '{y}-{m}-{d}')),
|
|
|
dateRangePickerOptions: {
|
|
|
onPick: this.dateRangePickHandler,
|
|
|
disabledDate: this.dateRangeDisabled
|
|
@@ -146,14 +278,23 @@ export default {
|
|
|
params: [
|
|
|
{
|
|
|
leftBrackets: '',
|
|
|
- paramKey: '',
|
|
|
- comparisonOperators: '',
|
|
|
+ paramKey: 'flightDate',
|
|
|
+ comparisonOperator: '>=',
|
|
|
paramValue: '',
|
|
|
rightBrackets: '',
|
|
|
- connector: ''
|
|
|
+ connector: 'and'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ leftBrackets: '',
|
|
|
+ paramKey: 'flightDate',
|
|
|
+ comparisonOperator: '<=',
|
|
|
+ paramValue: '',
|
|
|
+ rightBrackets: '',
|
|
|
+ connector: 'and'
|
|
|
}
|
|
|
],
|
|
|
- validateRules: {}
|
|
|
+ validateRules: {},
|
|
|
+ disabled: []
|
|
|
},
|
|
|
checkValue: '',
|
|
|
paramsTableCols: [
|
|
@@ -183,15 +324,15 @@ export default {
|
|
|
options: []
|
|
|
},
|
|
|
{
|
|
|
- prop: 'comparisonOperators',
|
|
|
+ prop: 'comparisonOperator',
|
|
|
label: '比较符',
|
|
|
inputType: 'select',
|
|
|
- options: []
|
|
|
+ options: new Array(2).fill(comparisonOperatorOptions.slice(0, 5).reverse())
|
|
|
},
|
|
|
{
|
|
|
prop: 'paramValue',
|
|
|
label: '值',
|
|
|
- inputType: ['text'],
|
|
|
+ inputType: ['date', 'date'],
|
|
|
options: []
|
|
|
},
|
|
|
{
|
|
@@ -236,71 +377,75 @@ export default {
|
|
|
...mapGetters(['clickedCells'])
|
|
|
},
|
|
|
watch: {
|
|
|
- flightDate: {
|
|
|
- handler (val) {
|
|
|
- if (val === null) {
|
|
|
- this.flightDate = ['', '']
|
|
|
- }
|
|
|
- },
|
|
|
- deep: true
|
|
|
- },
|
|
|
+ // flightDate: {
|
|
|
+ // handler(val) {
|
|
|
+ // if (val === null) {
|
|
|
+ // this.flightDate = ['', '']
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // deep: true
|
|
|
+ // },
|
|
|
queryString: {
|
|
|
- handler () {
|
|
|
+ handler() {
|
|
|
this.resetTable()
|
|
|
this.queryTableData()
|
|
|
}
|
|
|
},
|
|
|
tableCols: {
|
|
|
- handler (arr) {
|
|
|
+ handler(arr) {
|
|
|
this.getColumnSet(arr)
|
|
|
},
|
|
|
deep: true
|
|
|
}
|
|
|
},
|
|
|
- deactivated () {
|
|
|
+ created() {
|
|
|
+ this.paramsForm.params[0].paramValue = this.flightDate[0]
|
|
|
+ this.paramsForm.params[1].paramValue = this.flightDate[1]
|
|
|
+ },
|
|
|
+ deactivated() {
|
|
|
this.loading = false
|
|
|
},
|
|
|
- beforeDestroy () {
|
|
|
+ beforeDestroy() {
|
|
|
this.loading = false
|
|
|
},
|
|
|
methods: {
|
|
|
- dateRangePickHandler ({ maxDate, minDate }) {
|
|
|
+ dateRangePickHandler({ maxDate, minDate }) {
|
|
|
if (!maxDate) {
|
|
|
this.pickedDate = minDate
|
|
|
} else {
|
|
|
this.pickedDate = null
|
|
|
}
|
|
|
},
|
|
|
- dateRangeDisabled (date) {
|
|
|
+ dateRangeDisabled(date) {
|
|
|
return this.pickedDate ? Math.abs(date - this.pickedDate) > 2 * 24 * 60 * 60 * 1000 : false
|
|
|
},
|
|
|
- toOldAdvance () {
|
|
|
+ toOldAdvance() {
|
|
|
this.$router.push('/advance')
|
|
|
},
|
|
|
- dialogShow () {
|
|
|
+ dialogShow() {
|
|
|
this.dialogFlag = true
|
|
|
this.$nextTick(() => {
|
|
|
this.dialogFocus()
|
|
|
})
|
|
|
},
|
|
|
- dialogFocus () {
|
|
|
+ dialogFocus() {
|
|
|
this.$refs['dialog'].focus()
|
|
|
},
|
|
|
- dialogHide () {
|
|
|
+ dialogHide() {
|
|
|
this.dialogFlag = false
|
|
|
},
|
|
|
- addParamsHandler () {
|
|
|
+ addParamsHandler() {
|
|
|
this.paramsTableCols[3].inputType.push('text')
|
|
|
this.paramsForm.params.push({
|
|
|
leftBrackets: '',
|
|
|
paramKey: '',
|
|
|
- comparisonOperators: '',
|
|
|
+ comparisonOperator: '',
|
|
|
paramValue: '',
|
|
|
rightBrackets: '',
|
|
|
connector: ''
|
|
|
})
|
|
|
},
|
|
|
- selectChangeHandler (value, rowIndex, colIndex) {
|
|
|
+ selectChangeHandler(value, rowIndex, colIndex) {
|
|
|
if (colIndex === 1) {
|
|
|
const { dataType, options } = this.columnSet[value]
|
|
|
if (dataType === 'date') {
|
|
@@ -313,7 +458,7 @@ export default {
|
|
|
this.paramsTableCols[2].options[rowIndex] = comparisonOperatorOptions.slice(4, 5)
|
|
|
this.paramsTableCols[3].inputType[rowIndex] = 'select'
|
|
|
this.paramsTableCols[3].options[rowIndex] = options
|
|
|
- } else if (dataType !== 'number') {
|
|
|
+ } else if (dataType === 'number') {
|
|
|
this.paramsTableCols[2].options[rowIndex] = comparisonOperatorOptions.slice(0, 5).reverse()
|
|
|
this.paramsTableCols[3].inputType[rowIndex] = 'number'
|
|
|
} else {
|
|
@@ -321,28 +466,35 @@ export default {
|
|
|
this.paramsTableCols[3].inputType[rowIndex] = 'text'
|
|
|
}
|
|
|
|
|
|
- this.paramsForm.params[rowIndex].comparisonOperators = this.paramsTableCols[2].options[rowIndex][0].value
|
|
|
+ this.paramsForm.params[rowIndex].comparisonOperator = this.paramsTableCols[2].options[rowIndex][0].value
|
|
|
+ } else if (colIndex === 2) {
|
|
|
+ if (['is Null', 'is not Null'].includes(value)) {
|
|
|
+ this.paramsForm.params[rowIndex].paramValue = ''
|
|
|
+ this.paramsForm.disabled[rowIndex] = true
|
|
|
+ } else {
|
|
|
+ this.paramsForm.disabled[rowIndex] = false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- inputHold (value) {
|
|
|
+ inputHold(value) {
|
|
|
this.checkValue = value
|
|
|
},
|
|
|
- inputLimit (value, rowIndex) {
|
|
|
+ inputLimit(value, rowIndex) {
|
|
|
if (!/^[\-|\+]?((([1-9][0-9]*)|0)(\.[0-9]{0,2})?)?$/.test(value)) {
|
|
|
this.paramsForm.params[rowIndex].paramValue = this.checkValue
|
|
|
}
|
|
|
},
|
|
|
- inputFix (value, rowIndex) {
|
|
|
+ inputFix(value, rowIndex) {
|
|
|
if (value?.at(-1) === '.') {
|
|
|
this.paramsForm.params[rowIndex].paramValue = value.slice(0, -1)
|
|
|
}
|
|
|
},
|
|
|
- advancedQueryHandler () {
|
|
|
+ advancedQueryHandler() {
|
|
|
let bracketsDifference = 0
|
|
|
try {
|
|
|
const paramsRowNum = this.paramsForm.params.length
|
|
|
const queryString = this.paramsForm.params.reduce(
|
|
|
- (preString, { leftBrackets, paramKey, comparisonOperators, paramValue, rightBrackets, connector }, index) => {
|
|
|
+ (preString, { leftBrackets, paramKey, comparisonOperator, paramValue, rightBrackets, connector }, index) => {
|
|
|
bracketsDifference += leftBrackets.length - rightBrackets.length
|
|
|
if (bracketsDifference < 0) {
|
|
|
throw new Error('左右括号不匹配!')
|
|
@@ -351,8 +503,12 @@ export default {
|
|
|
preString +
|
|
|
leftBrackets +
|
|
|
paramKey +
|
|
|
- ` ${comparisonOperators} ` +
|
|
|
- (comparisonOperators === 'like' ? `%${paramValue}%` : paramValue) +
|
|
|
+ ` ${comparisonOperator} ` +
|
|
|
+ (['is Null', 'is not Null'].includes(comparisonOperator)
|
|
|
+ ? ''
|
|
|
+ : comparisonOperator === 'like'
|
|
|
+ ? `%${paramValue}%`
|
|
|
+ : paramValue) +
|
|
|
rightBrackets +
|
|
|
(index < paramsRowNum - 1 ? connector : '')
|
|
|
)
|
|
@@ -368,17 +524,17 @@ export default {
|
|
|
this.$message.error(error.message)
|
|
|
}
|
|
|
},
|
|
|
- deleteParam (index) {
|
|
|
+ deleteParam(index) {
|
|
|
this.paramsTableCols[3].inputType.splice(index, 1)
|
|
|
this.paramsForm.params.splice(index, 1)
|
|
|
},
|
|
|
- clearForm () {
|
|
|
+ clearForm() {
|
|
|
this.paramsTableCols[2].options = []
|
|
|
this.paramsTableCols[3].inputType = ['text']
|
|
|
this.paramsTableCols[3].options = []
|
|
|
this.$refs['paramsForm'].resetFields()
|
|
|
},
|
|
|
- getColumnSet (columnSet) {
|
|
|
+ getColumnSet(columnSet) {
|
|
|
this.columnSet = {}
|
|
|
this.paramsTableCols[1].options = []
|
|
|
columnSet.forEach(async column => {
|
|
@@ -398,19 +554,19 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- load () {
|
|
|
+ load() {
|
|
|
if (this.noMore || this.loading) {
|
|
|
return
|
|
|
}
|
|
|
this.queryTableData()
|
|
|
},
|
|
|
- resetTable () {
|
|
|
+ resetTable() {
|
|
|
this.page = 0
|
|
|
this.noMore = false
|
|
|
this.tableData = []
|
|
|
},
|
|
|
// 给表头单元格加上 ascending 或 descending 使用 element 自带的排序箭头变色
|
|
|
- headerCellClass ({ row, column, rowIndex, columnIndex }) {
|
|
|
+ headerCellClass({ row, column, rowIndex, columnIndex }) {
|
|
|
const classes = []
|
|
|
const rule = this.tableDataSortRules[column.property]
|
|
|
if (rule) {
|
|
@@ -418,14 +574,14 @@ export default {
|
|
|
}
|
|
|
return classes.join(' ')
|
|
|
},
|
|
|
- rowClass ({ row, rowIndex }) {
|
|
|
+ rowClass({ row, rowIndex }) {
|
|
|
const classes = []
|
|
|
if (row.deleted === 'DEL') {
|
|
|
classes.push('bgl-deleted')
|
|
|
}
|
|
|
return classes.join(' ')
|
|
|
},
|
|
|
- cellClass ({ row, column, rowIndex, columnIndex }) {
|
|
|
+ cellClass({ row, column, rowIndex, columnIndex }) {
|
|
|
const classes = []
|
|
|
if (
|
|
|
['flightNO', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
|
|
@@ -446,7 +602,7 @@ export default {
|
|
|
}
|
|
|
return classes.join(' ')
|
|
|
},
|
|
|
- cellClickHandler (row, column, cell, event) {
|
|
|
+ cellClickHandler(row, column, cell, event) {
|
|
|
if (
|
|
|
['flightNO', 'bagSN', 'U_Device_ID', 'preFlightNO', 'transferFlightNO'].includes(column.property) &&
|
|
|
row[column.property] &&
|
|
@@ -508,7 +664,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- tableFormatter (row, column, cellValue) {
|
|
|
+ tableFormatter(row, column, cellValue) {
|
|
|
switch (column.property) {
|
|
|
case 'departureTime':
|
|
|
return (cellValue ?? '').replace('T', ' ')
|
|
@@ -521,17 +677,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 清除查询
|
|
|
- clearSearchData () {
|
|
|
+ clearSearchData() {
|
|
|
this.clearForm()
|
|
|
this.resetTable()
|
|
|
},
|
|
|
// 统计行数
|
|
|
- summaryRow (num) {
|
|
|
+ summaryRow(num) {
|
|
|
return function () {
|
|
|
return ['合计', `共${num}件`]
|
|
|
}
|
|
|
},
|
|
|
- getSearchData (val) {
|
|
|
+ getSearchData(val) {
|
|
|
this.$message.info('开发中')
|
|
|
// this.clearForm()
|
|
|
// if (!val) {
|
|
@@ -557,7 +713,7 @@ export default {
|
|
|
// }
|
|
|
},
|
|
|
// 获取下拉数据
|
|
|
- async getSelectData (id) {
|
|
|
+ async getSelectData(id) {
|
|
|
try {
|
|
|
const { code, returnData } = await Query({
|
|
|
id,
|
|
@@ -569,10 +725,10 @@ export default {
|
|
|
return []
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- this.$message.error("失败");
|
|
|
+ this.$message.error('失败')
|
|
|
}
|
|
|
},
|
|
|
- async queryTableData () {
|
|
|
+ async queryTableData() {
|
|
|
this.loading = true
|
|
|
try {
|
|
|
const {
|
|
@@ -581,7 +737,7 @@ export default {
|
|
|
} = await Query({
|
|
|
id: DATACONTENT_ID.advancedQueryNew,
|
|
|
needPage: ++this.page,
|
|
|
- dataContent: { whereString: this.queryString }
|
|
|
+ dataContent: this.queryString ? { whereString: this.queryString } : []
|
|
|
})
|
|
|
if (Number(code) === 0) {
|
|
|
if (listValues.length === 0) {
|
|
@@ -595,7 +751,7 @@ export default {
|
|
|
this.$message.error('获取表格数据失败')
|
|
|
}
|
|
|
} catch (error) {
|
|
|
- this.$message.error("失败");
|
|
|
+ this.$message.error('失败')
|
|
|
}
|
|
|
this.loading = false
|
|
|
}
|
|
@@ -618,7 +774,7 @@ export default {
|
|
|
width: 32px;
|
|
|
cursor: pointer;
|
|
|
background-size: 100% 100%;
|
|
|
- background: url("../../../assets/baggage/ic_setting.png") no-repeat;
|
|
|
+ background: url('../../../assets/baggage/ic_setting.png') no-repeat;
|
|
|
margin-left: 12px;
|
|
|
position: relative;
|
|
|
top: 2px;
|
|
@@ -683,7 +839,7 @@ export default {
|
|
|
.cell {
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
|
- font-family: Helvetica, "Microsoft YaHei";
|
|
|
+ font-family: Helvetica, 'Microsoft YaHei';
|
|
|
font-weight: bold;
|
|
|
color: #303133;
|
|
|
}
|
|
@@ -701,18 +857,18 @@ export default {
|
|
|
background: transparent;
|
|
|
border: none;
|
|
|
color: #101116;
|
|
|
- font-family: Helvetica, "Microsoft YaHei";
|
|
|
+ font-family: Helvetica, 'Microsoft YaHei';
|
|
|
&:hover {
|
|
|
background-color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
.el-select {
|
|
|
.el-icon-arrow-up::before {
|
|
|
- content: "\e78f";
|
|
|
+ content: '\e78f';
|
|
|
color: #101116;
|
|
|
}
|
|
|
.el-icon-arrow-down::before {
|
|
|
- content: "\e790";
|
|
|
+ content: '\e790';
|
|
|
color: #101116;
|
|
|
}
|
|
|
}
|