From b33a1b62ce4e4d464a7c4f30dc577ec4c10217d5 Mon Sep 17 00:00:00 2001 From: qq55341701 <55341701@qq.com> Date: Fri, 1 Apr 2022 09:35:29 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=96=B0=E5=A2=9E=E9=A2=84?= =?UTF-8?q?=E8=AD=A6=E8=AF=AF=E6=8A=A5=E5=AE=A1=E6=A0=B8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +- .../criminal-records-admin.component.html | 131 ++-- .../criminal-records-admin.component.ts | 404 +--------- .../disposeequipment.component.html | 0 .../disposeequipment.component.scss | 0 .../disposeequipment.component.ts | 0 .../get-out-of-line-details.component.html | 0 .../get-out-of-line-details.component.scss | 0 .../get-out-of-line-details.component.ts | 0 src/app/pages/home/home.component.ts | 4 +- src/app/pages/login/login.component.html | 2 +- src/app/pages/login/login.component.ts | 26 +- .../oil-unloading-process-list.component.ts | 2 +- src/app/pages/pages-routing.module.ts | 7 - src/app/pages/pages.module.ts | 9 +- .../plan-admin/plan-admin.component.html | 105 --- .../plan-admin/plan-admin.component.scss | 193 ----- .../pages/plan-admin/plan-admin.component.ts | 173 ---- .../today-warning.component.html | 138 ---- .../today-warning.component.scss | 279 ------- .../today-warning/today-warning.component.ts | 259 ------ .../warning-statistics-list.component.html | 186 ----- .../warning-statistics-list.component.scss | 620 --------------- .../warning-statistics-list.component.ts | 739 ------------------ src/index.html | 2 +- src/theme.less | 305 +------- src/theme.wxss | 0 27 files changed, 117 insertions(+), 3471 deletions(-) rename src/app/pages/{warning-statistics-list => }/disposeequipment/disposeequipment.component.html (100%) rename src/app/pages/{warning-statistics-list => }/disposeequipment/disposeequipment.component.scss (100%) rename src/app/pages/{warning-statistics-list => }/disposeequipment/disposeequipment.component.ts (100%) rename src/app/pages/{today-warning => }/get-out-of-line-details/get-out-of-line-details.component.html (100%) rename src/app/pages/{today-warning => }/get-out-of-line-details/get-out-of-line-details.component.scss (100%) rename src/app/pages/{today-warning => }/get-out-of-line-details/get-out-of-line-details.component.ts (100%) delete mode 100644 src/app/pages/plan-admin/plan-admin.component.html delete mode 100644 src/app/pages/plan-admin/plan-admin.component.scss delete mode 100644 src/app/pages/plan-admin/plan-admin.component.ts delete mode 100644 src/app/pages/today-warning/today-warning.component.html delete mode 100644 src/app/pages/today-warning/today-warning.component.scss delete mode 100644 src/app/pages/today-warning/today-warning.component.ts delete mode 100644 src/app/pages/warning-statistics-list/warning-statistics-list.component.html delete mode 100644 src/app/pages/warning-statistics-list/warning-statistics-list.component.scss delete mode 100644 src/app/pages/warning-statistics-list/warning-statistics-list.component.ts create mode 100644 src/theme.wxss diff --git a/README.md b/README.md index 5949ffc..31af1d0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# 中国石化加油站项目:预警误报审核 +# 中国石化加油站项目:预警误报审核管理系统 -## 🌼v1.0.0 主要变化 完成功能,部署测试 +## 🌼v1.0.0 ### 🌻 简介 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 891e4e3..f8933d2 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 @@ -2,21 +2,13 @@
+ + +
-
- -
-
- 预警类型统计 - 卸油统计 - 证照预警统计 -
-
-
- +
- - +
- \ No newline at end of file + 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 cb90401..521f2c2 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 @@ -2,17 +2,15 @@ import { HttpClient } from '@angular/common/http'; import { Component, ElementRef, OnInit, ViewContainerRef } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router' -import * as echarts from 'echarts'; - import { fromEvent } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; - import * as moment from 'moment'; import { NzModalService } from 'ng-zorro-antd/modal'; -import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; +import { GetOutOfLineDetailsComponent } from '../get-out-of-line-details/get-out-of-line-details.component'; import { NzMessageService } from 'ng-zorro-antd/message'; import { TreeService } from 'src/app/service/tree.service'; -import { DisposeequipmentComponent } from '../warning-statistics-list/disposeequipment/disposeequipment.component'; +import { DisposeequipmentComponent } from '../disposeequipment/disposeequipment.component'; +import 'linqjs'; @Component({ selector: 'app-criminal-records-admin', templateUrl: './criminal-records-admin.component.html', @@ -22,271 +20,7 @@ export class CriminalRecordsAdminComponent implements OnInit { validateForm!: FormGroup; constructor(private element: ElementRef, private toTree: TreeService, private http: HttpClient, private fb: FormBuilder, private router: Router, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private message: NzMessageService) { } - //饼图 - myChart - option = { - color: ['#FF4B65', '#23D9FF', '#608AFF', '#B2FF6D', '#FFFF99', '#C4E2FC', '#FF7F00', '#0090FF', '#FFD634', '#105597', '#FF4B65', '#23D9FF', '#71FFF5', '#B2FF6D'], - tooltip: { - trigger: 'item'//触发类型 - }, - series: [ - { - // name: 'Access From', - type: 'pie', - radius: ['58%', '75%'],//内半径外,外半径 - left: '0', - top: '9%', - avoidLabelOverlap: false,//防止标签重叠策略 - label: {//每一个标签外网延伸的引导说明 - show: false, - position: 'outside' - }, - labelLine: {//引导线 - show: true, - showAbove: true - }, - emphasis: {//中间高亮区域 - label: { - show: false, - fontSize: '40', - fontWeight: 'bold' - } - }, - data: [ - - ], - tooltip: {//鼠标移入提示 - position: 'right', - padding: [14, 19], - backgroundColor: 'rgba(28, 129, 218, 0.4)', - textStyle: { - color: '#fff', - fontSize: 12 - }, - formatter: "{b} : {c} ({d}%)" - } - } - ] - }; - //柱状图 - mybarChart: any - baroption = { - xAxis: { - type: 'category', - data: [], - axisLine: { - show: false, - lineStyle: { - color: '#91CCFF' - } - }, - axisTick: {//刻度线 - show: false - }, - inverse: true - }, - yAxis: { - type: 'value', - nameTextStyle: { - color: '#C4E2FC' - }, - splitLine: {//分割线 - lineStyle: { - color: ['#0f4374'], - width: 2 - } - }, - axisTick: {//刻度线 - show: false - }, - axisLine: {//轴线 - show: false, - lineStyle: { - color: '#C4E2FC' - } - } - }, - tooltip: { - // trigger: 'axis' - }, - series: [ - { - data: [], - type: 'bar', - itemStyle: { - color: { - type: 'linear', - x: 0, - y: 0, - x2: 0, - y2: 1, - colorStops: [{ - offset: 0, color: '#23F0FF' // 0% 处的颜色 - }, { - offset: 1, color: 'rgba(35, 153, 255, 0.1)' // 100% 处的颜色 - }], - global: false // 缺省为 false - } - }, - barWidth: '25%' - }, - { - data: [], - type: 'line', - symbol: 'circle', - symbolSize: 8, - label: { - show: true - }, - itemStyle: { - color: '#fff', - shadowColor: '#fff', - shadowBlur: 10 - }, - lineStyle: { - color: '#FFCC8A', - width: 1 - } - } - ], - grid: { - left: '42px', - right: '30px', - bottom: '38px', - top: '80px' - } - }; - baroption2 = { - xAxis: { - type: 'value', - show: false - }, - tooltip: { - // trigger: 'axis' - }, - yAxis: { - type: 'category', - data: [], - axisLine: { - show: false, - lineStyle: { - color: '#91CCFF', - } - }, - axisTick: {//刻度线 - show: false - }, - 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|${newParamsName}}`; - }, - rich: { - a: { - color: '#C4E2FC', - padding: [0, 0, 0, 8], - }, - s: { - color: '#fff', - borderWidth: 1, - borderColor: '#23D9FF', - backgroundColor: '#fff', - width: 4, - height: 4, - shadowBlur: 3, - shadowColor: "#fff" - } - } - }, - inverse: true - - }, - series: - { - label: { - // 柱图头部显示值 - show: true, - position: "right", - color: "#fff", - fontSize: 12, - formatter: '{c}', - offset: [6, 0] - }, - data: [], - type: 'bar', - itemStyle: { - color: { - type: 'linear', - x: 0, - y: 0, - x2: 1, - y2: 0, - colorStops: [{ - offset: 0, color: '#063d72' // 0% 处的颜色 - }, { - offset: 1, color: '#FF9963' // 100% 处的颜色 - }], - global: false // 缺省为 false - } - }, - barWidth: '36%', - } - , - grid: { - left: '150px', - right: '80px', - bottom: '3px', - top: '36px' - }, - // dataZoom: [ //Y轴滑动条 - // { - // type: 'slider', //滑动条 - // show: true, //开启 - // yAxisIndex: 0,//表示控制第几个y轴 - // left: '97%', //滑动条位置 - // start: 1, //初始化时,滑动条宽度开始标度 - // end: 100, //初始化时,滑动条宽度结束标度
- // maxValueSpan: 10,//显示数据的条数(默认显示10个) - // showDataShadow: false,//是否显示数据阴影 默认auto - // showDetail: false,//即拖拽时候是否显示详细数值信息 默认true - // realtime: true, //是否实时更新 - // filterMode: 'filter', - // backgroundColor: '#001735', - // width: '18' - // }, - // { - // type: 'inside', - // yAxisIndex: 0, - // zoomOnMouseWheel: false, //滚轮是否触发缩放 - // moveOnMouseMove: true, //鼠标滚轮触发滚动 - // moveOnMouseWheel: true - // } - // ] - } - isEcharts: boolean = true - isEchartsShow() { - this.isEcharts = !this.isEcharts - } startdate enddate ngOnInit(): void { @@ -313,17 +47,10 @@ export class CriminalRecordsAdminComponent implements OnInit { datePicker: [[this.startdate, this.enddate]] }); - //饼图 - this.myChart = echarts.init(document.getElementById('piechart')); - this.myChart.setOption(this.option); - //柱状折线图 - this.mybarChart = echarts.init(document.getElementById('barchart')); - this.mybarChart.setOption(this.baroption); this.warningType() this.tableSpin = true this.getAllOrganization() - this.getAggregations() } defaultOrId: string @@ -351,88 +78,7 @@ export class CriminalRecordsAdminComponent implements OnInit { 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); - } - //获取统计信息 - chartsSpin: boolean = false - getAggregations() { - this.chartsSpin = true - 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.chartsSpin = false - this.refreshPieData(data.result) - this.refreshBarLineData(this.echartsData, 'month') - }) - } //获得违规记录列表 SkipCount: string = '0' MaxResultCount: string = '50' @@ -692,48 +338,8 @@ export class CriminalRecordsAdminComponent implements OnInit { } - selectedType = '分布' - selectedRankingType = null - echartClick(type) { - this.selectedType = type - this.mybarChart.dispose() - this.mybarChart = echarts.init(document.getElementById('barchart')); - // if (type == '排名') { - - // console.log(this.selectedRankingType) - // if (this.selectedRankingType == '站点排名') { - // this.refreshBarLineData(this.echartsData, 'siteTop') - // } - // if (this.selectedRankingType == '事件排名') { - // this.refreshBarLineData(this.echartsData, 'eventTop') - // } - // } else { - - // } - this.selectedRankingType = null - this.refreshBarLineData(this.echartsData, 'month') - - } - echartClick2(type) { - this.mybarChart.dispose() - this.mybarChart = echarts.init(document.getElementById('barchart')); - this.selectedType = null - this.selectedRankingType = type - if (this.selectedRankingType == '站点排名') { - this.refreshBarLineData(this.echartsData, 'siteTop') - } - if (this.selectedRankingType == '事件排名') { - this.refreshBarLineData(this.echartsData, 'eventTop') - } - } - - - //跳转卸油统计页面 - goOilList() { - this.router.navigate(['/records/oliunloadinglist']) - } - goWarningList() { - this.router.navigate(['/records/warningstatisticslist']) + tableheight() { + return (document.getElementById('tablebox').clientHeight - 32) + 'px' } } diff --git a/src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.html b/src/app/pages/disposeequipment/disposeequipment.component.html similarity index 100% rename from src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.html rename to src/app/pages/disposeequipment/disposeequipment.component.html diff --git a/src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.scss b/src/app/pages/disposeequipment/disposeequipment.component.scss similarity index 100% rename from src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.scss rename to src/app/pages/disposeequipment/disposeequipment.component.scss diff --git a/src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.ts b/src/app/pages/disposeequipment/disposeequipment.component.ts similarity index 100% rename from src/app/pages/warning-statistics-list/disposeequipment/disposeequipment.component.ts rename to src/app/pages/disposeequipment/disposeequipment.component.ts diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html b/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.html similarity index 100% rename from src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.html rename to src/app/pages/get-out-of-line-details/get-out-of-line-details.component.html diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss b/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss similarity index 100% rename from src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.scss rename to src/app/pages/get-out-of-line-details/get-out-of-line-details.component.scss diff --git a/src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts b/src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts similarity index 100% rename from src/app/pages/today-warning/get-out-of-line-details/get-out-of-line-details.component.ts rename to src/app/pages/get-out-of-line-details/get-out-of-line-details.component.ts diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index f985388..0a19c61 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -7,12 +7,12 @@ import { CacheTokenService } from '../../service/cache-token.service' //引入 import { NzMessageService } from 'ng-zorro-antd/message'; import { SignalRAspNetCoreHelper } from '../../../shared/helpers/SignalRAspNetCoreHelper'; import { NzNotificationService } from 'ng-zorro-antd/notification'; -import { GetOutOfLineDetailsComponent } from '../today-warning/get-out-of-line-details/get-out-of-line-details.component'; +import { GetOutOfLineDetailsComponent } from '../get-out-of-line-details/get-out-of-line-details.component'; import { NzModalService } from 'ng-zorro-antd/modal'; import { HttpClient } from '@angular/common/http'; import { ChangePasswordComponent, MyValidators } from '../change-password/change-password.component'; import { listRefreshService } from '../../service/listRefresh.service'; -import { DisposeequipmentComponent } from '../warning-statistics-list/disposeequipment/disposeequipment.component'; +import { DisposeequipmentComponent } from '../disposeequipment/disposeequipment.component'; declare var abp: any import * as moment from 'moment'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; diff --git a/src/app/pages/login/login.component.html b/src/app/pages/login/login.component.html index c14a77a..0845e5e 100644 --- a/src/app/pages/login/login.component.html +++ b/src/app/pages/login/login.component.html @@ -1,7 +1,7 @@

欢迎登录

-

加油站智能安全管理系统

+

预警误报审核管理系统