Showing
2 changed files
with
5 additions
and
3 deletions
| ... | @@ -358,7 +358,7 @@ | ... | @@ -358,7 +358,7 @@ |
| 358 | </div> | 358 | </div> |
| 359 | </template> | 359 | </template> |
| 360 | <el-select | 360 | <el-select |
| 361 | - v-if="routeMultiple" | 361 | + v-show="routeMultiple == true" |
| 362 | ref="routeSelect" | 362 | ref="routeSelect" |
| 363 | class="wid80" | 363 | class="wid80" |
| 364 | v-model="form.route" | 364 | v-model="form.route" |
| ... | @@ -389,7 +389,7 @@ | ... | @@ -389,7 +389,7 @@ |
| 389 | </el-option> | 389 | </el-option> |
| 390 | </el-select> | 390 | </el-select> |
| 391 | <el-select | 391 | <el-select |
| 392 | - v-if="routeMultiple == false" | 392 | + v-show="routeMultiple == false" |
| 393 | ref="routeSelect" | 393 | ref="routeSelect" |
| 394 | class="wid80" | 394 | class="wid80" |
| 395 | v-model="form.route" | 395 | v-model="form.route" |
| ... | @@ -1005,7 +1005,7 @@ export default { | ... | @@ -1005,7 +1005,7 @@ export default { |
| 1005 | this.form.route = ""; | 1005 | this.form.route = ""; |
| 1006 | } else if (item.chineseName.indexOf("Purple") >= 0) { | 1006 | } else if (item.chineseName.indexOf("Purple") >= 0) { |
| 1007 | this.routeMultiple = true; | 1007 | this.routeMultiple = true; |
| 1008 | - this.form.route = []; | 1008 | + this.$set(this.form, "route", []); |
| 1009 | } | 1009 | } |
| 1010 | this.routeError = true; | 1010 | this.routeError = true; |
| 1011 | } | 1011 | } | ... | ... |
| ... | @@ -258,11 +258,13 @@ export default { | ... | @@ -258,11 +258,13 @@ export default { |
| 258 | } | 258 | } |
| 259 | findFlightRoute(obj).then(res => { | 259 | findFlightRoute(obj).then(res => { |
| 260 | if (res.code === 200) { | 260 | if (res.code === 200) { |
| 261 | + if(res.data.length){ | ||
| 261 | res.data[0].route.indexOf(';') <= 0 ? | 262 | res.data[0].route.indexOf(';') <= 0 ? |
| 262 | this.routeList = res.data : | 263 | this.routeList = res.data : |
| 263 | res.data[0].route.split(';').forEach(item => { | 264 | res.data[0].route.split(';').forEach(item => { |
| 264 | this.routeList.push({ id: res.data[0].id, route: item }) | 265 | this.routeList.push({ id: res.data[0].id, route: item }) |
| 265 | }) | 266 | }) |
| 267 | + } | ||
| 266 | } else { | 268 | } else { |
| 267 | this.msgWarning(res.msg) | 269 | this.msgWarning(res.msg) |
| 268 | } | 270 | } | ... | ... |
-
Please register or login to post a comment