jinhui.wang

pt类型航班维度展示修改

...@@ -51,12 +51,12 @@ ...@@ -51,12 +51,12 @@
51 v-if="routeSatus != 'flightInformationMaintenanceWhite Tail' && routeSatus != 'dmLog'" 51 v-if="routeSatus != 'flightInformationMaintenanceWhite Tail' && routeSatus != 'dmLog'"
52 class="backgroundCollapse" :value="infoForm.list.length > 0 ? routeList[0].route : ''" 52 class="backgroundCollapse" :value="infoForm.list.length > 0 ? routeList[0].route : ''"
53 style="min-height:500px;width:95%;margin:0 auto 50px" accordion v-loading="loading"> 53 style="min-height:500px;width:95%;margin:0 auto 50px" accordion v-loading="loading">
54 - <el-collapse-item v-for="(routeItem, index) in routeList" :key="index" :name="routeItem.route" 54 + <el-collapse-item v-for="( routeItem, index ) in routeList " :key="index" :name="routeItem.route"
55 - v-if="($route.params.status == '3' && infoRouteList.includes(routeItem.route)) || $route.params.status != '3'"> 55 + v-if="($route.params.status == '3' && infoRouteList.includes(routeItem.route)) || (routeSatus == 'flightInformationMaintenancePurple Tail' && infoRouteList.includes(routeItem.route)) || ($route.params.status != '3' && routeSatus != 'flightInformationMaintenancePurple Tail')">
56 <template slot="title"> 56 <template slot="title">
57 <span class="fontWeight">{{ routeItem.route }}</span> 57 <span class="fontWeight">{{ routeItem.route }}</span>
58 </template> 58 </template>
59 - <template v-for="(val, idx) in infoForm.list"> 59 + <template v-for="( val, idx ) in infoForm.list ">
60 <el-card shadow="always" style="min-height:350px" v-if="val.flightRoute === routeItem.route" 60 <el-card shadow="always" style="min-height:350px" v-if="val.flightRoute === routeItem.route"
61 :key="idx"> 61 :key="idx">
62 <div> 62 <div>
...@@ -187,7 +187,7 @@ ...@@ -187,7 +187,7 @@
187 <el-card shadow="never" style="width: 95%"> 187 <el-card shadow="never" style="width: 95%">
188 <el-checkbox-group v-model="val.typeOfGoods" @change="change"> 188 <el-checkbox-group v-model="val.typeOfGoods" @change="change">
189 <el-row> 189 <el-row>
190 - <el-col v-for="item in checkBoxItem.cargoType" :span="2" 190 + <el-col v-for=" item in checkBoxItem.cargoType " :span="2"
191 :key="item.id"> 191 :key="item.id">
192 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 192 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
193 :name="item.chineseName" :key="item.code"> 193 :name="item.chineseName" :key="item.code">
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
205 <el-card shadow="never" style="width: 95%"> 205 <el-card shadow="never" style="width: 95%">
206 <el-checkbox-group v-model="val.declarationCategory" @change="change"> 206 <el-checkbox-group v-model="val.declarationCategory" @change="change">
207 <el-row> 207 <el-row>
208 - <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" 208 + <el-col v-for=" item in checkBoxItem.cargoStatus " :span="3"
209 :key="item.id"> 209 :key="item.id">
210 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 210 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
211 :name="item.chineseName" :key="item.code" disabled> 211 :name="item.chineseName" :key="item.code" disabled>
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
223 <el-card shadow="never" style="width: 95%"> 223 <el-card shadow="never" style="width: 95%">
224 <el-checkbox-group v-model="val.puporpuxCode" @change="change"> 224 <el-checkbox-group v-model="val.puporpuxCode" @change="change">
225 <el-row> 225 <el-row>
226 - <el-col :span="2" v-for="item in checkBoxItem.puporpux" 226 + <el-col :span="2" v-for=" item in checkBoxItem.puporpux "
227 :key="item.id"> 227 :key="item.id">
228 <el-checkbox 228 <el-checkbox
229 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" 229 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
244 <el-card shadow="never" style="width: 95%"> 244 <el-card shadow="never" style="width: 95%">
245 <el-checkbox-group v-model="val.serviceCode" @change="change"> 245 <el-checkbox-group v-model="val.serviceCode" @change="change">
246 <el-row> 246 <el-row>
247 - <el-col v-for="item in checkBoxItem.serviceCode" :span="2" 247 + <el-col v-for=" item in checkBoxItem.serviceCode " :span="2"
248 :key="item.id"> 248 :key="item.id">
249 <el-checkbox 249 <el-checkbox
250 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)" 250 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
264 <el-form-item label="Handling Code"> 264 <el-form-item label="Handling Code">
265 <el-card shadow="never" style="width: 95%"> 265 <el-card shadow="never" style="width: 95%">
266 <el-checkbox-group v-model="val.handlingCode" @change="change"> 266 <el-checkbox-group v-model="val.handlingCode" @change="change">
267 - <div class="checkboxItem" v-for="item in checkBoxItem.handlingCode" 267 + <div class="checkboxItem" v-for=" item in checkBoxItem.handlingCode "
268 :key="item.id"> 268 :key="item.id">
269 <el-checkbox 269 <el-checkbox
270 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)" 270 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
...@@ -283,7 +283,7 @@ ...@@ -283,7 +283,7 @@
283 <el-form-item label="Sub Category"> 283 <el-form-item label="Sub Category">
284 <el-card shadow="never" style="width: 95%"> 284 <el-card shadow="never" style="width: 95%">
285 <el-checkbox-group v-model="val.subCategory" @change="change"> 285 <el-checkbox-group v-model="val.subCategory" @change="change">
286 - <div class="checkboxItem" v-for="item in checkBoxItem.subCategory" 286 + <div class="checkboxItem" v-for=" item in checkBoxItem.subCategory "
287 :key="item.id"> 287 :key="item.id">
288 <el-checkbox 288 <el-checkbox
289 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)" 289 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
...@@ -304,7 +304,7 @@ ...@@ -304,7 +304,7 @@
304 </template> 304 </template>
305 </el-collapse-item> 305 </el-collapse-item>
306 </el-collapse> 306 </el-collapse>
307 - <el-card v-else shadow="always" v-for="(val, idx) in infoForm.list" :key="idx" style="min-height:350px"> 307 + <el-card v-else shadow="always" v-for="( val, idx ) in infoForm.list " :key="idx" style="min-height:350px">
308 <div> 308 <div>
309 <el-empty description="未设置规则!" v-if="!val.isLocation"> 309 <el-empty description="未设置规则!" v-if="!val.isLocation">
310 <el-button type="primary" size="small" @click="newRoute(idx, routeList[idx].route)">新增规则 310 <el-button type="primary" size="small" @click="newRoute(idx, routeList[idx].route)">新增规则
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
429 <el-card shadow="never" style="width: 95%"> 429 <el-card shadow="never" style="width: 95%">
430 <el-checkbox-group v-model="val.typeOfGoods" @change="change"> 430 <el-checkbox-group v-model="val.typeOfGoods" @change="change">
431 <el-row> 431 <el-row>
432 - <el-col v-for="item in checkBoxItem.cargoType" :span="2" :key="item.id"> 432 + <el-col v-for=" item in checkBoxItem.cargoType " :span="2" :key="item.id">
433 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 433 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
434 :name="item.chineseName" :key="item.code"> 434 :name="item.chineseName" :key="item.code">
435 <Tooltips :content="item.chineseName" :refName="item.code"> 435 <Tooltips :content="item.chineseName" :refName="item.code">
...@@ -446,7 +446,7 @@ ...@@ -446,7 +446,7 @@
446 <el-card shadow="never" style="width: 95%"> 446 <el-card shadow="never" style="width: 95%">
447 <el-checkbox-group v-model="val.declarationCategory" @change="change"> 447 <el-checkbox-group v-model="val.declarationCategory" @change="change">
448 <el-row> 448 <el-row>
449 - <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" :key="item.id"> 449 + <el-col v-for=" item in checkBoxItem.cargoStatus " :span="3" :key="item.id">
450 <el-checkbox v-if="item.status === 1" :label="item.chineseName" 450 <el-checkbox v-if="item.status === 1" :label="item.chineseName"
451 :name="item.chineseName" disabled :key="item.code"> 451 :name="item.chineseName" disabled :key="item.code">
452 <Tooltips :content="item.chineseName" :refName="item.code"> 452 <Tooltips :content="item.chineseName" :refName="item.code">
...@@ -463,7 +463,7 @@ ...@@ -463,7 +463,7 @@
463 <el-card shadow="never" style="width: 95%"> 463 <el-card shadow="never" style="width: 95%">
464 <el-checkbox-group v-model="val.puporpuxCode" @change="change"> 464 <el-checkbox-group v-model="val.puporpuxCode" @change="change">
465 <el-row> 465 <el-row>
466 - <el-col :span="2" v-for="item in checkBoxItem.puporpux" :key="item"> 466 + <el-col :span="2" v-for=" item in checkBoxItem.puporpux " :key="item">
467 <el-checkbox 467 <el-checkbox
468 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)" 468 v-if="item.status === 1 || val.puporpuxCode.includes(item.chineseName)"
469 :label="item.chineseName" :name="item.chineseName" 469 :label="item.chineseName" :name="item.chineseName"
...@@ -483,7 +483,7 @@ ...@@ -483,7 +483,7 @@
483 <el-card shadow="never" style="width: 95%"> 483 <el-card shadow="never" style="width: 95%">
484 <el-checkbox-group v-model="val.serviceCode" @change="change"> 484 <el-checkbox-group v-model="val.serviceCode" @change="change">
485 <el-row> 485 <el-row>
486 - <el-col v-for="item in checkBoxItem.serviceCode" :span="2" :key="item.id"> 486 + <el-col v-for=" item in checkBoxItem.serviceCode " :span="2" :key="item.id">
487 <el-checkbox 487 <el-checkbox
488 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)" 488 v-if="item.status === 1 || val.serviceCode.includes(item.chineseName)"
489 :label="item.chineseName" :name="item.chineseName" 489 :label="item.chineseName" :name="item.chineseName"
...@@ -502,7 +502,8 @@ ...@@ -502,7 +502,8 @@
502 <el-form-item label="Handling Code"> 502 <el-form-item label="Handling Code">
503 <el-card shadow="never" style="width: 95%"> 503 <el-card shadow="never" style="width: 95%">
504 <el-checkbox-group v-model="val.handlingCode" @change="change"> 504 <el-checkbox-group v-model="val.handlingCode" @change="change">
505 - <div class="checkboxItem" v-for="item in checkBoxItem.handlingCode" :key="item.id"> 505 + <div class="checkboxItem" v-for=" item in checkBoxItem.handlingCode "
506 + :key="item.id">
506 <el-checkbox 507 <el-checkbox
507 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)" 508 v-if="item.status === 1 || val.handlingCode.includes(item.chineseName)"
508 :label="item.chineseName" :name="item.chineseName" 509 :label="item.chineseName" :name="item.chineseName"
...@@ -520,7 +521,8 @@ ...@@ -520,7 +521,8 @@
520 <el-form-item label="Sub Category"> 521 <el-form-item label="Sub Category">
521 <el-card shadow="never" style="width: 95%"> 522 <el-card shadow="never" style="width: 95%">
522 <el-checkbox-group v-model="val.subCategory" @change="change"> 523 <el-checkbox-group v-model="val.subCategory" @change="change">
523 - <div class="checkboxItem" v-for="item in checkBoxItem.subCategory" :key="item.id"> 524 + <div class="checkboxItem" v-for=" item in checkBoxItem.subCategory "
525 + :key="item.id">
524 <el-checkbox 526 <el-checkbox
525 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)" 527 v-if="item.status === 1 || val.subCategory.includes(item.chineseName)"
526 :label="item.chineseName" :name="item.chineseName" 528 :label="item.chineseName" :name="item.chineseName"
...@@ -716,25 +718,29 @@ export default { ...@@ -716,25 +718,29 @@ export default {
716 this.infoForm.list.push(this.dataHandle(item)) 718 this.infoForm.list.push(this.dataHandle(item))
717 }) 719 })
718 } else { 720 } else {
721 + let arr = this.$route.params.route.split(';')
722 + this.infoRouteList = arr
719 //航班类型为Purple Tail则显示所有航线维度 723 //航班类型为Purple Tail则显示所有航线维度
720 this.routeList.forEach((route, sub) => { 724 this.routeList.forEach((route, sub) => {
721 - let routeStatus = 1 725 + if (arr.includes(route.route)) {
722 - res.data.list.forEach(item => { 726 + let routeStatus = 1
723 - if (route.route === item.flightRoute) { 727 + res.data.list.forEach(item => {
724 - //航线对应插入数据 728 + if (route.route === item.flightRoute) {
725 - routeStatus = 2 729 + //航线对应插入数据
726 - this.infoForm.list.push(this.dataHandle(item)) 730 + routeStatus = 2
727 - } 731 + this.infoForm.list.push(this.dataHandle(item))
728 - }) 732 + }
729 - if (routeStatus == 1) {
730 - //否则插入占位基础数据
731 - this.infoForm.list.push({
732 - purposeOfFlightNo: this.infoForm.fltNo,
733 - ruleDate: this.infoForm.fltDate,
734 - flightRoute: route.route,
735 - routePriority: route.routePriority,
736 }) 733 })
737 - this.newRoute(sub, route.route) 734 + if (routeStatus == 1) {
735 + //否则插入占位基础数据
736 + this.infoForm.list.push({
737 + purposeOfFlightNo: this.infoForm.fltNo,
738 + ruleDate: this.infoForm.fltDate,
739 + flightRoute: route.route,
740 + routePriority: route.routePriority,
741 + })
742 + this.newRoute(sub, route.route)
743 + }
738 } 744 }
739 }) 745 })
740 } 746 }
...@@ -972,27 +978,31 @@ export default { ...@@ -972,27 +978,31 @@ export default {
972 this.infoForm.list.push(this.dataHandle(item)) 978 this.infoForm.list.push(this.dataHandle(item))
973 }) 979 })
974 } else { 980 } else {
981 + let arr = this.$route.params.route.split(';')
982 + this.infoRouteList = arr
975 //航班类型Purple Tail展示全部航线维度 983 //航班类型Purple Tail展示全部航线维度
976 this.routeList.forEach(route => { 984 this.routeList.forEach(route => {
977 - let routesStatus = 1 985 + if (arr.includes(route.route)) {
978 - response.data.list.forEach(item => { 986 + let routesStatus = 1
979 - let obj = JSON.parse(JSON.stringify(item)) 987 + response.data.list.forEach(item => {
980 - if (route.route === item.flightRoute) { 988 + let obj = JSON.parse(JSON.stringify(item))
981 - routesStatus = 2 989 + if (route.route === item.flightRoute) {
982 - obj.id = undefined 990 + routesStatus = 2
983 - obj.status = undefined 991 + obj.id = undefined
984 - obj.flightRoute = route.route 992 + obj.status = undefined
985 - obj.routePriority = route.routePriority 993 + obj.flightRoute = route.route
986 - this.infoForm.list.push(this.dataHandle(obj)) 994 + obj.routePriority = route.routePriority
987 - } 995 + this.infoForm.list.push(this.dataHandle(obj))
988 - }) 996 + }
989 - if (routesStatus == 1) {
990 - this.infoForm.list.push({
991 - purposeOfFlightNo: this.infoForm.fltNo,
992 - ruleDate: this.infoForm.fltDate,
993 - flightRoute: route.route,
994 - routePriority: route.routePriority,
995 }) 997 })
998 + if (routesStatus == 1) {
999 + this.infoForm.list.push({
1000 + purposeOfFlightNo: this.infoForm.fltNo,
1001 + ruleDate: this.infoForm.fltDate,
1002 + flightRoute: route.route,
1003 + routePriority: route.routePriority,
1004 + })
1005 + }
996 } 1006 }
997 }) 1007 })
998 } 1008 }
......