shanyunduo.cheng

加入导航栏

......@@ -53,4 +53,12 @@ export function subCategoryData(){
url: '/destinationFlight/subCategoryData',
method: 'post'
})
}
//获取全部字典
export function allDictData(){
return request({
url: '/destinationFlight/allDictData',
method: 'post'
})
}
\ No newline at end of file
......
......@@ -81,17 +81,17 @@ export const constantRoutes = [
]
},
{
path: '/destinationFlight',
path: '/',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: '/destinationFlight/:handle/:id',
component: (resolve) => require(['@/views/system/destinationFlight/info'], resolve),
path: '/flightAllocConfig/:handle/:id',
component: (resolve) => require(['@/views/allocationConfig/flightAllocConfig/info'], resolve),
name: 'info',
meta: { title: '目的航班信息', icon: 'user' }
},
}
]
}
]
......
<template>
<div style="margin:40px" class="app-container">
<el-form :inline="true" :model="queryParams" class="demo-form-inline" size="small">
<el-form-item label="航班号">
<el-input v-model="queryParams.purposeOfFlightNo" placeholder="航班号"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="getList" size="mini">查询</el-button>
</el-form-item>
</el-form>
<el-button style="margin-bottom:20px" type="primary" icon="el-icon-plus" size="mini">添加</el-button>
<el-table
:data="flyList"
style="width: 800px"
v-loading="loading" size="small"
>
<el-table-column prop="purposeOfFlightNo" label="航班号" align="center"></el-table-column>
<el-table-column label="操作" prop="id" align="center">
<template slot-scope="scope" >
<el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看</el-button>
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleClick(scope.row.id, 'update')">修改</el-button>
<el-button type="text" size="mini" icon="el-icon-delete">删除</el-button>
<el-button type="text" size="mini" icon="el-icon-video-play">启用</el-button>
<el-button type="text" size="mini" icon="el-icon-video-pause">停用</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="getList"
@current-change="getList"
:current-page.sync="curPage"
:page-sizes="[10, 20, 30, 40]"
:page-size.sync="limit"
layout="prev, pager, next, jumper, sizes, total"
:total="total"
background
:hide-on-single-page="true"
style="margin-top:40px; text-align:right">
</el-pagination>
</div>
</template>
<script>
import {
findFlightNo
} from "@/api/destinationFlight";
export default {
data() {
return {
queryParams: {
purposeOfFlightNo: '',
start:0,
limit:10
},
flyList:[],
curPage:1,
limit:10,
total:0,
loading:false,
}
},
methods: {
getList(){
this.queryParams.limit = this.limit;
if (this.curPage > 1) {
this.queryParams.start = (this.curPage - 1) * this.queryParams.limit
}else {
this.queryParams.start = 0;
}
this.loading = true;
findFlightNo(this.queryParams).then(response => {
this.flyList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
});
},
//跳转到查看,修改页面
handleClick(flightiId, handle){
this.$router.push({ name: 'info', params: { handle: handle, id:flightiId }});
},
//删除,启用,停用
changeStatus(id, handle){
}
},
created() {
this.getList();
}
}
</script>
......@@ -108,7 +108,7 @@
</template>
<script>
import { findByFlightId, cargoTypeData, cargoStatusData, serviceCodeData, subCategoryData } from "@/api/destinationFlight";
import { findByFlightId, cargoTypeData, cargoStatusData, serviceCodeData, subCategoryData, allDictData } from "@/api/destinationFlight";
export default {
data() {
......@@ -142,24 +142,12 @@ export default {
this.disable = true;
}
//申报类别
cargoTypeData().then((response) => {
this.cargoType = response.data;
})
//货物类型
cargoStatusData().then((response) => {
this.cargoStatus = response.data;
})
//service code
serviceCodeData().then((response) => {
this.serviceCode = response.data;
})
//subCategory
subCategoryData().then((response) => {
this.subCategory = response.data;
allDictData().then((response) => {
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode;
this.subCategory = dict.subCategory;
})
......