单元格颜色显示修改

This commit is contained in:
zhouyuejun
2019-01-23 15:19:53 +08:00
parent 5bcda7181e
commit 6ccc93883a
4 changed files with 21 additions and 91 deletions
@@ -7,6 +7,12 @@
}
.c-toast{
height: 100%;
padding: 15px 30px 15px 15px;
}
button.close{
position: absolute;
top: 10px;
right: 10px;
}
-4
View File
@@ -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)
@@ -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设置字体颜色
+9 -82
View File
@@ -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