...
|
...
|
@@ -39,15 +39,16 @@ |
|
|
:ref="'headerRef'+index+'-'+idx"
|
|
|
:data-tip="tableFiledMaxWidth('isOverflow'+index+'-'+idx,index,idx)"
|
|
|
>
|
|
|
<el-tooltip :disabled="isEllipsis[index+'-'+idx]" ref="elTooltip" trigger="hover" >
|
|
|
<el-tooltip v-if="!itemChild.componentName || itemChild.componentName==1" :disabled="isEllipsis[index+'-'+idx]" ref="elTooltip" trigger="hover" >
|
|
|
<template #content>
|
|
|
<span>{{ item[itemChild.key].kpiValue}}</span>
|
|
|
</template>
|
|
|
<span @mouseleave="" :ref="'isOverflow'+index+'-'+idx" :data-num="index+'-'+idx" @click="clickListName(item[itemChild.key])" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
:class="['listName','width-80','text-overflow',{'listName-link':item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key].kpiValue}}
|
|
|
</span>
|
|
|
:class="['listName','width-80','text-overflow',{'listName-link':item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key].kpiValue}}
|
|
|
</span>
|
|
|
</el-tooltip>
|
|
|
<component v-if="itemChild.componentName && itemChild.componentName!=1" :is="itemChild.componentName" :alarmLevel="item[itemChild.key].alarmLevel?item[itemChild.key].alarmLevel:'2'" :way="item[itemChild.key].way?item[itemChild.key].way:'message'" />
|
|
|
|
|
|
<customMenuBox ref="customMenu" v-if="pressingVisible==index+'-'+idx && item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)"
|
|
|
:detailMenubox="calcDetailMenubox"
|
...
|
...
|
@@ -176,6 +177,8 @@ import VueSuperSlide from "vue-superslide"; |
|
|
import {getDetailTableData,getDetailTableDataNoPage} from "@/api/platform";
|
|
|
import customDialog from "../../designerComponents/customDialog";
|
|
|
import customMenuBox from "../../designerComponents/customMenuBox";//下探组件
|
|
|
import textToImage from "../../designerComponents/textToImage";//文字转图片
|
|
|
import textToBg from "../../designerComponents/textToBg";//文字转背景
|
|
|
|
|
|
vue.use(VueSuperSlide);
|
|
|
export default {
|
...
|
...
|
@@ -184,7 +187,7 @@ export default { |
|
|
ispreview: Boolean
|
|
|
},
|
|
|
components:{
|
|
|
customDialog,customMenuBox
|
|
|
customDialog,customMenuBox,textToImage,textToBg
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
...
|
...
|
@@ -258,6 +261,7 @@ export default { |
|
|
sortBy:'',//排序参数
|
|
|
sortCaret:'',//正序倒序
|
|
|
isEllipsis:[],//是否文字超出
|
|
|
componentName:'',//组件名称
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
...
|
...
|
@@ -652,9 +656,12 @@ export default { |
|
|
let that=this;
|
|
|
this.$nextTick(() => {
|
|
|
let isOverflow=that.$refs[obj];
|
|
|
let cWidth = isOverflow[0].parentElement.scrollWidth;//.scrollWidth;
|
|
|
let sWidth = isOverflow[0].scrollWidth;
|
|
|
that.isEllipsis[index+'-'+idx]=!((sWidth+10) > cWidth);
|
|
|
if(isOverflow && isOverflow[0]){
|
|
|
let cWidth = isOverflow[0].parentElement.scrollWidth;
|
|
|
let sWidth = isOverflow[0].scrollWidth;
|
|
|
that.isEllipsis[index+'-'+idx]=!((sWidth+10) > cWidth);
|
|
|
}
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//列是否排序
|
...
|
...
|
@@ -673,6 +680,7 @@ export default { |
|
|
if(item.key==v.key){
|
|
|
v.columnSort=item.columnSort;
|
|
|
v.sort=item.sort?item.sort:false;
|
|
|
v.componentName=item.componentName?item.componentName:1;
|
|
|
}
|
|
|
})
|
|
|
if(this.headerAll && this.headerAll.length>0){
|
...
|
...
|
@@ -680,6 +688,7 @@ export default { |
|
|
if(item.key==v.key){
|
|
|
v.columnSort=item.columnSort;
|
|
|
v.sort=item.sort?item.sort:false;
|
|
|
v.componentName=item.componentName?item.componentName:1;
|
|
|
}
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -821,6 +830,9 @@ export default { |
|
|
//下载
|
|
|
downloadTableList(title, resId, kpiId, flagPrifix, sortBy, order){
|
|
|
let kpiIdArr=[];
|
|
|
let param={
|
|
|
sortBy:this.sortBy
|
|
|
}
|
|
|
this.header.map(item=>{
|
|
|
if(item.sort){
|
|
|
kpiIdArr.push(item.key)
|
...
|
...
|
|