...
|
...
|
@@ -17,9 +17,8 @@ |
|
|
:key="index"
|
|
|
:class="['padding-10',{'ascending':(sortBy==item.key && sortCaret=='ascending'),'descending':(sortBy==item.key && sortCaret=='descending')}]"
|
|
|
>
|
|
|
{{ item.name }}
|
|
|
<!-- <i v-if="tableFiledSort(index)" :class="['cursorClass',{'el-icon-caret-bottom':(sortBy==item.key && sortVal=='bottom'),'el-icon-caret-top':(sortBy==item.key && sortVal=='top')}]" @click="changeSort(item)"></i>-->
|
|
|
<span v-if="tableFiledSort(index)" class="caret-wrapper">
|
|
|
{{ item.name }}
|
|
|
<span v-if="tableFiledSort(index)" class="caret-wrapper">
|
|
|
<i class="sort-caret ascending" @click="changeSort(item,'ascending')"></i>
|
|
|
<i class="sort-caret descending" @click="changeSort(item,'descending')"></i>
|
|
|
</span>
|
...
|
...
|
@@ -36,8 +35,7 @@ |
|
|
:key="idx"
|
|
|
:style="[bodyTableStyle, bodyTable(index),tableFiledWidth(idx),tableRowHeight()]"
|
|
|
@mouseenter="pressingTimes(index,idx)"
|
|
|
:ref="'headerRef'+index+'-'+idx"
|
|
|
:data-tip="tableFiledMaxWidth('isOverflow'+index+'-'+idx,index,idx)"
|
|
|
:data-tip="tableFiledMaxWidth('isOverflow'+index+'-'+idx,index,idx,'')"
|
|
|
>
|
|
|
<el-tooltip v-if="!itemChild.componentName || itemChild.componentName==1" :disabled="isEllipsis[index+'-'+idx]" ref="elTooltip" trigger="hover" >
|
|
|
<template #content>
|
...
|
...
|
@@ -74,10 +72,9 @@ |
|
|
v-for="(item, index) in headerAll"
|
|
|
:style="[headerTableStlye,tableFiledWidth(index),tableRowHeight()]"
|
|
|
:key="index"
|
|
|
:class="{'ascending':(sortBy==item.key && sortCaret=='ascending'),'descending':(sortBy==item.key && sortCaret=='descending')}"
|
|
|
:class="['padding-10',{'ascending':(sortBy==item.key && sortCaret=='ascending'),'descending':(sortBy==item.key && sortCaret=='descending')}]"
|
|
|
>
|
|
|
{{ item.name }}
|
|
|
<!-- <i v-if="tableFiledSort(index)" :class="['cursorClass',{'el-icon-caret-bottom':sortVal=='bottom','el-icon-caret-top':sortVal=='top'}]" @click="changeSort(item)"></i>-->
|
|
|
<span v-if="tableFiledSort(index)" class="caret-wrapper">
|
|
|
<i class="sort-caret ascending" @click="changeSort(item,'ascending')"></i>
|
|
|
<i class="sort-caret descending" @click="changeSort(item,'descending')"></i>
|
...
|
...
|
@@ -90,15 +87,31 @@ |
|
|
<li v-for="(item, index) in listAll" :key="index" :style="tableRowHeight()" @mouseenter="isHover=true" @mouseleave="isHover=false" >
|
|
|
<div class="infoList-flex" :style="[bodyTableStyle, bodyTable(index),tableFiledWidth(index),tableRowHeight(),serialNumber]">
|
|
|
{{ index+1 }}</div>
|
|
|
<div class="infoList-flex"
|
|
|
<div class="infoList-flex text-overflow padding-10"
|
|
|
v-for="(itemChild, idx) in headerAll"
|
|
|
:key="idx"
|
|
|
:style="[bodyTableStyle, bodyTable(index),tableFiledWidth(idx),tableRowHeight()]"
|
|
|
@mouseenter="pressingTimes(index,idx)"
|
|
|
:data-tip="tableFiledMaxWidth('isOverflow1'+index+'-'+idx,index,idx,'more')"
|
|
|
>
|
|
|
<span @click="clickListName(item[itemChild.key])" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
<el-tooltip v-if="!itemChild.componentName || itemChild.componentName==1" :disabled="isEllipsisMore[index+'-'+idx]" ref="elTooltip" trigger="hover" >
|
|
|
<template #content>
|
|
|
<span>{{ item[itemChild.key].kpiValue}}</span>
|
|
|
</template>
|
|
|
<span @mouseleave="" :ref="'isOverflow1'+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>
|
|
|
</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'" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <span @click="clickListName(item[itemChild.key])" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
:class="['listName',{'listName-link':item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)}]">
|
|
|
{{ item[itemChild.key]?item[itemChild.key].kpiValue:'' }}</span>
|
|
|
{{ item[itemChild.key]?item[itemChild.key].kpiValue:'' }}</span>-->
|
|
|
<customMenuBox v-if="pressingVisible==index+'-'+idx && item[itemChild.key] && (item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1)"
|
|
|
:detailMenubox="calcDetailMenubox"
|
|
|
:tableDataValue="item[itemChild.key].kpiValue" :flg="''" :trendSrc="trendSrc"
|
...
|
...
|
@@ -261,6 +274,7 @@ export default { |
|
|
sortBy:'',//排序参数
|
|
|
sortCaret:'',//正序倒序
|
|
|
isEllipsis:[],//是否文字超出
|
|
|
isEllipsisMore:[],//是否文字超出
|
|
|
componentName:'',//组件名称
|
|
|
};
|
|
|
},
|
...
|
...
|
@@ -652,14 +666,20 @@ export default { |
|
|
return styleJson
|
|
|
},
|
|
|
//列最大宽
|
|
|
tableFiledMaxWidth(obj,index,idx){
|
|
|
tableFiledMaxWidth(obj,index,idx,flg){
|
|
|
let that=this;
|
|
|
this.$nextTick(() => {
|
|
|
let isOverflow=that.$refs[obj];
|
|
|
if(isOverflow && isOverflow[0]){
|
|
|
if(isOverflow && isOverflow[0]){
|
|
|
let cWidth = isOverflow[0].parentElement.scrollWidth;
|
|
|
let sWidth = isOverflow[0].scrollWidth;
|
|
|
that.isEllipsis[index+'-'+idx]=!((sWidth+10) > cWidth);
|
|
|
if(flg=='more'){
|
|
|
that.isEllipsisMore[index+'-'+idx]=!((sWidth+10) > cWidth);
|
|
|
|
|
|
}else {
|
|
|
that.isEllipsis[index+'-'+idx]=!((sWidth+10) > cWidth);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
})
|
...
|
...
|
|