|
@@ -72,6 +72,7 @@
|
|
|
securityCheckPlanPlantList,
|
|
|
reportAppStatisticsDangerSort,
|
|
|
securityCheckDangerNotHazardOneCollect,
|
|
|
+ securityCheckDangerHazardOneCollect,
|
|
|
} from '@/pages/api/index.js'
|
|
|
export default {
|
|
|
name: "hazardSources",
|
|
@@ -197,7 +198,7 @@
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
- name: 'data3',
|
|
|
+ name: 'ratio',
|
|
|
label: '占比',
|
|
|
align: 'center',
|
|
|
},
|
|
@@ -211,48 +212,17 @@
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
- name: 'data1',
|
|
|
+ name: 'deptSortName',
|
|
|
label: '学院单位',
|
|
|
fixed: true,
|
|
|
width: 80,
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
- name: 'data2',
|
|
|
+ name: 'hazardNum',
|
|
|
label: '总隐患',
|
|
|
align: 'center',
|
|
|
},
|
|
|
- {
|
|
|
- name: 'data3',
|
|
|
- label: '实验场所',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'data4',
|
|
|
- label: '安全设施',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'data5',
|
|
|
- label: '化学安全',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'data6',
|
|
|
- label: '基础安全',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'data7',
|
|
|
- label: '生物安全',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'data8',
|
|
|
- label: '特种与冷热设备',
|
|
|
- align: 'center',
|
|
|
- },
|
|
|
-
|
|
|
],
|
|
|
dataList: [],
|
|
|
dataListTow: [],
|
|
@@ -288,9 +258,15 @@
|
|
|
this.reportAppStatisticsDangerSort(this.pickerList[this.pickerIndex].planId)
|
|
|
}else if(this.chartIndex==1){
|
|
|
//一级指标排行
|
|
|
-
|
|
|
+ this.dataListTow=[];
|
|
|
+ this.dataListThree=[];
|
|
|
+ this.chartDataTow={};
|
|
|
+ this.securityCheckDangerHazardOneCollect(this.pickerList[this.pickerIndex].planId)
|
|
|
}else if(this.chartIndex==2){
|
|
|
//暂无法整改
|
|
|
+ this.dataListTow=[];
|
|
|
+ this.dataListThree=[];
|
|
|
+ this.chartDataTow={};
|
|
|
this.securityCheckDangerNotHazardOneCollect(this.pickerList[this.pickerIndex].planId)
|
|
|
}
|
|
|
},
|
|
@@ -301,7 +277,7 @@
|
|
|
this.reportAppStatisticsDangerSort(this.pickerList[0].planId)
|
|
|
}else if(this.chartIndex==1){
|
|
|
//一级指标排行
|
|
|
-
|
|
|
+ this.securityCheckDangerHazardOneCollect(this.pickerList[0].planId)
|
|
|
}else if(this.chartIndex==2){
|
|
|
//暂无法整改
|
|
|
this.securityCheckDangerNotHazardOneCollect(this.pickerList[0].planId)
|
|
@@ -373,6 +349,45 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
+ //一级指标
|
|
|
+ async securityCheckDangerHazardOneCollect(planId) {
|
|
|
+ let self = this;
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await securityCheckDangerHazardOneCollect({'type':'-1','planId':planId});
|
|
|
+ if (data.code == 200) {
|
|
|
+ //列表
|
|
|
+ this.dataListTow=data.data.head;
|
|
|
+ this.dataListThree=data.data.list;
|
|
|
+ if(data.data.head[0]){
|
|
|
+ let name=[];
|
|
|
+ let list=[];
|
|
|
+ data.data.head.forEach(function(item,index){
|
|
|
+ self.column3.push({
|
|
|
+ name: item.code,
|
|
|
+ label: item.name,
|
|
|
+ align: 'center',
|
|
|
+ })
|
|
|
+ if(index<5){
|
|
|
+ name.push(item.name)
|
|
|
+ list.push(item.num)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //图表
|
|
|
+ let res = {
|
|
|
+ categories:name,
|
|
|
+ series: [{
|
|
|
+ name: "",
|
|
|
+ data: list
|
|
|
+ }, ]
|
|
|
+ };
|
|
|
+ this.chartDataTow = JSON.parse(JSON.stringify(res));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
//暂无法整改
|
|
|
async securityCheckDangerNotHazardOneCollect(planId) {
|
|
|
let self = this;
|
|
@@ -380,25 +395,37 @@
|
|
|
data
|
|
|
} = await securityCheckDangerNotHazardOneCollect({'type':'-1','planId':planId});
|
|
|
if (data.code == 200) {
|
|
|
+ //列表
|
|
|
+ this.dataListTow=data.data.head;
|
|
|
+ this.dataListThree=data.data.list;
|
|
|
+ if(data.data.head[0]){
|
|
|
+ let name=[];
|
|
|
+ let list=[];
|
|
|
+ data.data.head.forEach(function(item,index){
|
|
|
+ self.column3.push({
|
|
|
+ name: item.code,
|
|
|
+ label: item.name,
|
|
|
+ align: 'center',
|
|
|
+ })
|
|
|
+ if(index<5){
|
|
|
+ name.push(item.name)
|
|
|
+ list.push(item.num)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //图表
|
|
|
+ let res = {
|
|
|
+ categories:name,
|
|
|
+ series: [{
|
|
|
+ name: "",
|
|
|
+ data: list
|
|
|
+ }, ]
|
|
|
+ };
|
|
|
+ this.chartDataTow = JSON.parse(JSON.stringify(res));
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
- getServerDataTow() {
|
|
|
- //模拟从服务器获取数据时的延时
|
|
|
- setTimeout(() => {
|
|
|
- //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
|
|
- let res = {
|
|
|
- categories: ["生物安全", "基础安全", "安全设施", "化学安全"],
|
|
|
- series: [{
|
|
|
- name: "",
|
|
|
- data: [55, 31, 61, 48]
|
|
|
- }, ]
|
|
|
- };
|
|
|
- this.chartDataTow = JSON.parse(JSON.stringify(res));
|
|
|
- }, 500);
|
|
|
- },
|
|
|
},
|
|
|
}
|
|
|
</script>
|