Browse Source

[修改]信息完整度查询输入范围修改

zhuzhou
chenjingyu 4 years ago
parent
commit
223fd3e55c
  1. 4
      src/app/key-unit/key-unit-management/key-unit-management.component.html
  2. 4
      src/app/key-unit/key-unit-management/key-unit-management.component.ts
  3. 11
      src/app/plan-audit/plan-record/plan-record.component.ts
  4. 9
      src/app/plan-audit/wait-examineer/wait-examineer.component.ts
  5. 82
      src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts
  6. 55
      src/app/statistic-analysis/echarts-data.service.ts

4
src/app/key-unit/key-unit-management/key-unit-management.component.html

@ -75,11 +75,11 @@
<div class="queryField" style="margin-left: 100px;"> <div class="queryField" style="margin-left: 100px;">
<label style="margin-right: 10px;">完整度查询:</label> <label style="margin-right: 10px;">完整度查询:</label>
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<input type="number" oninput="if(value>1)value=1;if(value<0)value=0" matInput placeholder="请输入完整度最小值" name="integrityScoreMin" [(ngModel)]="integrityScoreMin" autocomplete="off"> <input type="number" oninput="if(value>100)value=100;if(value<0)value=0" matInput placeholder="请输入完整度最小值" name="integrityScoreMin" [(ngModel)]="integrityScoreMin" autocomplete="off">
</mat-form-field> </mat-form-field>
🠊 🠊
<mat-form-field class="example-full-width" style="margin-left: 5px;"> <mat-form-field class="example-full-width" style="margin-left: 5px;">
<input type="number" oninput="if(value>1)value=1;if(value<0)value=0" matInput placeholder="请输入完整度最大值" name="integrityScoreMax" [(ngModel)]="integrityScoreMax" autocomplete="off"> <input type="number" oninput="if(value>100)value=100;if(value<0)value=0" matInput placeholder="请输入完整度最大值" name="integrityScoreMax" [(ngModel)]="integrityScoreMax" autocomplete="off">
</mat-form-field> </mat-form-field>
</div> </div>

4
src/app/key-unit/key-unit-management/key-unit-management.component.ts

