审查视图

src/views/nav4/inquiry.vue 21.4 KB
1
<template>
2
    <el-container style="height: 550px;overflow:auto;">
3 4 5 6 7 8 9 10
        <el-main style="background-color: #EAEAEA">
<!--            航班号查询-->
            <el-row style="height: 180px">
                <el-col :span="24">
                    <el-row>
                        <p style="font-size: 28px">航班号查询</p>
                    </el-row>
                    <el-row>
11 12 13 14 15 16 17 18 19
                        <!--工具条-->
                            <el-form :inline="true" :model="filters">
                                <el-form-item>
                                    <el-input v-model="filters.flightNo" ></el-input>
                                </el-form-item>
                                <el-form-item>
                                    <el-button type="primary" v-on:click="getDomesticClearance()">查询</el-button>
                                </el-form-item>
                            </el-form>
20 21 22 23 24 25 26 27 28 29
                    </el-row>
                </el-col>
            </el-row>
<!--            条件查询-->
            <el-row style="">
                <el-col :span="24">
                    <el-row>
                        <p style="font-size: 28px">条件查询</p>
                    </el-row>
                    <el-row>
30
                        <el-tabs v-model="activeName" @tab-click="getDomesticClearance" style="width: 100%">
31 32 33
                            <el-tab-pane label="国内出港" name="first">
                                <div style=";margin-top: 15px">
                                    <el-time-picker
34
                                            v-model="filters.flightDate"
35 36 37 38
                                            placeholder="任意时间点"
                                    style="width: 140px">
                                    </el-time-picker>
                                    <el-time-picker
39
                                            v-model="filters.flightDate"
40 41 42
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
43
                                    <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px">
44 45 46 47 48 49 50
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
51
                                    <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px">
52 53 54 55 56 57 58 59 60 61 62 63
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                    <el-button type="primary">点击查询</el-button>
                                </div>
                                <el-row style="margin-top: 15px">
                                    <el-col :span="23">
                                        <el-table
64
                                                :data="listDate"
65 66 67
                                                tooltip-effect="dark"
                                                style="border-radius: 10px 10px 0px 0px;line-height: 25px;"
                                                :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
68
                                            <el-table-column prop="fplt" label="计划离港">
69
                                            </el-table-column>
70 71 72 73
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
74
                                            </el-table-column>
75
                                            <el-table-column prop="carrier" label="航空公司">
76
                                            </el-table-column>
77
                                            <el-table-column prop="apcd" label="目的地">
78
                                            </el-table-column>
79
                                            <el-table-column prop="frlt" label="预计/实际离港">
80
                                            </el-table-column>
81
                                            <el-table-column prop="" label="状态">
82
                                            </el-table-column>
83
                                            <el-table-column prop="btsc" label="航站楼">
84 85 86 87 88 89 90 91
                                            </el-table-column>
                                        </el-table>
                                    </el-col>
                                </el-row>
                            </el-tab-pane>
                            <el-tab-pane label="国际/地区出港" name="second">
                                <div style=";margin-top: 15px">
                                    <el-time-picker
92
                                            v-model="filters.flightDate"
93 94 95 96 97
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
                                    <el-time-picker
                                            arrow-control
98
                                            v-model="filters.flightDate"
99 100 101
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
102
                                    <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px">
103 104 105 106 107 108 109
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
110
                                    <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px">
111 112 113 114 115 116 117 118 119 120 121 122
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                    <el-button type="primary">点击查询</el-button>
                                </div>
                                <el-row style="margin-top: 15px">
                                    <el-col :span="23">
                                        <el-table
123
                                                :data="listDate"
124
                                                style="width: 100%">
125
                                            <el-table-column prop="fplt" label="计划离港">
126
                                            </el-table-column>
127 128 129 130
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
131
                                            </el-table-column>
132
                                            <el-table-column prop="carrier" label="航空公司">
133
                                            </el-table-column>
134
                                            <el-table-column prop="apcd" label="目的地">
135
                                            </el-table-column>
136
                                            <el-table-column prop="frlt" label="预计/实际离港">
137
                                            </el-table-column>
138
                                            <el-table-column prop="" label="状态">
139
                                            </el-table-column>
140
                                            <el-table-column prop="btsc" label="航站楼">
141 142 143 144 145
                                            </el-table-column>
                                        </el-table>
                                    </el-col>
                                </el-row>
                            </el-tab-pane>
146
                            <el-tab-pane label="国内进港" name="third">
147
                                <div style=";margin-top: 15px">
148 149 150 151 152 153 154
                                    <el-time-select
                                            v-model="filters.flightDate"
                                            :picker-options="{
                                                start: '00:00',
                                                step: '01:00',
                                                end: '23:00'
                                              }"
155 156
                                            placeholder="任意时间点"
                                            style="width: 140px">
157
                                    </el-time-select>
158 159
                                    <el-time-picker
                                            arrow-control
160
                                            v-model="filters.flightDate"
161 162 163
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
164
                                    <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px">
165 166 167 168 169 170 171
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
172
                                    <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px">
173 174 175 176 177 178 179 180 181 182 183 184
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                    <el-button type="primary">点击查询</el-button>
                                </div>
                                <el-row style="margin-top: 15px">
                                    <el-col :span="23">
                                        <el-table
185
                                                :data="listDate"
186
                                                style="width: 100%">
187
                                            <el-table-column prop="fplt" label="计划离港">
188
                                            </el-table-column>
