作者 小范

运输工具测试

... ... @@ -39,6 +39,9 @@ export const editBill=params=>{return http.put(`${baseUrlBill}/editBill`, param
//航班申报
//新增方法
export const addFlight = params => { return http.post(`${baseUrlFlight}/addFlight`, params); };
//保存并发送
export const sendFlight = params => { return http.post(`${baseUrlFlight}/sendFlight`, params); };
//查询列表
export const selectFlight=params=>{return http.get(`${baseUrlFlight}/selectFlight`, params);};
//删除方法
... ... @@ -47,6 +50,9 @@ export const editFlight=params=>{return http.put(`${baseUrlFlight}/editFlight`,
//航班当日计划申报
//新增方法
export const addFlightPlan = params => { return http.post(`${baseUrlFlightPlan}/addFlightPlan`, params); };
//保存并发送
export const sendFlightPlan = params => { return http.post(`${baseUrlFlightPlan}/sendFlightPlan`, params); };
//查询列表
export const selectFlightPlan=params=>{return http.get(`${baseUrlFlightPlan}/selectFlightPlan`, params);};
//删除方法
... ... @@ -55,6 +61,8 @@ export const editFlightPlan=params=>{return http.put(`${baseUrlFlightPlan}/editF
//通用航空器申报
//新增方法
export const addAircraft = params => { return http.post(`${baseUrlAircraft}/addAircraft`, params); };
//保存并发送
export const sendAircraft = params => { return http.post(`${baseUrlAircraft}/sendAircraft`, params); };
//查询列表
export const selectAircraft=params=>{return http.get(`${baseUrlAircraft}/selectAircraft`, params);};
//删除方法
... ... @@ -63,6 +71,9 @@ export const editAircraft=params=>{return http.put(`${baseUrlAircraft}/editAircr
//航线航空器申报
//新增方法
export const addAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/addAirLineAircraft`, params); };
//保存并发送
export const sendAirLineAircraft = params => { return http.post(`${baseUrlAirLineAircraft}/sendAirLineAircraft`, params); };
//删除方法
export const editAirLineAircraft=params=>{return http.put(`${baseUrlAirLineAircraft}/editAirLineAircraft`, params);};
//查询列表
... ...
... ... @@ -200,21 +200,21 @@ let routes = [
// { path: '/group', component: Group, name: '集团管理'}
]
},
// {
// path: '/admin',
// component: Home,
// name: '系统设置',
// iconCls: 'el-icon-setting',//图标样式class
// children: [
// { path: '/user', component: User, name: '用户管理' },
// { path: '/role', component: Role, name: '组织机构' },
// { path: '/perm', component: Perm, name: '权限管理' },
// { path: '/log', component: LOG, name: '系统日志' },
// { path: '/department', component: Department, name: '部门管理' },
// { path: '/company', component: Company, name: '公司管理'},
// { path: '/group', component: Group, name: '集团管理'}
// ]
// },
{
path: '/admin',
component: Home,
name: '系统设置',
iconCls: 'el-icon-setting',//图标样式class
children: [
{ path: '/user', component: User, name: '用户管理' },
{ path: '/role', component: Role, name: '组织机构' },
{ path: '/perm', component: Perm, name: '权限管理' },
{ path: '/log', component: LOG, name: '系统日志' },
{ path: '/department', component: Department, name: '部门管理' },
{ path: '/company', component: Company, name: '公司管理'},
{ path: '/group', component: Group, name: '集团管理'}
]
},
// {
// path: '/guestService',
// component: Home,
... ...
... ... @@ -259,26 +259,26 @@
handleselect: function (a, b) {
this.reload()
},
//退出登录
// logout: function () {
// var _this = this;
// this.$confirm('确认退出吗?', '提示', {
// //type: 'warning'
// }).then(() => {
// sessionStorage.removeItem('user');
// sessionStorage.removeItem('menu');
// //退出后初始化原来的路由
// let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
// console.log(sysRoutes);
// _this.$router.options.routes = sysRoutes;
//
// _this.$router.push('/login');
// }).catch(() => {
//
// });
//
//
// },
// 退出登录
logout: function () {
var _this = this;
this.$confirm('确认退出吗?', '提示', {
//type: 'warning'
}).then(() => {
sessionStorage.removeItem('user');
sessionStorage.removeItem('menu');
//退出后初始化原来的路由
let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu'));
console.log(sysRoutes);
_this.$router.options.routes = sysRoutes;
_this.$router.push('/login');
}).catch(() => {
});
},
//折叠导航栏
collapse:function(){
this.collapsed=!this.collapsed;
... ...
... ... @@ -96,7 +96,7 @@
</el-row>
<el-row style="margin-left: 130px">
<el-col :span="24"> <el-button type="primary" @click="submitForm('aircraft')">保 存</el-button>
<el-button type="success">保存并发送</el-button></el-col>
<el-button type="success" @click="sendForm('aircraft')">保存并发送</el-button></el-col>
</el-row>
<!--对话提示框-->
<el-row>
... ... @@ -135,7 +135,7 @@
</style>
<script>
const fecha = require('fecha');
import {addAircraft} from "../../api/transport";
import {addAircraft, sendAircraft} from "../../api/transport";
export default {
data(){
return{
... ... @@ -234,6 +234,26 @@
}
});
},
//保存并发送
sendForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
sendAircraft(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$router.push({path:'/queryAircraft',query:{airwayCode:this.aircraft.airwayCode,aircraftNo:this.aircraft.aircraftNo}});
}else{
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
//加载默认值
defaultData(){
if(this.$route.query!=null){
... ... @@ -249,4 +269,4 @@
this.defaultData();
}
}
</script>
\ No newline at end of file
</script>
... ...
... ... @@ -160,7 +160,7 @@
</el-row>
<el-row style="margin-left: 120px">
<el-col :span="24"> <el-button type="primary" @click="submitForm('flight')">保 存</el-button>
<el-button type="success">保存并发送</el-button></el-col>
<el-button type="success" @click="sendForm('flight')">保存并发送</el-button></el-col>
</el-row>
<el-row>
<el-dialog title="航线信息" :visible.sync="dialogTableVisible" width="90%">
... ... @@ -275,7 +275,7 @@
.el-col{margin-right: 0px;}
</style>
<script>
import {addFlight, selectRoute} from "../../api/transport";
import {addFlight, selectRoute, sendFlight} from "../../api/transport";
const fecha = require('fecha');
import loginUserInfo from '../../api/base';
export default {
... ... @@ -439,6 +439,28 @@
}
});
},
//新增航班方法(保存并发送按钮)
sendForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
sendFlight(this.flight).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$router.push({path:'/queryFlights',query:{flightNo:this.flight.flightNo,flightDate:this.flight.flightDate}});
this.centerDialogVisible=false;
}else{
this.centerDialogVisible=true;
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
//分页方法
handleSizeChange(val) {
this.pageSize=val;
... ...
... ... @@ -90,7 +90,7 @@
</el-row>
<el-row style="margin-left: 120px">
<el-col :span="24"> <el-button type="primary" @click="submitForm('flight')">保 存</el-button>
<el-button type="success">保存并发送</el-button></el-col>
<el-button type="success" @click="sendForm('flight')">保存并发送</el-button></el-col>
</el-row>
<!--对话提示框-->
<el-row>
... ... @@ -143,7 +143,7 @@
</style>
<script>
const fecha = require('fecha');
import {addFlightPlan} from "../../api/transport";
import {addFlightPlan, sendFlightPlan} from "../../api/transport";
export default {
data(){
return{
... ... @@ -219,6 +219,26 @@
}
});
},
//保存并发送
sendForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
sendFlightPlan(this.flight).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$router.push({path:'/queryFlightplan',query:{flightNo:this.flight.flightNo,flightDate:this.flight.flightDate,aircraftNo:this.flight.aircraftNo}});
}else{
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
//加载默认值
defaultData(){
if(this.$route.query.uuid!=null){
... ...
... ... @@ -96,7 +96,7 @@
</el-row>
<el-row style="margin-left: 130px">
<el-col :span="24"> <el-button type="primary" @click="submitForm('aircraft')">保 存</el-button>
<el-button type="success">保存并发送</el-button></el-col>
<el-button type="success" @click="sendForm('aircraft')">保存并发送</el-button></el-col>
</el-row>
<!--对话提示框-->
<el-row>
... ... @@ -134,7 +134,7 @@
.el-col{margin-right: 0px;}
</style>
<script>
import {addAirLineAircraft} from "../../api/transport";
import {addAirLineAircraft, sendAirLineAircraft} from "../../api/transport";
export default {
data(){
... ... @@ -234,6 +234,26 @@
}
});
},
//保存并发送
sendForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
sendAirLineAircraft(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$router.push({path:'/queryRouteaircraft',query:{airwayCode:this.aircraft.airwayCode,aircraftNo:this.aircraft.aircraftNo},});
}else{
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
//加载默认值
defaultData(){
if(this.$route.query!=null){
... ...
... ... @@ -19,6 +19,7 @@
<el-table :data="tableList" highlight-current-row v-loading="listLoading" @selection-change="selsChange"
tooltip-effect="dark"
style="border-radius: 10px 10px 0px 0px;line-height: 25px;"
height="600px"
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
row-key="permissionId"
border
... ...
... ... @@ -20,6 +20,7 @@
default-expand-all
row-key="roleId"
border
height="600px"
tooltip-effect="dark"
style="border-radius: 10px 10px 0px 0px;line-height: 25px;"
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
... ...