审查视图

src/views/nav4/inquiry.vue 21.1 KB
1 2 3 4 5 6 7 8 9 10
<template>
    <el-container>
        <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
                                                style="width: 100%">
66
                                            <el-table-column prop="fplt" label="计划离港">
67
                                            </el-table-column>
68 69 70 71
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
72
                                            </el-table-column>
73
                                            <el-table-column prop="carrier" label="航空公司">
74
                                            </el-table-column>
75
                                            <el-table-column prop="apcd" label="目的地">
76
                                            </el-table-column>
77
                                            <el-table-column prop="frlt" label="预计/实际离港">
78
                                            </el-table-column>
79
                                            <el-table-column prop="" label="状态">
80
                                            </el-table-column>
81
                                            <el-table-column prop="btsc" label="航站楼">
82 83 84 85 86 87 88 89
                                            </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
90
                                            v-model="filters.flightDate"
91 92 93 94 95
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
                                    <el-time-picker
                                            arrow-control
96
                                            v-model="filters.flightDate"
97 98 99
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
100
                                    <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px">
101 102 103 104 105 106 107
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
108
                                    <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px">
109 110 111 112 113 114 115 116 117 118 119 120
                                        <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
121
                                                :data="listDate"
122
                                                style="width: 100%">
123
                                            <el-table-column prop="fplt" label="计划离港">
124
                                            </el-table-column>
125 126 127 128
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
129
                                            </el-table-column>
130
                                            <el-table-column prop="carrier" label="航空公司">
131
                                            </el-table-column>
132
                                            <el-table-column prop="apcd" label="目的地">
133
                                            </el-table-column>
134
                                            <el-table-column prop="frlt" label="预计/实际离港">
135
                                            </el-table-column>
136
                                            <el-table-column prop="" label="状态">
137
                                            </el-table-column>
138
                                            <el-table-column prop="btsc" label="航站楼">
139 140 141 142 143
                                            </el-table-column>
                                        </el-table>
                                    </el-col>
                                </el-row>
                            </el-tab-pane>
144
                            <el-tab-pane label="国内进港" name="third">
145
                                <div style=";margin-top: 15px">
146 147 148 149 150 151 152
                                    <el-time-select
                                            v-model="filters.flightDate"
                                            :picker-options="{
                                                start: '00:00',
                                                step: '01:00',
                                                end: '23:00'
                                              }"
153 154
                                            placeholder="任意时间点"
                                            style="width: 140px">
155
                                    </el-time-select>
156 157
                                    <el-time-picker
                                            arrow-control
158
                                            v-model="filters.flightDate"
159 160 161
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
162
                                    <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px">
163 164 165 166 167 168 169
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
170
                                    <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px">
171 172 173 174 175 176 177 178 179 180 181 182
                                        <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
183
                                                :data="listDate"
184
                                                style="width: 100%">
185
                                            <el-table-column prop="fplt" label="计划离港">
186
                                            </el-table-column>
187 188 189 190
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
191
                                            </el-table-column>
192
                                            <el-table-column prop="carrier" label="航空公司">
193
                                            </el-table-column>
194
                                            <el-table-column prop="apcd" label="目的地">
195
                                            </el-table-column>
196
                                            <el-table-column prop="frlt" label="预计/实际离港">
197
                                            </el-table-column>
198
                                            <el-table-column prop="" label="状态">
199
                                            </el-table-column>
200
                                            <el-table-column prop="btsc" label="航站楼">
201 202 203 204 205
                                            </el-table-column>
                                        </el-table>
                                    </el-col>
                                </el-row>
                            </el-tab-pane>
206
                            <el-tab-pane label="国际/地区进港" name="fourth">
207 208
                                <div style=";margin-top: 15px">
                                    <el-time-picker
209
                                            v-model="filters.flightDate"
210 211 212 213 214
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
                                    <el-time-picker
                                            arrow-control
215
                                            v-model="filters.flightDate"
216 217 218
                                            placeholder="任意时间点"
                                            style="width: 140px">
                                    </el-time-picker>
219
                                    <el-select v-model="filters.destination" placeholder="目的地" style="width: 140px">
220 221 222 223 224 225 226
                                        <el-option
                                                v-for="item in options"
                                                :key="item.value"
                                                :label="item.label"
                                                :value="item.value">
                                        </el-option>
                                    </el-select>
227
                                    <el-select v-model="filters.carrier" placeholder="航空公司" style="width: 140px">
228 229 230 231 232 233 234 235 236 237 238 239
                                        <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
240
                                                :data="listDate"
241
                                                style="width: 100%">
242
                                            <el-table-column prop="fplt" label="计划离港">
243
                                            </el-table-column>
244 245 246 247
                                            <el-table-column label="航班号">
                                                <template slot-scope="scope">
                                                    {{scope.row.carrier}}{{scope.row.flightno}}
                                                </template>
248
                                            </el-table-column>
249
                                            <el-table-column prop="carrier" label="航空公司">
250
                                            </el-table-column>
251
                                            <el-table-column prop="apcd" label="目的地">
252
                                            </el-table-column>
253
                                            <el-table-column prop="frlt" label="预计/实际离港">
254
                                            </el-table-column>
255
                                            <el-table-column prop="" label="状态">
256
                                            </el-table-column>
257
                                            <el-table-column prop="btsc" label="航站楼">
258 259 260 261 262 263 264 265 266
                                            </el-table-column>
                                        </el-table>
                                    </el-col>
                                </el-row>
                            </el-tab-pane>
                        </el-tabs>
                    </el-row>
                    <el-row>
                        <div>
267 268
                            <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()"/>
269 270 271 272 273 274 275 276 277
                        </div>
                    </el-row>
                </el-col>
            </el-row>
        </el-main>
    </el-container>
</template>

<script>
278
    import {portList, exportList, nternationaiiImportList, nternationaiiExportList} from '../../api/inquiry/inquiry'
279 280 281 282
    export default {
        data() {
            return {
                currentPage4: 4,
283 284
                activeName: 'first',
                filters: {
285 286 287 288
                    flightNo: '',
                    flightDate: '',
                    destination: '',
                    carrier: ''
289
                },
290 291
                options:[],
                listDate: [],
292 293
                total: 1,
                pageSize: 1,
294
                limitSize: 30,
295 296 297
            };
        },
        methods: {
298
            //获取列表集合
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315
            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);
                        }
316
317 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
                    });
                }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);
                        }

                    });
                }
367 368
            }
        },
369 370 371
        mounted() {

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

    }
</script>

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