189 190 191 192
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
193
                                            </el-table-column>
194
                                            <el-table-column prop="carrier" label="航空公司">
195
                                            </el-table-column>
196
                                            <el-table-column prop="apcd" label="目的地">
197
                                            </el-table-column>
198
                                            <el-table-column prop="frlt" label="预计/实际离港">
199
                                            </el-table-column>
200
                                            <el-table-column prop="" label="状态">
201
                                            </el-table-column>
202
                                            <el-table-column prop="btsc" label="航站楼">
203 204 205 206 207
                                            </el-table-column>
                                        </el-table>
                                    </el-col>
                                </el-row>
                            </el-tab-pane>
208
                            <el-tab-pane label="国际/地区进港" name="fourth">
209 210
                                <div style=";margin-top: 15px">
                                    <el-time-picker
211
                                            v-model="filters.flightDate"
212 213 214 215 216
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
                                    <el-time-picker
                                            arrow-control
217
                                            v-model="filters.flightDate"
218 219 220
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
221
                                    <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px">
222 223 224 225 226 227 228
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
229
                                    <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px">
230 231 232 233 234 235 236 237 238 239 240 241
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
                                    <el-button type="primary">点击查询</el-button>
                                </div>
                                <el-row style="margin-top: 15px">
                                    <el-col :span="23">
                                        <el-table
242
                                                :data="listDate"
243
                                                style="width: 100%">
244
                                            <el-table-column prop="fplt" label="计划离港">
245
                                            </el-table-column>
246 247 248 249
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
250
                                            </el-table-column>
251
                                            <el-table-column prop="carrier" label="航空公司">
252
                                            </el-table-column>
253
                                            <el-table-column prop="apcd" label="目的地">
254
                                            </el-table-column>
255
                                            <el-table-column prop="frlt" label="预计/实际离港">
256
                                            </el-table-column>
257
                                            <el-table-column prop="" label="状态">
258
                                            </el-table-column>
259
                                            <el-table-column prop="btsc" label="航站楼">
260 261 262 263 264 265 266 267 268
                                            </el-table-column>
                                        </el-table>
                                    </el-col>
                                </el-row>
                            </el-tab-pane>
                        </el-tabs>
                    </el-row>
                    <el-row>
                        <div>
269 270
                            <el-pagination background layout="total, prev, pager, next" v-show="this.total>0" :total="total" :page.sync="this.pageSize" :limit.sync="this.pageSize"
                                           @pagination="getDomesticClearance()"/>
271 272 273 274 275 276 277 278 279
                        </div>
                    </el-row>
                </el-col>
            </el-row>
        </el-main>
    </el-container>
</template>

<script>
280
    import {portList, exportList, nternationaiiImportList, nternationaiiExportList} from '../../api/inquiry/inquiry'
281 282 283 284
    export default {
        data() {
            return {
                currentPage4: 4,
285 286
                activeName: 'first',
                filters: {
287 288 289 290
                    flightNo: '',
                    flightDate: '',
                    destination: '',
                    carrier: ''
291
                },
292 293
                options:[],
                listDate: [],
294 295
                total: 1,
                pageSize: 1,
296
                limitSize: 30,
297 298 299
            };
        },
        methods: {
300
            //获取列表集合
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
            getDomesticClearance(tab, event) {
                let label = tab.label;
                this.listLoading = true;
                if (label == '国内出港'){
                    exportList().then((res) =>{
                        this.total = res.data.total;
                        this.listDate = res.data.data.list;
                        this.listLoading = false;
                    }).catch((error) => {
                        this.listLoading = false;
                        if(null!= error.response && error.response!==undefined){
                            let status= error.response.status;
                            let msg = error.response.statusText;
                            alert(status+msg);
                        }else {
                            alert(error);
                        }
318
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
                    });
                }else if(label == '国际/地区出港'){
                    nternationaiiExportList().then((res) =>{
                        this.total = res.data.total;
                        this.listDate = res.data.data.list;
                        this.listLoading = false;
                    }).catch((error) => {
                        this.listLoading = false;
                        if(null!= error.response && error.response!==undefined){
                            let status= error.response.status;
                            let msg = error.response.statusText;
                            alert(status+msg);
                        }else {
                            alert(error);
                        }

                    });
                }else if(label == '国内进港'){
                    portList().then((res) =>{
                        this.total = res.data.total;
                        this.listDate = res.data.data.list;
                        this.listLoading = false;
                    }).catch((error) => {
                        this.listLoading = false;
                        if(null!= error.response && error.response!==undefined){
                            let status= error.response.status;
                            let msg = error.response.statusText;
                            alert(status+msg);
                        }else {
                            alert(error);
                        }

                    });
                }else if(label == '国际/地区进港'){
                    nternationaiiImportList().then((res) =>{
                        this.total = res.data.total;
                        this.listDate = res.data.data.list;
                        this.listLoading = false;
                    }).catch((error) => {
                        this.listLoading = false;
                        if(null!= error.response && error.response!==undefined){
                            let status= error.response.status;
                            let msg = error.response.statusText;
                            alert(status+msg);
                        }else {
                            alert(error);
                        }

                    });
                }
369 370
            }
        },
371 372 373
        mounted() {

        }
374 375 376 377 378 379 380 381 382 383 384 385 386

    }
</script>

<style scoped>
.input-with-select{
    width: 450px;
}
.el-row{
    margin-left: 10px;
    width: 98%;
    background-color: #FFFFFF;
}
387
</style>