Showing
5 changed files
with
112 additions
and
23 deletions
| ... | @@ -54,3 +54,11 @@ export function subCategoryData(){ | ... | @@ -54,3 +54,11 @@ export function subCategoryData(){ |
| 54 | method: 'post' | 54 | method: 'post' |
| 55 | }) | 55 | }) |
| 56 | } | 56 | } |
| 57 | + | ||
| 58 | +//获取全部字典 | ||
| 59 | +export function allDictData(){ | ||
| 60 | + return request({ | ||
| 61 | + url: '/destinationFlight/allDictData', | ||
| 62 | + method: 'post' | ||
| 63 | + }) | ||
| 64 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -81,17 +81,17 @@ export const constantRoutes = [ | ... | @@ -81,17 +81,17 @@ export const constantRoutes = [ |
| 81 | ] | 81 | ] |
| 82 | }, | 82 | }, |
| 83 | { | 83 | { |
| 84 | - path: '/destinationFlight', | 84 | + path: '/', |
| 85 | component: Layout, | 85 | component: Layout, |
| 86 | hidden: true, | 86 | hidden: true, |
| 87 | redirect: 'noredirect', | 87 | redirect: 'noredirect', |
| 88 | children: [ | 88 | children: [ |
| 89 | { | 89 | { |
| 90 | - path: '/destinationFlight/:handle/:id', | 90 | + path: '/flightAllocConfig/:handle/:id', |
| 91 | - component: (resolve) => require(['@/views/system/destinationFlight/info'], resolve), | 91 | + component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve), |
| 92 | name: 'info', | 92 | name: 'info', |
| 93 | meta: { title: '目的航班信息', icon: 'user' } | 93 | meta: { title: '目的航班信息', icon: 'user' } |
| 94 | - }, | 94 | + } |
| 95 | ] | 95 | ] |
| 96 | } | 96 | } |
| 97 | ] | 97 | ] | ... | ... |
| 1 | +<template> | ||
| 2 | +<div style="margin:40px" class="app-container"> | ||
| 3 | + <el-form :inline="true" :model="queryParams" class="demo-form-inline" size="small"> | ||
| 4 | + <el-form-item label="航班号"> | ||
| 5 | + <el-input v-model="queryParams.purposeOfFlightNo" placeholder="航班号"></el-input> | ||
| 6 | + </el-form-item> | ||
| 7 | + <el-form-item> | ||
| 8 | + <el-button type="primary" icon="el-icon-search" @click="getList" size="mini">查询</el-button> | ||
| 9 | + </el-form-item> | ||
| 10 | + </el-form> | ||
| 11 | + <el-button style="margin-bottom:20px" type="primary" icon="el-icon-plus" size="mini">添加</el-button> | ||
| 12 | + <el-table | ||
| 13 | + :data="flyList" | ||
| 14 | + style="width: 800px" | ||
| 15 | + v-loading="loading" size="small" | ||
| 16 | + > | ||
| 17 | + <el-table-column prop="purposeOfFlightNo" label="航班号" align="center"></el-table-column> | ||
| 18 | + <el-table-column label="操作" prop="id" align="center"> | ||
| 19 | + <template slot-scope="scope" > | ||
| 20 | + <el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看</el-button> | ||
| 21 | + <el-button type="text" size="mini" icon="el-icon-edit" @click="handleClick(scope.row.id, 'update')">修改</el-button> | ||
| 22 | + <el-button type="text" size="mini" icon="el-icon-delete">删除</el-button> | ||
| 23 | + <el-button type="text" size="mini" icon="el-icon-video-play">启用</el-button> | ||
| 24 | + <el-button type="text" size="mini" icon="el-icon-video-pause">停用</el-button> | ||
| 25 | + </template> | ||
| 26 | + </el-table-column> | ||
| 27 | + </el-table> | ||
| 28 | + <el-pagination | ||
| 29 | + @size-change="getList" | ||
| 30 | + @current-change="getList" | ||
| 31 | + :current-page.sync="curPage" | ||
| 32 | + :page-sizes="[10, 20, 30, 40]" | ||
| 33 | + :page-size.sync="limit" | ||
| 34 | + layout="prev, pager, next, jumper, sizes, total" | ||
| 35 | + :total="total" | ||
| 36 | + background | ||
| 37 | + :hide-on-single-page="true" | ||
| 38 | + style="margin-top:40px; text-align:right"> | ||
| 39 | + </el-pagination> | ||
| 40 | +</div> | ||
| 41 | +</template> | ||
| 42 | + | ||
| 43 | +<script> | ||
| 44 | + import { | ||
| 45 | + findFlightNo | ||
| 46 | + } from "@/api/destinationFlight"; | ||
| 47 | + | ||
| 48 | + export default { | ||
| 49 | + data() { | ||
| 50 | + return { | ||
| 51 | + queryParams: { | ||
| 52 | + purposeOfFlightNo: '', | ||
| 53 | + start:0, | ||
| 54 | + limit:10 | ||
| 55 | + }, | ||
| 56 | + flyList:[], | ||
| 57 | + curPage:1, | ||
| 58 | + limit:10, | ||
| 59 | + total:0, | ||
| 60 | + loading:false, | ||
| 61 | + } | ||
| 62 | + }, | ||
| 63 | + methods: { | ||
| 64 | + getList(){ | ||
| 65 | + this.queryParams.limit = this.limit; | ||
| 66 | + if (this.curPage > 1) { | ||
| 67 | + this.queryParams.start = (this.curPage - 1) * this.queryParams.limit | ||
| 68 | + }else { | ||
| 69 | + this.queryParams.start = 0; | ||
| 70 | + } | ||
| 71 | + this.loading = true; | ||
| 72 | + findFlightNo(this.queryParams).then(response => { | ||
| 73 | + this.flyList = response.data.list; | ||
| 74 | + this.total = response.data.totalCount; | ||
| 75 | + this.loading = false; | ||
| 76 | + }); | ||
| 77 | + }, | ||
| 78 | + //跳转到查看,修改页面 | ||
| 79 | + handleClick(flightiId, handle){ | ||
| 80 | + this.$router.push({ name: 'info', params: { handle: handle, id:flightiId }}); | ||
| 81 | + }, | ||
| 82 | + //删除,启用,停用 | ||
| 83 | + changeStatus(id, handle){ | ||
| 84 | + | ||
| 85 | + } | ||
| 86 | + }, | ||
| 87 | + created() { | ||
| 88 | + this.getList(); | ||
| 89 | + } | ||
| 90 | + } | ||
| 91 | +</script> | ||
| 92 | + | ||
| 93 | + |
| ... | @@ -108,7 +108,7 @@ | ... | @@ -108,7 +108,7 @@ |
| 108 | </template> | 108 | </template> |
| 109 | 109 | ||
| 110 | <script> | 110 | <script> |
| 111 | -import { findByFlightId, cargoTypeData, cargoStatusData, serviceCodeData, subCategoryData } from "@/api/destinationFlight"; | 111 | +import { findByFlightId, cargoTypeData, cargoStatusData, serviceCodeData, subCategoryData, allDictData } from "@/api/destinationFlight"; |
| 112 | 112 | ||
| 113 | export default { | 113 | export default { |
| 114 | data() { | 114 | data() { |
| ... | @@ -142,24 +142,12 @@ export default { | ... | @@ -142,24 +142,12 @@ export default { |
| 142 | this.disable = true; | 142 | this.disable = true; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | - //申报类别 | 145 | + allDictData().then((response) => { |
| 146 | - cargoTypeData().then((response) => { | 146 | + let dict = response.data; |
| 147 | - this.cargoType = response.data; | 147 | + this.cargoType = dict.cargoType; |
| 148 | - }) | 148 | + this.cargoStatus = dict.cargoStatus; |
| 149 | - | 149 | + this.serviceCode = dict.serviceCode; |
| 150 | - //货物类型 | 150 | + this.subCategory = dict.subCategory; |
| 151 | - cargoStatusData().then((response) => { | ||
| 152 | - this.cargoStatus = response.data; | ||
| 153 | - }) | ||
| 154 | - | ||
| 155 | - //service code | ||
| 156 | - serviceCodeData().then((response) => { | ||
| 157 | - this.serviceCode = response.data; | ||
| 158 | - }) | ||
| 159 | - | ||
| 160 | - //subCategory | ||
| 161 | - subCategoryData().then((response) => { | ||
| 162 | - this.subCategory = response.data; | ||
| 163 | }) | 151 | }) |
| 164 | 152 | ||
| 165 | 153 | ... | ... |
File mode changed
-
Please register or login to post a comment