|
@@ -30,15 +30,14 @@
|
|
|
</view>
|
|
|
<!-- 暂无法整改-图表 -->
|
|
|
<view class="chart-b-tow" v-if="chartIndex==1 || chartIndex==2">
|
|
|
- <qiun-data-charts :canvas2d="true" :tapLegend="false" :tooltipShow="false"
|
|
|
- type="bar" :opts="optsTow" :echartsH5="true" :chartData="chartDataTow" />
|
|
|
+ <qiun-data-charts :canvas2d="true" :tapLegend="false" :tooltipShow="false" type="bar" :opts="optsTow"
|
|
|
+ :echartsH5="true" :chartData="chartDataTow" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 选项卡 -->
|
|
|
<scroll-view scroll-x @scrolltolower="scrollGet" v-if="chartIndex!=0">
|
|
|
<view class="tabTitle_tow">
|
|
|
- <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index"
|
|
|
- v-for="(item,index) in tabTextTow">
|
|
|
+ <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index" v-for="(item,index) in tabTextTow">
|
|
|
<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
|
|
|
<view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
|
|
|
</view>
|
|
@@ -126,9 +125,9 @@
|
|
|
padding: [15, 20, 15, 15],
|
|
|
dataLabel: true,
|
|
|
enableScroll: false,
|
|
|
- fontColor:'#ffffff',
|
|
|
+ fontColor: '#ffffff',
|
|
|
legend: {
|
|
|
- show:false,
|
|
|
+ show: false,
|
|
|
},
|
|
|
xAxis: {
|
|
|
boundaryGap: "justify",
|
|
@@ -248,8 +247,8 @@
|
|
|
tabTextTow: ['一级指标', '学院单位'],
|
|
|
curTabTow: 0,
|
|
|
pickerList: [],
|
|
|
- pickerIndex:0,
|
|
|
- hiddenChartBottom:[],
|
|
|
+ pickerIndex: 0,
|
|
|
+ hiddenChartBottom: [],
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -270,32 +269,33 @@
|
|
|
bindPickerChange(data) {
|
|
|
console.log(data)
|
|
|
this.pickerIndex = data.detail.value;
|
|
|
- if(this.chartIndex==0){
|
|
|
+ if (this.chartIndex == 0) {
|
|
|
//安全隐患排行
|
|
|
this.reportAppStatisticsDangerSort(this.pickerList[this.pickerIndex].planId)
|
|
|
- }else if(this.chartIndex==1){
|
|
|
+ } else if (this.chartIndex == 1) {
|
|
|
//一级指标排行
|
|
|
- this.dataListTow=[];
|
|
|
- this.dataListThree=[];
|
|
|
- this.chartDataTow={};
|
|
|
+ this.dataListTow = [];
|
|
|
+ this.dataListThree = [];
|
|
|
+ this.chartDataTow = {};
|
|
|
this.securityCheckDangerHazardOneCollect(this.pickerList[this.pickerIndex].planId)
|
|
|
- }else if(this.chartIndex==2){
|
|
|
+ } else if (this.chartIndex == 2) {
|
|
|
//暂无法整改
|
|
|
- this.dataListTow=[];
|
|
|
- this.dataListThree=[];
|
|
|
- this.chartDataTow={};
|
|
|
+ this.dataListTow = [];
|
|
|
+ this.dataListThree = [];
|
|
|
+ this.chartDataTow = {};
|
|
|
this.securityCheckDangerNotHazardOneCollect(this.pickerList[this.pickerIndex].planId)
|
|
|
}
|
|
|
},
|
|
|
chartClick(index) {
|
|
|
this.chartIndex = index;
|
|
|
- if(this.chartIndex==0){
|
|
|
+ this.curTabTow = 0;
|
|
|
+ if (this.chartIndex == 0) {
|
|
|
//安全隐患排行
|
|
|
this.reportAppStatisticsDangerSort(this.pickerList[this.pickerIndex].planId)
|
|
|
- }else if(this.chartIndex==1){
|
|
|
+ } else if (this.chartIndex == 1) {
|
|
|
//一级指标排行
|
|
|
this.securityCheckDangerHazardOneCollect(this.pickerList[this.pickerIndex].planId)
|
|
|
- }else if(this.chartIndex==2){
|
|
|
+ } else if (this.chartIndex == 2) {
|
|
|
//暂无法整改
|
|
|
this.securityCheckDangerNotHazardOneCollect(this.pickerList[this.pickerIndex].planId)
|
|
|
}
|
|
@@ -303,7 +303,7 @@
|
|
|
//顶部tab点击
|
|
|
tabClickTow(item, index) {
|
|
|
this.curTabTow = index;
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
//计划标题
|
|
|
async securityCheckPlanPlantList() {
|
|
@@ -314,7 +314,7 @@
|
|
|
if (data.code == 200) {
|
|
|
this.pickerList = data.data
|
|
|
this.reportAppStatisticsDangerSort(this.pickerList[0].planId)
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
//安全隐患列表数据
|
|
@@ -322,24 +322,30 @@
|
|
|
let self = this;
|
|
|
const {
|
|
|
data
|
|
|
- } = await reportAppStatisticsDangerSort({'type':'-1','planId':planId});
|
|
|
+ } = await reportAppStatisticsDangerSort({
|
|
|
+ 'type': '-1',
|
|
|
+ 'planId': planId
|
|
|
+ });
|
|
|
if (data.code == 200) {
|
|
|
- this.dataList=data.data;
|
|
|
- if(data.data[0]){
|
|
|
- let name=[];
|
|
|
- let list=[];
|
|
|
- let list2=[];
|
|
|
- let list3=[];
|
|
|
- let num=0;
|
|
|
- self.hiddenChartBottom=[];
|
|
|
- data.data.forEach(function(item,index){
|
|
|
- if(index<3){
|
|
|
+ this.dataList = data.data;
|
|
|
+ if (data.data[0]) {
|
|
|
+ let name = [];
|
|
|
+ let list = [];
|
|
|
+ let list2 = [];
|
|
|
+ let list3 = [];
|
|
|
+ let num = 0;
|
|
|
+ self.hiddenChartBottom = [];
|
|
|
+ data.data.forEach(function(item, index) {
|
|
|
+ if (index < 3) {
|
|
|
name.push(item.deptSortName)
|
|
|
list.push(item.rectifyNum)
|
|
|
list2.push(item.notRectifyNum)
|
|
|
list3.push(item.tempNum)
|
|
|
- num=item.rectifyNum+item.notRectifyNum+item.tempNum
|
|
|
- self.hiddenChartBottom.push({'name':item.deptSortName,'total':num})
|
|
|
+ num = item.rectifyNum + item.notRectifyNum + item.tempNum
|
|
|
+ self.hiddenChartBottom.push({
|
|
|
+ 'name': item.deptSortName,
|
|
|
+ 'total': num
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
let res = {
|
|
@@ -348,7 +354,7 @@
|
|
|
name: "已整改",
|
|
|
textColor: '#fff',
|
|
|
data: list
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
name: "未整改",
|
|
@@ -363,14 +369,14 @@
|
|
|
]
|
|
|
};
|
|
|
this.chartData = JSON.parse(JSON.stringify(res));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
let res = {
|
|
|
categories: ['无数据'],
|
|
|
series: [{
|
|
|
name: "已整改",
|
|
|
textColor: '#fff',
|
|
|
data: [0]
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
{
|
|
|
name: "未整改",
|
|
@@ -388,46 +394,69 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
//一级指标
|
|
|
async securityCheckDangerHazardOneCollect(planId) {
|
|
|
let self = this;
|
|
|
const {
|
|
|
data
|
|
|
- } = await securityCheckDangerHazardOneCollect({'type':'-1','planId':planId});
|
|
|
+ } = 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',
|
|
|
+ this.$set(this, 'dataListTow', data.data.head);
|
|
|
+ this.$set(this, 'dataListThree', data.data.list);
|
|
|
+ let column3 = [{
|
|
|
+ type: 'index',
|
|
|
+ label: '排行',
|
|
|
+ fixed: true,
|
|
|
+ width: 60,
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'deptSortName',
|
|
|
+ label: '学院单位',
|
|
|
+ fixed: true,
|
|
|
+ width: 80,
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'hazardNum',
|
|
|
+ label: '总隐患',
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ if (data.data.head[0]) {
|
|
|
+ let name = [];
|
|
|
+ let list = [];
|
|
|
+ data.data.head.forEach(function(item, index) {
|
|
|
+ if (index < 5) {
|
|
|
+ column3.push({
|
|
|
+ name: item.code,
|
|
|
+ label: item.name,
|
|
|
+ align: 'center',
|
|
|
})
|
|
|
- if(index<5){
|
|
|
- name.push(item.name)
|
|
|
- list.push(item.num)
|
|
|
- }
|
|
|
+ name.push(item.name)
|
|
|
+ list.push(item.num)
|
|
|
+ }
|
|
|
})
|
|
|
//图表
|
|
|
let res = {
|
|
|
- categories:name,
|
|
|
+ categories: name,
|
|
|
series: [{
|
|
|
name: "",
|
|
|
data: list
|
|
|
}, ]
|
|
|
};
|
|
|
this.chartDataTow = JSON.parse(JSON.stringify(res));
|
|
|
-
|
|
|
- }else{
|
|
|
-
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
//图表
|
|
|
let res = {
|
|
|
- categories:['无数据'],
|
|
|
+ categories: ['无数据'],
|
|
|
series: [{
|
|
|
name: "",
|
|
|
data: [0]
|
|
@@ -435,52 +464,73 @@
|
|
|
};
|
|
|
this.chartDataTow = JSON.parse(JSON.stringify(res));
|
|
|
}
|
|
|
-
|
|
|
+ this.column3 = JSON.parse(JSON.stringify(column3));
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
//暂无法整改
|
|
|
async securityCheckDangerNotHazardOneCollect(planId) {
|
|
|
let self = this;
|
|
|
let obj = {
|
|
|
- rectifyStatus:4,
|
|
|
- planId:planId
|
|
|
+ rectifyStatus: 4,
|
|
|
+ planId: planId
|
|
|
};
|
|
|
const {
|
|
|
data
|
|
|
} = await securityCheckDangerNotHazardOneCollect(obj);
|
|
|
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',
|
|
|
+ this.$set(this, 'dataListTow', data.data.head);
|
|
|
+ this.$set(this, 'dataListThree', data.data.list);
|
|
|
+ let column3 = [{
|
|
|
+ type: 'index',
|
|
|
+ label: '排行',
|
|
|
+ fixed: true,
|
|
|
+ width: 60,
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'deptSortName',
|
|
|
+ label: '学院单位',
|
|
|
+ fixed: true,
|
|
|
+ width: 80,
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'hazardNum',
|
|
|
+ label: '总隐患',
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ if (data.data.head[0]) {
|
|
|
+ let name = [];
|
|
|
+ let list = [];
|
|
|
+ data.data.head.forEach(function(item, index) {
|
|
|
+ if (index < 5) {
|
|
|
+ column3.push({
|
|
|
+ name: item.code,
|
|
|
+ label: item.name,
|
|
|
+ align: 'center',
|
|
|
})
|
|
|
- if(index<5){
|
|
|
- name.push(item.name)
|
|
|
- list.push(item.num)
|
|
|
- }
|
|
|
+ name.push(item.name)
|
|
|
+ list.push(item.num)
|
|
|
+ }
|
|
|
})
|
|
|
//图表
|
|
|
let res = {
|
|
|
- categories:name,
|
|
|
+ categories: name,
|
|
|
series: [{
|
|
|
name: "",
|
|
|
data: list
|
|
|
}, ]
|
|
|
};
|
|
|
this.chartDataTow = JSON.parse(JSON.stringify(res));
|
|
|
-
|
|
|
- }else{
|
|
|
-
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
//图表
|
|
|
let res = {
|
|
|
- categories:['无数据'],
|
|
|
+ categories: ['无数据'],
|
|
|
series: [{
|
|
|
name: "",
|
|
|
data: [0]
|
|
@@ -488,7 +538,8 @@
|
|
|
};
|
|
|
this.chartDataTow = JSON.parse(JSON.stringify(res));
|
|
|
}
|
|
|
-
|
|
|
+ this.column3 = JSON.parse(JSON.stringify(column3));
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -537,7 +588,7 @@
|
|
|
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
|
|
margin: 20rpx 30rpx 0;
|
|
|
overflow: hidden;
|
|
|
-
|
|
|
+
|
|
|
.chart-t {
|
|
|
width: 570rpx;
|
|
|
height: 50rpx;
|
|
@@ -957,4 +1008,4 @@
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|