|
@@ -10,8 +10,15 @@
|
|
<div>
|
|
<div>
|
|
<p>隐患总数</p>
|
|
<p>隐患总数</p>
|
|
</div>
|
|
</div>
|
|
- <div :class="!lengthType?'for-box':(item.length<5?'for-min-box':'for-big-box')" v-for="(item,index) in titleList" :key="index">
|
|
|
|
- <p>{{item.title}}</p>
|
|
|
|
|
|
+ <div class="for-box" v-for="(item,index) in titleList" :key="index">
|
|
|
|
+ <el-tooltip v-if="item.title.length>4" class="item" effect="dark" :content="item.title" placement="top">
|
|
|
|
+ <p>
|
|
|
|
+ {{item.title}}
|
|
|
|
+ </p>
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ <p v-else>
|
|
|
|
+ {{item.title}}
|
|
|
|
+ </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="title-max-box"></div>
|
|
<div class="title-max-box"></div>
|
|
@@ -82,30 +89,14 @@
|
|
reportSecIndexDataGetGaugeOutfit(obj).then(response => {
|
|
reportSecIndexDataGetGaugeOutfit(obj).then(response => {
|
|
this.$nextTick(()=>{
|
|
this.$nextTick(()=>{
|
|
let list = [];
|
|
let list = [];
|
|
- let widthList = [40,110,50];
|
|
|
|
response.data.forEach((item,index)=>{
|
|
response.data.forEach((item,index)=>{
|
|
list.push({
|
|
list.push({
|
|
title:item.name,
|
|
title:item.name,
|
|
length:item.name.length
|
|
length:item.name.length
|
|
})
|
|
})
|
|
- if(item.name.length>4){
|
|
|
|
- this.$set(self,'lengthType',true);
|
|
|
|
- }
|
|
|
|
})
|
|
})
|
|
- if(this.lengthType){
|
|
|
|
- for(let i=0;i<list.length;i++){
|
|
|
|
- if(list[i].length>4){
|
|
|
|
- widthList.push(80)
|
|
|
|
- }else{
|
|
|
|
- widthList.push(50)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this.$set(this.config,'columnWidth',widthList);
|
|
|
|
- }else{
|
|
|
|
- this.$set(this.config,'columnWidth',[40,110,50,55,55,55,55,55,55]);
|
|
|
|
- }
|
|
|
|
|
|
+ this.$set(this.config,'columnWidth',[40,94,50,58,58,58,58,58,58]);
|
|
this.$set(this,'titleList',list);
|
|
this.$set(this,'titleList',list);
|
|
-
|
|
|
|
this.reportSecIndexDataDistributionHazard(response.data);
|
|
this.reportSecIndexDataDistributionHazard(response.data);
|
|
})
|
|
})
|
|
});
|
|
});
|
|
@@ -123,7 +114,7 @@
|
|
response.data.forEach((item,index)=>{
|
|
response.data.forEach((item,index)=>{
|
|
let minList = [];
|
|
let minList = [];
|
|
minList.push(index+1);
|
|
minList.push(index+1);
|
|
- minList.push(item.subName+item.subName+item.subName);
|
|
|
|
|
|
+ minList.push(item.subName);
|
|
minList.push(item.hazardNum);
|
|
minList.push(item.hazardNum);
|
|
titleList.forEach((minItem,minIndex)=>{
|
|
titleList.forEach((minItem,minIndex)=>{
|
|
minList.push(item[minItem.code]);
|
|
minList.push(item[minItem.code]);
|
|
@@ -147,13 +138,12 @@
|
|
}else if(val.layerY>158&&val.layerY<200){
|
|
}else if(val.layerY>158&&val.layerY<200){
|
|
this.suspensionTop = 170;
|
|
this.suspensionTop = 170;
|
|
}
|
|
}
|
|
- this.$set(this,'suspensionLeft',43);
|
|
|
|
this.$set(this,'suspensionType',false);
|
|
this.$set(this,'suspensionType',false);
|
|
this.$set(this,'suspensionText','');
|
|
this.$set(this,'suspensionText','');
|
|
},
|
|
},
|
|
mouseoverDv(row){
|
|
mouseoverDv(row){
|
|
- if(row.columnIndex == 1){
|
|
|
|
- console.log('row.ceil',row.ceil)
|
|
|
|
|
|
+ if(row.columnIndex != 0){
|
|
|
|
+ this.$set(this,'suspensionLeft',row.columnIndex==1?43:(row.columnIndex==2?137:(row.columnIndex==3?187:(row.columnIndex==4?245:(row.columnIndex==5?303:(row.columnIndex==6?361:(row.columnIndex==7?419:(row.columnIndex==8?477:43))))))));
|
|
this.$set(this,'suspensionText',row.ceil);
|
|
this.$set(this,'suspensionText',row.ceil);
|
|
this.$set(this,'suspensionType',true);
|
|
this.$set(this,'suspensionType',true);
|
|
}else{
|
|
}else{
|
|
@@ -202,7 +192,7 @@
|
|
}
|
|
}
|
|
div:nth-child(2){
|
|
div:nth-child(2){
|
|
p{
|
|
p{
|
|
- width:109px;
|
|
|
|
|
|
+ width:93px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
div:nth-child(3){
|
|
div:nth-child(3){
|
|
@@ -214,19 +204,11 @@
|
|
.for-box{
|
|
.for-box{
|
|
p{
|
|
p{
|
|
padding:0 10px;
|
|
padding:0 10px;
|
|
- width:54px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .for-min-box{
|
|
|
|
- p{
|
|
|
|
- padding:0 10px;
|
|
|
|
- width:49px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .for-big-box{
|
|
|
|
- p{
|
|
|
|
- padding:0 10px;
|
|
|
|
- width:79px;
|
|
|
|
|
|
+ width:57px;
|
|
|
|
+ display: -webkit-box;
|
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
|
+ -webkit-line-clamp: 2;
|
|
|
|
+ overflow: hidden;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -251,7 +233,7 @@
|
|
color: rgba(70, 70, 70);
|
|
color: rgba(70, 70, 70);
|
|
}
|
|
}
|
|
.position-suspension-null-left{
|
|
.position-suspension-null-left{
|
|
- width:40px;
|
|
|
|
|
|
+ width:10px;
|
|
}
|
|
}
|
|
.position-suspension-null-right{
|
|
.position-suspension-null-right{
|
|
flex:1;
|
|
flex:1;
|