...
|
...
|
@@ -7,20 +7,19 @@ |
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-form :label-position="labelPosition" :model="queryRoute" :rules="rules" ref="queryRoute" label-width="130px" class="demo-ruleForm">
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="航线序号" prop="seqNo" label-width="70px">
|
|
|
<el-input v-model="queryRoute.seqNo"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-input v-model="serialNo" placeholder="请输入航线序号"></el-input>
|
|
|
</el-col>
|
|
|
<el-col :span="3"> <el-button type="primary" @click="submitForm('queryRoute')">保 存</el-button></el-col>
|
|
|
</el-form>
|
|
|
<el-col :span="3"> <el-button type="primary" @click="submitForm()">查 询</el-button></el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
<template>
|
|
|
<el-table
|
|
|
:data="tableData"
|
|
|
border
|
|
|
style="width: 100%;margin-bottom: 10px">
|
|
|
v-loading="tableloading"
|
|
|
style="width:100%;margin-bottom: 10px">
|
|
|
<el-table-column
|
|
|
fixed="left"
|
|
|
label="操作"
|
...
|
...
|
@@ -29,7 +28,7 @@ |
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@click="handleEdit(scope.$index, scope.row)">选择</el-button>
|
|
|
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
...
|
...
|
@@ -93,18 +92,23 @@ |
|
|
width="150">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
fixed
|
|
|
prop="remark"
|
|
|
label="报文操作"
|
|
|
width="150">
|
|
|
width="250">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@click="handleEdit(scope.$index, scope.row)">选择</el-button>
|
|
|
@click="handleDetail(scope.$index, scope.row)">查看明细</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="primary"
|
|
|
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</template>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<div class="block">
|
...
|
...
|
@@ -112,10 +116,10 @@ |
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="currentPage"
|
|
|
:page-sizes="[100, 200, 300, 400]"
|
|
|
:page-size="100"
|
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
|
:page-size="pageSize"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="400">
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</el-row>
|
...
|
...
|
@@ -140,27 +144,86 @@ |
|
|
}
|
|
|
</style>
|
|
|
<script>
|
|
|
import {editRoute, selectRoute} from "../../api/transport";
|
|
|
|
|
|
export default {
|
|
|
data(){
|
|
|
return{
|
|
|
queryRoute:{
|
|
|
seqNo:undefined
|
|
|
},
|
|
|
|
|
|
rules:{},
|
|
|
serialNo:undefined,
|
|
|
labelPosition:'left',
|
|
|
currentPage: 4,
|
|
|
tableData:[]
|
|
|
|
|
|
currentPage: 1,
|
|
|
pageSize:10,
|
|
|
total:0,
|
|
|
tableData:[],
|
|
|
tableloading:false
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
//分页方法
|
|
|
handleSizeChange(val) {
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
this.pageSize=val;
|
|
|
},
|
|
|
handleCurrentChange(val) {
|
|
|
console.log(`当前页: ${val}`);
|
|
|
this.currentPage=val;
|
|
|
},
|
|
|
//获取航线列表
|
|
|
submitForm(){
|
|
|
let params={currentPage:this.currentPage,pageSize:this.pageSize,serialNo:this.serialNo};
|
|
|
this.tableloading=true;
|
|
|
selectRoute(params).then(res=>{
|
|
|
let response=res.data.data;
|
|
|
this.tableData=response.list;
|
|
|
this.tableloading=false;
|
|
|
this.total=response.total;
|
|
|
});
|
|
|
|
|
|
},
|
|
|
//编辑航线功能
|
|
|
handleEdit(index,row){
|
|
|
this.$router.push({path:'/route',query:{uuid:JSON.stringify(row.uuid),serialNo:JSON.stringify(row.serialNo),departurePort:JSON.stringify(row.departurePort),
|
|
|
arrivalPort:JSON.stringify(row.arrivalPort),departureCustomNo:JSON.stringify(row.departureCustomNo),arrivalCustomNo:JSON.stringify(row.arrivalCustomNo),
|
|
|
cancelFlag:JSON.stringify(row.cancelFlag),meno:JSON.stringify(row.meno),planno:JSON.stringify(row.planno),std:JSON.stringify(row.std),
|
|
|
sta:JSON.stringify(row.sta),effStartdate:JSON.stringify(row.effStartdate),effEnddate:JSON.stringify(row.effEnddate),plan:JSON.stringify(row.plan),
|
|
|
remark:JSON.stringify(row.remark),createTime:JSON.stringify(row.createTime),createBy:JSON.stringify(row.createBy),updateTime:JSON.stringify(row.updateTime),
|
|
|
updateBy:JSON.stringify(row.updateBy),isDelete:JSON.stringify(row.isDelete)}})
|
|
|
},
|
|
|
//获取默认值
|
|
|
defaultData(){
|
|
|
this.serialNo=JSON.parse(this.$route.query.serialNo);
|
|
|
},
|
|
|
//列表删除功能
|
|
|
handleDelete(index,row){
|
|
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
editRoute(row).then(res=>{
|
|
|
let response=res.data;
|
|
|
if(response.code=='200'){
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '删除成功'
|
|
|
});
|
|
|
this.submitForm();
|
|
|
}else{
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '删除失败'
|
|
|
}); }
|
|
|
});
|
|
|
}).catch(() => {
|
|
|
this.$message({
|
|
|
type: 'info',
|
|
|
message: '已取消删除'
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
//渲染方法
|
|
|
mounted(){
|
|
|
this.defaultData();
|
|
|
this.submitForm();
|
|
|
}
|
|
|
}
|
|
|
</script> |
...
|
...
|
|