|
@@ -2,106 +2,50 @@
|
|
|
<div class="data-query">
|
|
|
<div class="data-query-header">
|
|
|
<div class="manageTitle">局方报文</div>
|
|
|
- <el-form
|
|
|
- ref="formRef"
|
|
|
- :model="formData"
|
|
|
- class="data-query-form"
|
|
|
- :rules="rules"
|
|
|
- @submit.native.prevent
|
|
|
- >
|
|
|
+ <el-form ref="formRef" :model="formData" class="data-query-form" :rules="rules" @submit.native.prevent>
|
|
|
<div class="form-left">
|
|
|
<el-form-item prop="startDate">
|
|
|
- <el-date-picker
|
|
|
- v-model="formData.startDate"
|
|
|
- format="YYYY-MM-DD"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- size="default"
|
|
|
- type="date"
|
|
|
- placeholder="开始日期"
|
|
|
- :prefix-icon="datePreTitle('开始')"
|
|
|
- :clearable="false"
|
|
|
- class="pre-text"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="formData.startDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD" size="default" type="date" placeholder="开始日期" :prefix-icon="datePreTitle('开始')" :clearable="false" class="pre-text" />
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="endDate">
|
|
|
- <el-date-picker
|
|
|
- v-model="formData.endDate"
|
|
|
- format="YYYY-MM-DD"
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
- :disabled-date="disabledEndDate"
|
|
|
- size="default"
|
|
|
- type="date"
|
|
|
- placeholder="结束日期"
|
|
|
- :prefix-icon="datePreTitle('结束')"
|
|
|
- :clearable="false"
|
|
|
- class="pre-text"
|
|
|
- />
|
|
|
+ <el-date-picker v-model="formData.endDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD" :disabled-date="disabledEndDate" size="default" type="date" placeholder="结束日期" :prefix-icon="datePreTitle('结束')" :clearable="false" class="pre-text" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="form-right">
|
|
|
+ <el-form-item prop="messageName" style="width: 108px">
|
|
|
+ <el-select v-model="formData.messageName" size="default" placeholder="报文名称">
|
|
|
+ <el-option v-for="{ value, label } in messageNameOptions" :key="value" :value="value" :label="label" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item prop="messageType" style="width: 108px">
|
|
|
- <el-select
|
|
|
- v-model="formData.messageType"
|
|
|
- size="default"
|
|
|
- placeholder="报文类型"
|
|
|
- clearable
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="{ value, label } in messageTypeOptions"
|
|
|
- :key="value"
|
|
|
- :value="value"
|
|
|
- :label="label"
|
|
|
- />
|
|
|
+ <el-select v-model="formData.messageType" size="default" placeholder="报文类型">
|
|
|
+ <el-option v-for="{ value, label } in messageTypeOptions" :key="value" :value="value" :label="label" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="messageEmit" style="width: 128px">
|
|
|
+ <el-select v-model="formData.messageEmit" size="default" placeholder="报文发出方">
|
|
|
+ <el-option v-for="{ value, label } in messageLoactionOptions" :key="value" :value="value" :label="label" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="messageReceive" style="width: 128px">
|
|
|
+ <el-select v-model="formData.messageReceive" size="default" placeholder="报文接收方">
|
|
|
+ <el-option v-for="{ value, label } in messageLoactionOptions" :key="value" :value="value" :label="label" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="waybillNO">
|
|
|
- <el-input
|
|
|
- v-model.trim="formData.waybillNO"
|
|
|
- size="default"
|
|
|
- placeholder="请输入运单号进行搜索"
|
|
|
- :prefix-icon="Search"
|
|
|
- clearable
|
|
|
- @keyup.enter.prevent="dataQuery"
|
|
|
- />
|
|
|
+ <el-input v-model.trim="formData.waybillNO" size="default" placeholder="请输入运单号进行搜索" :prefix-icon="Search" clearable @keyup.enter.prevent="dataQuery" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
- <el-button size="default" color="#ac014d" @click="dataQuery"
|
|
|
- >搜索</el-button
|
|
|
- >
|
|
|
+ <el-button size="default" color="#ac014d" @click="dataQuery">搜索</el-button>
|
|
|
<el-button size="default" plain @click="resetForm">重置</el-button>
|
|
|
- <ColumnSet
|
|
|
- :table-columns="tableColumns"
|
|
|
- @checked-submit="columnChecked"
|
|
|
- />
|
|
|
+ <ColumnSet :table-columns="tableColumns" @checked-submit="columnChecked" />
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-loading="loading"
|
|
|
- element-loading-text="拼命加载中"
|
|
|
- element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
- class="data-query-table"
|
|
|
- >
|
|
|
- <SimpleTable
|
|
|
- ref="tableRef"
|
|
|
- :header-cell-style="() => ({ background: '#F9FAFC' })"
|
|
|
- :data="
|
|
|
+ <div v-loading="loading" element-loading-text="拼命加载中" element-loading-background="rgba(0, 0, 0, 0.8)" class="data-query-table">
|
|
|
+ <SimpleTable ref="tableRef" :header-cell-style="() => ({ background: '#F9FAFC' })" :data="
|
|
|
tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)
|
|
|
- "
|
|
|
- :columns="tableColumns"
|
|
|
- height="calc(100vh - 220px)"
|
|
|
- :column-props="{ formatter }"
|
|
|
- custom-sequence
|
|
|
- />
|
|
|
- <el-pagination
|
|
|
- v-if="tableData.length > 0"
|
|
|
- background
|
|
|
- layout="prev, pager, next, jumper"
|
|
|
- :total="tableData.length"
|
|
|
- :page-size="pageSize"
|
|
|
- style="position: absolute; right: 19px; bottom: 10px"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- >
|
|
|
+ " :columns="tableColumns" height="calc(100vh - 220px)" :column-props="{ formatter }" custom-sequence />
|
|
|
+ <el-pagination v-if="tableData.length > 0" background layout="prev, pager, next, jumper" :total="tableData.length" :page-size="pageSize" style="position: absolute; right: 19px; bottom: 10px" @current-change="handleCurrentChange" @size-change="handleSizeChange">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -109,8 +53,8 @@
|
|
|
|
|
|
<script lang="tsx">
|
|
|
export default {
|
|
|
- name: 'MessageQuery',
|
|
|
-}
|
|
|
+ name: "MessageQuery",
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<script setup lang="tsx">
|
|
@@ -133,7 +77,10 @@ const today = parseTime(new Date(), '{y}-{m}-{d}') as string
|
|
|
const formData = reactive({
|
|
|
startDate: today,
|
|
|
endDate: today,
|
|
|
- messageType: '',
|
|
|
+ messageName:'FSUDLV',
|
|
|
+ messageType: 'IMP_ARRIVAL',
|
|
|
+ messageEmit:'IMP_NJ',
|
|
|
+ messageReceive:'IMP_SZ',
|
|
|
waybillNO: '',
|
|
|
})
|
|
|
|
|
@@ -174,6 +121,20 @@ const messageTypeOptions = ref(
|
|
|
}))
|
|
|
)
|
|
|
|
|
|
+const messageNameOptions = ref(
|
|
|
+ Object.entries(MESSAGE_NAME).map(([value, label]) => ({
|
|
|
+ label,
|
|
|
+ value,
|
|
|
+ }))
|
|
|
+)
|
|
|
+
|
|
|
+const messageLoactionOptions = ref(
|
|
|
+ Object.entries(MESSAGE_LOCATION).map(([value, label]) => ({
|
|
|
+ label,
|
|
|
+ value,
|
|
|
+ }))
|
|
|
+)
|
|
|
+
|
|
|
const waybillValidator = (rule: any, value: any, callback: any) => {
|
|
|
if (!value) {
|
|
|
return callback()
|
|
@@ -215,8 +176,7 @@ const getTableData = async (defaultDataContent?: CommonValue[]) => {
|
|
|
loading.value = true
|
|
|
}
|
|
|
try {
|
|
|
- let { startDate, endDate, messageType, waybillNO } = formData
|
|
|
- const dataContent = [startDate, endDate, messageType, waybillNO].map(
|
|
|
+ const dataContent = Object.values(formData).map(
|
|
|
v => v || null
|
|
|
)
|
|
|
const {
|
|
@@ -272,6 +232,14 @@ const tableInit = () => {
|
|
|
const { columnChecked } = useTableColumnSet(tableColumns)
|
|
|
|
|
|
const columns = [
|
|
|
+ {
|
|
|
+ columnName: 'flightNO',
|
|
|
+ columnLabel: '航班号',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnName: 'flightDate',
|
|
|
+ columnLabel: '航班时间',
|
|
|
+ },
|
|
|
{
|
|
|
columnName: 'waybillNO',
|
|
|
columnLabel: '运单号',
|
|
@@ -285,16 +253,20 @@ const columns = [
|
|
|
columnLabel: '报文名称',
|
|
|
},
|
|
|
{
|
|
|
- columnName: 'messageState',
|
|
|
- columnLabel: '收发状态',
|
|
|
+ columnName: 'messageType',
|
|
|
+ columnLabel: '报文类型',
|
|
|
},
|
|
|
{
|
|
|
columnName: 'execTime',
|
|
|
columnLabel: '执行时间',
|
|
|
},
|
|
|
{
|
|
|
- columnName: 'airportState',
|
|
|
- columnLabel: '报文收发方',
|
|
|
+ columnName: 'airportEmit',
|
|
|
+ columnLabel: '报文发出方',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnName: 'airportReceive',
|
|
|
+ columnLabel: '报文接收方',
|
|
|
},
|
|
|
{
|
|
|
columnName: 'messageDetails',
|