From 91e24db0d65ca551cd0eb5be2928fb2b25f9b0aa Mon Sep 17 00:00:00 2001
From: zhouyuejun <505127606@qq.com>
Date: Mon, 14 Jan 2019 11:01:29 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AD=A3=E5=BA=A6=E8=AE=A1=E5=88=92=E8=A1=A5?=
=?UTF-8?q?=E5=85=85=E4=B8=8D=E5=AE=8C=E6=95=B4=E5=AD=97=E6=AE=B5=E5=8F=8A?=
=?UTF-8?q?=E8=AE=A1=E5=88=92=E6=9C=BA=E4=BD=8D=E3=80=81=E9=A3=9E=E6=9C=BA?=
=?UTF-8?q?=E5=8F=B7=E5=8F=98=E6=9B=B4=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/pages/main/main.component.html | 14 --
src/app/pages/main/main.component.scss | 5 +-
src/app/pages/main/main.component.ts | 4 +-
.../seasonal-plan.component.html | 36 +++-
.../seasonal-plan.component.scss | 104 ++++++---
.../seasonal-plan/seasonal-plan.component.ts | 204 +++++++++++++++---
src/app/utils/flights-data-handle.ts | 1 +
src/app/utils/transfer-render-handle.ts | 39 +++-
src/app/utils/web-worker-handle.ts | 79 ++++---
src/assets/web-worker-handle.js | 79 ++++---
10 files changed, 427 insertions(+), 138 deletions(-)
diff --git a/src/app/pages/main/main.component.html b/src/app/pages/main/main.component.html
index 692ae13..d3d5128 100644
--- a/src/app/pages/main/main.component.html
+++ b/src/app/pages/main/main.component.html
@@ -166,10 +166,6 @@
-
| {{common_col.COL_CN}} |
@@ -181,16 +177,6 @@
-
-
diff --git a/src/app/pages/main/main.component.scss b/src/app/pages/main/main.component.scss
index 3343c6e..2425d40 100644
--- a/src/app/pages/main/main.component.scss
+++ b/src/app/pages/main/main.component.scss
@@ -61,6 +61,7 @@
th {
background-color: #ddd;
color: rgb(0, 0, 255);
+ text-align: center;
}
}
&::-webkit-scrollbar {
@@ -98,8 +99,8 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- border: none;
- // text-align: center;
+ border: 1px solid #dee2e6;
+ text-align: center;
}
}
&::-webkit-scrollbar {
diff --git a/src/app/pages/main/main.component.ts b/src/app/pages/main/main.component.ts
index 0092210..4c85bc5 100644
--- a/src/app/pages/main/main.component.ts
+++ b/src/app/pages/main/main.component.ts
@@ -126,7 +126,6 @@ export class MainComponent implements OnInit {
ngOnInit() {
- console.log(Object.prototype.toString.call({}));
this.renderer2.setStyle(this.tableContainer.nativeElement, 'height', this.pageContent.nativeElement.offsetHeight - this.searchFilter.nativeElement.offsetHeight - 35 + 'px');
this.renderer2.setStyle(this.tableBody.nativeElement, 'height', this.tableContainer.nativeElement.offsetHeight - this.tableHead.nativeElement.offsetHeight + 'px');
if (!this.tabClose) {
@@ -472,7 +471,7 @@ export class MainComponent implements OnInit {
/**
* 创建线程并执行
*/
- public promise: Worker = new Worker('/adminweb/assets/web-worker-handle.js');
+ public promise: Worker = new Worker('/assets/web-worker-handle.js');
creatWorkers() {
let dynamicData = {
raw_data: this.raw_data,
@@ -485,6 +484,7 @@ export class MainComponent implements OnInit {
}
this.promise.postMessage(dynamicData);
this.promise.onmessage = function (e) {
+ console.log('=====')
this.combined_data = e.data;
this.selectChange('dynamic');
// this.promise.terminate();
diff --git a/src/app/pages/seasonal-plan/seasonal-plan.component.html b/src/app/pages/seasonal-plan/seasonal-plan.component.html
index dde31ba..8079caa 100644
--- a/src/app/pages/seasonal-plan/seasonal-plan.component.html
+++ b/src/app/pages/seasonal-plan/seasonal-plan.component.html
@@ -1,5 +1,5 @@
-
-->
diff --git a/src/app/pages/seasonal-plan/seasonal-plan.component.scss b/src/app/pages/seasonal-plan/seasonal-plan.component.scss
index 8111a88..a7c804f 100644
--- a/src/app/pages/seasonal-plan/seasonal-plan.component.scss
+++ b/src/app/pages/seasonal-plan/seasonal-plan.component.scss
@@ -4,9 +4,10 @@
height: 100%;
overflow-y: auto;
padding: 15px 10px;
- background-color: #fff;
+ background-color: #fff;
.page-content {
border: 1px solid #ccc;
+ height: 100%;
padding: 10px 20px;
.search-filter {
padding: 0 15px;
@@ -38,42 +39,75 @@
}
}
.airline-table{
- .table-container{
+ .table-container {
display: inline-block;
- // border: 1px solid #ccc;
+ // position: relative;
width: 100%;
- height: 700px;
- overflow: auto;
- box-shadow: 0 0 1px .5px #ddd;
- table{
- width: max-content;
- tr{
- cursor: pointer;
- &.selected{
- background: rgb(181, 215, 255);
+ // overflow-x: auto;
+ overflow-y: hidden;
+ box-shadow: 0 0 1px 0.5px #ddd;
+ .table-head {
+ overflow: hidden;
+ overflow-y: scroll;
+ height: 42px;
+ table {
+ margin: 0;
+ width: max-content;
+ th {
+ background-color: #ddd;
+ text-align: center;
+ color: rgb(0, 0, 255);
}
}
- th{
- background-color: #ddd;
- color: rgb(0, 0, 255);
- }
- th,td{
- // border: none;
- text-align: center;
+ &::-webkit-scrollbar {
+ width: 15px;
+ height: 15px;
}
}
- &::-webkit-scrollbar {
- width: 15px;
- height: 15px;
- }
- &::-webkit-scrollbar-thumb {
- /*滚动条里面小方块*/
- background: rgba(165, 207, 222, 1);
- border-radius: 10px;
- }
- &::-webkit-scrollbar-track {
- background: rgba(0, 0, 0, 0.06);
- border-radius: 10px;
+
+ .table-body {
+ position: relative;
+ // height: 600px;
+ overflow: auto;
+ width: 100%;
+ .list-view-phantom {
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ z-index: -1;
+ }
+ table {
+ left: 0;
+ right: 0;
+ top: 0;
+ position: absolute;
+ width: max-content;
+ tr {
+ cursor: pointer;
+ height: 42px;
+ &.selected {
+ background: rgb(181, 215, 255);
+ }
+ }
+ td {
+ border: 1px solid #dee2e6;
+ text-align: center
+ }
+ }
+ &::-webkit-scrollbar {
+ width: 15px;
+ height: 15px;
+ }
+ &::-webkit-scrollbar-thumb {
+ /*滚动条里面小方块*/
+ background: rgba(165, 207, 222, 1);
+ border-radius: 10px;
+ }
+ &::-webkit-scrollbar-track {
+ background: rgba(0, 0, 0, 0.06);
+ border-radius: 10px;
+ }
}
}
.airline-message {
@@ -95,6 +129,14 @@
}
}
}
+ /deep/ .ant-tabs-content{
+ height: calc(100% - 65px);
+ overflow-y: auto;
+ border: 1px solid #ccc;
+ }
+ nz-tabset{
+ height: 100%;
+ }
&::-webkit-scrollbar {
width: 15px;
height: 15px;
diff --git a/src/app/pages/seasonal-plan/seasonal-plan.component.ts b/src/app/pages/seasonal-plan/seasonal-plan.component.ts
index 88a3b5c..e1ab54e 100644
--- a/src/app/pages/seasonal-plan/seasonal-plan.component.ts
+++ b/src/app/pages/seasonal-plan/seasonal-plan.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, ViewChild, Renderer2, ChangeDetectorRef } from '@angular/core';
+import { Component, OnInit, ViewChild, Renderer2 } from '@angular/core';
import { OperateSpinServiceService } from '../../services/operate-spin-service.service';
import { HttpClientService } from '../../services/http-client.service';
import { BasicDataService } from '../../services/basic-data-service';
@@ -16,10 +16,8 @@ export class SeasonalPlanComponent implements OnInit {
private httpCilent: HttpClientService,
private basicDataService: BasicDataService,
private operateSpinServiceService: OperateSpinServiceService,
- private changeDetectorRef: ChangeDetectorRef
) {
this.operateSpinServiceService.showSpin();
- this.changeDetectorRef.detach();
}
//勾选复选框
@@ -40,7 +38,7 @@ export class SeasonalPlanComponent implements OnInit {
{ col_code: 'operationDays', col_chn: '运营日' },
{ col_code: 'startDate', col_chn: '开始日期' },
{ col_code: 'endDate', col_chn: '结束日期' },
- { col_code: 'AirportChn', col_chn: '航线' },
+ { col_code: 'routChn', col_chn: '航线' },
{ col_code: 'arriOrDeptChn', col_chn: '进/出港' },
{ col_code: 'arrivalTimeTra', col_chn: '到达时间' },
{ col_code: 'departureTimeTra', col_chn: '出发时间' },
@@ -71,20 +69,55 @@ export class SeasonalPlanComponent implements OnInit {
airlines: Array; //航空公司
aircraftTypes: Array; //机型
flightTypes: Array; //航班类别
+ airports: Array; //机场
public row_state: any = {};
public combined_data: Array