From 4baf71a2561c6fad27872daeb3c8347980401c9f Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Wed, 24 Nov 2021 15:59:57 +0800
Subject: [PATCH 1/9] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=EF=BC=9B=E5=AE=8C=E5=96=84=E9=A2=84?=
=?UTF-8?q?=E8=AD=A6=E8=AE=B0=E5=BD=95=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/app.component.ts | 35 +-
.../criminal-records-admin.component.html | 2 +-
.../criminal-records-admin.component.ts | 151 ++-
.../criminal-records.component.html | 2 +-
.../criminal-records.component.ts | 150 ++-
src/app/pages/home/home.component.ts | 13 +-
src/app/pages/login/login.component.html | 8 +-
src/app/pages/login/login.component.scss | 21 +-
src/app/pages/login/login.component.ts | 1 +
.../plan-admin/plan-admin.component.html | 2 +-
.../pages/plan-admin/plan-admin.component.ts | 46 +-
.../navigation/navigation.component.html | 1 +
.../navigation/navigation.component.ts | 3 +
src/app/ui/tabbar/tabbar.component.html | 8 +-
src/app/ui/tabbar/tabbar.component.ts | 13 +-
src/assets/images/logo2.png | Bin 0 -> 10772 bytes
src/assets/js/abp.js | 896 ++++++++++++++++++
src/index.html | 4 +-
18 files changed, 1256 insertions(+), 100 deletions(-)
create mode 100644 src/assets/images/logo2.png
create mode 100644 src/assets/js/abp.js
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 6104104..d2f69af 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -7,7 +7,7 @@ import { CookieService } from 'ngx-cookie-service';
import "reflect-metadata";
import { NzNotificationService } from 'ng-zorro-antd/notification';
-
+declare var abp:any
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
@@ -17,7 +17,7 @@ export class AppComponent {
@ViewChild(TemplateRef, { static: false }) template?: TemplateRef<{}>;
- constructor(private http: HttpClient, private router: Router, public token: CacheTokenService, private cookieService: CookieService,private notificationService: NzNotificationService) { }
+ constructor(private http: HttpClient, private router: Router, public token: CacheTokenService, private cookieService: CookieService, private notificationService: NzNotificationService) { }
ngOnInit(): void {
// var token = this.cookieService.get("token")
@@ -30,11 +30,38 @@ export class AppComponent {
// this.token.startUp()
// })
// }
-
+ console.log('abp',abp)
}
receiptOfNotification() {
- this.notificationService.template(this.template!, { nzPlacement: 'bottomRight', nzClass: 'receiptOfNotification',nzDuration: 0 });
+ this.notificationService.template(this.template!, { nzPlacement: 'bottomRight', nzClass: 'receiptOfNotification', nzDuration: 0 });
}
+
+ messages
+ abp() {
+ let _this = this;
+
+ //手动实现hub
+ //this.hubConnection = new signalR.HubConnectionBuilder()
+ // .withUrl('/signalr-violation',
+ // {
+ // accessTokenFactory: ()=>this.token
+ // }
+ // )
+ // .build();
+ ////服务器回调方法
+ //this.hubConnection.on('SendViolation', (data) => {
+ // console.log("SendViolation", data);
+ // _this.messages.push("SendViolation:"+JSON.stringify(data));
+ //});
+ //this.hubConnection.start();
+
+ //abp封装的hub
+ abp.event.on('abp.notifications.received', function (userNotification) {
+ _this.messages.push("abp.notifications.received:" + JSON.stringify(userNotification));
+ console.log('abp.notifications.received', userNotification);
+ });
+ }
+
}
diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html
index 4783137..bc2075d 100644
--- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html
+++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html
@@ -68,7 +68,7 @@
diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
index 63587fa..901ff44 100644
--- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
+++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
@@ -49,26 +49,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
}
},
data: [
- { value: 26, name: '工作人员倚靠加油机或者立柱1' },
- { value: 86, name: '工作人员倚靠加油机或者立柱2' },
- { value: 34, name: '工作人员倚靠加油机或者立柱3' },
- { value: 55, name: '工作人员倚靠加油机或者立柱4' },
- { value: 60, name: '工作人员倚靠加油机或者立柱5' },
- { value: 26, name: '工作人员倚靠加油机或者立柱6' },
- { value: 86, name: '工作人员倚靠加油机或者立柱7' },
- { value: 34, name: '工作人员倚靠加油机或者立柱8' },
- { value: 55, name: '工作人员倚靠加油机或者立柱9' },
- { value: 60, name: '工作人员倚靠加油机或者立柱10' },
- { value: 26, name: '工作人员倚靠加油机或者立柱11' },
- { value: 86, name: '工作人员倚靠加油机或者立柱12' },
- { value: 34, name: '工作人员倚靠加油机或者立柱13' },
- { value: 55, name: '工作人员倚靠加油机或者立柱14' },
- { value: 60, name: '工作人员倚靠加油机或者立柱15' },
- { value: 26, name: '工作人员倚靠加油机或者立柱16' },
- { value: 86, name: '工作人员倚靠加油机或者立柱17' },
- { value: 34, name: '工作人员倚靠加油机或者立柱18' },
- { value: 55, name: '工作人员倚靠加油机或者立柱19' },
- { value: 60, name: '工作人员倚靠加油机或者立柱20' }
+
],
tooltip: {//鼠标移入提示
position: 'right',
@@ -87,7 +68,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
baroption = {
xAxis: {
type: 'category',
- data: this.getThirtyDays(),
+ data: [],
axisLine: {
show: false,
lineStyle: {
@@ -96,7 +77,8 @@ export class CriminalRecordsAdminComponent implements OnInit {
},
axisTick: {//刻度线
show: false
- }
+ },
+ inverse: true
},
yAxis: {
type: 'value',
@@ -121,7 +103,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
},
series: [
{
- data: [120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 100, 101],
+ data: [],
type: 'bar',
itemStyle: {
color: {
@@ -141,7 +123,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
barWidth: '25%'
},
{
- data: [120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 100, 101],
+ data: [],
type: 'line',
symbol: 'circle',
symbolSize: 8,
@@ -173,7 +155,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
},
yAxis: {
type: 'category',
- data: ['北京市第十九加油站1', '北京市第十九加油站2', '北京市第十九加油站3', '北京市第十九加油站4', '北京市第十九加油站5', '北京市第十九加油站6', '北京市第十九加油站7', '北京市第十九加油站8', '北京市第十九加油站9', '北京市第十九加油站10', '北京市第十九加油站11', '北京市第十九加油站12', '北京市第十九加油站', '北京市第十九加油站', '北京市第十九加油站', '北京市第十九加油站', '北京市第十九加油站', '北京市第十九加油站', '北京市第十九加油站', '北京市第十九加油站20', '北京市第十九加油站21', '北京市第十九加油站22', '北京市第十九加油站23'],
+ data: [],
axisLine: {
show: false,
lineStyle: {
@@ -185,8 +167,27 @@ export class CriminalRecordsAdminComponent implements OnInit {
},
axisLabel: {
formatter: function (value, index) {
+ let newParamsName = '';
+ const paramsNameNumber = value.length;
+ const provideNumber = 10;
+ const rowNumber = Math.ceil(paramsNameNumber / provideNumber);
+ if (paramsNameNumber > provideNumber) {
+ for (let p = 0; p < rowNumber; p++) {
+ let tempStr = '';
+ const start = p * provideNumber;
+ const end = start + provideNumber;
+ if (p == rowNumber - 1) {
+ tempStr = value.substring(start, paramsNameNumber);
+ } else {
+ tempStr = value.substring(start, end) + '\n';
+ }
+ newParamsName += tempStr;
+ }
+ } else {
+ newParamsName = value;
+ }
// 格式化成月/日,只在第一个刻度显示年份
- return '{s|·}' + `{a|${value}}`;
+ return '{s|·}' + `{a|${newParamsName}}`;
},
rich: {
a: {
@@ -219,7 +220,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
formatter: '{c}',
offset: [6, 0]
},
- data: [40, 36, 30, 25, 19, 15, 14, 11, 10, 8, 40, 36, 30, 25, 19, 15, 14, 11, 10, 8, 1, 2, 3].reverse(),
+ data: [],
type: 'bar',
itemStyle: {
color: {
@@ -278,7 +279,6 @@ export class CriminalRecordsAdminComponent implements OnInit {
startdate
enddate
ngOnInit(): void {
-
//当前日期
let myDate: any = new Date();
let nowY = myDate.getFullYear();
@@ -309,7 +309,85 @@ export class CriminalRecordsAdminComponent implements OnInit {
this.warningType()
this.getViolateRecordList()
}
+ //刷新饼图图表数据
+ num
+ echartsData: any
+ refreshPieData(data) {
+ //饼图
+ let option = this.myChart.getOption();
+ var num = 0
+ data.pieTop.forEach(element => {
+ num += element.count
+ element.name = element.key
+ element.value = element.count
+ });
+ this.num = num
+ option.series[0].data = data.pieTop;
+ this.myChart.setOption(option);
+ }
+ //刷新柱状折线图表数据
+ refreshBarLineData(data, type) {
+ console.log('统计图表数据', data)
+ //柱状图
+ let option = this.mybarChart.getOption();
+ console.log('柱图option', option)
+ if (type == 'month') {//近一个月柱状折线图
+ option = this.baroption
+ let monthArr = []
+ let valuedata = []
+ data.timeTop.forEach(element => {
+ monthArr.push(moment(element.key).format('MM.DD'))
+ valuedata.push(element.count)
+ });
+ option.xAxis.data = monthArr
+ option.series[0].data = valuedata
+ option.series[1].data = valuedata
+ } else if (type == 'eventTop') {
+ option = this.baroption2
+ let ydata = []
+ let valuedata = []
+ data.eventTop.forEach(element => {
+ ydata.push(element.key)
+ valuedata.push(element.count)
+ });
+ option.yAxis.data = ydata
+ option.series.data = valuedata
+ } else if (type == 'siteTop') {
+ option = this.baroption2
+ let ydata = []
+ let valuedata = []
+ data.siteTop.forEach(element => {
+ ydata.push(element.key)
+ valuedata.push(element.count)
+ });
+ option.yAxis.data = ydata
+ option.series.data = valuedata
+ }
+ this.mybarChart.setOption(option);
+ }
+ //获取统计信息
+ getAggregations() {
+ let ViolationIds = []
+ if (this.validateForm.value.type) {
+ this.warningTypesDetails.forEach(item => {
+ item.id ? ViolationIds.push(item.id) : null
+ });
+ }
+ let body: any = {
+ organizationUnitId: JSON.parse(sessionStorage.getItem('userdata')).organization.id,
+ isContainsChildren: true,
+ ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null
+ }
+ this.validateForm.value.level ? body.level = this.validateForm.value.level : null
+ this.validateForm.value.site ? body.violateArea = this.validateForm.value.site : null
+ ViolationIds.length != 0 ? body.violationType = ViolationIds : null
+ this.http.post('/api/services/app/ViolateRecord/Aggregations', body).subscribe((data: any) => {
+ this.echartsData = data.result
+ this.refreshPieData(data.result)
+ this.refreshBarLineData(this.echartsData, 'month')
+ })
+ }
//获得违规记录列表
SkipCount: string = '0'
MaxResultCount: string = '50'
@@ -340,6 +418,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
// this.list = data.result.items
this.totalCount = data.result.totalCount
console.log('违规记录列表', data)
+ this.getAggregations()
})
}
@@ -466,13 +545,25 @@ export class CriminalRecordsAdminComponent implements OnInit {
this.mybarChart.dispose()
this.mybarChart = echarts.init(document.getElementById('barchart'));
if (type == '排名') {
- this.mybarChart.setOption(this.baroption2);
+ console.log(this.selectedRankingType)
+ if (this.selectedRankingType == '站点排名') {
+ this.refreshBarLineData(this.echartsData, 'siteTop')
+ }
+ if (this.selectedRankingType == '事件排名') {
+ this.refreshBarLineData(this.echartsData, 'eventTop')
+ }
} else {
- this.mybarChart.setOption(this.baroption);
+ this.refreshBarLineData(this.echartsData, 'month')
}
}
echartClick2(type) {
this.selectedRankingType = type
+ if (this.selectedRankingType == '站点排名') {
+ this.refreshBarLineData(this.echartsData, 'siteTop')
+ }
+ if (this.selectedRankingType == '事件排名') {
+ this.refreshBarLineData(this.echartsData, 'eventTop')
+ }
}
}
diff --git a/src/app/pages/criminal-records/criminal-records.component.html b/src/app/pages/criminal-records/criminal-records.component.html
index 299ac75..bf7d449 100644
--- a/src/app/pages/criminal-records/criminal-records.component.html
+++ b/src/app/pages/criminal-records/criminal-records.component.html
@@ -68,7 +68,7 @@
diff --git a/src/app/pages/criminal-records/criminal-records.component.ts b/src/app/pages/criminal-records/criminal-records.component.ts
index 5972b59..9cb605c 100644
--- a/src/app/pages/criminal-records/criminal-records.component.ts
+++ b/src/app/pages/criminal-records/criminal-records.component.ts
@@ -45,26 +45,6 @@ export class CriminalRecordsComponent implements OnInit {
}
},
data: [
- { value: 26, name: '工作人员倚靠加油机或者立柱1' },
- { value: 86, name: '工作人员倚靠加油机或者立柱2' },
- { value: 34, name: '工作人员倚靠加油机或者立柱3' },
- { value: 55, name: '工作人员倚靠加油机或者立柱4' },
- { value: 60, name: '工作人员倚靠加油机或者立柱5' },
- { value: 26, name: '工作人员倚靠加油机或者立柱6' },
- { value: 86, name: '工作人员倚靠加油机或者立柱7' },
- { value: 34, name: '工作人员倚靠加油机或者立柱8' },
- { value: 55, name: '工作人员倚靠加油机或者立柱9' },
- { value: 60, name: '工作人员倚靠加油机或者立柱10' },
- { value: 26, name: '工作人员倚靠加油机或者立柱11' },
- { value: 86, name: '工作人员倚靠加油机或者立柱12' },
- { value: 34, name: '工作人员倚靠加油机或者立柱13' },
- { value: 55, name: '工作人员倚靠加油机或者立柱14' },
- { value: 60, name: '工作人员倚靠加油机或者立柱15' },
- { value: 26, name: '工作人员倚靠加油机或者立柱16' },
- { value: 86, name: '工作人员倚靠加油机或者立柱17' },
- { value: 34, name: '工作人员倚靠加油机或者立柱18' },
- { value: 55, name: '工作人员倚靠加油机或者立柱19' },
- { value: 60, name: '工作人员倚靠加油机或者立柱20' }
],
tooltip: {//鼠标移入提示
position: 'right',
@@ -84,7 +64,7 @@ export class CriminalRecordsComponent implements OnInit {
baroption = {
xAxis: {
type: 'category',
- data: this.getThirtyDays(),
+ data: [],
axisLine: {
show: false,
lineStyle: {
@@ -93,7 +73,9 @@ export class CriminalRecordsComponent implements OnInit {
},
axisTick: {//刻度线
show: false
- }
+ },
+ inverse: true
+
},
yAxis: {
type: 'value',
@@ -118,7 +100,7 @@ export class CriminalRecordsComponent implements OnInit {
},
series: [
{
- data: [120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 100, 101],
+ data: [],
type: 'bar',
itemStyle: {
color: {
@@ -138,7 +120,7 @@ export class CriminalRecordsComponent implements OnInit {
barWidth: '25%'
},
{
- data: [120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 120, 200, 150, 80, 70, 110, 130, 100, 101],
+ data: [],
type: 'line',
symbol: 'circle',
symbolSize: 8,
@@ -170,7 +152,7 @@ export class CriminalRecordsComponent implements OnInit {
},
yAxis: {
type: 'category',
- data: ['预警事件名', '预警事件名', '预警事件名', '预警事件名', '预警事件名', '预警事件名', '预警事件名', '预警事件名', '预警事件名', '预警事件名'],
+ data: [],
axisLine: {
show: false,
lineStyle: {
@@ -182,8 +164,27 @@ export class CriminalRecordsComponent implements OnInit {
},
axisLabel: {
formatter: function (value, index) {
+ let newParamsName = '';
+ const paramsNameNumber = value.length;
+ const provideNumber = 10;
+ const rowNumber = Math.ceil(paramsNameNumber / provideNumber);
+ if (paramsNameNumber > provideNumber) {
+ for (let p = 0; p < rowNumber; p++) {
+ let tempStr = '';
+ const start = p * provideNumber;
+ const end = start + provideNumber;
+ if (p == rowNumber - 1) {
+ tempStr = value.substring(start, paramsNameNumber);
+ } else {
+ tempStr = value.substring(start, end) + '\n';
+ }
+ newParamsName += tempStr;
+ }
+ } else {
+ newParamsName = value;
+ }
// 格式化成月/日,只在第一个刻度显示年份
- return '{s|·}' + `{a|${value}}`;
+ return '{s|·}' + `{a|${newParamsName}}`;
},
rich: {
a: {
@@ -201,8 +202,8 @@ export class CriminalRecordsComponent implements OnInit {
shadowColor: "#fff"
}
}
- }
-
+ },
+ inverse: true
},
series:
{
@@ -215,7 +216,7 @@ export class CriminalRecordsComponent implements OnInit {
formatter: '{c}',
offset: [6, 0]
},
- data: [40, 36, 30, 25, 19, 15, 14, 11, 10, 8].reverse(),
+ data: [],
type: 'bar',
itemStyle: {
color: {
@@ -237,8 +238,8 @@ export class CriminalRecordsComponent implements OnInit {
}
,
grid: {
- left: '100px',
- right: '60px',
+ left: '150px',
+ right: '80px',
bottom: '3px',
top: '20px'
}
@@ -312,6 +313,87 @@ export class CriminalRecordsComponent implements OnInit {
this.warningType()
this.getViolateRecordList()
+
+
+
+ }
+ //刷新饼图图表数据
+ num
+ echartsData: any
+ refreshPieData(data) {
+ //饼图
+ let option = this.myChart.getOption();
+ var num = 0
+ data.pieTop.forEach(element => {
+ num += element.count
+ element.name = element.key
+ element.value = element.count
+ });
+ this.num = num
+ option.series[0].data = data.pieTop;
+ this.myChart.setOption(option);
+ }
+ //刷新柱状折线图表数据
+ refreshBarLineData(data, type) {
+ console.log('统计图表数据', data)
+ //柱状图
+ let option = this.mybarChart.getOption();
+ console.log('柱图option', option)
+ if (type == 'month') {//近一个月柱状折线图
+ option = this.baroption
+ let monthArr = []
+ let valuedata = []
+ data.timeTop.forEach(element => {
+ monthArr.push(moment(element.key).format('MM.DD'))
+ valuedata.push(element.count)
+ });
+ option.xAxis.data = monthArr
+ option.series[0].data = valuedata
+ option.series[1].data = valuedata
+ } else if (type == 'eventTop') {
+ option = this.baroption2
+ let ydata = []
+ let valuedata = []
+ data.eventTop.forEach(element => {
+ ydata.push(element.key)
+ valuedata.push(element.count)
+ });
+ option.yAxis.data = ydata
+ option.series.data = valuedata
+ } else if (type == 'siteTop') {
+ option = this.baroption2
+ let ydata = []
+ let valuedata = []
+ data.siteTop.forEach(element => {
+ ydata.push(element.key)
+ valuedata.push(element.count)
+ });
+ option.yAxis.data = ydata
+ option.series.data = valuedata
+ }
+ this.mybarChart.setOption(option);
+ }
+ //获取统计信息
+ getAggregations() {
+ let ViolationIds = []
+ if (this.validateForm.value.type) {
+ this.warningTypesDetails.forEach(item => {
+ item.id ? ViolationIds.push(item.id) : null
+ });
+ }
+ let body: any = {
+ organizationUnitId: JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id,
+ isContainsChildren: true,
+ ViolateTime: this.validateForm.value.datePicker ? [moment(this.validateForm.value.datePicker[0]).format('yyyy-MM-DD'), moment(this.validateForm.value.datePicker[1]).format('yyyy-MM-DD')] : null
+ }
+ this.validateForm.value.level ? body.level = this.validateForm.value.level : null
+ this.validateForm.value.site ? body.violateArea = this.validateForm.value.site : null
+ ViolationIds.length != 0 ? body.violationType = ViolationIds : null
+ this.http.post('/api/services/app/ViolateRecord/Aggregations', body).subscribe((data: any) => {
+ this.echartsData = data.result
+ this.refreshPieData(data.result)
+ this.refreshBarLineData(this.echartsData, 'month')
+ })
}
//获得违规记录列表
@@ -344,6 +426,7 @@ export class CriminalRecordsComponent implements OnInit {
// this.list = data.result.items
this.totalCount = data.result.totalCount
console.log('违规记录列表', data)
+ this.getAggregations()
})
}
ngAfterViewInit(): void {
@@ -405,9 +488,10 @@ export class CriminalRecordsComponent implements OnInit {
this.mybarChart.dispose()
this.mybarChart = echarts.init(document.getElementById('barchart'));
if (type == '排名') {
- this.mybarChart.setOption(this.baroption2);
+ console.log(this.selectedRankingType)
+ this.refreshBarLineData(this.echartsData, 'eventTop')
} else {
- this.mybarChart.setOption(this.baroption);
+ this.refreshBarLineData(this.echartsData, 'month')
}
}
diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts
index 625431d..86b1181 100644
--- a/src/app/pages/home/home.component.ts
+++ b/src/app/pages/home/home.component.ts
@@ -19,15 +19,22 @@ export class HomeComponent implements OnInit {
this.navChangeService.getMessage().subscribe((message: any) => {
console.log(message);//send a message
- if(message.name == 'oilstation'){
+ if (message.name == 'oilstation') {
this.isGasStationNav = true
}
- if(message.name == '改变数量'){
+ if (message.name == '改变数量') {
this.isWarning = true
this.num = message.num
}
});
+ if (this.router.url.indexOf('warning') != -1) {
+ this.isWarning = true
+ } else {
+ this.isWarning = false
+ }
+
+
if (this.router.url.indexOf('petrolStation') != -1 && sessionStorage.getItem('isGasStation') == 'false') {//控制返回按钮显示
this.isGasStation = true
} else {
@@ -44,7 +51,7 @@ export class HomeComponent implements OnInit {
filter(event => event instanceof NavigationEnd)
).subscribe((event: any) => {
if (event.url.indexOf('warning') != -1) {//控制今日预警左上角数字显示
- this.isWarning = true
+
} else {
this.isWarning = false
}
diff --git a/src/app/pages/login/login.component.html b/src/app/pages/login/login.component.html
index db3fe0a..aa7b867 100644
--- a/src/app/pages/login/login.component.html
+++ b/src/app/pages/login/login.component.html
@@ -1,6 +1,8 @@
\ No newline at end of file
diff --git a/src/app/pages/login/login.component.scss b/src/app/pages/login/login.component.scss
index 9f15706..b58c9c0 100644
--- a/src/app/pages/login/login.component.scss
+++ b/src/app/pages/login/login.component.scss
@@ -8,8 +8,9 @@
.card {
position: absolute;
- top: 20%;
- right: 12%;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%,-50%);
background-color: rgba(0, 13, 33, 0.24);
border-radius: 16px;
width: 456px;
@@ -20,10 +21,12 @@
}
.cardheader {
- font-size: 28px;
- margin-bottom: 66px;
+ font-size: 22px;
color: rgba(255, 255, 255, 1);
}
+.cardheader:nth-child(2) {
+ margin-bottom: 40px;
+}
label {
color: #fff;
@@ -33,7 +36,7 @@ label {
display: flex;
justify-content: space-between;
margin-bottom: 6px;
-
+ align-items: center;
.forget {
cursor: pointer;
color: #2399FF;
@@ -69,11 +72,13 @@ p {
.name {
position: absolute;
- left: 10%;
- bottom: 45%;
+ left:40px;
+ top:40px;
img {
- margin-bottom: 32px;
+ // margin-bottom: 32px;
+ width: 254px;
+ height: 56px;
}
h1 {
diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts
index acaee6c..608e9ac 100644
--- a/src/app/pages/login/login.component.ts
+++ b/src/app/pages/login/login.component.ts
@@ -111,6 +111,7 @@ export class LoginComponent implements OnInit {
//自动登陆
this.autoLogin()
if (data.result.user.userName == 'admin') {
+ sessionStorage.setItem("isGasStation", 'false');
this.router.navigate(['/system/organization'])
} else {
if (data.result.user.organization.isGasStation) {
diff --git a/src/app/pages/plan-admin/plan-admin.component.html b/src/app/pages/plan-admin/plan-admin.component.html
index 8039995..e30c6b0 100644
--- a/src/app/pages/plan-admin/plan-admin.component.html
+++ b/src/app/pages/plan-admin/plan-admin.component.html
@@ -81,7 +81,7 @@
{{item.laneCount}} |
{{item.tankVolume}} |
- 查看
+ 查看
|
diff --git a/src/app/pages/plan-admin/plan-admin.component.ts b/src/app/pages/plan-admin/plan-admin.component.ts
index 34ea1a2..8024f77 100644
--- a/src/app/pages/plan-admin/plan-admin.component.ts
+++ b/src/app/pages/plan-admin/plan-admin.component.ts
@@ -33,10 +33,29 @@ export class PlanAdminComponent implements OnInit {
if (event.target.scrollHeight - (event.target.scrollTop + event.target.clientHeight) <= 10) {
console.log('需要加载数据了', event)
this.SkipCount = String(Number(this.SkipCount) + 50)
- await this.getGasStation()
+ // await this.getGasStation()
+ let params = {
+ StationName: this.validateForm.value.name,
+ OrganizationUnitId: String(this.OrganizationUnitId),
+ IsContainsChildren: 'true',
+ SkipCount: this.SkipCount,
+ MaxResultCount: this.MaxResultCount
+ }
+ await new Promise((resolve, reject) => {
+ this.http.get('/api/services/app/GasStation/GetAll', {
+ params: params
+ }).subscribe((data: any) => {
+ this.list = this.list.concat(data.result.items);
+ this.list = [...this.list]
+ resolve(data)
+ })
+ })
}
});
}
+
+
+
submitForm(): void {
for (const i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
@@ -83,7 +102,7 @@ export class PlanAdminComponent implements OnInit {
let OrganizationUnitId = sessionStorage.getItem('isGasStation') == 'true' ? JSON.parse(sessionStorage.getItem('userdataOfgasstation')).organization.id : JSON.parse(sessionStorage.getItem('userdata')).organization.id
let params = {
OrganizationUnitId: OrganizationUnitId,
- IsContainsChildren: "false"
+ IsContainsChildren: "true"
}
this.http.get('/api/services/app/Organization/GetAll', {
params: params
@@ -93,9 +112,9 @@ export class PlanAdminComponent implements OnInit {
element.parentId = null
}
});
- // data.result.items = data.result.items.filter((item, i) => {
- // return !item.isGasStation
- // })
+ data.result.items = data.result.items.filter((item, i) => {
+ return !item.isGasStation
+ })
for (let index = 0; index < data.result.items.length; index++) {
const element = data.result.items[index];
element.key = element.id
@@ -115,7 +134,16 @@ export class PlanAdminComponent implements OnInit {
return (document.getElementById('tablebox').clientHeight - 42) + 'px'
}
- look() {
+ look(item) {
+
+ let gastionobj = {
+ organization: {
+ displayName: item.stationName,
+ isGasStation: true,
+ id: item.organizationUnitId
+ }
+ }
+ sessionStorage.setItem('userdataOfgasstation', JSON.stringify(gastionobj))
this.router.navigate(['/plan/petrolStation'])
let obj = {
name: 'oilstation'
@@ -150,10 +178,10 @@ export class PlanAdminComponent implements OnInit {
this.http.get('/api/services/app/GasStation/GetAll', {
params: params
}).subscribe((data: any) => {
- this.list = this.list.concat(data.result.items);
- this.list = [...this.list]
+ // this.list = this.list.concat(data.result.items);
+ this.list = [...data.result.items]
resolve(data)
- console.log(999999, data)
+ // console.log(999999, data)
})
})
}
diff --git a/src/app/system-management/navigation/navigation.component.html b/src/app/system-management/navigation/navigation.component.html
index 02cd2a6..a839689 100644
--- a/src/app/system-management/navigation/navigation.component.html
+++ b/src/app/system-management/navigation/navigation.component.html
@@ -29,6 +29,7 @@
diff --git a/src/app/system-management/navigation/navigation.component.ts b/src/app/system-management/navigation/navigation.component.ts
index d5ca598..378932c 100644
--- a/src/app/system-management/navigation/navigation.component.ts
+++ b/src/app/system-management/navigation/navigation.component.ts
@@ -15,4 +15,7 @@ export class NavigationComponent implements OnInit {
signOut() {
this.router.navigate(['/login'])
}
+ pages() {
+ this.router.navigate(['/plan'])
+ }
}
diff --git a/src/app/ui/tabbar/tabbar.component.html b/src/app/ui/tabbar/tabbar.component.html
index 267f8da..805ad12 100644
--- a/src/app/ui/tabbar/tabbar.component.html
+++ b/src/app/ui/tabbar/tabbar.component.html
@@ -1,6 +1,6 @@
-

+
@@ -16,9 +16,9 @@
- - 基本信息
- - 器材信息
-
+ - 基本信息
+ - 器材信息
+ - 系统管理
- 退出系统
diff --git a/src/app/ui/tabbar/tabbar.component.ts b/src/app/ui/tabbar/tabbar.component.ts
index 803ff22..b4ae5b2 100644
--- a/src/app/ui/tabbar/tabbar.component.ts
+++ b/src/app/ui/tabbar/tabbar.component.ts
@@ -17,11 +17,22 @@ export class TabbarComponent implements OnInit {
constructor(private http: HttpClient, private router: Router, private route: ActivatedRoute, public token: CacheTokenService,
private cookieService: CookieService, private message: NzMessageService) { }
surname: string
+ userName: string
+ isGasStation: string
ngOnInit() {
setInterval(() => {
this.getTime()
}, 1000);
- this.surname = JSON.parse(sessionStorage.getItem('userdata')).name
+ this.isGasStation = JSON.parse(sessionStorage.getItem('isGasStation'))
+ if(this.isGasStation == 'true'){
+ this.surname = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).name
+ this.userName = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).userName
+ }else{
+ this.surname = JSON.parse(sessionStorage.getItem('userdata')).name
+ this.userName = JSON.parse(sessionStorage.getItem('userdata')).userName
+ }
+
+
}
//获得时间
diff --git a/src/assets/images/logo2.png b/src/assets/images/logo2.png
new file mode 100644
index 0000000000000000000000000000000000000000..afada94062726cdf0a958a683c94038d1950fa9c
GIT binary patch
literal 10772
zcmV+vD(lsWP)
z2b@*K^~Yy-VS%M8RRk1!j0Hm^Xv9XMV2v?YqhQx)C{Zz16uV+q(1^YLu?5tKif9l!
zHteV%7DOo`AVt{a{y|C!fP)=C=3lV|Sh3=W{>ry?Jxz&TZ$MIkhYZ0+j=HQA+Kn
zl-gV=wOA=NMJe@|QtGoj4(8$E;o*@U#byBgl~QLy_-%MjDRsV5YO=pq9v&VZYZt|2
z03(%BCnfAVLMe5+zxN&<9v*8C#bN;0D5VCc+~*mk)B#GVrT+eVczAe}9>rh){ghG<
zX59BfrPS6+sa5{odw6(wloo|DfF??**-ELF1&lF4DYb{c?;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&ai3)ba=FkEHPrMX=lAmX51JURuNoVO?7NvzpH=`3;fR~F
zyxIrDi1wNN8tKHgtSlDJKnHm@64m)|{%5_Nnv
zR&dNtEGLsPfWBl9%#xS?EIx5*30@S&nCBt3x8U=7Sju9}
z3Q7KakpL?WXW)*d*l!tbbviP!0vD`q3CHV~l7McDx4}yEl{$E47YJ!1f<}_!T=I=%
zfxgaZ3j7pu?j9Z<8Bp6-0A|L&DD)G?t)1ET7>p?+(VM0@-)eNAuINY;y0X^EA}~aU
zu1|;f?wz7u@qBWRCq-AGBA7!)$6fJYP%tu^pSKIMjI4%f@EsET%R&V;NvsTteeNC}
z9vM)dYydCeCp#3PeH^Y&j}cTcH-kPpjfH$9DRUJoj}_?XD%eiM?JKWpWZQ6#U!v;j
z4Y#tu94E2ctyn!KjsPGZK8=dz-1gRvA%FBZB
zY|SCO%}AZw66WxtC39jiF^)~+8RnyNf?QuhgRJ&5H-lR|JUnU<>RTMZoqR6C7x)I;
z*qRe;vYQBaDK^f*!)PArlQIzyvJrtQ4Nwuiki+peBK>Uz=NdAg-(v%*h8Y}^V4Pwg
ztM1>!!=r?#?F_&cK;c4YG~5i;%M*l#k03>?R%f&)gI`hxkmmT6Nc&YH%b`N*-+)y~
zMNIB+^Vn&Q{{_sg2JfR`*dA_VZfSjm(;VAGp$s7HxqEncWI%0a0BsWV(I_WL(na{d
zj};Mt3MTL`;scVP0u@G5f_)yF#znZF?v+vXw2qMiHVPHo%PU16%>b?yZB;1>
zyfBrxlDpR896UU7MQvXJq#^to*NL>L8s)U7iKJX63PPtvC999|8Hv9#b9Thw3z4Z&
zVeI{mdB}ubU#A!|O%T=yJgu~m`9~P8nF(^5V}BEA&OI+&ZX_7<@Tgx 0) {
+ addSeperator();
+ }
+
+ qs = qs + parameterInfo.name + '[' + j + ']=' + encodeURIComponent(parameterInfo.value[j]);
+ }
+ } else {
+ qs = qs + parameterInfo.name + '=' + encodeURIComponent(parameterInfo.value);
+ }
+ }
+
+ return qs;
+ }
+
+ /**
+ * Sets a cookie value for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} value
+ * @param {Date} expireDate (optional). If not specified the cookie will expire at the end of session.
+ * @param {string} path (optional)
+ */
+ abp.utils.setCookieValue = function (key, value, expireDate, path, domain) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ if (value) {
+ cookieValue = cookieValue + encodeURIComponent(value);
+ }
+
+ if (expireDate) {
+ cookieValue = cookieValue + "; expires=" + expireDate.toUTCString();
+ }
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ if (domain) {
+ cookieValue = cookieValue + "; domain=" + domain;
+ }
+
+ document.cookie = cookieValue;
+ };
+
+ /**
+ * Gets a cookie with given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @returns {string} Cookie value or null
+ */
+ abp.utils.getCookieValue = function (key) {
+ var equalities = document.cookie.split('; ');
+ for (var i = 0; i < equalities.length; i++) {
+ if (!equalities[i]) {
+ continue;
+ }
+
+ var splitted = equalities[i].split('=');
+ if (splitted.length != 2) {
+ continue;
+ }
+
+ if (decodeURIComponent(splitted[0]) === key) {
+ return decodeURIComponent(splitted[1] || '');
+ }
+ }
+
+ return null;
+ };
+
+ /**
+ * Deletes cookie for given key.
+ * This is a simple implementation created to be used by ABP.
+ * Please use a complete cookie library if you need.
+ * @param {string} key
+ * @param {string} path (optional)
+ */
+ abp.utils.deleteCookie = function (key, path) {
+ var cookieValue = encodeURIComponent(key) + '=';
+
+ cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
+
+ if (path) {
+ cookieValue = cookieValue + "; path=" + path;
+ }
+
+ document.cookie = cookieValue;
+ }
+
+ /**
+ * Gets the domain of given url
+ * @param {string} url
+ * @returns {string}
+ */
+ abp.utils.getDomain = function (url) {
+ var domainRegex = /(https?:){0,1}\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i;
+ var matches = domainRegex.exec(url);
+ return (matches && matches[2]) ? matches[2] : '';
+ }
+
+ /* TIMING *****************************************/
+ abp.timing = abp.timing || {};
+
+ abp.timing.utcClockProvider = (function () {
+
+ var toUtc = function (date) {
+ return Date.UTC(
+ date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()
+ );
+ }
+
+ var now = function () {
+ return toUtc(new Date());
+ };
+
+ var normalize = function (date) {
+ if (!date) {
+ return date;
+ }
+
+ return new Date(toUtc(date));
+ };
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ now: now,
+ normalize: normalize,
+ supportsMultipleTimezone: true
+ };
+ })();
+
+ abp.timing.localClockProvider = (function () {
+
+ var toLocal = function (date) {
+ return new Date(
+ date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()
+ );
+ }
+
+ var now = function () {
+ return toLocal(new Date());
+ }
+
+ var normalize = function (date) {
+ if (!date) {
+ return date;
+ }
+
+ return toLocal(date);
+ }
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ now: now,
+ normalize: normalize,
+ supportsMultipleTimezone: false
+ };
+ })();
+
+ abp.timing.unspecifiedClockProvider = (function () {
+
+ var now = function () {
+ return new Date();
+ }
+
+ var normalize = function (date) {
+ return date;
+ }
+
+ // Public interface ///////////////////////////////////////////////////
+
+ return {
+ now: now,
+ normalize: normalize,
+ supportsMultipleTimezone: false
+ };
+ })();
+
+ abp.timing.convertToUserTimezone = function (date) {
+ var localTime = date.getTime();
+ var utcTime = localTime + (date.getTimezoneOffset() * 60000);
+ var targetTime = parseInt(utcTime) + parseInt(abp.timing.timeZoneInfo.windows.currentUtcOffsetInMilliseconds);
+ return new Date(targetTime);
+ };
+
+ /* CLOCK *****************************************/
+ abp.clock = abp.clock || {};
+
+ abp.clock.now = function () {
+ if (abp.clock.provider) {
+ return abp.clock.provider.now();
+ }
+
+ return new Date();
+ }
+
+ abp.clock.normalize = function (date) {
+ if (abp.clock.provider) {
+ return abp.clock.provider.normalize(date);
+ }
+
+ return date;
+ }
+
+ abp.clock.provider = abp.timing.unspecifiedClockProvider;
+
+ /* SECURITY ***************************************/
+ abp.security = abp.security || {};
+ abp.security.antiForgery = abp.security.antiForgery || {};
+
+ abp.security.antiForgery.tokenCookieName = 'XSRF-TOKEN';
+ abp.security.antiForgery.tokenHeaderName = 'X-XSRF-TOKEN';
+
+ abp.security.antiForgery.getToken = function () {
+ return abp.utils.getCookieValue(abp.security.antiForgery.tokenCookieName);
+ };
+
+ abp.security.antiForgery.shouldSendToken = function (settings) {
+ if (settings.crossDomain === undefined || settings.crossDomain === null) {
+ return abp.utils.getDomain(location.href) === abp.utils.getDomain(settings.url);
+ }
+
+ return !settings.crossDomain;
+ };
+
+})();
\ No newline at end of file
diff --git a/src/index.html b/src/index.html
index f451d0c..15e4416 100644
--- a/src/index.html
+++ b/src/index.html
@@ -2,7 +2,7 @@
- 中石化加油站
+ 中化石油智能安全管理系统
@@ -10,5 +10,5 @@
-
+
From 98b5791895595777a2ca353d19985746c30a5ecf Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Thu, 25 Nov 2021 09:56:19 +0800
Subject: [PATCH 2/9] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=8E=A8=E9=80=81?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E6=90=9C=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/app/system-management/push/push.component.ts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/app/system-management/push/push.component.ts b/src/app/system-management/push/push.component.ts
index 6f09bcc..944b28f 100644
--- a/src/app/system-management/push/push.component.ts
+++ b/src/app/system-management/push/push.component.ts
@@ -121,5 +121,14 @@ export class PushComponent implements OnInit {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
}
+
+ if(this.validateForm.value.search){
+ this.list = this.list.filter((item)=>{
+ return item.violationType.indexOf(this.validateForm.value.search) != -1
+ })
+ }else{
+ this.getViolation()
+ }
+
}
}
From 287fff7d78ff5055ea039b4533eacffd9e0682c4 Mon Sep 17 00:00:00 2001
From: cpf <1105965053@qq.com>
Date: Thu, 25 Nov 2021 11:34:37 +0800
Subject: [PATCH 3/9] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E5=AE=8C?=
=?UTF-8?q?=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../left-domain/left-domain.component.ts | 25 ++--
src/app/pages/pages.module.ts | 11 +-
src/app/pages/plan/plan.component.html | 23 ++--
src/app/pages/plan/plan.component.scss | 8 +-
src/app/pages/plan/plan.component.ts | 123 ++++++++++++++----
5 files changed, 136 insertions(+), 54 deletions(-)
diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts
index 0de4d11..407baef 100644
--- a/src/app/pages/left-domain/left-domain.component.ts
+++ b/src/app/pages/left-domain/left-domain.component.ts
@@ -211,26 +211,24 @@ export class LeftDomainComponent implements OnInit {
selectNode(item: MarkPlanData, e: MarkNodeData) {
if (this.selectPlanId != item.id || this.selectNodeId != e.id) { //选中
if (!MarkWindow.instance.currentMarkNodeInfo) { //未选中节点
- PlanComponent.instance.beforeEmergencyPlan = item
- PlanComponent.instance.beforePlanNode = e
- PlanComponent.instance.nzCurrent = -1
- PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器
+ this.updateFatherData() //更新/初始化父组件 数据
this.selectPlanId = item.id
this.selectNodeId = e.id
MarkWindow.instance.selectMarkNode(item.id, e.id)
+ PlanComponent.instance.beforeEmergencyPlan = item
+ PlanComponent.instance.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData
} else { //已选中节点
let isTrue = true;
if (ModeManager.currentMode == ModeType.Edit) {
isTrue = confirm('切换节点后,没保存的信息将会丢失!')
}
if (isTrue) {
- PlanComponent.instance.beforeEmergencyPlan = item
- PlanComponent.instance.beforePlanNode = e
- PlanComponent.instance.nzCurrent = -1
- PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器
+ this.updateFatherData() //更新/初始化父组件 数据
this.selectPlanId = item.id
this.selectNodeId = e.id
MarkWindow.instance.selectMarkNode(item.id, e.id)
+ PlanComponent.instance.beforeEmergencyPlan = item
+ PlanComponent.instance.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData
}
}
} else if (this.selectPlanId === item.id && this.selectNodeId === e.id) { //取消选中
@@ -241,8 +239,7 @@ export class LeftDomainComponent implements OnInit {
if (isTrue) {
PlanComponent.instance.beforeEmergencyPlan = new MarkPlanData(-99, "请选择节点")
PlanComponent.instance.beforePlanNode = new MarkNodeData(-99, "请选择节点")
- PlanComponent.instance.nzCurrent = -1
- PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器
+ this.updateFatherData() //更新/初始化父组件 数据
this.selectPlanId = null
this.selectNodeId = null
MarkWindow.instance.selectMarkNode(null, null)
@@ -250,6 +247,14 @@ export class LeftDomainComponent implements OnInit {
}
}
+ //更新/初始化父组件 数据
+ updateFatherData() {
+ PlanComponent.instance.nzCurrent = -1
+ PlanComponent.instance.isSuspend = true //暂停
+ PlanComponent.instance.timer? window.clearTimeout(PlanComponent.instance.timer) : null //清除定时器
+ PlanComponent.instance.updateTimer? window.clearTimeout(PlanComponent.instance.updateTimer) : null //清除定时器
+ }
+
saveDisposalDialog: boolean = false; //整体保存预案 弹窗
saveType: number = null; //新建保存/保存到已有 弹窗
allNodeList: any[] = []; //所有根节点/节点
diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts
index c30a97f..bdeda40 100644
--- a/src/app/pages/pages.module.ts
+++ b/src/app/pages/pages.module.ts
@@ -32,6 +32,10 @@ import { NzSpinModule } from 'ng-zorro-antd/spin';
import { NzTreeModule } from 'ng-zorro-antd/tree';
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
import { NzStepsModule } from 'ng-zorro-antd/steps';
+import { NzTableModule } from 'ng-zorro-antd/table';
+import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
+import { NzTimePickerModule } from 'ng-zorro-antd/time-picker';
+import { NzProgressModule } from 'ng-zorro-antd/progress';
import { TodayWarningAdminComponent } from './today-warning-admin/today-warning-admin.component';
import { CriminalRecordsAdminComponent } from './criminal-records-admin/criminal-records-admin.component';
import { EquipmentInfoComponent } from './equipment-info/equipment-info.component';
@@ -42,9 +46,7 @@ import { EditequipmentComponent } from './equipment-info/editequipment/editequip
import { NzTreeSelectModule } from 'ng-zorro-antd/tree-select';
import { PlanAdminComponent } from './plan-admin/plan-admin.component';
import { GetOutOfLineDetailsComponent } from './today-warning/get-out-of-line-details/get-out-of-line-details.component';
-import { NzTableModule } from 'ng-zorro-antd/table';
-import { NzCheckboxModule } from 'ng-zorro-antd/checkbox';
-import { NzTimePickerModule } from 'ng-zorro-antd/time-picker';
+
@NgModule({
declarations: [LoginComponent, RegisterComponent, HomeComponent, PlanComponent, TodayWarningComponent, CriminalRecordsComponent,
TodayWarningAdminComponent, CriminalRecordsAdminComponent, LeftDomainComponent, EquipmentInfoComponent, OilStationInfoComponent,
@@ -83,7 +85,8 @@ import { NzTimePickerModule } from 'ng-zorro-antd/time-picker';
NzStepsModule,
NzTableModule,
NzCheckboxModule,
- NzTimePickerModule
+ NzTimePickerModule,
+ NzProgressModule
],
entryComponents: [AddequipmentComponent, EditequipmentComponent,GetOutOfLineDetailsComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html
index 0217cb3..4e0838b 100644
--- a/src/app/pages/plan/plan.component.html
+++ b/src/app/pages/plan/plan.component.html
@@ -158,20 +158,19 @@
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss
index de97d92..12e7da1 100644
--- a/src/app/pages/plan/plan.component.scss
+++ b/src/app/pages/plan/plan.component.scss
@@ -362,9 +362,13 @@
}
label:nth-child(2){
flex: 1;
+ display: flex;
overflow: hidden;
- //.anticon{ font-size: 16px; color: #23D9FF; }
- img{ height: 35px; width: auto; vertical-align: top; }
+ .progress{
+ display: flex;
+ div { flex: 1; line-height: 30px; }
+ img{ width: 27px; height: 35px; display: block; cursor: pointer; }
+ }
}
label:last-child{
width: 15%;
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts
index 73877d9..c033142 100644
--- a/src/app/pages/plan/plan.component.ts
+++ b/src/app/pages/plan/plan.component.ts
@@ -339,6 +339,8 @@ export class PlanComponent implements OnInit {
nzCurrent: number = -1; //当前选择 预案节点Index
isSuspend: boolean = false; //是否暂停 自动切换节点
timer: any; //定时器
+ progressList: number[] = []; //进度条 条/值
+ updateTimer: any; //更新进度条定时器
//初始化 应急预案模块
initializePlan() {
@@ -346,14 +348,21 @@ export class PlanComponent implements OnInit {
this.beforePlanNode = new MarkNodeData(-99, "请选择节点")
this.isSuspend = false //初始化暂停状态
window.clearTimeout(this.timer) //清除定时器
+ this.progressList = []
+ window.clearTimeout(this.updateTimer) //清除定时器
}
//公用 切换选中节点
publicToggleNode() {
- this.beforePlanNode = this.beforeEmergencyPlan.nodes[this.nzCurrent]
- this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id
- this.leftDomain.selectNodeId = this.beforePlanNode.id
- MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true)
+ return new Promise((resolve, reject) => {
+ this.beforePlanNode = this.beforeEmergencyPlan.nodes[this.nzCurrent]
+ this.leftDomain.selectPlanId = this.beforeEmergencyPlan.id
+ this.leftDomain.selectNodeId = this.beforePlanNode.id
+ MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true)
+ this.beforePlanNode = MarkWindow.instance.currentMarkNodeInfo.nodeData
+ this.updateProgress() //更新进度条
+ resolve(true)
+ })
}
//选中 底部一级节点 开启自动播放
@@ -363,10 +372,14 @@ export class PlanComponent implements OnInit {
let isTrue = confirm("即将开始播放节点")
if (isTrue) {
this.timer? window.clearTimeout(this.timer) : null //清除定时器
+ this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
this.nzCurrent = 0
this.beforeEmergencyPlan = item
- this.publicToggleNode()
- !this.isSuspend? this.autoPlay() : null
+ this.updateProgressList().then(res=>{
+ this.publicToggleNode().then(data=>{
+ !this.isSuspend? this.autoPlay() : null
+ })
+ })
}
} else {
this.message.info('暂无数据节点');
@@ -374,31 +387,55 @@ export class PlanComponent implements OnInit {
}
}
- //自动播放-切换接点
- autoPlay() {
- if (this.nzCurrent >= this.beforeEmergencyPlan.nodes.length - 1) {
- this.nzCurrent = this.nzCurrent + 1
- this.isSuspend = false //初始化暂停状态
- window.clearTimeout(this.timer) //清除定时器
- this.message.info('已播放至最后一节点');
+ //更新进度条 值
+ updateProgress() {
+ if (this.progressList[this.nzCurrent] >= 100) {
+ this.progressList[this.nzCurrent] = 100
+ window.clearTimeout(this.updateTimer) //清除定时器
return
}
- let time: number = this.beforePlanNode.getShowTime()
- console.log(`所需${time}s`)
+ let time: number = this.beforePlanNode.getShowTime() || 1
+ this.updateTimer = window.setTimeout(()=>{
+ this.progressList[this.nzCurrent] = this.progressList[this.nzCurrent] + Math.ceil(100 / time)
+ this.updateProgress()
+ },1000)
+ }
+
+ //更新进度条 条数
+ updateProgressList() {
+ return new Promise((resolve, reject) => {
+ this.progressList = []
+ this.beforeEmergencyPlan.nodes.forEach(item=>{ this.progressList.push(0) })
+ resolve(true)
+ })
+ }
+
+ //自动播放-切换接点
+ autoPlay() {
+ let time: number = this.beforePlanNode.getShowTime() || 1
this.timer = window.setTimeout(()=>{
+ if (this.nzCurrent >= this.beforeEmergencyPlan.nodes.length - 1) {
+ this.isSuspend = false //初始化暂停状态
+ window.clearTimeout(this.timer) //清除定时器
+ this.message.info('已播放至最后一节点');
+ return
+ }
this.nzCurrent = this.nzCurrent + 1
- this.publicToggleNode()
- !this.isSuspend? this.autoPlay() : null
+ this.publicToggleNode().then(data=>{
+ !this.isSuspend? this.autoPlay() : null
+ })
},time * 1000)
}
//切换预案节点
changePlanNode(event){
- if (event === this.beforeEmergencyPlan.nodes.length) {
- return
+ if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) {
+ this.updateProgressList()
}
this.timer? window.clearTimeout(this.timer) : null //清除定时器
+ this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
this.nzCurrent = event
+ this.progressList[this.nzCurrent] = 0
this.publicToggleNode()
}
@@ -412,10 +449,16 @@ export class PlanComponent implements OnInit {
this.message.info('目前已经是第一节点');
return
}
+ if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) {
+ this.updateProgressList()
+ }
this.timer? window.clearTimeout(this.timer) : null //清除定时器
+ this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
this.nzCurrent = this.nzCurrent - 1
- this.publicToggleNode()
- !this.isSuspend? this.autoPlay() : null
+ this.progressList[this.nzCurrent] = 0
+ this.publicToggleNode().then(data=>{
+ //!this.isSuspend? this.autoPlay() : null
+ })
}
//切换预案节点 暂停
@@ -424,13 +467,21 @@ export class PlanComponent implements OnInit {
this.message.info('请选择节点');
return
}
+ if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) {
+ this.updateProgressList()
+ }
this.isSuspend = isSuspend
let msg: string = this.isSuspend? "目前已暂停" : "目前已开始播放"
this.message.info(msg);
if (this.isSuspend) { //暂停
window.clearTimeout(this.timer) //清除定时器
+ window.clearTimeout(this.updateTimer) //清除定时器
} else { //开启
+ this.timer? window.clearTimeout(this.timer) : null //清除定时器
+ this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
+ this.progressList.forEach((item,index)=>{ index >= this.nzCurrent? this.progressList[index] = 0 : null })
MarkWindow.instance.selectMarkNode(this.beforeEmergencyPlan.id, this.beforePlanNode.id, false, true)
+ this.updateProgress()
this.autoPlay()
}
}
@@ -442,9 +493,13 @@ export class PlanComponent implements OnInit {
return
}
this.timer? window.clearTimeout(this.timer) : null //清除定时器
- this.nzCurrent = 0
- this.publicToggleNode()
- !this.isSuspend? this.autoPlay() : null
+ this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
+ this.updateProgressList().then(res=>{
+ this.nzCurrent = 0
+ this.publicToggleNode().then(data=>{
+ !this.isSuspend? this.autoPlay() : null
+ })
+ })
}
//切换预案节点 下一个
@@ -457,10 +512,26 @@ export class PlanComponent implements OnInit {
this.message.info('目前已经是最后一个节点');
return
}
+ if (this.progressList.length != this.beforeEmergencyPlan.nodes.length) {
+ this.updateProgressList()
+ }
this.timer? window.clearTimeout(this.timer) : null //清除定时器
+ this.updateTimer? window.clearTimeout(this.updateTimer) : null //清除定时器
this.nzCurrent = this.nzCurrent + 1
- this.publicToggleNode()
- !this.isSuspend? this.autoPlay() : null
+ this.progressList[this.nzCurrent] = 0
+ this.publicToggleNode().then(data=>{
+ //!this.isSuspend? this.autoPlay() : null
+ })
+ }
+
+ //获取进度条 flex分布
+ getProgressFlex(e: MarkNodeData):string {
+ let length: number = 0
+ this.beforeEmergencyPlan.nodes.forEach(item=>{
+ length = length + (item.getShowTime() || 1)
+ })
+ let percentage: number = (e.getShowTime() || 1) / length
+ return `${percentage * 100}%`
}
//选中应急预案 设备
From e2eee64cb5f069cc44f7f388b7332958b93fd42c Mon Sep 17 00:00:00 2001
From: SHAOJIAHAO <55341701@qq.com>
Date: Thu, 25 Nov 2021 11:42:41 +0800
Subject: [PATCH 4/9] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=E6=A0=B9=E6=8D=AE?=
=?UTF-8?q?=E5=8E=9F=E5=9E=8B=E5=9B=BE=E4=BF=AE=E6=94=B9=E6=9C=80=E6=96=B0?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../criminal-records-admin.component.html | 109 +++++++++---------
.../criminal-records-admin.component.scss | 36 +++---
.../criminal-records-admin.component.ts | 13 ++-
.../criminal-records.component.html | 109 +++++++++---------
.../criminal-records.component.scss | 33 +++---
.../criminal-records.component.ts | 13 ++-
src/app/pages/home/home.component.html | 38 +++++-
src/app/pages/home/home.component.scss | 41 ++++++-
src/app/pages/home/home.component.ts | 107 ++++++++++++++++-
.../today-warning-admin.component.html | 5 +
.../today-warning-admin.component.scss | 51 ++++----
.../today-warning.component.html | 5 +
.../today-warning.component.scss | 26 +++++
src/assets/images/fullscreen.png | Bin 0 -> 1648 bytes
src/assets/images/navbg.png | Bin 22586 -> 41053 bytes
15 files changed, 401 insertions(+), 185 deletions(-)
create mode 100644 src/assets/images/fullscreen.png
diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html
index bc2075d..03256b2 100644
--- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.html
+++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.html
@@ -1,64 +1,65 @@
-
-
-
+
+
+
diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.scss b/src/app/pages/criminal-records-admin/criminal-records-admin.component.scss
index 4f9b0d3..2d24701 100644
--- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.scss
+++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.scss
@@ -10,7 +10,7 @@
padding: 0 36px;
width: 100%;
height: 32px;
- margin-top: 14px;
+ margin-bottom: 16px;
form {
width: 100%;
@@ -65,20 +65,21 @@
width: 100%;
display: flex;
justify-content: center;
-
+ .chartname{
+ position: absolute;
+ left: 20px;
+ top: 12px;
+ }
.chart {
width: 97%;
- height: 360px;
- border: 0px;
- box-shadow: 0 0 26px 0px #1a7fd7 inset;
+ height: 350px;
box-sizing: border-box;
- padding: 18px 26px;
+ padding: 0 10px;
display: flex;
div {
display: flex;
flex-direction: column;
-
span {
font-family: titlefont;
display: flex;
@@ -91,22 +92,18 @@
div {
flex: 1;
}
-
- .piechart {}
-
- .barchart {
- // border: 1px solid rgba(145, 204, 255, 0.95);
- }
+
}
-
.leftbox {
width: 360px;
position: relative;
-
+ border: 0px;
+ box-shadow: 0 0 26px 0px #1a7fd7 inset;
+ margin-right: 16px;
.centerContent {
position: absolute;
top: 42%;
- left: 11%;
+ left: 26%;
width: 170px;
div {
@@ -132,11 +129,12 @@
.rightbox {
flex: 1;
position: relative;
-
+ border: 0px;
+ box-shadow: 0 0 26px 0px #1a7fd7 inset;
.btnbox {
position: absolute;
- right: 5px;
- top: 5px;
+ right: 28px;
+ top: 12px;
display: flex;
flex-direction: row;
z-index: 999;
diff --git a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
index 901ff44..d76adf5 100644
--- a/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
+++ b/src/app/pages/criminal-records-admin/criminal-records-admin.component.ts
@@ -30,8 +30,9 @@ export class CriminalRecordsAdminComponent implements OnInit {
{
// name: 'Access From',
type: 'pie',
- radius: [85, 112],//内半径外,外半径
- left: '-30%',
+ radius: [88, 116],//内半径外,外半径
+ left: '0',
+ top:'8%',
avoidLabelOverlap: false,//防止标签重叠策略
label: {//每一个标签外网延伸的引导说明
show: false,
@@ -142,10 +143,10 @@ export class CriminalRecordsAdminComponent implements OnInit {
}
],
grid: {
- left: '36px',
+ left: '42px',
right: '30px',
- bottom: '50px',
- top: '45px'
+ bottom: '38px',
+ top: '60px'
}
};
baroption2 = {
@@ -245,7 +246,7 @@ export class CriminalRecordsAdminComponent implements OnInit {
left: '150px',
right: '80px',
bottom: '3px',
- top: '20px'
+ top: '36px'
},
// dataZoom: [ //Y轴滑动条
// {
diff --git a/src/app/pages/criminal-records/criminal-records.component.html b/src/app/pages/criminal-records/criminal-records.component.html
index bf7d449..a10f121 100644
--- a/src/app/pages/criminal-records/criminal-records.component.html
+++ b/src/app/pages/criminal-records/criminal-records.component.html
@@ -1,64 +1,65 @@
-
-
-
+
+
+
diff --git a/src/app/pages/criminal-records/criminal-records.component.scss b/src/app/pages/criminal-records/criminal-records.component.scss
index 13599ab..3c005b1 100644
--- a/src/app/pages/criminal-records/criminal-records.component.scss
+++ b/src/app/pages/criminal-records/criminal-records.component.scss
@@ -10,7 +10,7 @@
padding: 0 36px;
width: 100%;
height: 32px;
- margin-top: 14px;
+ margin-bottom: 16px;
form {
width: 100%;
@@ -66,14 +66,16 @@
width: 100%;
display: flex;
justify-content: center;
-
+ .chartname{
+ position: absolute;
+ left: 20px;
+ top: 12px;
+ }
.chart {
width: 97%;
- height: 360px;
- border: 0px;
- box-shadow: 0 0 26px 0px #1a7fd7 inset;
+ height: 350px;
box-sizing: border-box;
- padding: 18px 26px;
+ padding: 0 10px;
display: flex;
div {
@@ -92,22 +94,18 @@
div {
flex: 1;
}
-
- .piechart {}
-
- .barchart {
- // border: 1px solid rgba(145, 204, 255, 0.95);
- }
}
.leftbox {
width: 360px;
position: relative;
-
+ border: 0px;
+ box-shadow: 0 0 26px 0px #1a7fd7 inset;
+ margin-right: 16px;
.centerContent {
position: absolute;
top: 42%;
- left: 11%;
+ left: 26%;
width: 170px;
div {
@@ -133,11 +131,12 @@
.rightbox {
flex: 1;
position: relative;
-
+ border: 0px;
+ box-shadow: 0 0 26px 0px #1a7fd7 inset;
.btnbox {
position: absolute;
- right: 5px;
- top: 5px;
+ right: 28px;
+ top: 12px;
display: flex;
flex-direction: row;
z-index: 999;
diff --git a/src/app/pages/criminal-records/criminal-records.component.ts b/src/app/pages/criminal-records/criminal-records.component.ts
index 9cb605c..b9c18f2 100644
--- a/src/app/pages/criminal-records/criminal-records.component.ts
+++ b/src/app/pages/criminal-records/criminal-records.component.ts
@@ -26,8 +26,9 @@ export class CriminalRecordsComponent implements OnInit {
{
// name: 'Access From',
type: 'pie',
- radius: [85, 112],//内半径外,外半径
- left: '-30%',
+ radius: [88, 116],//内半径外,外半径
+ left: '0',
+ top:'8%',
avoidLabelOverlap: false,//防止标签重叠策略
label: {//每一个标签外网延伸的引导说明
show: false,
@@ -139,10 +140,10 @@ export class CriminalRecordsComponent implements OnInit {
}
],
grid: {
- left: '36px',
+ left: '42px',
right: '30px',
- bottom: '50px',
- top: '45px'
+ bottom: '38px',
+ top: '60px'
}
};
baroption2 = {
@@ -241,7 +242,7 @@ export class CriminalRecordsComponent implements OnInit {
left: '150px',
right: '80px',
bottom: '3px',
- top: '20px'
+ top: '36px'
}
}
getThirtyDays() {
diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html
index 6702563..5594d54 100644
--- a/src/app/pages/home/home.component.html
+++ b/src/app/pages/home/home.component.html
@@ -1,8 +1,11 @@