From 44d7bec291f8154cb90d3e063080988a14020c52 Mon Sep 17 00:00:00 2001 From: zhouyuejun <505127606@qq.com> Date: Wed, 27 Mar 2019 15:16:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E8=AE=BE=E7=BD=AE=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=80=BC=E6=9C=BA=EF=BC=8C=E7=99=BB=E6=9C=BA=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E9=9A=9C=E7=9A=84=E9=A2=9C=E8=89=B2=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/pages/main/main.component.ts | 6 ++- .../color-settings.component.ts | 12 +++++- src/app/utils/cell-color-handle.ts | 40 +++++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/src/app/pages/main/main.component.ts b/src/app/pages/main/main.component.ts index 9f6880d..e68b03c 100644 --- a/src/app/pages/main/main.component.ts +++ b/src/app/pages/main/main.component.ts @@ -52,7 +52,7 @@ export class MainComponent implements OnInit { if (event.urlAfterRedirects != '/app/main') { if (this.websocketService.websocket.readyState === 1) { this.websocketService.websocket.close(); - if(this.websocketService.websocketHeartBeat){ + if (this.websocketService.websocketHeartBeat) { this.websocketService.clearIntervalHandle(); } } @@ -1244,6 +1244,10 @@ 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 7d24553..d865664 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,12 +27,22 @@ export class ColorSettingsComponent implements OnInit { ngOnInit() { this.queryTable(); this.defaultList=[ - {"COL_CODE":"SODT", "COL_CN":"预计到达/出发", "COL_BG_COLOR":"rgb(230,221,221,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)"}, + {"COL_CODE":"COTM", "COL_CN":"值机开始", "COL_BG_COLOR":"rgb(228,157,157,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"CCTM", "COL_CN":"值机结束", "COL_BG_COLOR":"rgb(159,140,140,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"BOTM", "COL_CN":"登机开始", "COL_BG_COLOR":"rgb(247,124,124,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"GCTM", "COL_CN":"登机结束", "COL_BG_COLOR":"rgb(239,229,55,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"FSTA", "COL_CN":"服务开始时间", "COL_BG_COLOR":"rgb(171,169,88,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"FEND", "COL_CN":"服务完成时间", "COL_BG_COLOR":"rgb(194,192,13,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"FPEO", "COL_CN":"服务人员", "COL_BG_COLOR":"rgb(65,194,13,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"FCAR", "COL_CN":"服务车辆", "COL_BG_COLOR":"rgb(191,237,173,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"FNUM", "COL_CN":"服务数量", "COL_BG_COLOR":"rgb(173,237,226,1)","COL_COLOR":"rgb(0,70,255,1)"}, + {"COL_CODE":"FCGE", "COL_CN":"机务交接时间", "COL_BG_COLOR":"rgb(30,179,153,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 29aa458..ac16eab 100644 --- a/src/app/utils/cell-color-handle.ts +++ b/src/app/utils/cell-color-handle.ts @@ -102,4 +102,44 @@ export class CellColorHandle { 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']) { + return { + 'background-color': colorSetting.COL_BG_COLOR, + 'color': colorSetting.COL_COLOR + } + } else { + return {}; + } + } } \ No newline at end of file