邵佳豪 4 years ago
parent
commit
5cc45f4e17
  1. 10
      src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts
  2. 2
      src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts
  3. 2
      src/app/statistic-analysis/echarts-data.service.ts
  4. 9
      src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts
  5. 14
      src/assets/css/photo-sphere-viewer.css
  6. 4
      src/index.html

10
src/app/statistic-analysis/addUnit/add-unit-two-time/add-unit-two-time.component.ts

@ -40,6 +40,9 @@ export class AddUnitTwoTimeComponent implements OnInit {
//获取数据 //获取数据
yeardatee yeardatee
async getdata(){ async getdata(){
this.date=[]
this.dateNum=[]
this.zongcount=0
let parzhi={ let parzhi={
objectType:0, objectType:0,
BuildingTypeId:this.lastId, BuildingTypeId:this.lastId,
@ -197,6 +200,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
} }
if(this.selectType == "month"){ if(this.selectType == "month"){
this.serviceData.selectType=0 this.serviceData.selectType=0
this.getdata()
this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date) this.tiaoshiPao=this.serviceData.qipao(this.tiaoshiPao,this.dateNum,this.date)
//this.oneInit(this.date,this.dateNum) //this.oneInit(this.date,this.dateNum)
this.twoInit(this.date,this.dateNum,'month') this.twoInit(this.date,this.dateNum,'month')
@ -367,6 +371,10 @@ export class AddUnitTwoTimeComponent implements OnInit {
//提示框 //提示框
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
formatter: function (params) {
//console.log(params)
return '时间:' + params[0].axisValueLabel + '<br>数量: ' + params[0].data;
},
/* formatter: (params)=>{ /* formatter: (params)=>{
if(params[0].seriesName == "year"){ if(params[0].seriesName == "year"){
return this.serviceData.tableTooltip(this.serviceData.monthTooltip,params[0].name) return this.serviceData.tableTooltip(this.serviceData.monthTooltip,params[0].name)
@ -374,7 +382,7 @@ export class AddUnitTwoTimeComponent implements OnInit {
return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name) return this.serviceData.tableTooltip(this.serviceData.tableDataZhi,params[0].name)
} }
}, */ }, */
position: this.serviceData.tableTooltipNoShow2 position: this.serviceData.tableTooltipNoShow
}, },
// x轴 // x轴
xAxis: { xAxis: {

2
src/app/statistic-analysis/addUnit/add-unit-two-type-statistics/add-unit-two-type-statistics.component.ts

@ -62,7 +62,7 @@ export class AddUnitTwoTypeStatisticsComponent implements OnInit {
} }
await this.data.getData(this.zhiorbuild=="zhi"?paramsdata:null,this.zhiorbuild=="zhi"?`/api/StatisticsAnalysis/Companies/Organizations/${this.lastId}`:`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.lastId}`) await this.data.getData(this.zhiorbuild=="zhi"?paramsdata:null,this.zhiorbuild=="zhi"?`/api/StatisticsAnalysis/Companies/Organizations/${this.lastId}`:`/api/StatisticsAnalysis/Companies/BuildingTypes/${this.lastId}`)
this.tabledata=JSON.parse(JSON.stringify(this.data.allDate)) this.tabledata=JSON.parse(JSON.stringify(this.data.allDate))
console.log(this.tabledata) //console.log(this.tabledata)
if(this.zhiorbuild=="zhi"){ if(this.zhiorbuild=="zhi"){
for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){ for(var i=0;i<this.tabledata[0].buildingTypes.length;i++){
this.buildingData.push(this.tabledata[0].buildingTypes[i].buildingTypeName) this.buildingData.push(this.tabledata[0].buildingTypes[i].buildingTypeName)

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

@ -581,7 +581,7 @@ export class EchartsDataService {
}) })
this.allDate.push(result) this.allDate.push(result)
this.obdata=JSON.parse(JSON.stringify(this.allDate)) this.obdata=JSON.parse(JSON.stringify(this.allDate))
console.log(this.obdata) //console.log(this.obdata)
} }
selectType=0//选择年月 selectType=0//选择年月

9
src/app/statistic-analysis/state/page-two-time/page-two-time.component.ts

@ -200,6 +200,9 @@ export class echartsComponent implements OnInit {
} }
//获取数据 //获取数据
async getechartsData(){ async getechartsData(){
this.datayuex=[]
this.datayuey=[]
this.zongcount=0
let paramdata={ let paramdata={
planStatus:this.tid=='pieone'?'': this.type, planStatus:this.tid=='pieone'?'': this.type,
PlanCategory:this.tid=='pieone'?this.type:'', PlanCategory:this.tid=='pieone'?this.type:'',
@ -208,7 +211,7 @@ export class echartsComponent implements OnInit {
} }
await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Trends`) await this.echartsData.getData(paramdata,`/api/StatisticsAnalysis/Trends`)
this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate)) this.tabledata=JSON.parse(JSON.stringify(this.echartsData.allDate))
console.log(this.tabledata) //console.log(this.tabledata)
for(var i=0;i<this.tabledata[0].length;i++){ for(var i=0;i<this.tabledata[0].length;i++){
if(this.tabledata[0][i].month>=this.echartsData.selectStartMonth||this.tabledata[0][i].month<=this.echartsData.selectEndMonth){ if(this.tabledata[0][i].month>=this.echartsData.selectStartMonth||this.tabledata[0][i].month<=this.echartsData.selectEndMonth){
this.datayuex.push(this.tabledata[0][i].month) this.datayuex.push(this.tabledata[0][i].month)
@ -231,6 +234,7 @@ export class echartsComponent implements OnInit {
if (e=='year') { if (e=='year') {
//this.oneInit(this.dataYearX,this.dataYearY) //this.oneInit(this.dataYearX,this.dataYearY)
this.dataYearX=[] this.dataYearX=[]
this.dataYearY=[]
this.echartsData.selectType=2 this.echartsData.selectType=2
this.zongcount=0 this.zongcount=0
let paramdata={ let paramdata={
@ -252,7 +256,7 @@ export class echartsComponent implements OnInit {
this.dataYearX.forEach((value,index,array)=>{ this.dataYearX.forEach((value,index,array)=>{
this.dataYearX[index]=this.dataYearX[index]+'年' this.dataYearX[index]=this.dataYearX[index]+'年'
}) })
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex) //this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
//this.oneInit() //this.oneInit()
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX) this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.dataYearY,this.dataYearX)
this.twoInit(this.dataYearX,this.dataYearY) this.twoInit(this.dataYearX,this.dataYearY)
@ -263,6 +267,7 @@ export class echartsComponent implements OnInit {
this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex) this.tiaoshiPao=this.echartsData.qipao(this.tiaoshiPao,this.datayuey,this.datayuex)
//this.oneInit() //this.oneInit()
this.echartsData.selectType=0 this.echartsData.selectType=0
this.getechartsData()
this.twoInit(this.datayuex,this.datayuey) this.twoInit(this.datayuex,this.datayuey)
} }

14
src/assets/css/photo-sphere-viewer.css

File diff suppressed because one or more lines are too long

4
src/index.html

@ -4,7 +4,7 @@
* @Author: sueRimn * @Author: sueRimn
* @Date: 2020-11-25 15:44:29 * @Date: 2020-11-25 15:44:29
* @LastEditors: sueRimn * @LastEditors: sueRimn
* @LastEditTime: 2021-01-12 13:42:33 * @LastEditTime: 2021-04-25 09:50:54
--> -->
<!doctype html> <!doctype html>
<html lang="zh-CN"> <html lang="zh-CN">
@ -16,7 +16,7 @@
<!-- <meta name="viewport" content="initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no,uc-fitscreen=yes,viewport-fit=cover"> --> <!-- <meta name="viewport" content="initial-scale=0.5, maximum-scale=0.5, minimum-scale=0.5, user-scalable=no,uc-fitscreen=yes,viewport-fit=cover"> -->
<link rel="icon" type="image/x-icon" href="favicon.ico"> <link rel="icon" type="image/x-icon" href="favicon.ico">
<link href='/assets/icon/material-icons.css' rel="stylesheet"> <link href='/assets/icon/material-icons.css' rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.min.css"/> <link rel="stylesheet" href="/assets/css/photo-sphere-viewer.css"/>
</head> </head>
<body> <body>
<app-root></app-root> <app-root></app-root>

Loading…
Cancel
Save