shanyunduo.cheng

样式

...@@ -87,17 +87,11 @@ export const constantRoutes = [ ...@@ -87,17 +87,11 @@ export const constantRoutes = [
87 redirect: 'noredirect', 87 redirect: 'noredirect',
88 children: [ 88 children: [
89 { 89 {
90 - path: 'detail', 90 + path: '/destinationFlight/:handle/:id',
91 component: (resolve) => require(['@/views/system/destinationFlight/info'], resolve), 91 component: (resolve) => require(['@/views/system/destinationFlight/info'], resolve),
92 - name: 'Detail', 92 + name: 'info',
93 meta: { title: '目的航班信息', icon: 'user' } 93 meta: { title: '目的航班信息', icon: 'user' }
94 }, 94 },
95 - {
96 - path: 'update',
97 - component: (resolve) => require(['@/views/system/destinationFlight/info'], resolve),
98 - name: 'Update',
99 - meta: { title: '目的航班信息修改', icon: 'user' }
100 - }
101 ] 95 ]
102 } 96 }
103 ] 97 ]
......
1 <template> 1 <template>
2 <div style="margin: 40px"> 2 <div style="margin: 40px">
3 - <el-form ref="form" :model="form" label-width="200px"> 3 + <el-form ref="form" :model="form" label-width="200px" size="small" :disabled="disable">
4 <el-form-item label="航班号"> 4 <el-form-item label="航班号">
5 <el-input 5 <el-input
6 v-model="form.purposeOfFlightNo" 6 v-model="form.purposeOfFlightNo"
...@@ -99,8 +99,9 @@ ...@@ -99,8 +99,9 @@
99 </el-form-item> 99 </el-form-item>
100 100
101 <el-form-item> 101 <el-form-item>
102 - <el-button type="primary" @click="onSubmit">立即创建</el-button> 102 + <el-button type="primary" v-if="$route.params.handle === 'add'" @click="onSubmit">添加</el-button>
103 - <el-button>取消</el-button> 103 + <el-button type="primary" v-if="$route.params.handle === 'update'" @click="onSubmit">保存</el-button>
104 + <el-button @click="close">取消</el-button>
104 </el-form-item> 105 </el-form-item>
105 </el-form> 106 </el-form>
106 </div> 107 </div>
...@@ -121,16 +122,25 @@ export default { ...@@ -121,16 +122,25 @@ export default {
121 cargoType:[], 122 cargoType:[],
122 cargoStatus:[], 123 cargoStatus:[],
123 serviceCode:[], 124 serviceCode:[],
124 - subCategory:[] 125 + subCategory:[],
126 + disable:false,
125 }; 127 };
126 }, 128 },
127 methods: { 129 methods: {
128 onSubmit() { 130 onSubmit() {
129 console.log("submit!"); 131 console.log("submit!");
130 }, 132 },
133 + close(){
134 +
135 + }
131 }, 136 },
132 created() { 137 created() {
133 - let id = this.$route.query.id; 138 + let id = this.$route.params.id;
139 + let handle = this.$route.params.handle;
140 + console.log(handle);
141 + if (handle === "detail"){
142 + this.disable = true;
143 + }
134 144
135 //申报类别 145 //申报类别
136 cargoTypeData().then((response) => { 146 cargoTypeData().then((response) => {
......
1 <template> 1 <template>
2 -<div style="margin:40px"> 2 +<div style="margin:40px" class="app-container">
3 - <el-form :inline="true" :model="queryParams" class="demo-form-inline"> 3 + <el-form :inline="true" :model="queryParams" class="demo-form-inline" size="small">
4 <el-form-item label="航班号"> 4 <el-form-item label="航班号">
5 <el-input v-model="queryParams.purposeOfFlightNo" placeholder="航班号"></el-input> 5 <el-input v-model="queryParams.purposeOfFlightNo" placeholder="航班号"></el-input>
6 </el-form-item> 6 </el-form-item>
7 <el-form-item> 7 <el-form-item>
8 - <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button> 8 + <el-button type="primary" icon="el-icon-search" @click="getList" size="mini">查询</el-button>
9 </el-form-item> 9 </el-form-item>
10 </el-form> 10 </el-form>
11 - <el-button style="margin-bottom:20px" type="primary" icon="el-icon-plus">添加</el-button> 11 + <el-button style="margin-bottom:20px" type="primary" icon="el-icon-plus" size="mini">添加</el-button>
12 <el-table 12 <el-table
13 :data="flyList" 13 :data="flyList"
14 style="width: 800px" 14 style="width: 800px"
15 - v-loading="loading" 15 + v-loading="loading" size="small"
16 > 16 >
17 - <el-table-column 17 + <el-table-column prop="purposeOfFlightNo" label="航班号" align="center"></el-table-column>
18 - prop="purposeOfFlightNo" 18 + <el-table-column label="操作" prop="id" align="center">
19 - label="航班号"> 19 + <template slot-scope="scope" >
20 - </el-table-column> 20 + <el-button type="text" size="mini" icon="el-icon-view" @click="handleClick(scope.row.id, 'detail')">查看</el-button>
21 - <el-table-column 21 + <el-button type="text" size="mini" icon="el-icon-edit" @click="handleClick(scope.row.id, 'update')">修改</el-button>
22 - label="操作" prop="id"> 22 + <el-button type="text" size="mini" icon="el-icon-delete">删除</el-button>
23 - <template slot-scope="scope"> 23 + <el-button type="text" size="mini" icon="el-icon-video-play">启用</el-button>
24 - <el-button type="text" @click="handleClick(scope.row.id, 'Detail')">查看</el-button> 24 + <el-button type="text" size="mini" icon="el-icon-video-pause">停用</el-button>
25 - <el-divider direction="vertical"></el-divider>
26 - <el-button type="text" @click="handleClick(scope.row.id, 'Update')">修改</el-button>
27 - <el-divider direction="vertical"></el-divider>
28 - <el-button type="text">删除</el-button>
29 - <el-divider direction="vertical"></el-divider>
30 - <el-button type="text">启用</el-button>
31 - <el-divider direction="vertical"></el-divider>
32 - <el-button type="text">停用</el-button>
33 </template> 25 </template>
34 </el-table-column> 26 </el-table-column>
35 </el-table> 27 </el-table>
...@@ -42,7 +34,8 @@ ...@@ -42,7 +34,8 @@
42 layout="prev, pager, next, jumper, sizes, total" 34 layout="prev, pager, next, jumper, sizes, total"
43 :total="total" 35 :total="total"
44 background 36 background
45 - style="margin-top:40px"> 37 + :hide-on-single-page="true"
38 + style="margin-top:40px; text-align:right">
46 </el-pagination> 39 </el-pagination>
47 </div> 40 </div>
48 </template> 41 </template>
...@@ -83,8 +76,8 @@ ...@@ -83,8 +76,8 @@
83 }); 76 });
84 }, 77 },
85 //跳转到查看,修改页面 78 //跳转到查看,修改页面
86 - handleClick(flightiId, pageName){ 79 + handleClick(flightiId, handle){
87 - this.$router.push({name:pageName,query: {id:flightiId}}); 80 + this.$router.push({ name: 'info', params: { handle: handle, id:flightiId }});
88 }, 81 },
89 //删除,启用,停用 82 //删除,启用,停用
90 changeStatus(id, handle){ 83 changeStatus(id, handle){
......