-
+
-
+
{{item.name}}
@@ -114,16 +117,6 @@
{{item.num}}%
-
diff --git a/src/app/home/statistic-analysis/home/home.component.scss b/src/app/home/statistic-analysis/home/home.component.scss
index 40b8e24..b5675b4 100644
--- a/src/app/home/statistic-analysis/home/home.component.scss
+++ b/src/app/home/statistic-analysis/home/home.component.scss
@@ -211,17 +211,17 @@
flex: 2;
display: flex;
justify-content: space-between;
- margin-bottom: 18px;
overflow: hidden;
.top1 {
flex: 1;
display: flex;
flex-direction: column;
+ overflow: hidden;
.top1-1 {
- flex: 1;
- margin-bottom: 18px;
+ height: 230px;
+ min-height: 205px;
display: flex;
position: relative;
@@ -231,8 +231,15 @@
}
.top1-2 {
+ margin-top: 18px;
position: relative;
- flex: 1.3;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+
+ .disqualificationUnitEcharts {
+ box-sizing: border-box;
+ }
.top1-2titlebox {
span {
@@ -273,6 +280,7 @@
box-sizing: border-box;
padding: 16px;
display: flex;
+ cursor: pointer;
.mapcarditemname {
flex: 1;
@@ -282,6 +290,11 @@
.mapcarditemname1 {
font-size: 16px;
+ max-width: 112px;
+ display: inline-block;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.mapcarditemname2 {
@@ -363,6 +376,19 @@
}
.bottombox {
+ margin-top: 18px;
position: relative;
flex: 0.9;
}
+
+// 适配125%
+@media screen and (max-height: 750px) {
+ .topbox {
+ .top1 {
+
+ .top1-1 {
+ height: 180px;
+ }
+ }
+ }
+}
diff --git a/src/app/home/statistic-analysis/home/home.component.ts b/src/app/home/statistic-analysis/home/home.component.ts
index b219552..c138d60 100644
--- a/src/app/home/statistic-analysis/home/home.component.ts
+++ b/src/app/home/statistic-analysis/home/home.component.ts
@@ -6,40 +6,45 @@ declare var AMapUI: any;
import * as echarts from 'echarts';
import { NzModalService } from 'ng-zorro-antd/modal';
import { TaskListComponent } from './task-list/task-list.component';
+import { UnitListComponent } from './unit-list/unit-list.component';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
- styleUrls: ['./home.component.scss']
+ styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit {
-
- constructor(private http: HttpClient, private modal: NzModalService, private viewContainerRef: ViewContainerRef, private router: Router) { }
- taskNumCharts
+ constructor(
+ private http: HttpClient,
+ private modal: NzModalService,
+ private viewContainerRef: ViewContainerRef,
+ private router: Router
+ ) {}
+ taskNumCharts;
taskNumChartsOption = {
title: [
{
- text: `{val|195}\n{name|任务总数}`,
+ text: `{val|0}\n{name|任务总数}`,
top: 'center',
left: '61%',
textStyle: {
rich: {
val: {
- fontSize: 28,
+ fontSize: 23,
fontWeight: 'bold',
- color: '#333333'
+ color: '#333333',
},
name: {
- fontSize: 14,
+ fontSize: 12,
color: '#666666',
- padding: [2, 0]
- }
- }
- }
+ padding: [2, 0],
+ },
+ },
+ },
},
],
color: ['#5483EA', '#34E0A3', '#E4E7EC'],
tooltip: {
- trigger: 'item'
+ trigger: 'item',
},
legend: {
top: 'center',
@@ -49,105 +54,124 @@ export class HomeComponent implements OnInit {
itemHeight: 10,
orient: 'vertical',
formatter: (name) => {
- let data = this.taskNumChartsOption.series[0].data
- let total = 0
- let tarValue
+ let data = this.taskNumChartsOption.series[0].data;
+ let total = 0;
+ let tarValue;
for (let i = 0; i < data.length; i++) {
- total += data[i].value
+ total += data[i].value;
if (data[i].name == name) {
- tarValue = data[i].value
+ tarValue = data[i].value;
}
}
- let v = tarValue + '个'
+ let v = tarValue + '个';
//计算出百分比
// let p = Math.round((tarValue / total) * 100) + '%'
- return `${name} ${v}`
+ return `${name} ${v}`;
//name是名称,v是数值
},
},
series: [
{
-
type: 'pie',
radius: ['50%', '65%'],
center: ['72%', '50%'],
avoidLabelOverlap: false,
label: {
show: false,
- position: 'center'
+ position: 'center',
},
labelLine: {
- show: false
+ show: false,
},
data: [
{ value: 37, name: '上级派发任务' },
{ value: 56, name: '自主任务' },
- { value: 102, name: '协助任务' }
- ]
- }
- ]
+ { value: 102, name: '协助任务' },
+ ],
+ },
+ ],
};
- disqualificationUnitCharts
+ disqualificationUnitCharts;
disqualificationUnitChartsOption = {
grid: {
left: '8%',
right: '5%',
top: '15%',
- bottom: '15%'
+ bottom: '22%',
},
xAxis: {
type: 'category',
- data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
- axisTick: { //x轴刻度尺
- show: false
+ data: [
+ '1月',
+ '2月',
+ '3月',
+ '4月',
+ '5月',
+ '6月',
+ '7月',
+ '8月',
+ '9月',
+ '10月',
+ '11月',
+ '12月',
+ ],
+ axisTick: {
+ //x轴刻度尺
+ show: false,
},
- axisLine: {//x轴线条颜色
+ axisLine: {
+ //x轴线条颜色
show: false,
lineStyle: {
- color: '#C7CAD0'
- }
+ color: '#C7CAD0',
+ },
},
},
yAxis: {
type: 'value',
- splitLine: {//网格线
+ splitLine: {
+ //网格线
lineStyle: {
- type: 'solid', //设置网格线类型 dotted:虚线 solid:实线
- color: '#ECEFF1' //网格线颜色
+ type: 'solid', //设置网格线类型 dotted:虚线 solid:实线
+ color: '#ECEFF1', //网格线颜色
},
},
- axisLine: {//y轴线条颜色
+ axisLine: {
+ //y轴线条颜色
show: false,
lineStyle: {
- color: '#C7CAD0'
- }
+ color: '#C7CAD0',
+ },
},
},
series: [
{
data: [8, 7, 8, 6, 11, 16, 18, 10, 14, 10, 9, 5],
type: 'line',
- showSymbol: false,//去除面积图节点圆
- smooth: true,//面积图改成弧形状
+ showSymbol: false, //去除面积图节点圆
+ smooth: true, //面积图改成弧形状
areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: 'rgba(84,131,234,0.6)'
- }, {
- offset: 1,
- color: 'rgba(255,255,255,0)'
- }])
- }
- }
- ]
+ color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+ {
+ offset: 0,
+ color: 'rgba(84,131,234,0.6)',
+ },
+ {
+ offset: 1,
+ color: 'rgba(255,255,255,0)',
+ },
+ ]),
+ },
+ },
+ ],
};
- completionOfTaskPie
+ completionOfTaskPie;
completionOfTaskPieOption = {
title: [
{
- text: `{val|195}\n{name|任务总数}`,
+ text: `{val|0}\n{name|任务总数}`,
top: 'center',
left: '26%',
textStyle: {
@@ -156,20 +180,19 @@ export class HomeComponent implements OnInit {
fontSize: 28,
fontWeight: 'bold',
color: '#333333',
-
},
name: {
fontSize: 14,
color: '#666666',
- padding: [2, 0]
- }
- }
- }
+ padding: [2, 0],
+ },
+ },
+ },
},
],
color: ['#34E0A3', '#E4E7EC'],
tooltip: {
- trigger: 'item'
+ trigger: 'item',
},
legend: {
top: 'center',
@@ -179,52 +202,51 @@ export class HomeComponent implements OnInit {
itemHeight: 10,
orient: 'vertical',
formatter: (name) => {
- let data = this.completionOfTaskPieOption.series[0].data
- let total = 0
- let tarValue
+ let data = this.completionOfTaskPieOption.series[0].data;
+ let total = 0;
+ let tarValue;
for (let i = 0; i < data.length; i++) {
- total += data[i].value
+ total += data[i].value;
if (data[i].name == name) {
- tarValue = data[i].value
+ tarValue = data[i].value;
}
}
- let v = tarValue
+ let v = tarValue;
//计算出百分比
// let p = Math.round((tarValue / total) * 100) + '%'
- return `${name} ${v}`
+ return `${name} ${v}`;
//name是名称,v是数值
},
},
series: [
{
-
type: 'pie',
radius: ['50%', '65%'],
center: ['35%', '50%'],
avoidLabelOverlap: false,
label: {
show: false,
- position: 'center'
+ position: 'center',
},
labelLine: {
- show: false
+ show: false,
},
data: [
{ value: 157, name: '已完成' },
- { value: 38, name: '未完成' }
- ]
- }
- ]
+ { value: 38, name: '未完成' },
+ ],
+ },
+ ],
};
- completionOfTaskBar
+ completionOfTaskBar;
completionOfTaskBarOption = {
grid: {
left: '3%',
right: '7%',
top: '15%',
- bottom: '20%'
+ bottom: '20%',
},
legend: {
top: 'center',
@@ -232,46 +254,62 @@ export class HomeComponent implements OnInit {
itemGap: 15,
itemWidth: 10,
itemHeight: 10,
- orient: 'vertical'
+ orient: 'vertical',
},
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
- type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
- }
+ type: 'shadow', // 'shadow' as default; can also be 'line' or 'shadow'
+ },
},
color: ['#34E0A3', '#39CCF4'],
xAxis: {
type: 'category',
- data: ['历下区大队', '南部山区大队', '市中区大队', '槐荫区大队', '天桥区大队', '历城区大队', '高新技术产业开发区大队', '长清区大队', '章丘区大队', '平阴县大队', '商河县大队', '济阳县大队', '莱芜区大队'],
- axisTick: { //x轴刻度尺
- show: false
+ data: [
+ '历下区大队',
+ '南部山区大队',
+ '市中区大队',
+ '槐荫区大队',
+ '天桥区大队',
+ '历城区大队',
+ '高新技术产业开发区大队',
+ '长清区大队',
+ '章丘区大队',
+ '平阴县大队',
+ '商河县大队',
+ '济阳县大队',
+ '莱芜区大队',
+ ],
+ axisTick: {
+ //x轴刻度尺
+ show: false,
},
- axisLine: {//x轴线条颜色
+ axisLine: {
+ //x轴线条颜色
show: false,
lineStyle: {
- color: '#C7CAD0'
- }
+ color: '#C7CAD0',
+ },
},
axisLabel: {
show: true,
- interval: 0,//使x轴上的文字显示完全,
+ interval: 0, //使x轴上的文字显示完全,
//设置一行显示几个字,自己设置
formatter: function (params) {
- var newParamsName = "";
+ var newParamsName = '';
var paramsNameNumber = params.length;
var provideNumber = 6;
var rowNumber = Math.ceil(paramsNameNumber / provideNumber);
if (paramsNameNumber > provideNumber) {
for (var p = 0; p < rowNumber; p++) {
- var tempStr = "";
+ var tempStr = '';
var start = p * provideNumber;
var end = start + provideNumber;
if (p == rowNumber - 1) {
tempStr = params.substring(start, paramsNameNumber);
} else {
- tempStr = params.substring(start, end) + "\n";
+ tempStr = params.substring(start, end) + '\n';
}
newParamsName += tempStr;
}
@@ -279,22 +317,24 @@ export class HomeComponent implements OnInit {
newParamsName = params;
}
return newParamsName;
- }
- }
+ },
+ },
},
yAxis: {
type: 'value',
- splitLine: {//网格线
+ splitLine: {
+ //网格线
lineStyle: {
- type: 'solid', //设置网格线类型 dotted:虚线 solid:实线
- color: '#ECEFF1' //网格线颜色
+ type: 'solid', //设置网格线类型 dotted:虚线 solid:实线
+ color: '#ECEFF1', //网格线颜色
},
},
- axisLine: {//y轴线条颜色
+ axisLine: {
+ //y轴线条颜色
show: false,
lineStyle: {
- color: '#C7CAD0'
- }
+ color: '#C7CAD0',
+ },
},
},
series: [
@@ -304,12 +344,12 @@ export class HomeComponent implements OnInit {
barWidth: 16, // 柱子宽度
stack: 'total',
label: {
- show: false
+ show: false,
},
emphasis: {
- focus: 'series'
+ focus: 'series',
},
- data: [8, 17, 10, 14, 8, 16, 10, 11, 10, 15, 9, 10, 18]
+ data: [8, 17, 10, 14, 8, 16, 10, 11, 10, 15, 9, 10, 18],
},
{
name: '未完成',
@@ -317,56 +357,79 @@ export class HomeComponent implements OnInit {
barWidth: 16, // 柱子宽度
stack: 'total',
label: {
- show: false
+ show: false,
},
emphasis: {
- focus: 'series'
+ focus: 'series',
},
- data: [3, 2, 1, 5, 3, 3, 4, 5, 2, 3, 4, 2, 2]
- }
- ]
+ data: [3, 2, 1, 5, 3, 3, 4, 5, 2, 3, 4, 2, 2],
+ },
+ ],
};
-
-
- level //任务完成情况当前级别
- leveldata
+ level; //任务完成情况当前级别
+ leveldata;
async ngOnInit(): Promise
{
-
// this.level = JSON.parse(sessionStorage.getItem('userData')).organizationLevel
+ console.log('游览器宽度:', document.body.clientWidth);
+ console.log('游览器高度:', document.body.clientHeight);
+
window.setTimeout(() => {
- this.mapInit() //初始化地图
- }, 0)
+ this.mapInit(); //初始化地图
+ }, 0);
// 任务总数
- this.taskNumCharts = echarts.init(document.getElementById('taskNumCharts'), null, { devicePixelRatio: 2 });
- this.disqualificationUnitCharts = echarts.init(document.getElementById('disqualificationUnit'), null, { devicePixelRatio: 2 });
- this.completionOfTaskPie = echarts.init(document.getElementById('completionOfTask1'), null, { devicePixelRatio: 2 });
- this.completionOfTaskBar = echarts.init(document.getElementById('completionOfTask2'), null, { devicePixelRatio: 2 });
+ this.taskNumCharts = echarts.init(
+ document.getElementById('taskNumCharts'),
+ null,
+ { devicePixelRatio: 2 }
+ );
+ this.disqualificationUnitCharts = echarts.init(
+ document.getElementById('disqualificationUnit'),
+ null,
+ { devicePixelRatio: 2 }
+ );
+ this.completionOfTaskPie = echarts.init(
+ document.getElementById('completionOfTask1'),
+ null,
+ { devicePixelRatio: 2 }
+ );
+ this.completionOfTaskBar = echarts.init(
+ document.getElementById('completionOfTask2'),
+ null,
+ { devicePixelRatio: 2 }
+ );
this.completionOfTaskBar.getZr().on('click', (params) => {
let pointInPixel = [params.offsetX, params.offsetY];
if (this.completionOfTaskBar.containPixel('grid', pointInPixel)) {
- let pointInGrid = this.completionOfTaskBar.convertFromPixel({
- seriesIndex: 0
- }, pointInPixel);
+ let pointInGrid = this.completionOfTaskBar.convertFromPixel(
+ {
+ seriesIndex: 0,
+ },
+ pointInPixel
+ );
let xIndex = pointInGrid[0]; //索引
let handleIndex = Number(xIndex);
let seriesObj = this.completionOfTaskBar.getOption(); //图表object对象
var op = this.completionOfTaskBar.getOption();
//获得图表中点击的列
- var month = op.xAxis[0].data[handleIndex]; //获取点击的列名
- let taskBar = this.statisticalData_taskStatByOrg['组织机构数据']
+ var month = op.xAxis[0].data[handleIndex]; //获取点击的列名
+ let taskBar = this.statisticalData_taskStatByOrg['组织机构数据'];
// console.log(month, taskBar[handleIndex])
- if (taskBar[handleIndex].organization.level == 'battalion') {//点击大队
- this.leveldata = taskBar[handleIndex].organization
+ if (taskBar[handleIndex].organization.level == 'battalion') {
+ //点击大队
+ this.leveldata = taskBar[handleIndex].organization;
this.completionOfTaskBar.clear();
- this.getData_taskStatByOrg(taskBar[handleIndex].organization.id).then(data => {
- this.echartsSetData_taskStatByOrg()
- })
- } else if (taskBar[handleIndex].organization.level == 'squadron') {//点击消防站
+ this.getData_taskStatByOrg(taskBar[handleIndex].organization.id).then(
+ (data) => {
+ this.echartsSetData_taskStatByOrg();
+ }
+ );
+ } else if (taskBar[handleIndex].organization.level == 'squadron') {
+ //点击消防站
this.modal.create({
nzTitle: '任务列表',
nzContent: TaskListComponent,
@@ -374,264 +437,357 @@ export class HomeComponent implements OnInit {
nzWidth: 1200,
nzFooter: null,
nzComponentParams: {
- data: taskBar[handleIndex].organization
- }
+ data: taskBar[handleIndex].organization,
+ },
});
}
- };
+ }
});
+ await this.getData();
- await this.getData()
-
- let orid = JSON.parse(sessionStorage.getItem('userData')).organizationId
- Promise.all([this.getData(), this.getData_taskStatByOrg(orid)]).then(data => {
- this.echartsSetData()
+ let orid = JSON.parse(sessionStorage.getItem('userData')).organizationId;
+ Promise.all([this.getData(), this.getData_taskStatByOrg(orid)]).then(
+ (data) => {
+ this.echartsSetData();
- this.echartsSetData_buhege('buhege')
-
-
- this.echartsSetData_taskStatByOrg()
- })
+ this.echartsSetData_buhege('buhege');
+ this.echartsSetData_taskStatByOrg();
+ }
+ );
}
goback() {
this.completionOfTaskBar.clear();
- this.getData_taskStatByOrg(this.leveldata.parentId).then(data => {
- this.echartsSetData_taskStatByOrg()
- this.leveldata = null
- })
+ this.getData_taskStatByOrg(this.leveldata.parentId).then((data) => {
+ this.echartsSetData_taskStatByOrg();
+ this.leveldata = null;
+ });
}
-
assistTaskRankingData: any = [
- { name: '济南市消防救援支队', num: 28, url: "../../../../assets/statistic-analysis/one.png" },
- { name: '历下区大队', num: 25, url: "../../../../assets/statistic-analysis/two.png" },
- { name: '南部山区大队', num: 18, url: "../../../../assets/statistic-analysis/three.png" },
- { name: '市中区大队', num: 16, url: "../../../../assets/statistic-analysis/four.png" },
- { name: '天桥区大队', num: 15, url: "../../../../assets/statistic-analysis/five.png" }
- ]
+ {
+ name: '济南市消防救援支队',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/one.png',
+ },
+ {
+ name: '历下区大队',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/two.png',
+ },
+ {
+ name: '南部山区大队',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/three.png',
+ },
+ {
+ name: '市中区大队',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/four.png',
+ },
+ {
+ name: '天桥区大队',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/five.png',
+ },
+ ];
rankingList1 = [
- { name: '济南市消防救援支队', num: 80, type: "up", changeNum: 1 },
- { name: '历下区大队', num: 75, type: "down", changeNum: 1 },
- { name: '南部山区大队', num: 75, type: "up", changeNum: 2 },
- { name: '市中区大队', num: 75, type: "up", changeNum: 1 },
- { name: '槐荫区大队', num: 70, type: "up", changeNum: 3 },
- { name: '天桥区大队', num: 60, type: "up", changeNum: 1 }
- ]
-
+ { name: '济南市消防救援支队', num: 80, type: 'up', changeNum: 1 },
+ { name: '历下区大队', num: 75, type: 'down', changeNum: 1 },
+ { name: '南部山区大队', num: 75, type: 'up', changeNum: 2 },
+ { name: '市中区大队', num: 75, type: 'up', changeNum: 1 },
+ { name: '槐荫区大队', num: 70, type: 'up', changeNum: 3 },
+ { name: '天桥区大队', num: 60, type: 'up', changeNum: 1 },
+ ];
rankingList2 = [
- { name: '历下区大队', num: 100, percentage: 100, type: "up", changeNum: 2 },
- { name: '高新技术产业开发区大队', num: 90, percentage: 100, type: "down", changeNum: 1 },
- { name: '槐荫区大队', num: 88, percentage: 100, type: "down", changeNum: 1 },
- { name: '天桥区大队', num: 80, percentage: 100, type: "up", changeNum: 2 },
- { name: '历城区大队', num: 70, percentage: 100, type: "up", changeNum: 1 },
- { name: '长清区大队', num: 53, percentage: 100, type: "up", changeNum: 2 },
- { name: '南部山区大队', num: 80, percentage: 100, type: "up", changeNum: 1 },
- { name: '章丘区大队', num: 70, percentage: 100, type: "up", changeNum: 1 },
- { name: '平阴县大队', num: 53, percentage: 100, type: "down", changeNum: 1 },
- { name: '济阳区大队', num: 80, percentage: 100, type: "up", changeNum: 1 },
- { name: '市中区大队', num: 70, percentage: 100, type: "down", changeNum: 2 },
- { name: '商河县大队', num: 53, percentage: 100, type: "down", changeNum: 3 },
- { name: '莱芜区大队', num: 80, percentage: 100, type: "down", changeNum: 1 },
- { name: '钢城区大队', num: 70, percentage: 100, type: "up", changeNum: 3 },
- { name: '起步区大队', num: 50, percentage: 100, type: "down", changeNum: 2 },
- { name: '特勤大队', num: 50, percentage: 100, type: "up", changeNum: 2 },
- ]
+ { name: '历下区大队', num: 100, percentage: 100, type: 'up', changeNum: 2 },
+ {
+ name: '高新技术产业开发区大队',
+ num: 90,
+ percentage: 100,
+ type: 'down',
+ changeNum: 1,
+ },
+ {
+ name: '槐荫区大队',
+ num: 88,
+ percentage: 100,
+ type: 'down',
+ changeNum: 1,
+ },
+ { name: '天桥区大队', num: 80, percentage: 100, type: 'up', changeNum: 2 },
+ { name: '历城区大队', num: 70, percentage: 100, type: 'up', changeNum: 1 },
+ { name: '长清区大队', num: 53, percentage: 100, type: 'up', changeNum: 2 },
+ {
+ name: '南部山区大队',
+ num: 80,
+ percentage: 100,
+ type: 'up',
+ changeNum: 1,
+ },
+ { name: '章丘区大队', num: 70, percentage: 100, type: 'up', changeNum: 1 },
+ {
+ name: '平阴县大队',
+ num: 53,
+ percentage: 100,
+ type: 'down',
+ changeNum: 1,
+ },
+ { name: '济阳区大队', num: 80, percentage: 100, type: 'up', changeNum: 1 },
+ {
+ name: '市中区大队',
+ num: 70,
+ percentage: 100,
+ type: 'down',
+ changeNum: 2,
+ },
+ {
+ name: '商河县大队',
+ num: 53,
+ percentage: 100,
+ type: 'down',
+ changeNum: 3,
+ },
+ {
+ name: '莱芜区大队',
+ num: 80,
+ percentage: 100,
+ type: 'down',
+ changeNum: 1,
+ },
+ { name: '钢城区大队', num: 70, percentage: 100, type: 'up', changeNum: 3 },
+ {
+ name: '起步区大队',
+ num: 50,
+ percentage: 100,
+ type: 'down',
+ changeNum: 2,
+ },
+ { name: '特勤大队', num: 50, percentage: 100, type: 'up', changeNum: 2 },
+ ];
mapcard = [
- // { name: "重点单位数量", num: 19273, url: '../../../../assets/statistic-analysis/unit.png' },
- { name: "不合格单位数量", num: 121, url: '../../../../assets/statistic-analysis/ununit.png' },
- { name: "隐患单位数量", num: 121, url: '../../../../assets/statistic-analysis/ununit.png' },
- { name: "协作任务数量", num: 102, url: '../../../../assets/statistic-analysis/task.png' }
- ]
-
+ {
+ name: '不合格单位数量',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/ununit.png',
+ data: [],
+ },
+ {
+ name: '隐患单位数量',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/ununit.png',
+ data: [],
+ },
+ {
+ name: '协作任务数量',
+ num: 0,
+ url: '../../../../assets/statistic-analysis/task.png',
+ data: [],
+ },
+ ];
//获得统计数据
- statisticalData: any
- isLoading = false
+ statisticalData: any;
+ isLoading = false;
async getData() {
- this.isLoading = true
+ this.isLoading = true;
return new Promise((resolve, reject) => {
this.http.get('/api/PlanTasks/Dashboard').subscribe((data: any) => {
- this.statisticalData = data
- this.isLoading = false
- resolve(data)
- })
- })
-
+ this.statisticalData = data;
+ this.isLoading = false;
+ resolve(data);
+ });
+ });
}
-
- statisticalData_taskStatByOrg
- isLoading2 = false
+ statisticalData_taskStatByOrg;
+ isLoading2 = false;
//按组织获取任务完成情况
async getData_taskStatByOrg(orid) {
- this.isLoading2 = true
+ this.isLoading2 = true;
return new Promise((resolve, reject) => {
- this.http.get('/api/PlanTasks/Dashboard_TaskStatByOrg', {
- params: {
- organizaionId: orid
- }
- }).subscribe((data: any) => {
- console.log('按组织获取任务完成情况', data)
- this.statisticalData_taskStatByOrg = data
- this.isLoading2 = false
- resolve(data)
- })
- })
-
+ this.http
+ .get('/api/PlanTasks/Dashboard_TaskStatByOrg', {
+ params: {
+ organizaionId: orid,
+ },
+ })
+ .subscribe((data: any) => {
+ console.log('按组织获取任务完成情况', data);
+ this.statisticalData_taskStatByOrg = data;
+ this.isLoading2 = false;
+ resolve(data);
+ });
+ });
}
- top1_1_leftNum = 188 //任务总数
+ top1_1_leftNum = 188; //任务总数
buhegedata = {
badCount: 0,
- date: "2022-06-01T00:00:00",
+ date: '2022-06-01T00:00:00',
month: 6,
totalCount: 0,
- percentOfPass: 0
- }
+ percentOfPass: 0,
+ };
echartsSetData() {
- console.log('统计数据', this.statisticalData)
+ console.log('统计数据', this.statisticalData);
//左上角 任务总数 + 协助任务数量排名TOP5
- let top1_1_left = this.statisticalData['任务']
- this.top1_1_leftNum = top1_1_left['上级派发任务'] + top1_1_left['申领任务'] + top1_1_left['自主任务']
- this.taskNumChartsOption.title[0].text = `{val|${this.top1_1_leftNum}}\n{name|任务总数}`
+ let top1_1_left = this.statisticalData['任务'];
+ this.top1_1_leftNum =
+ top1_1_left['上级派发任务'] +
+ top1_1_left['申领任务'] +
+ top1_1_left['自主任务'];
+ this.taskNumChartsOption.title[0].text = `{val|${this.top1_1_leftNum}}\n{name|任务总数}`;
this.taskNumChartsOption.series[0].data = [
{ value: top1_1_left['上级派发任务'], name: '上级派发任务' },
{ value: top1_1_left['自主任务'], name: '自主任务' },
- { value: top1_1_left['申领任务'], name: '协助任务' }
- ]
- this.taskNumCharts && this.taskNumCharts.setOption(this.taskNumChartsOption);
- let top1_1_right = this.statisticalData['协助任务Top5']
+ { value: top1_1_left['申领任务'], name: '协助任务' },
+ ];
+ this.taskNumCharts &&
+ this.taskNumCharts.setOption(this.taskNumChartsOption);
+ let top1_1_right = this.statisticalData['协助任务Top5'];
this.assistTaskRankingData.forEach((element, key) => {
if (top1_1_right[key]) {
- element.name = top1_1_right[key].organization.name
- element.num = top1_1_right[key].totalCount
+ element.name = top1_1_right[key].organization.name;
+ element.num = top1_1_right[key].totalCount;
} else {
- element.name = '暂无机构'
- element.num = 0
+ element.name = '暂无机构';
+ element.num = 0;
}
});
-
-
//地图上方卡片
- let mapcard = this.statisticalData['单位']
- this.mapcard[0].num = mapcard['不合格数量'] || 0
- this.mapcard[1].num = mapcard['隐患单位数量'] || 0
- this.mapcard[2].num = mapcard['协作任务数量'] || 0
+ let mapcard = this.statisticalData['单位'];
+ this.mapcard[0].num = mapcard['不合格数量'].length || 0;
+ this.mapcard[0].data = mapcard['不合格数量'] || [];
+ this.mapcard[1].num = mapcard['隐患单位数量'].length || 0;
+ this.mapcard[1].data = mapcard['隐患单位数量'] || [];
+ this.mapcard[2].num = mapcard['协作任务数量'] || 0;
//持证人数排名
- let rankingList2 = this.statisticalData['持证人数排名']
- this.rankingList2 = []
- rankingList2.forEach(element => {
- let obj: any = {}
- obj.name = element.organization.name
- obj.num = element.totalCount
- obj.percentage = Math.round((element.totalCount / rankingList2[0].totalCount) * 100)
+ let rankingList2 = this.statisticalData['持证人数排名'];
+ this.rankingList2 = [];
+ rankingList2.forEach((element) => {
+ let obj: any = {};
+ obj.name = element.organization.name;
+ obj.num = element.totalCount;
+ obj.percentage = Math.round(
+ (element.totalCount / rankingList2[0].totalCount) * 100
+ );
if (element.differenceCount == 0) {
- obj.type = "="
+ obj.type = '=';
} else if (element.differenceCount < 0) {
- obj.type = "down"
+ obj.type = 'down';
} else if (element.differenceCount > 0) {
- obj.type = "up"
+ obj.type = 'up';
}
- obj.changeNum = element.differenceCount
- this.rankingList2.push(obj)
+ obj.changeNum = element.differenceCount;
+ this.rankingList2.push(obj);
});
-
-
}
- selectedLeft = 'buhege'
+ selectedLeft = 'buhege';
echartsSetData_buhege(type) {
- this.disqualificationUnitCharts.clear()
- this.selectedLeft = type
- let center_left
+ this.disqualificationUnitCharts.clear();
+ this.selectedLeft = type;
+ let center_left;
if (type == 'buhege') {
- center_left = this.statisticalData['不合格单位趋势']
+ center_left = this.statisticalData['不合格单位趋势'];
} else if (type == 'yinhuan') {
- center_left = this.statisticalData['隐患单位趋势']
+ center_left = this.statisticalData['隐患单位趋势'];
}
//左边中间不合格单位趋势图
- let xAxis = []
- let yAxis = []
- center_left.forEach(element => {
- let monthnum = new Date(element.date).getMonth() + 1
+ let xAxis = [];
+ let yAxis = [];
+ center_left.forEach((element) => {
+ let monthnum = new Date(element.date).getMonth() + 1;
if (monthnum == new Date().getMonth() + 1) {
- element.percentOfPass = Math.round(((element.totalCount - element.badCount) / element.totalCount) * 100) || 0
- this.buhegedata = element
+ element.percentOfPass =
+ Math.round(
+ ((element.totalCount - element.badCount) / element.totalCount) * 100
+ ) || 0;
+ this.buhegedata = element;
}
- element.month = monthnum
- xAxis.push(monthnum + '月')
- yAxis.push(element.badCount)
+ element.month = monthnum;
+ xAxis.push(monthnum + '月');
+ yAxis.push(element.badCount);
});
- this.disqualificationUnitChartsOption.xAxis.data = xAxis
- this.disqualificationUnitChartsOption.series[0].data = yAxis
- this.disqualificationUnitCharts && this.disqualificationUnitCharts.setOption(this.disqualificationUnitChartsOption);
+ this.disqualificationUnitChartsOption.xAxis.data = xAxis;
+ this.disqualificationUnitChartsOption.series[0].data = yAxis;
+ this.disqualificationUnitCharts &&
+ this.disqualificationUnitCharts.setOption(
+ this.disqualificationUnitChartsOption
+ );
}
+
echartsSetData_taskStatByOrg() {
//任务完成情况两个echarts
- let task = this.statisticalData_taskStatByOrg
- this.completionOfTaskPieOption.title[0].text = `{val|${task['总数']}}\n{name|任务总数}`
+ let task = this.statisticalData_taskStatByOrg;
+ this.completionOfTaskPieOption.title[0].text = `{val|${task['总数']}}\n{name|任务总数}`;
this.completionOfTaskPieOption.series[0].data = [
{ value: task['已完成'], name: '已完成' },
- { value: task['未完成'], name: '未完成' }
- ]
- this.completionOfTaskPie && this.completionOfTaskPie.setOption(this.completionOfTaskPieOption);
-
- let taskBar = task['组织机构数据']
- let taskBarx = []
- let taskBary1 = []
- let taskBary2 = []
- taskBar.forEach(element => {
- taskBarx.push(element.organization.name)
- taskBary1.push(element.completeCount)//已完成
- taskBary2.push(element.uncompleteCount)//未完成
+ { value: task['未完成'], name: '未完成' },
+ ];
+ this.completionOfTaskPie &&
+ this.completionOfTaskPie.setOption(this.completionOfTaskPieOption);
+
+ let taskBar = task['组织机构数据'];
+ let taskBarx = [];
+ let taskBary1 = [];
+ let taskBary2 = [];
+ taskBar.forEach((element) => {
+ taskBarx.push(element.organization.name);
+ taskBary1.push(element.completeCount); //已完成
+ taskBary2.push(element.uncompleteCount); //未完成
});
- this.completionOfTaskBarOption.xAxis.data = taskBarx
- this.completionOfTaskBarOption.series[0].data = taskBary1
- this.completionOfTaskBarOption.series[1].data = taskBary2
- this.completionOfTaskBar && this.completionOfTaskBar.setOption(this.completionOfTaskBarOption);
+ this.completionOfTaskBarOption.xAxis.data = taskBarx;
+ this.completionOfTaskBarOption.series[0].data = taskBary1;
+ this.completionOfTaskBarOption.series[1].data = taskBary2;
+ this.completionOfTaskBar &&
+ this.completionOfTaskBar.setOption(this.completionOfTaskBarOption);
}
-
- map
+ map;
mapInit() {
//创建地图
this.map = new AMap.Map('mapbox', {
cursor: 'default',
zooms: [8, 16],
- mapStyle: "amap://styles/light",
+ mapStyle: 'amap://styles/light',
// bubble: true
});
let colors = [
- "#EE30B3", "#B37CF0", "#BD2CE6", "#7768EE", "#359EEF", "#7B95CA", "#CAFBF8", "#43D0E1",
- "#72C6EF"
+ '#EE30B3',
+ '#B37CF0',
+ '#BD2CE6',
+ '#7768EE',
+ '#359EEF',
+ '#7B95CA',
+ '#CAFBF8',
+ '#43D0E1',
+ '#72C6EF',
];
AMapUI.loadUI(['geo/DistrictExplorer'], (DistrictExplorer) => {
-
//创建一个实例
let districtExplorer = new DistrictExplorer({
map: this.map,
eventSupport: true, //打开事件支持
});
- // let adcode = this.adcode; //行政编码
- let adcode = 370100
-
+ // let adcode = this.adcode; //行政编码
+ let adcode = 370100;
districtExplorer.loadAreaNode(adcode, (error, areaNode) => {
-
//更新地图视野
this.map.setBounds(areaNode.getBounds(), null, null, true);
@@ -646,7 +802,7 @@ export class HomeComponent implements OnInit {
districtExplorer.renderSubFeatures(areaNode, (feature, i) => {
// console.log(111, feature)
let fillColor = colors[i % colors.length];
- let strokeColor = colors[colors.length - 1 - i % colors.length];
+ let strokeColor = colors[colors.length - 1 - (i % colors.length)];
return {
cursor: 'default',
bubble: true,
@@ -672,14 +828,41 @@ export class HomeComponent implements OnInit {
// 更新地图视野以适合区划面
this.map.setFitView(districtExplorer.getAllFeaturePolygons());
});
-
});
-
-
}
-
formroute() {
- this.router.navigate(['/statistic/form'])
+ this.router.navigate(['/statistic/form']);
+ }
+
+ clickCard(item) {
+ console.log(item);
+ if (item.name.indexOf('单位') !== -1) {
+ this.modal.create({
+ nzTitle: item.name + '列表',
+ nzContent: UnitListComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 1200,
+ nzFooter: null,
+ nzComponentParams: {
+ name: item.name,
+ data: item.data,
+ },
+ });
+ } else {
+ this.modal.create({
+ nzTitle: '任务列表',
+ nzContent: TaskListComponent,
+ nzViewContainerRef: this.viewContainerRef,
+ nzWidth: 1200,
+ nzFooter: null,
+ nzComponentParams: {
+ data: {
+ id: JSON.parse(sessionStorage.getItem('userData')).organizationId,
+ },
+ type: '协助任务',
+ },
+ });
+ }
}
}
diff --git a/src/app/home/statistic-analysis/home/task-list/task-list.component.html b/src/app/home/statistic-analysis/home/task-list/task-list.component.html
index 9806296..7c4483c 100644
--- a/src/app/home/statistic-analysis/home/task-list/task-list.component.html
+++ b/src/app/home/statistic-analysis/home/task-list/task-list.component.html
@@ -1,14 +1,14 @@
- 任务名称 |
+ 任务名称 |
时间 |
单位名称 |
- 单位级别 |
+ 单位级别 |
主负责人 |
- 协助机构/人员 |
+ 协助机构/人员 |
检查结果 |
- 操作 |
+ 操作 |
diff --git a/src/app/home/statistic-analysis/home/task-list/task-list.component.ts b/src/app/home/statistic-analysis/home/task-list/task-list.component.ts
index 775c5a3..7d2343a 100644
--- a/src/app/home/statistic-analysis/home/task-list/task-list.component.ts
+++ b/src/app/home/statistic-analysis/home/task-list/task-list.component.ts
@@ -7,62 +7,62 @@ import { NzModalRef } from 'ng-zorro-antd/modal';
@Component({
selector: 'app-task-list',
templateUrl: './task-list.component.html',
- styleUrls: ['./task-list.component.scss']
+ styleUrls: ['./task-list.component.scss'],
})
export class TaskListComponent implements OnInit {
@Input() data?: any;
- constructor(private router: Router, private http: HttpClient, private message: NzMessageService, private modalRef: NzModalRef) { }
+ @Input() type?: any;
+ constructor(private http: HttpClient, private message: NzMessageService) {}
ngOnInit(): void {
- console.log(this.data)
- this.getTaskList()
+ this.getTaskList();
}
listOfData: any = [];
- isloading = false
- totalCount
- PageNumber = 1
- PageSize = 10
+ isloading = false;
+ totalCount;
+ PageNumber = 1;
+ PageSize = 10;
getTaskList() {
- this.isloading = true
+ this.isloading = true;
let params = {
- // Month: selectedTime,
- // OrganizationId: this.OrganizationId,
- TaskTypes: ['熟悉演练'],
- // TaskName: this.searchForm.taskname,
- // CompanyName: this.searchForm.unitname,
- AssistantOrganizationId: this.data.id,
- approvalStatuses: ['待检查', '已检查'],
+ // TaskTypes: ['熟悉演练'],
+ OrganizationId: this.data.id,
+ // approvalStatuses: ['待检查', '已检查'],
PageNumber: this.PageNumber,
- PageSize: this.PageSize
- }
- this.http.get('/api/PlanTasks', {
- params: params
- }).subscribe((data: any) => {
- this.isloading = false
- console.log('任务列表', data);
- this.totalCount = data.totalCount
- this.listOfData = [...data.items]
- })
+ PageSize: this.PageSize,
+ PlanStartTime: '1999-01-01',
+ CreationTypes: this.type ? ['申领任务'] : null,
+ };
+ this.http
+ .get('/api/PlanTasks', {
+ params: params,
+ })
+ .subscribe((data: any) => {
+ this.isloading = false;
+ console.log('任务列表', data);
+ this.totalCount = data.totalCount;
+ this.listOfData = [...data.items];
+ });
}
pageChange($event) {
- this.PageNumber = $event
- this.getTaskList()
+ this.PageNumber = $event;
+ this.getTaskList();
}
look(item) {
- console.log(item)
+ console.log(item);
if (item.approvalStatus == '待检查') {
this.message.create('warning', '该单位未检查');
- return
+ return;
}
- // this.modalRef.close()
- // this.router.navigate(['/statistic/taskdetails'], { queryParams: { id: item.id, company: item.company.companyName, organization: item.organization.name, legalPersonName: item.company.legalPersonName ? item.company.legalPersonName : '' } })
-
- window.open(`/statistic/taskdetails?id=${item.id}&company=${item.company.companyName}&organization=${item.organization.name}&legalPersonName=${item.company.legalPersonName ? item.company.legalPersonName : ''}`)
-
-
+ window.open(
+ `/statistic/taskdetails?id=${item.id}&company=${
+ item.company.companyName
+ }&organization=${item.organization.name}&legalPersonName=${
+ item.company.legalPersonName ? item.company.legalPersonName : ''
+ }`
+ );
}
-
}
diff --git a/src/app/home/statistic-analysis/home/unit-list/unit-list.component.html b/src/app/home/statistic-analysis/home/unit-list/unit-list.component.html
new file mode 100644
index 0000000..f9e0258
--- /dev/null
+++ b/src/app/home/statistic-analysis/home/unit-list/unit-list.component.html
@@ -0,0 +1,34 @@
+
+
+
+ 单位名称 |
+ 所属机构 |
+ 单位类型 |
+ 使用性质 |
+ 单位级别 |
+ 单位地址 |
+ 操作 |
+
+
+
+
+ {{ item.companyName }} |
+ {{ item.organization.name }} |
+ {{ item.buildingType?.buildingTypeName || ''}} |
+ {{ item.useNature }} |
+ {{item.companyLevel}} |
+
+ {{item.address}}
+ |
+
+ 查看
+ |
+
+
+
+
\ No newline at end of file
diff --git a/src/app/home/statistic-analysis/home/unit-list/unit-list.component.scss b/src/app/home/statistic-analysis/home/unit-list/unit-list.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/home/statistic-analysis/home/unit-list/unit-list.component.spec.ts b/src/app/home/statistic-analysis/home/unit-list/unit-list.component.spec.ts
new file mode 100644
index 0000000..9946c26
--- /dev/null
+++ b/src/app/home/statistic-analysis/home/unit-list/unit-list.component.spec.ts
@@ -0,0 +1,25 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { UnitListComponent } from './unit-list.component';
+
+describe('UnitListComponent', () => {
+ let component: UnitListComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ UnitListComponent ]
+ })
+ .compileComponents();
+ });
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(UnitListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts b/src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts
new file mode 100644
index 0000000..f032727
--- /dev/null
+++ b/src/app/home/statistic-analysis/home/unit-list/unit-list.component.ts
@@ -0,0 +1,55 @@
+import { HttpClient } from '@angular/common/http';
+import { Component, Input, OnInit } from '@angular/core';
+import { NzMessageService } from 'ng-zorro-antd/message';
+
+@Component({
+ selector: 'app-unit-list',
+ templateUrl: './unit-list.component.html',
+ styleUrls: ['./unit-list.component.scss'],
+})
+export class UnitListComponent implements OnInit {
+ @Input() name?: any;
+ @Input() data?: any;
+
+ constructor(private http: HttpClient, private message: NzMessageService) {}
+
+ ngOnInit(): void {
+ if (this.data.length !== 0) {
+ this.getUnitList();
+ }
+ }
+
+ listOfData: any = [];
+
+ isloading = false;
+ totalCount;
+ PageNumber = 1;
+ PageSize = 10;
+ getUnitList() {
+ this.isloading = true;
+ let params = {
+ CompanyIds: this.data,
+ PageNumber: this.PageNumber,
+ PageSize: this.PageSize,
+ };
+ this.http
+ .get('/api/Companies', {
+ params: params,
+ })
+ .subscribe((data: any) => {
+ this.isloading = false;
+ console.log('单位列表', data);
+ this.totalCount = data.totalCount;
+ this.listOfData = [...data.items];
+ });
+ }
+
+ pageChange($event) {
+ this.PageNumber = $event;
+ this.getUnitList();
+ }
+
+ look(item) {
+ window.open(`/basicInfo/unit/details?id=${item.id}&pattern=look`);
+ }
+}
diff --git a/src/app/home/task/station-task-execution/task-details/task-details.component.html b/src/app/home/task/station-task-execution/task-details/task-details.component.html
index 0c1d1be..3289141 100644
--- a/src/app/home/task/station-task-execution/task-details/task-details.component.html
+++ b/src/app/home/task/station-task-execution/task-details/task-details.component.html
@@ -58,7 +58,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:130.95pt">
- {{taskAlldataOfcompany.address}}
+ {{taskAlldataOfcompany?.address || ''}}
{{taskAlldataOfcompany.datas.basicInfo.structure}}
+ style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.datas.basicInfo.structure}}
|
@@ -82,7 +82,7 @@
{{taskAlldataOfcompany.datas.basicInfo.height}}
+ style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.datas.basicInfo.height}}
|
@@ -92,7 +92,7 @@
|
{{taskAlldataOfcompany.datas.basicInfo.layer}}
+ style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.datas.basicInfo.layer}}
|
@@ -104,7 +104,7 @@
{{taskAlldataOfcompany.directorName}}
+ style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.directorName}}
|
@@ -114,7 +114,7 @@
|
{{taskAlldataOfcompany.directorPhone}}
+ style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.directorPhone}}
|
@@ -126,7 +126,7 @@
{{taskAlldataOfcompany.useNature}}
+ style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.useNature}}
|
@@ -136,7 +136,7 @@
|
{{taskAlldataOfcompany.datas.facilities.controlPosition}}
+ style="font-family:宋体; font-size:10.5pt">{{taskAlldataOfcompany?.datas.facilities.controlPosition}}
|
@@ -149,7 +149,7 @@
{{taskAlldataOfcompany.datas.basicInfo.nature}}
+ style="font-family:宋体; font-size:9pt">{{taskAlldataOfcompany?.datas.basicInfo.nature}}
|
@@ -162,7 +162,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-left-color:#000000; border-left-style:solid; border-left-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.03pt; padding-right:5.03pt; vertical-align:top; width:364.85pt">
+ *ngFor="let item of taskAlldataOfcompany?.zhuyaosheshi.data">
{{item.check ? item.name : ''}}
@@ -177,19 +177,19 @@
室内消火栓数量:{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shineishuliang}}
+ style="font-family:宋体; font-size:9pt">室内消火栓数量:{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shineishuliang}}
|
室外消火栓数量:{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shiwaishuliang}}
+ style="font-family:宋体; font-size:9pt">室外消火栓数量:{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shiwaishuliang}}
|
消防泵数量:{{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.xiaofangshuanshuliang}}
+ style="font-family:宋体; font-size:9pt">消防泵数量:{{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.xiaofangshuanshuliang}}
|
@@ -1311,7 +1311,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; padding-left:5.4pt; padding-right:5.03pt; vertical-align:middle; width:130.4pt">
- {{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shiwaishuliang}}
+ {{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shiwaishuliang}}
@@ -1482,7 +1482,7 @@
style="border-bottom-color:#000000; border-bottom-style:solid; border-bottom-width:0.75pt; border-right-color:#000000; border-right-style:solid; border-right-width:0.75pt; border-top-color:#000000; border-top-style:solid; border-top-width:0.75pt; padding-left:5.4pt; padding-right:5.03pt; vertical-align:middle; width:101.05pt">
- {{taskAlldataOfcompany.datas.facilities.fireFightingFacilities.shineishuliang}}
+ {{taskAlldataOfcompany?.datas.facilities.fireFightingFacilities.shineishuliang}}
{
- this.checkTime = data.checkTime
- let obj = JSON.parse(data.resultData)
+ this.checkTime = data.checkTime;
+ let obj = JSON.parse(data.resultData);
// if (!obj) {
// return
// }
- console.log('所有数据', obj)
- this.taskAlldataOfcompany = obj.company
- this.taskAlldataOfform = obj.form
+ console.log('所有数据', obj);
+ this.taskAlldataOfcompany = obj.company;
+ this.taskAlldataOfform = obj.form;
-
-
- let exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form)
+ let exerciseData = this.methodService.getTaskDetailsItem(
+ '实战演练',
+ obj.form
+ );
if (exerciseData.data.data) {
- this.exerciseData = this.methodService.getTaskDetailsItem('实战演练', obj.form)
+ this.exerciseData = this.methodService.getTaskDetailsItem(
+ '实战演练',
+ obj.form
+ );
}
// console.log('实战演练详情', this.exerciseData)
- let planData = this.methodService.getTaskDetailsItem('数字化预案', obj.form)
- if (JSON.stringify(planData.data) != "{}") {
- if (JSON.stringify(planData.data.basicInfo) != "{}") {
- this.planData.data.basicInfo = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.basicInfo
+ let planData = this.methodService.getTaskDetailsItem(
+ '数字化预案',
+ obj.form
+ );
+ if (JSON.stringify(planData.data) != '{}') {
+ if (JSON.stringify(planData.data.basicInfo) != '{}') {
+ this.planData.data.basicInfo = this.methodService.getTaskDetailsItem(
+ '数字化预案',
+ obj.form
+ ).data.basicInfo;
}
- if (JSON.stringify(planData.data.other) != "{}") {
- this.planData.data.other = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.other
+ if (JSON.stringify(planData.data.other) != '{}') {
+ this.planData.data.other = this.methodService.getTaskDetailsItem(
+ '数字化预案',
+ obj.form
+ ).data.other;
}
if (planData.data.key.lenth != 0) {
- this.planData.data.key = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.key
+ this.planData.data.key = this.methodService.getTaskDetailsItem(
+ '数字化预案',
+ obj.form
+ ).data.key;
}
if (planData.data.zhongdiantishi) {
- this.planData.data.zhongdiantishi = this.methodService.getTaskDetailsItem('数字化预案', obj.form).data.zhongdiantishi
+ this.planData.data.zhongdiantishi =
+ this.methodService.getTaskDetailsItem(
+ '数字化预案',
+ obj.form
+ ).data.zhongdiantishi;
}
}
- console.log('数字化预案详情', this.planData)
- this.kongzhishiweizhi = obj.company.datas.facilities.controlPosition
- this.shiwaixiaohuoshuanweizhi = obj.company.datas.facilities.fireFightingFacilities.shiwaifenbu
+ console.log('数字化预案详情', this.planData);
+ this.kongzhishiweizhi =
+ obj.company?.datas.facilities.controlPosition || '';
+ this.shiwaixiaohuoshuanweizhi =
+ obj.company?.datas.facilities.fireFightingFacilities.shiwaifenbu || '';
// let kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form)
// if (JSON.stringify(kongzhishi.data) != "{}") {
// this.kongzhishi = this.methodService.getTaskDetailsItem('消防控制室', obj.form)
@@ -325,10 +350,9 @@ export class TaskDetailsPagesComponent implements OnInit {
// }
// console.log('消防控制室详情', this.kongzhishi)
// console.log('室外消火栓详情', this.shiwaixiaohuoshuan)
- })
-
+ });
}
- olddata: any
+ olddata: any;
getCompanies() {
// this.http.get('/api/Companies/' + this.id).subscribe((data: any) => {
// console.log('当前单位信息', data);
@@ -337,45 +361,46 @@ export class TaskDetailsPagesComponent implements OnInit {
}
goback() {
- window.history.back()
+ window.history.back();
}
download(type) {
- type == 1 ? $("#tablebox").wordExport('演练卡') : $("#tablebox2").wordExport('数字化预案');
+ type == 1
+ ? $('#tablebox').wordExport('演练卡')
+ : $('#tablebox2').wordExport('数字化预案');
}
- isprintLoading = false
+ isprintLoading = false;
print() {
- this.isprintLoading = true
+ this.isprintLoading = true;
Print('#tablebox3', {
onStart: () => {
- console.log('onStart', this)
- this.isprintLoading = false
+ console.log('onStart', this);
+ this.isprintLoading = false;
},
onEnd: () => {
- console.log('onEnd', new Date())
- this.isprintLoading = false
- }
- })
+ console.log('onEnd', new Date());
+ this.isprintLoading = false;
+ },
+ });
}
-
//查看图片
viewImg(url) {
- let dom = document.getElementById(`viewerjs`)
+ let dom = document.getElementById(`viewerjs`);
let pObjs = dom.childNodes;
- let node = document.createElement("img")
- node.style.display = "none";
+ let node = document.createElement('img');
+ node.style.display = 'none';
node.src = url;
- node.id = 'img'
- dom.appendChild(node)
+ node.id = 'img';
+ dom.appendChild(node);
setTimeout(() => {
let viewer = new Viewer(document.getElementById(`viewerjs`), {
hidden: () => {
dom.removeChild(pObjs[0]);
viewer.destroy();
- }
+ },
});
node.click();
}, 0);
|