From 6ccc93883a50bb02062772e226cf157d988fa6e2 Mon Sep 17 00:00:00 2001 From: zhouyuejun <505127606@qq.com> Date: Wed, 23 Jan 2019 15:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/components/toast/toast.component.scss | 6 ++ src/app/pages/main/main.component.ts | 4 - .../color-settings.component.ts | 11 ++- src/app/utils/cell-color-handle.ts | 91 ++----------------- 4 files changed, 21 insertions(+), 91 deletions(-) diff --git a/src/app/components/toast/toast.component.scss b/src/app/components/toast/toast.component.scss index b895ca8..0a540f9 100644 --- a/src/app/components/toast/toast.component.scss +++ b/src/app/components/toast/toast.component.scss @@ -7,6 +7,12 @@ } .c-toast{ height: 100%; + padding: 15px 30px 15px 15px; + } + button.close{ + position: absolute; + top: 10px; + right: 10px; } diff --git a/src/app/pages/main/main.component.ts b/src/app/pages/main/main.component.ts index 14a20d6..7e95347 100644 --- a/src/app/pages/main/main.component.ts +++ b/src/app/pages/main/main.component.ts @@ -886,10 +886,6 @@ export class MainComponent implements OnInit { 'SODT': this.cellColorHandle.sodt.bind(this.cellColorHandle), 'PADT': this.cellColorHandle.padt.bind(this.cellColorHandle), 'PSST': this.cellColorHandle.psst.bind(this.cellColorHandle), - 'COTM': this.cellColorHandle.cotm.bind(this.cellColorHandle), - 'CCTM': this.cellColorHandle.cctm.bind(this.cellColorHandle), - 'BOTM': this.cellColorHandle.botm.bind(this.cellColorHandle), - 'GCTM': this.cellColorHandle.gctm.bind(this.cellColorHandle) } getColor(col_CODE, flight, col_WIDTH) { let index = this.airline_color.findIndex(color => color['COL_CODE'] === col_CODE) diff --git a/src/app/pages/system-management/personal-settings/color-settings/color-settings.component.ts b/src/app/pages/system-management/personal-settings/color-settings/color-settings.component.ts index 851896b..7d24553 100644 --- a/src/app/pages/system-management/personal-settings/color-settings/color-settings.component.ts +++ b/src/app/pages/system-management/personal-settings/color-settings/color-settings.component.ts @@ -27,11 +27,12 @@ export class ColorSettingsComponent implements OnInit { ngOnInit() { this.queryTable(); this.defaultList=[ - {"COL_CODE":"RENO", "COL_CN":"飞机号", "COL_BG_COLOR":"rgb(46,255,135,1)","COL_COLOR":"rgb(0,70,255,1)"}, - {"COL_CODE":"ACTT", "COL_CN":"实际到达/出发", "COL_BG_COLOR":"rgb(149,207,255,1)","COL_COLOR":"rgb(0,70,255,1)"}, - {"COL_CODE":"ESTT", "COL_CN":"预计到达/出发", "COL_BG_COLOR":"rgb(255,207,157,1)","COL_COLOR":"rgb(0,70,255,1)"}, - {"COL_CODE":"PADT", "COL_CN":"前站起飞时间", "COL_BG_COLOR":"rgb(114,181,255,1)","COL_COLOR":"rgb(0,70,255,1)"}, - {"COL_CODE":"PSST", "COL_CN":"计划机位", "COL_BG_COLOR":"rgb(173,255,46,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"SODT", "COL_CN":"预计到达/出发", "COL_BG_COLOR":"rgb(230,221,221,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"ESTT", "COL_CN":"预计到达/出发", "COL_BG_COLOR":"rgb(255,207,157,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"ACTT", "COL_CN":"实际到达/出发", "COL_BG_COLOR":"rgb(149,207,255,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"RENO", "COL_CN":"飞机号变更", "COL_BG_COLOR":"rgb(46,255,135,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"PSST", "COL_CN":"计划机位变更", "COL_BG_COLOR":"rgb(173,255,46,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"PADT", "COL_CN":"前站起飞时间", "COL_BG_COLOR":"rgb(114,181,255,1)","COL_COLOR":"rgb(0,70,255,1)"}, ] } //设置颜色 1设置背景颜色 2设置字体颜色 diff --git a/src/app/utils/cell-color-handle.ts b/src/app/utils/cell-color-handle.ts index 0282364..7028e29 100644 --- a/src/app/utils/cell-color-handle.ts +++ b/src/app/utils/cell-color-handle.ts @@ -7,33 +7,13 @@ export class CellColorHandle { public reno(flight, colorSetting) { - if (this.orderHandle.isArriFlight(flight)) { - if (flight['preFlight']['RENO'] && flight['preFlight']['RENO'].indexOf('(') > 0) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; - } - } else if (this.orderHandle.isDeptFlight(flight)) { - if (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; + if (flight['renderFlight']['RENO'] && flight['renderFlight']['RENO'].indexOf('(') > 0) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR } } else { - if ((flight['preFlight']['RENO'] && flight['preFlight']['RENO'].indexOf('(') > 0) || (flight['reaFlight']['RENO'] && flight['reaFlight']['RENO'].indexOf('(') > 0)) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; - } + return {}; } } @@ -105,17 +85,8 @@ export class CellColorHandle { } public padt(flight, colorSetting) { - if (this.orderHandle.isArriFlight(flight)) { - if (flight['preFlight']['PADT'] && flight['preFlight']['PADT'].indexOf('(') > 0) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; - } - } else if (this.orderHandle.isDeptFlight(flight)) { - if (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0) { + if (this.orderHandle.isArriFlight(flight) || this.orderHandle.isLinked(flight)) { + if (flight['preFlight']['PADT']) { return { 'background-color': colorSetting.COL_BG_COLOR, 'color': colorSetting.COL_COLOR @@ -124,56 +95,12 @@ export class CellColorHandle { return {}; } } else { - if ((flight['preFlight']['PADT'] && flight['preFlight']['PADT'].indexOf('(') > 0) || (flight['reaFlight']['PADT'] && flight['reaFlight']['PADT'].indexOf('(') > 0)) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; - } + return {}; } } public psst(flight, colorSetting) { - return {}; - } - - public cotm(flight, colorSetting) { - if (flight['renderFlight']['COTM'] && !flight['renderFlight']['CCTM']) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; - } - } - - public cctm(flight, colorSetting) { - if (flight['renderFlight']['CCTM']) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; - } - } - - public botm(flight, colorSetting) { - if (flight['renderFlight']['BOTM'] && !flight['renderFlight']['GCTM']) { - return { - 'background-color': colorSetting.COL_BG_COLOR, - 'color': colorSetting.COL_COLOR - } - } else { - return {}; - } - } - - public gctm(flight, colorSetting) { - if (flight['renderFlight']['GCTM']) { + if (flight['renderFlight']['PSST'] && flight['renderFlight']['PSST'].indexOf('(') > 0) { return { 'background-color': colorSetting.COL_BG_COLOR, 'color': colorSetting.COL_COLOR