|
@@ -7,20 +7,19 @@ |
|
@@ -7,20 +7,19 @@ |
7
|
</el-col>
|
7
|
</el-col>
|
8
|
</el-row>
|
8
|
</el-row>
|
9
|
<el-row>
|
9
|
<el-row>
|
10
|
- <el-form :label-position="labelPosition" :model="queryRoute" :rules="rules" ref="queryRoute" label-width="130px" class="demo-ruleForm">
|
|
|
11
|
<el-col :span="6">
|
10
|
<el-col :span="6">
|
12
|
- <el-form-item label="航线序号" prop="seqNo" label-width="70px">
|
|
|
13
|
- <el-input v-model="queryRoute.seqNo"></el-input>
|
|
|
14
|
- </el-form-item>
|
11
|
+ <el-input v-model="serialNo" placeholder="请输入航线序号"></el-input>
|
15
|
</el-col>
|
12
|
</el-col>
|
16
|
- <el-col :span="3"> <el-button type="primary" @click="submitForm('queryRoute')">保 存</el-button></el-col>
|
|
|
17
|
- </el-form>
|
13
|
+ <el-col :span="3"> <el-button type="primary" @click="submitForm()">查 询</el-button></el-col>
|
18
|
</el-row>
|
14
|
</el-row>
|
19
|
<el-row>
|
15
|
<el-row>
|
|
|
16
|
+ <el-col :span="24">
|
|
|
17
|
+ <template>
|
20
|
<el-table
|
18
|
<el-table
|
21
|
:data="tableData"
|
19
|
:data="tableData"
|
22
|
border
|
20
|
border
|
23
|
- style="width: 100%;margin-bottom: 10px">
|
21
|
+ v-loading="tableloading"
|
|
|
22
|
+ style="width:100%;margin-bottom: 10px">
|
24
|
<el-table-column
|
23
|
<el-table-column
|
25
|
fixed="left"
|
24
|
fixed="left"
|
26
|
label="操作"
|
25
|
label="操作"
|
|
@@ -29,7 +28,7 @@ |
|
@@ -29,7 +28,7 @@ |
29
|
<el-button
|
28
|
<el-button
|
30
|
size="mini"
|
29
|
size="mini"
|
31
|
type="primary"
|
30
|
type="primary"
|
32
|
- @click="handleEdit(scope.$index, scope.row)">选择</el-button>
|
31
|
+ @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
33
|
</template>
|
32
|
</template>
|
34
|
</el-table-column>
|
33
|
</el-table-column>
|
35
|
<el-table-column
|
34
|
<el-table-column
|
|
@@ -93,18 +92,23 @@ |
|
@@ -93,18 +92,23 @@ |
93
|
width="150">
|
92
|
width="150">
|
94
|
</el-table-column>
|
93
|
</el-table-column>
|
95
|
<el-table-column
|
94
|
<el-table-column
|
96
|
- fixed
|
|
|
97
|
prop="remark"
|
95
|
prop="remark"
|
98
|
label="报文操作"
|
96
|
label="报文操作"
|
99
|
- width="150">
|
97
|
+ width="250">
|
100
|
<template slot-scope="scope">
|
98
|
<template slot-scope="scope">
|
101
|
<el-button
|
99
|
<el-button
|
102
|
size="mini"
|
100
|
size="mini"
|
103
|
type="primary"
|
101
|
type="primary"
|
104
|
- @click="handleEdit(scope.$index, scope.row)">选择</el-button>
|
102
|
+ @click="handleDetail(scope.$index, scope.row)">查看明细</el-button>
|
|
|
103
|
+ <el-button
|
|
|
104
|
+ size="mini"
|
|
|
105
|
+ type="primary"
|
|
|
106
|
+ @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
105
|
</template>
|
107
|
</template>
|
106
|
</el-table-column>
|
108
|
</el-table-column>
|
107
|
</el-table>
|
109
|
</el-table>
|
|
|
110
|
+ </template>
|
|
|
111
|
+ </el-col>
|
108
|
</el-row>
|
112
|
</el-row>
|
109
|
<el-row>
|
113
|
<el-row>
|
110
|
<div class="block">
|
114
|
<div class="block">
|
|
@@ -112,10 +116,10 @@ |
|
@@ -112,10 +116,10 @@ |
112
|
@size-change="handleSizeChange"
|
116
|
@size-change="handleSizeChange"
|
113
|
@current-change="handleCurrentChange"
|
117
|
@current-change="handleCurrentChange"
|
114
|
:current-page="currentPage"
|
118
|
:current-page="currentPage"
|
115
|
- :page-sizes="[100, 200, 300, 400]"
|
|
|
116
|
- :page-size="100"
|
119
|
+ :page-sizes="[10, 20, 30, 40]"
|
|
|
120
|
+ :page-size="pageSize"
|
117
|
layout="total, sizes, prev, pager, next, jumper"
|
121
|
layout="total, sizes, prev, pager, next, jumper"
|
118
|
- :total="400">
|
122
|
+ :total="total">
|
119
|
</el-pagination>
|
123
|
</el-pagination>
|
120
|
</div>
|
124
|
</div>
|
121
|
</el-row>
|
125
|
</el-row>
|
|
@@ -140,27 +144,86 @@ |
|
@@ -140,27 +144,86 @@ |
140
|
}
|
144
|
}
|
141
|
</style>
|
145
|
</style>
|
142
|
<script>
|
146
|
<script>
|
|
|
147
|
+ import {editRoute, selectRoute} from "../../api/transport";
|
|
|
148
|
+
|
143
|
export default {
|
149
|
export default {
|
144
|
data(){
|
150
|
data(){
|
145
|
return{
|
151
|
return{
|
146
|
- queryRoute:{
|
|
|
147
|
- seqNo:undefined
|
|
|
148
|
- },
|
|
|
149
|
-
|
|
|
150
|
- rules:{},
|
152
|
+ serialNo:undefined,
|
151
|
labelPosition:'left',
|
153
|
labelPosition:'left',
|
152
|
- currentPage: 4,
|
|
|
153
|
- tableData:[]
|
|
|
154
|
-
|
154
|
+ currentPage: 1,
|
|
|
155
|
+ pageSize:10,
|
|
|
156
|
+ total:0,
|
|
|
157
|
+ tableData:[],
|
|
|
158
|
+ tableloading:false
|
155
|
}
|
159
|
}
|
156
|
},
|
160
|
},
|
157
|
methods: {
|
161
|
methods: {
|
|
|
162
|
+ //分页方法
|
158
|
handleSizeChange(val) {
|
163
|
handleSizeChange(val) {
|
159
|
- console.log(`每页 ${val} 条`);
|
164
|
+ this.pageSize=val;
|
160
|
},
|
165
|
},
|
161
|
handleCurrentChange(val) {
|
166
|
handleCurrentChange(val) {
|
162
|
- console.log(`当前页: ${val}`);
|
167
|
+ this.currentPage=val;
|
|
|
168
|
+ },
|
|
|
169
|
+ //获取航线列表
|
|
|
170
|
+ submitForm(){
|
|
|
171
|
+ let params={currentPage:this.currentPage,pageSize:this.pageSize,serialNo:this.serialNo};
|
|
|
172
|
+ this.tableloading=true;
|
|
|
173
|
+ selectRoute(params).then(res=>{
|
|
|
174
|
+ let response=res.data.data;
|
|
|
175
|
+ this.tableData=response.list;
|
|
|
176
|
+ this.tableloading=false;
|
|
|
177
|
+ this.total=response.total;
|
|
|
178
|
+ });
|
|
|
179
|
+
|
|
|
180
|
+ },
|
|
|
181
|
+ //编辑航线功能
|
|
|
182
|
+ handleEdit(index,row){
|
|
|
183
|
+ this.$router.push({path:'/route',query:{uuid:JSON.stringify(row.uuid),serialNo:JSON.stringify(row.serialNo),departurePort:JSON.stringify(row.departurePort),
|
|
|
184
|
+ arrivalPort:JSON.stringify(row.arrivalPort),departureCustomNo:JSON.stringify(row.departureCustomNo),arrivalCustomNo:JSON.stringify(row.arrivalCustomNo),
|
|
|
185
|
+ cancelFlag:JSON.stringify(row.cancelFlag),meno:JSON.stringify(row.meno),planno:JSON.stringify(row.planno),std:JSON.stringify(row.std),
|
|
|
186
|
+ sta:JSON.stringify(row.sta),effStartdate:JSON.stringify(row.effStartdate),effEnddate:JSON.stringify(row.effEnddate),plan:JSON.stringify(row.plan),
|
|
|
187
|
+ remark:JSON.stringify(row.remark),createTime:JSON.stringify(row.createTime),createBy:JSON.stringify(row.createBy),updateTime:JSON.stringify(row.updateTime),
|
|
|
188
|
+ updateBy:JSON.stringify(row.updateBy),isDelete:JSON.stringify(row.isDelete)}})
|
|
|
189
|
+ },
|
|
|
190
|
+ //获取默认值
|
|
|
191
|
+ defaultData(){
|
|
|
192
|
+ this.serialNo=JSON.parse(this.$route.query.serialNo);
|
|
|
193
|
+ },
|
|
|
194
|
+ //列表删除功能
|
|
|
195
|
+ handleDelete(index,row){
|
|
|
196
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
197
|
+ confirmButtonText: '确定',
|
|
|
198
|
+ cancelButtonText: '取消',
|
|
|
199
|
+ type: 'warning'
|
|
|
200
|
+ }).then(() => {
|
|
|
201
|
+ editRoute(row).then(res=>{
|
|
|
202
|
+ let response=res.data;
|
|
|
203
|
+ if(response.code=='200'){
|
|
|
204
|
+ this.$message({
|
|
|
205
|
+ type: 'info',
|
|
|
206
|
+ message: '删除成功'
|
|
|
207
|
+ });
|
|
|
208
|
+ this.submitForm();
|
|
|
209
|
+ }else{
|
|
|
210
|
+ this.$message({
|
|
|
211
|
+ type: 'info',
|
|
|
212
|
+ message: '删除失败'
|
|
|
213
|
+ }); }
|
|
|
214
|
+ });
|
|
|
215
|
+ }).catch(() => {
|
|
|
216
|
+ this.$message({
|
|
|
217
|
+ type: 'info',
|
|
|
218
|
+ message: '已取消删除'
|
|
|
219
|
+ });
|
|
|
220
|
+ });
|
163
|
}
|
221
|
}
|
164
|
},
|
222
|
},
|
|
|
223
|
+ //渲染方法
|
|
|
224
|
+ mounted(){
|
|
|
225
|
+ this.defaultData();
|
|
|
226
|
+ this.submitForm();
|
|
|
227
|
+ }
|
165
|
}
|
228
|
}
|
166
|
</script> |
229
|
</script> |