Browse Source

[修改]修改统计图表不显示的问题

beijing
邵佳豪 2 years ago
parent
commit
2da852f109
  1. 4
      proxy.config.json
  2. 15
      src/app/pages/records/criminal-records-admin/criminal-records-admin.component.ts
  3. 18
      src/app/pages/records/criminal-records/criminal-records.component.ts
  4. 16
      src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts
  5. 21
      src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts

4
proxy.config.json

@ -1,11 +1,11 @@
{ {
"/api": { "/api": {
"target": "http://121.36.37.70:8906", "target": "https://znaq.sinochemoilmarketing.com",
"secure": false, "secure": false,
"changeOrigin": true "changeOrigin": true
}, },
"/signalr": { "/signalr": {
"target": "http://121.36.37.70:8906", "target": "https://znaq.sinochemoilmarketing.com",
"secure": false, "secure": false,
"ws": true, "ws": true,
"logLevel": "debug" "logLevel": "debug"

15
src/app/pages/records/criminal-records-admin/criminal-records-admin.component.ts

@ -350,12 +350,15 @@ export class CriminalRecordsAdminComponent implements OnInit {
misinformation: ['true'], misinformation: ['true'],
}); });
//饼图 setTimeout(() => {
this.myChart = echarts.init(document.getElementById('piechart')); //饼图
this.myChart.setOption(this.option); 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.mybarChart = echarts.init(document.getElementById('barchart'));
this.mybarChart.setOption(this.baroption);
}, 0);
this.warningType() this.warningType()
this.tableSpin = true this.tableSpin = true

18
src/app/pages/records/criminal-records/criminal-records.component.ts

@ -312,7 +312,6 @@ export class CriminalRecordsComponent implements OnInit {
// this.isShowEcharts.getMessage().subscribe((message: any) => { // this.isShowEcharts.getMessage().subscribe((message: any) => {
// this.isEchartsShow() // this.isEchartsShow()
// }); // });
console.log(1243);
this.tableScrollHeight = '100px' this.tableScrollHeight = '100px'
// 页面监听 // 页面监听
@ -358,12 +357,17 @@ export class CriminalRecordsComponent implements OnInit {
datePicker: [[this.startdate, this.enddate]], datePicker: [[this.startdate, this.enddate]],
misinformation: ['true'], misinformation: ['true'],
}); });
// 饼图
this.myChart = echarts.init(document.getElementById('piechart')); setTimeout(() => {
this.myChart.setOption(this.option); // 饼图
//柱状折线图 this.myChart = echarts.init(document.getElementById('piechart'));
this.mybarChart = echarts.init(document.getElementById('barchart')); this.myChart.setOption(this.option);
this.mybarChart.setOption(this.baroption); //柱状折线图
this.mybarChart = echarts.init(document.getElementById('barchart'));
this.mybarChart.setOption(this.baroption);
}, 0);
this.warningType() this.warningType()
this.getViolateRecordList() this.getViolateRecordList()

16
src/app/pages/records/oil-unloading-process-list/oil-unloading-process-list.component.ts

@ -118,10 +118,16 @@ export class OilUnloadingProcessListComponent implements OnInit {
organization: [null], organization: [null],
datePicker: [[this.startdate, this.enddate]] datePicker: [[this.startdate, this.enddate]]
}); });
// 饼图
this.myChart = echarts.init(document.getElementById('piechart')); setTimeout(() => {
//柱状折线图 // 饼图
this.mybarChart = echarts.init(document.getElementById('barchart')); this.myChart = echarts.init(document.getElementById('piechart'));
//柱状折线图
this.mybarChart = echarts.init(document.getElementById('barchart'));
}, 0);
this.tableSpin = true this.tableSpin = true
this.getAllOrganization() this.getAllOrganization()
this.getAggregations() this.getAggregations()
@ -753,7 +759,7 @@ export class OilUnloadingProcessListComponent implements OnInit {
let arr3 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油连接静电接地' || item.nodeName == '连接静电接地' }); let arr3 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油连接静电接地' || item.nodeName == '连接静电接地' });
let arr4 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油设置消防器材' || item.nodeName == '放置消防器材' }); let arr4 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油设置消防器材' || item.nodeName == '放置消防器材' });
let arr5 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '连接卸油管' }); let arr5 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '连接卸油管' });
let arr6 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油中无人监卸' || item.nodeName == '全程监卸'}); let arr6 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '卸油中无人监卸' || item.nodeName == '全程监卸' });
let arr7 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '拆除卸油管' }); let arr7 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '拆除卸油管' });
let arr8 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '车辆离场' || item.nodeName == '车辆离厂' || item.nodeName == '车辆出厂' || item.nodeName == '油罐车离场' }); let arr8 = item.oilUnloadingNodes.find((item) => { return item.nodeName == '车辆离场' || item.nodeName == '车辆离厂' || item.nodeName == '车辆出厂' || item.nodeName == '油罐车离场' });

21
src/app/pages/records/warning-statistics-list/warning-statistics-list.component.ts

@ -85,10 +85,13 @@ export class WarningStatisticsListComponent implements OnInit {
datePicker: [[this.startdate, this.enddate]] datePicker: [[this.startdate, this.enddate]]
}); });
// 饼图 setTimeout(() => {
this.myChart = echarts.init(document.getElementById('piechart')); // 饼图
//柱状折线图 this.myChart = echarts.init(document.getElementById('piechart'));
this.mybarChart = echarts.init(document.getElementById('barchart')); //柱状折线图
this.mybarChart = echarts.init(document.getElementById('barchart'));
}, 0);
this.tableSpin = true this.tableSpin = true
this.getAllOrganization() this.getAllOrganization()
this.getAggregations() this.getAggregations()
@ -103,15 +106,15 @@ export class WarningStatisticsListComponent implements OnInit {
} }
returnLastMenus(e) { returnLastMenus(e) {
let userMenu let userMenu
if(e){ if (e) {
userMenu = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).menus userMenu = JSON.parse(sessionStorage.getItem('userdataOfgasstation')).menus
}else{ } else {
userMenu = JSON.parse(sessionStorage.getItem('userdata')).menus userMenu = JSON.parse(sessionStorage.getItem('userdata')).menus
} }
for (let index = 0; index < userMenu.length; index++) { for (let index = 0; index < userMenu.length; index++) {
for (let k = 0; k < userMenu.length; k++) { for (let k = 0; k < userMenu.length; k++) {
if (userMenu[index].name=="证照预警统计") { if (userMenu[index].name == "证照预警统计") {
if(userMenu[index].id==userMenu[k].parentId){ if (userMenu[index].id == userMenu[k].parentId) {
this.button = true this.button = true
} }
} }

Loading…
Cancel
Save