Showing
1 changed file
with
7 additions
and
23 deletions
| ... | @@ -153,14 +153,7 @@ export default { | ... | @@ -153,14 +153,7 @@ export default { |
| 153 | const routes = []; | 153 | const routes = []; |
| 154 | if (isEtesRoute.length) { | 154 | if (isEtesRoute.length) { |
| 155 | isEtesRoute.map((item) => { | 155 | isEtesRoute.map((item) => { |
| 156 | - item.routePriority = item.ordinal; | 156 | + routes.push({ config: false, route: item.route }); |
| 157 | - routes.push({ | ||
| 158 | - config: false, | ||
| 159 | - fltNo: item.fltNo, | ||
| 160 | - route: item.route, | ||
| 161 | - etesRule: item.isEtesRoute, | ||
| 162 | - routePriority: item.routePriority, | ||
| 163 | - }); | ||
| 164 | }); | 157 | }); |
| 165 | } else { | 158 | } else { |
| 166 | this.msgWarning("暂无航线"); | 159 | this.msgWarning("暂无航线"); |
| ... | @@ -184,25 +177,17 @@ export default { | ... | @@ -184,25 +177,17 @@ export default { |
| 184 | this.queryForm.purposeOfFlightNo = this.upCase(purposeOfFlightNo); | 177 | this.queryForm.purposeOfFlightNo = this.upCase(purposeOfFlightNo); |
| 185 | }, | 178 | }, |
| 186 | // 新增规则 | 179 | // 新增规则 |
| 187 | - addRlue(item, index) { | 180 | + addRlue(index) { |
| 188 | - let currentRoute = this.routeList.filter( | ||
| 189 | - (val) => val.route == item.route | ||
| 190 | - ); | ||
| 191 | // 如果当前航班号的航线下没有数据,新增规则给默认数据 | 181 | // 如果当前航班号的航线下没有数据,新增规则给默认数据 |
| 192 | routeRuleForm.purposeOfFlightNo = this.$route.query.purposeOfFlightNo; | 182 | routeRuleForm.purposeOfFlightNo = this.$route.query.purposeOfFlightNo; |
| 193 | - routeRuleForm.routePriority = currentRoute[0].routePriority; | ||
| 194 | - let routeSpecifyDateSeq = []; | ||
| 195 | - if (this.routeList.length) { | ||
| 196 | - this.routeList.map((item) => { | ||
| 197 | - routeSpecifyDateSeq.push(item.route); | ||
| 198 | - }); | ||
| 199 | - } | ||
| 200 | - routeRuleForm.routeSpecifyDateSeq = routeSpecifyDateSeq.join(";"); | ||
| 201 | this.setattrVal(routeRuleForm); | 183 | this.setattrVal(routeRuleForm); |
| 202 | const mergeObj = { | 184 | const mergeObj = { |
| 203 | ...this.routesInfo[index], | 185 | ...this.routesInfo[index], |
| 204 | ...routeRuleForm, | 186 | ...routeRuleForm, |
| 205 | }; | 187 | }; |
| 188 | + if (this.routeList[index].hasOwnProperty("ordinal")) { | ||
| 189 | + mergeObj.routePriority = this.routeList[index].ordinal; | ||
| 190 | + } | ||
| 206 | this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据 | 191 | this.$set(this.routesInfo, index, mergeObj); // 给新增规则赋上默认数据 |
| 207 | }, | 192 | }, |
| 208 | // 保存 【新增/修改航线规则设置】 | 193 | // 保存 【新增/修改航线规则设置】 |
| ... | @@ -349,12 +334,11 @@ export default { | ... | @@ -349,12 +334,11 @@ export default { |
| 349 | .then((res) => { | 334 | .then((res) => { |
| 350 | const { code, msg, data } = res; | 335 | const { code, msg, data } = res; |
| 351 | if (code == 200) { | 336 | if (code == 200) { |
| 352 | - console.log(item); | ||
| 353 | this.$set(this.routesInfo, index, { | 337 | this.$set(this.routesInfo, index, { |
| 354 | route: item.flightRoute, | 338 | route: item.flightRoute, |
| 355 | config: false, | 339 | config: false, |
| 356 | - fltNo: item.fltNo, | 340 | + fltNo: this.routeList[0].fltNo, |
| 357 | - etesRule: item.etesRule, | 341 | + etesRule: this.routeList[0].etesRule, |
| 358 | routePriority: item.routePriority, | 342 | routePriority: item.routePriority, |
| 359 | }); | 343 | }); |
| 360 | this.msgSuccess(msg); | 344 | this.msgSuccess(msg); | ... | ... |
-
Please register or login to post a comment