@ -349,8 +349,8 @@ export class KeyUnitManagementComponent implements OnInit {
PageSize: this.pageSizeOptions[0], PageSize: this.pageSizeOptions[0],
Sort: this.integritySort ? 'integrityscore' : '', Sort: this.integritySort ? 'integrityscore' : '',
SortType: this.integritySort || '', SortType: this.integritySort || '',
IntegrityScoreMin:this.integrityScoreMin||0, IntegrityScoreMin:this.integrityScoreMin/100||0,
IntegrityScoreMax:this.integrityScoreMax||1 IntegrityScoreMax:this.integrityScoreMax/100||1
} }
this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{ this.http.get("/api/Companies",{params:paramsdata}).subscribe((data:any)=>{

11
src/app/plan-audit/plan-record/plan-record.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-25 10:19:31 * @Date: 2020-12-25 10:19:31
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-02-20 16:35:38 * @LastEditTime: 2021-02-22 10:49:38
*/ */
import { Component, OnInit,Inject } from '@angular/core'; import { Component, OnInit,Inject } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
@ -134,13 +134,12 @@ export class PlanRecordComponent implements OnInit {
viewer//全景图对象 viewer//全景图对象
tableClick(e,item){ tableClick(e,item){
//e.target.parentElement.bgColor='#2196F3' //e.target.parentElement.bgColor='#2196F3'
console.log(e,item) //console.log(e,item)
this.organizationName='' this.organizationName=''
this.id=item.id this.id=item.id
this.fetchUrl='' this.fetchUrl=''
this.viewer={}
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{
console.log(data)
this.companyId=data.companyId this.companyId=data.companyId
this.companyName=data.companyName this.companyName=data.companyName
if(data.planType!=2&&data.planType!=1){ if(data.planType!=2&&data.planType!=1){
@ -148,6 +147,10 @@ export class PlanRecordComponent implements OnInit {
var index=this.fetchUrl.indexOf("\/") var index=this.fetchUrl.indexOf("\/")
if(this.fetchUrl.substr(0,index)=='psw'){ if(this.fetchUrl.substr(0,index)=='psw'){
this.showtype=1 this.showtype=1
var obj=document.getElementById('viewer')
if(obj!=null){
obj.innerHTML=''
}
window.setTimeout(()=>{ window.setTimeout(()=>{
this.viewer = new Viewer({ this.viewer = new Viewer({
container: document.querySelector('#viewer'), container: document.querySelector('#viewer'),

9
src/app/plan-audit/wait-examineer/wait-examineer.component.ts

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-12-25 16:13:50 * @Date: 2020-12-25 16:13:50
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-02-20 16:34:00 * @LastEditTime: 2021-02-22 10:49:28
*/ */
import { Component, Inject, OnInit } from '@angular/core'; import { Component, Inject, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
@ -155,13 +155,12 @@ export class WaitExamineerComponent implements OnInit {
viewer//全景图对象 viewer//全景图对象
radioClick(e,item){ radioClick(e,item){
//e.target.parentElement.bgColor='#2196F3' //e.target.parentElement.bgColor='#2196F3'
console.log(e,item) //console.log(e,item)
this.organizationName='' this.organizationName=''
this.id=item.id this.id=item.id
this.fetchUrl='' this.fetchUrl=''
this.viewer={} this.viewer={}
this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{ this.http.get(`/api/PlanComponents/${item.itemId}`).subscribe((data:any)=>{
console.log(data)
this.companyId=data.companyId this.companyId=data.companyId
this.companyName=data.companyName this.companyName=data.companyName
if(data.planType!=2&&data.planType!=1){ if(data.planType!=2&&data.planType!=1){
@ -169,6 +168,10 @@ export class WaitExamineerComponent implements OnInit {
var index=this.fetchUrl.indexOf("\/") var index=this.fetchUrl.indexOf("\/")
if(this.fetchUrl.substr(0,index)=='psw'){ if(this.fetchUrl.substr(0,index)=='psw'){
this.showtype=1 this.showtype=1
var obj=document.getElementById('viewer')
if(obj!=null){
obj.innerHTML=''
}
window.setTimeout(()=>{ window.setTimeout(()=>{
this.viewer = new Viewer({ this.viewer = new Viewer({
container: document.querySelector('#viewer'), container: document.querySelector('#viewer'),

82
src/app/statistic-analysis/buildingType/building-type-one/building-type-one.component.ts

@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { HttpClient } from '@angular/common/http' import { HttpClient } from '@angular/common/http'
import {EchartsDataService,} from '../../echarts-data.service' import {EchartsDataService,} from '../../echarts-data.service'
import { map } from 'rxjs/operators';
declare var echarts: any; declare var echarts: any;
@Component({ @Component({
selector: 'app-building-type-one', selector: 'app-building-type-one',
@ -34,7 +35,7 @@ export class BuildingTypeOneComponent implements OnInit {
this.indexData.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i]) this.indexData.push(data.companyStatistics.buildingTypeStatistics.buildingTypes[i])
} }
//JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name')) //JSON.parse(JSON.stringify(this.indexData).replace(/buildingTypeName/g, 'name'))
this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count}}) this.indexData=this.indexData.map(v=>{return {name: v.buildingTypeName,value:v.count,id:v.buildingTypeId}})
console.log(this.indexData) console.log(this.indexData)
this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden'); this.indexBzt = echarts.init(document.getElementById('indexBzt'),'walden');
let options={ let options={
@ -50,7 +51,10 @@ export class BuildingTypeOneComponent implements OnInit {
trigger: 'item', trigger: 'item',
position: this.echartsData.tableTooltipNoShow2, position: this.echartsData.tableTooltipNoShow2,
formatter: (params)=>{ formatter: (params)=>{
return this.echartsData.biaogeTishiZhi(params.name) //console.log(params)
this.echartsData.biaogeTishiZhi(params.data)
return this.echartsData.res
} }
}, },
legend: { legend: {
@ -80,24 +84,7 @@ export class BuildingTypeOneComponent implements OnInit {
} }
}, },
}, },
data:/* [ data:this.indexData,
{value: this.indexData[0].count, name: this.indexData[0].buildingTypeName},
{value: this.indexData[1].count, name: this.indexData[1].buildingTypeName},
{value: this.indexData[2].count, name: this.indexData[2].buildingTypeName},
{value: this.indexData[3].count, name: this.indexData[3].buildingTypeName},
{value: this.indexData[4].count, name: this.indexData[4].buildingTypeName},
{value: this.indexData[5].count, name: this.indexData[5].buildingTypeName},
{value: this.indexData[6].count, name: this.indexData[6].buildingTypeName},
{value: this.indexData[7].count, name: this.indexData[7].buildingTypeName},
{value: this.indexData[8].count, name: this.indexData[8].buildingTypeName},
{value: this.indexData[9].count, name: this.indexData[9].buildingTypeName},
{value: this.indexData[10].count, name: this.indexData[0].buildingTypeName},
{value: this.indexData[0].count, name: this.indexData[0].buildingTypeName},
{value: this.indexData[0].count, name: this.indexData[0].buildingTypeName},
{value: 500, name: '影剧院'},
{value: 1025, name: '展览建筑'},
{value: 600, name: '隧道'}
] */this.indexData,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
@ -116,34 +103,35 @@ export class BuildingTypeOneComponent implements OnInit {
} }
biaogeTishi(biaotou:string){ tishiData
var shuju='[{"name":"浦东支队","number":"156","zhanbi":"3%"},{"name":"黄浦支队","number":"144","zhanbi":"2.8%"},' res:string
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},' biaogeTishiZhi(datas){
shuju+='{"name":"静安支队","number":"120","zhanbi":"1.3%"},{"name":"普陀支队","number":"100","zhanbi":"1.1%"},' let paramsdata:any = {
shuju+='{"name":"虹口支队","number":"95","zhanbi":"1%"},{"name":"杨浦支队","number":"90","zhanbi":"0.9%"},' BuildingTypeId:datas.id
shuju+='{"name":"闵行支队","number":"88","zhanbi":"0.8%"},{"name":"宝山支队","number":"83","zhanbi":"0.7%"},' }
shuju+='{"name":"徐汇支队","number":"133","zhanbi":"2.1%"},{"name":"长宁支队","number":"122","zhanbi":"1.6%"},'
shuju+='{"name":"嘉定支队","number":"78","zhanbi":"0.6%"},{"name":"松江支队","number":"75","zhanbi":"0.5%"},' this.http.get("/api/StatisticsAnalysis/Companies",{params:paramsdata}).subscribe((data:any)=>{
shuju+='{"name":"金山支队","number":"65","zhanbi":"0.4%"},{"name":"崇明支队","number":"55","zhanbi":"0.3%"}]' this.tishiData=data
var jsonObj = JSON.parse(shuju); this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#000000;font-size:30px;text-align: center;display:block;">'+biaotou+'</span></div>' this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px; background:#FFFFFF; color:#000000;border-collapse:collapse;"cellspacing="0"; >'; this.res+='<thead style="font-size:18px;"><tr>';
res+='<thead><tr>'; this.res+='<td style="text-align:center;width:30%;">名称</td>';
res+='<td style="text-align:center;width:30%;border:1px solid #000000">名称</td>'; this.res+='<td style="text-align:center;width:30%;">数量</td>'
res+='<td style="text-align:center;width:30%;border:1px solid #000000">数量</td>' this.res+='<td style="text-align:center;width:30%;">总占比</td>'
res+='<td style="text-align:center;width:30%;border:1px solid #000000">总占比</td>' this.res+='</tr></thead>'
res+='</tr></thead>' this.res+='<tbody>';
res+='<tbody>'; //var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>'
for(var i=0;i<jsonObj.length;i++){ for(var i=0;i<this.tishiData.organizationStatistics.organizations.length;i++){
res+='<tr>' this.res+='<tr>'
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].name+'</td>' this.res+='<td style="text-align:center;">'+this.tishiData.organizationStatistics.organizations[i].organizationName+'</td>'
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].number+'</td>' this.res+='<td style="text-align:center;">'+this.tishiData.organizationStatistics.organizations[i].count+'</td>'
res+='<td style="text-align:center;border:1px solid #000000">'+jsonObj[i].zhanbi+'</td></tr>' this.res+='<td style="text-align:center;">10</td></tr>'
} }
res+='</tbody>' this.res+='</tbody>'
res+='<tfoot><td style="text-align:center;border:1px solid #000000">总计</td><td style="text-align:center;border:1px solid #000000">1356</td><td style="text-align:center;border:1px solid #000000">19%</td></tfoot>' this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">1356</td><td style="text-align:center;">19%</td></tfoot>'
res+='</table></div></div>' this.res+='</table></div></div>'
return res return this.res
})
} }
} }

55
src/app/statistic-analysis/echarts-data.service.ts

@ -396,37 +396,54 @@ export class EchartsDataService {
return res return res
} }
/** /**
* @name: * @name:
* @test: test font * @test: test font
* @msg: * @msg:
* @param {string()} * @param {string()}
* @return {type} * @return {type}
*/ */
biaogeTishiZhi(biaotou:string){ res
var res = '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+biaotou+'</span></div>' tishiData
res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >'; biaogeTishiZhi(datas){
res+='<thead style="font-size:18px;"><tr>'; let paramsdata:any = {
res+='<td style="text-align:center;width:30%;">名称</td>'; BuildingTypeId:datas.id
res+='<td style="text-align:center;width:30%;">数量</td>' }
res+='<td style="text-align:center;width:30%;">总占比</td>' //var res
res+='</tr></thead>' this.http.get("/api/StatisticsAnalysis/Companies",{params:paramsdata}).subscribe((data:any)=>{
res+='<tbody>'; this.tishiData=data
console.log(this.tishiData)
this.res= '<div class="tishi" style=" backgroundColor:rgba(255,255,255,1);width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span style="color:#FFFFFF;font-size:27px;text-align: center;display:block;">'+datas.name+'</span></div>'
this.res+='</br><div style="width:300px;height:100%;padding:0 20px 15px 20px"><table style="width:300px;font-size:16px; color:#FFFFFF;border-collapse:collapse;"cellspacing="0"; >';
this.res+='<thead style="font-size:18px;"><tr>';
this.res+='<td style="text-align:center;width:30%;">名称</td>';
this.res+='<td style="text-align:center;width:30%;">数量</td>'
this.res+='<td style="text-align:center;width:30%;">总占比</td>'
this.res+='</tr></thead>'
this.res+='<tbody>';
var countall=0
for(var i=0;i<this.tishiData.organizationStatistics.organizations.length;i++){
countall+=this.tishiData.organizationStatistics.organizations[i].count
}
//var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>' //var res='<div class="tishi" style=" width:100%;height:100%;"><div style="padding:10px 0 5px 0"><span >'+biaotou+'</span></div>'
for(var i=0;i<this.tableDataZhi.length;i++){ for(var i=0;i<this.tishiData.organizationStatistics.organizations.length;i++){
res+='<tr>' this.res+='<tr>'
res+='<td style="text-align:center;">'+this.tableDataZhi[i].name+'</td>' this.res+='<td style="text-align:center;">'+this.tishiData.organizationStatistics.organizations[i].organizationName+'</td>'
res+='<td style="text-align:center;">'+this.tableDataZhi[i].number+'</td>' this.res+='<td style="text-align:center;">'+this.tishiData.organizationStatistics.organizations[i].count+'</td>'
res+='<td style="text-align:center;">'+this.tableDataZhi[i].zhanbi+'</td></tr>' this.res+='<td style="text-align:center;">'+Math.round(this.tishiData.organizationStatistics.organizations[i].count/countall* 10000)/ 100.00 +'%</td></tr>'
} }
res+='</tbody>' this.res+='</tbody>'
res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">1356</td><td style="text-align:center;">19%</td></tfoot>' this.res+='<tfoot style="font-size:18px;"><td style="text-align:center;">总计</td><td style="text-align:center;">'+this.tishiData.totalCount+'</td><td style="text-align:center;">100%</td></tfoot>'
res+='</table></div></div>' this.res+='</table></div></div>'
return res return this.res
})
} }
zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"] zhiNameData = ["浦东支队","黄浦支队","徐汇支队","长宁支队","静安支队","普陀支队","虹口支队","杨浦支队","闵行支队","宝山支队","嘉定支队","松江支队","金山支队","崇明支队"]
zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70] zhiNumData = [200,190,180,170,160,150,140,130,120,110,100,90,80,70]
/** /**
* @name: * @name:
* @test: test font * @test: test font

Loading…
Cancel
Save