|
|
<template>
|
|
|
<div :style="styleObj" @click="closePressingDialog" ref="detailTable">
|
|
|
<div :style="styleObj" @mouseleave.stop="closePressingDialog" ref="detailTable">
|
|
|
<div class="detail-table-title title-flex-between">
|
|
|
<div class="title-left">{{tableStyle.tableName}}</div>
|
|
|
<div class="title-right">
|
|
|
<span class="title-link" @click="handlerDetailDataNoPage()">更多</span>
|
|
|
<span class="title-link">下载</span>
|
|
|
<span class="title-link" @click="downloadTableList">下载</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<superslide v-if="hackReset" :options="options" class="txtScroll-top" :style="borderStyle">
|
|
|
<!--表头-->
|
|
|
<div class="title">
|
|
|
<div :style="[headerTableStlye,tableRowHeight(),serialNumber]">序号</div>
|
|
|
<div
|
|
|
v-for="(item, index) in header"
|
|
|
:style="[headerTableStlye,tableFiledWidth(index),tableRowHeight()]"
|
|
|
: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">
|
|
|
<i class="sort-caret ascending" @click="changeSort(item,'ascending')"></i>
|
|
|
<i class="sort-caret descending" @click="changeSort(item,'descending')"></i>
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--数据-->
|
|
|
<div class="bd">
|
|
|
<ul class="infoList">
|
|
|
<li v-for="(item, index) in list" :key="index" :style="tableRowHeight()" @mouseenter="isHover=true" @mouseleave="isHover=false" >
|
|
|
<div class="infoList-flex"
|
|
|
<div class="infoList-flex" :style="[bodyTableStyle, bodyTable(index),tableFiledWidth(index),tableRowHeight(),serialNumber]">
|
|
|
{{ index+1 }}</div>
|
|
|
<div class="infoList-flex text-overflow padding-10"
|
|
|
v-for="(itemChild, idx) in header"
|
|
|
: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)"
|
|
|
>
|
|
|
<span @click="clickListName(item[itemChild.key])" :style="colorStyle(item[itemChild.key].kpiValue)"
|
|
|
:class="['listName',{'listName-link':item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1}]">
|
|
|
{{ item[itemChild.key].kpiValue}} </span>
|
|
|
<div class="basic-img" v-if="item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1">
|
|
|
<el-popover ref="popoverMenu" placement="right" trigger="click" :auto-close="200">
|
|
|
<template #reference>
|
|
|
<img class="info-img" src="@/assets/images/healthStatus/icon_row_menu.png" alt="" @click.stop="pressingTimes(index,idx)">
|
|
|
</template>
|
|
|
<!-- <div class="info-ul" v-if="pressingVisible==index+'-'+idx">-->
|
|
|
<div class="info-ul" style="width:140px;" >
|
|
|
<div class="basic-pressing-times" @click="pressingDialog(itemMenu,item[itemChild.key].kpiValue,'')" v-for="itemMenu in detailMenubox">
|
|
|
<i class="el-icon-link icon-div"></i>{{itemMenu.name}}
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
<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>
|
|
|
</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"
|
|
|
:tableDataValue="item[itemChild.key].kpiValue" :flg="''" :trendSrc="trendSrc"
|
|
|
:heightStyle="heightStyle" :marginStyle="marginStyle" :tableName="dialogNameStyle(item[itemChild.key])"
|
|
|
|
|
|
></customMenuBox>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</superslide>
|
|
|
<!-- <el-dialog :visible.sync="tableVisible" :title="tableStyle.tableName" width="80%" center>-->
|
|
|
|
|
|
<!-- <el-popover
|
|
|
ref="popoverRef"
|
|
|
v-model:visible="tableVisible"
|
|
|
placement="left"
|
|
|
trigger="click"
|
|
|
:title="tableStyle.tableName"
|
|
|
virtual-triggering
|
|
|
persistent
|
|
|
<!-- 更多弹框-->
|
|
|
<customDialog :dialogVisible="tableVisible" :heightStyle="heightStyle" :marginStyle="marginStyle" :title-name="tableStyle.tableName"
|
|
|
@hideDialog="hideDialogTable" @okFunc="okFuncTable"
|
|
|
>
|
|
|
|
|
|
</el-popover>-->
|
|
|
<div class="dialog-div" v-if="tableVisible" :style="heightStyle">
|
|
|
<div class="dialog-div-content" :style="marginStyle" >
|
|
|
<div class="dialog-div-title title-flex-between"><span>{{tableStyle.tableName}}</span> <span class="dialog-close" @click="tableVisible = false">X</span></div>
|
|
|
<template v-slot>
|
|
|
<div v-if="hackReset" class="txtScroll-top" >
|
|
|
<!--表头-->
|
|
|
<div class="title" :style="borderStyle">
|
|
|
<div :style="[headerTableStlye,tableRowHeight(),serialNumber]">序号</div>
|
|
|
<div
|
|
|
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')}"
|
|
|
>
|
|
|
{{ 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>
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--数据-->
|
|
|
<div class="bd">
|
|
|
<ul class="infoList" :style="borderStyle">
|
|
|
<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"
|
|
|
v-for="(itemChild, idx) in headerAll"
|
|
|
:key="idx"
|
|
|
:style="[bodyTableStyle, bodyTable(index),tableFiledWidth(idx),tableRowHeight()]"
|
|
|
@mouseenter="pressingTimes(index,idx)"
|
|
|
>
|
|
|
<span @click="clickListName(item[itemChild.key])" :style="colorStyle(item[itemChild.key].kpiValue)" :class="['listName',{'listName-link':item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1}]">
|
|
|
{{ item[itemChild.key].kpiValue }}</span>
|
|
|
<div class="basic-img" v-if="item[itemChild.key].kpiIdent==1 || item[itemChild.key].isWarning==1">
|
|
|
<el-popover ref="popoverMenu" placement="right" trigger="click" :auto-close="200">
|
|
|
<template #reference>
|
|
|
<img class="info-img" src="@/assets/images/healthStatus/icon_row_menu.png" alt="" @click.stop="pressingTimes(index,idx)">
|
|
|
</template>
|
|
|
<!-- <div class="info-ul" v-if="pressingVisible==index+'-'+idx">-->
|
|
|
<div class="info-ul" style="width:140px;" >
|
|
|
<div class="basic-pressing-times" @click="pressingDialog(itemMenu,item[itemChild.key].kpiValue,'dialog')" v-for="itemMenu in detailMenubox">
|
|
|
<i class="el-icon-link icon-div"></i>{{itemMenu.name}}
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-popover>
|
|
|
|
|
|
</div>
|
|
|
<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>
|
|
|
<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"
|
|
|
:heightStyle="heightStyle" :marginStyle="marginStyle" :tableName="dialogNameStyle(item[itemChild.key])"
|
|
|
|
|
|
></customMenuBox>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="dialog-div" v-if="dialogVisible" :style="heightStyle">
|
|
|
<div class="dialog-div-content" :style="marginStyle+widthStyle" >
|
|
|
<div class="dialog-div-title title-flex-between"><span>{{tableStyle.tableName}}</span> <span class="dialog-close" @click="dialogVisible = false">X</span></div>
|
|
|
<div v-if="dialogName=='alarm_setting'" class="txtScroll-top">
|
|
|
告警设置{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='filter_sheet_indicator'" class="txtScroll-top">
|
|
|
过滤单指标{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='filter_multiple_indicators'" class="txtScroll-top">
|
|
|
过滤多指标{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='performance_trends'" class="txtScroll-top">
|
|
|
性能趋势{{pressingValue}}
|
|
|
<iframe :src="trendSrc" class="layadmin-iframe" style="height: 99.5%!important;width: 100%;"/>
|
|
|
</div>
|
|
|
<div v-if="dialogName=='pressing_times'" class="txtScroll-top">
|
|
|
压制次数{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='include_capacity_forecast'" class="txtScroll-top">
|
|
|
纳入容量预测{{pressingValue}}
|
|
|
</div>
|
|
|
<div class="dialog-footer" v-if="dialogName!='table' && dialogName!='performance_trends'">
|
|
|
<el-button @click="dialogVisible = false">取消</el-button>
|
|
|
<el-button type="primary" @click="dialogVisible = false"
|
|
|
>确定</el-button
|
|
|
>
|
|
|
<!-- 分页 -->
|
|
|
<div class="pageClass" style='text-align: left;background-color: white'>
|
|
|
<el-pagination
|
|
|
v-if="currentPage"
|
|
|
@size-change="handleSizeChange"
|
|
|
@prev-click="prePage"
|
|
|
@next-click="nextPage"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="currentPage"
|
|
|
:page-sizes="pageSizes"
|
|
|
:page-size="pageSize"
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</customDialog>
|
|
|
<!-- 直接点击表格数据展示 性能趋势弹框-->
|
|
|
<customDialog :dialogVisible="trendVisible" :heightStyle="heightStyle" :marginStyle="marginStyle" :widthStyle="widthStyle" :title-name="dialogName"
|
|
|
:showFooter="true" :showCancelBtn="true" :showOkBtn="true" @hideDialog="hideDialog" @okFunc="okFunc"
|
|
|
>
|
|
|
<template v-slot>
|
|
|
<div class="txtScroll-top">
|
|
|
性能趋势{{pressingValue}}
|
|
|
<iframe :src="trendSrc" class="layadmin-iframe" style="height: 99.5%!important;width: 100%;"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
</customDialog>
|
|
|
<!-- <div class="dialog-div" v-if="tableVisible" :style="heightStyle">
|
|
|
<div class="dialog-div-content" :style="marginStyle" >
|
|
|
<div class="dialog-div-title title-flex-between"><span>{{tableStyle.tableName}}</span> <span class="dialog-close" @click="tableVisible = false">X</span></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- <template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
<el-button @click="tableVisible = false">取消</el-button>
|
|
|
<el-button type="primary" @click="tableVisible = false"
|
|
|
>确定</el-button
|
|
|
>
|
|
|
</span>
|
|
|
</div>-->
|
|
|
<!-- <customDialog :dialogVisible="dialogVisible" :heightStyle="heightStyle" :marginStyle="marginStyle" :widthStyle="widthStyle" :title-name="tableStyle.tableName"
|
|
|
:showFooter="true" :showCancelBtn="true" :showOkBtn="true" @hideDialog="hideDialog" @okFunc="okFunc"
|
|
|
>
|
|
|
<template v-slot>
|
|
|
<div v-if="dialogName=='alarm_setting'" class="txtScroll-top">
|
|
|
告警设置{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='filter_sheet_indicator'" class="txtScroll-top">
|
|
|
过滤单指标{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='filter_multiple_indicators'" class="txtScroll-top">
|
|
|
过滤多指标{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='performance_trends'" class="txtScroll-top">
|
|
|
性能趋势{{pressingValue}}
|
|
|
<iframe :src="trendSrc" class="layadmin-iframe" style="height: 99.5%!important;width: 100%;"/>
|
|
|
</div>
|
|
|
<div v-if="dialogName=='pressing_times'" class="txtScroll-top">
|
|
|
压制次数{{pressingValue}}
|
|
|
</div>
|
|
|
<div v-if="dialogName=='include_capacity_forecast'" class="txtScroll-top">
|
|
|
纳入容量预测{{pressingValue}}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>-->
|
|
|
</customDialog>-->
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import vue from "vue";
|
|
|
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 {
|
|
|
props: {
|
|
|
value: Object,
|
|
|
ispreview: Boolean
|
|
|
},
|
|
|
components:{
|
|
|
customDialog,customMenuBox,textToImage,textToBg
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
currentPage:1,
|
|
|
pageSize:10,
|
|
|
pageSizes:[10,50,100, 200, 300, 400],
|
|
|
total:0,
|
|
|
trendVisible:false,//性能趋势弹框
|
|
|
headerAll:[],
|
|
|
listAll:[],
|
|
|
tableVisible:false,//更多表格弹框
|
...
|
...
|
@@ -185,44 +219,53 @@ export default { |
|
|
optionsData: {},
|
|
|
pressingVisible:'',
|
|
|
isHover:false,
|
|
|
detailMenubox:[
|
|
|
/*detailMenubox:[
|
|
|
{
|
|
|
name:'告警设置',
|
|
|
type:'alarm_setting'
|
|
|
type:'alarm_setting',
|
|
|
isDisplay:true
|
|
|
},
|
|
|
{
|
|
|
name:'过滤单指标',
|
|
|
type:'filter_sheet_indicator'
|
|
|
type:'filter_sheet_indicator',
|
|
|
isDisplay:true
|
|
|
},
|
|
|
{
|
|
|
name:'过滤多指标',
|
|
|
type:'filter_multiple_indicators'
|
|
|
type:'filter_multiple_indicators',
|
|
|
isDisplay:true
|
|
|
},
|
|
|
{
|
|
|
name:'性能趋势',
|
|
|
type:'performance_trends'
|
|
|
type:'performance_trends',
|
|
|
isDisplay:true
|
|
|
},
|
|
|
{
|
|
|
name:'压制次数',
|
|
|
type:'pressing_times'
|
|
|
type:'pressing_times',
|
|
|
isDisplay:true
|
|
|
},
|
|
|
{
|
|
|
name:'纳入容量预测',
|
|
|
type:'include_capacity_forecast'
|
|
|
type:'include_capacity_forecast',
|
|
|
isDisplay:true
|
|
|
}
|
|
|
],
|
|
|
],*/
|
|
|
dialogName:'',//表格名称
|
|
|
pressingValue:'',//表格下探值
|
|
|
trendSrc:'',//性能走势图地址
|
|
|
marginStyle:'',//弹框距离顶部距离
|
|
|
heightStyle:'',//弹框遮罩层高度
|
|
|
widthStyle:';',//弹框宽度样式
|
|
|
|
|
|
sortVal:'bottom',//排序方式
|
|
|
sortBy:'',//排序参数
|
|
|
sortCaret:'',//正序倒序
|
|
|
isEllipsis:[],//是否文字超出
|
|
|
componentName:'',//组件名称
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
styleObj() {
|
|
|
// console.log(this.optionsSetUp);
|
|
|
const allStyle = this.optionsPosition;
|
|
|
return {
|
|
|
position: this.ispreview ? "absolute" : "static",
|
...
|
...
|
@@ -262,6 +305,13 @@ export default { |
|
|
"border-bottom":'none',
|
|
|
};
|
|
|
},
|
|
|
serialNumber(){
|
|
|
const headStyle = this.optionsSetUp;
|
|
|
return{
|
|
|
width:'30%',
|
|
|
display:headStyle.isSerialNumber?"block":"none",
|
|
|
}
|
|
|
},
|
|
|
borderStyle(){
|
|
|
const bodyStyle = this.optionsSetUp;
|
|
|
return{
|
...
|
...
|
@@ -275,6 +325,48 @@ export default { |
|
|
return{
|
|
|
tableName:tableStyleSetup.tableName
|
|
|
}
|
|
|
},
|
|
|
//表格下探列表
|
|
|
calcDetailMenubox(){
|
|
|
const menubox = this.optionsSetUp;
|
|
|
let detailMenuBox=[];
|
|
|
if(menubox.alarm_setting){
|
|
|
detailMenuBox.push({
|
|
|
name:'告警设置',
|
|
|
type:'alarm_setting'
|
|
|
})
|
|
|
}
|
|
|
if(menubox.filter_sheet_indicator){
|
|
|
detailMenuBox.push({
|
|
|
name:'过滤单指标',
|
|
|
type:'filter_sheet_indicator'
|
|
|
})
|
|
|
}
|
|
|
if(menubox.filter_multiple_indicators){
|
|
|
detailMenuBox.push({
|
|
|
name:'过滤多指标',
|
|
|
type:'filter_multiple_indicators'
|
|
|
})
|
|
|
}
|
|
|
if(menubox.performance_trends){
|
|
|
detailMenuBox.push({
|
|
|
name:'性能趋势',
|
|
|
type:'performance_trends'
|
|
|
})
|
|
|
}
|
|
|
if(menubox.pressing_times){
|
|
|
detailMenuBox.push({
|
|
|
name:'压制次数',
|
|
|
type:'pressing_times'
|
|
|
})
|
|
|
}
|
|
|
if(menubox.include_capacity_forecast){
|
|
|
detailMenuBox.push({
|
|
|
name:'纳入容量预测',
|
|
|
type:'include_capacity_forecast'
|
|
|
})
|
|
|
}
|
|
|
return detailMenuBox;
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
...
|
...
|
@@ -300,7 +392,7 @@ export default { |
|
|
this.handlerHead();
|
|
|
this.handlerData();
|
|
|
this.visConfig();
|
|
|
this.handlerDetailData();
|
|
|
// this.handlerDetailData();
|
|
|
window.addEventListener("scroll", this.handleScroll, true); //监听滚动事件
|
|
|
},
|
|
|
visConfig(){
|
...
|
...
|
@@ -325,7 +417,6 @@ export default { |
|
|
let ybNum=rollSet.ybNum?rollSet.ybNum:80;
|
|
|
let zyNum=rollSet.zyNum?rollSet.zyNum:85;
|
|
|
let yzNum=rollSet.yzNum?rollSet.yzNum:95;
|
|
|
console.log("color",ybNum,rollSet.zcColor)
|
|
|
if(val){
|
|
|
let value=val.split("%")
|
|
|
if(value && value.length>1){
|
...
|
...
|
@@ -364,22 +455,34 @@ export default { |
|
|
this.selectNum = 1;
|
|
|
|
|
|
}
|
|
|
let scroll=window.pageYOffset;
|
|
|
// let scroll=window.pageYOffset;
|
|
|
let scroll=document.documentElement.scrollTop;
|
|
|
let documentHeight=document.documentElement.clientHeight;
|
|
|
console.log("123",documentHeight,scroll)
|
|
|
this.heightStyle="height:"+(documentHeight+scroll)+'px;';
|
|
|
this.marginStyle+="margin-top:"+(scroll+30)+'px;';
|
|
|
if (self != top) {
|
|
|
//嵌入到监控系统iframe中弹框位置样式
|
|
|
// let documentHeight=document.body.scrollHeight;
|
|
|
this.heightStyle="height:"+(documentHeight+230)+'px;top:'+scroll+'px';
|
|
|
if(scroll<600){
|
|
|
this.marginStyle+="margin-top:"+(110)+'px;';
|
|
|
|
|
|
}else{
|
|
|
this.marginStyle+="margin-top:"+(230)+'px;';
|
|
|
|
|
|
}
|
|
|
}else{
|
|
|
//ajreport中弹框位置样式
|
|
|
this.heightStyle="height:"+(documentHeight+scroll)+'px;';
|
|
|
this.marginStyle+="margin-top:"+(scroll+100)+'px;';
|
|
|
}
|
|
|
},
|
|
|
|
|
|
handleHeadContent(headTable,flg){
|
|
|
let data = headTable.data[0];
|
|
|
let data = headTable;
|
|
|
let head = data.header;
|
|
|
let content = data.content;
|
|
|
let colArr = [];
|
|
|
let fisttd = "";
|
|
|
let datas=[];
|
|
|
|
|
|
head.map((v) => {
|
|
|
fisttd = v.id;
|
|
|
let columnObj = {
|
...
|
...
|
@@ -394,13 +497,17 @@ export default { |
|
|
if (ccv.kpiValue || ccv.kpiValue === 0) {
|
|
|
kpi[ccv.kpiId] = ccv;
|
|
|
} else {
|
|
|
kpi[ccv.kpiId] = {};
|
|
|
kpi[ccv.kpiId] = {
|
|
|
kpiValue: "",
|
|
|
kpiUnit: "",
|
|
|
kpiIdent: "0",
|
|
|
isWarning: 0,
|
|
|
};
|
|
|
}
|
|
|
|
|
|
})
|
|
|
datas.push(kpi);
|
|
|
})
|
|
|
console.log("col",colArr)
|
|
|
if(flg=='all'){
|
|
|
this.headerAll=colArr;
|
|
|
this.listAll=datas;
|
...
|
...
|
@@ -408,49 +515,75 @@ export default { |
|
|
this.list=datas;
|
|
|
this.header=colArr;
|
|
|
}
|
|
|
console.log("datas",datas)
|
|
|
|
|
|
this.tableFiledColumnSort();
|
|
|
},
|
|
|
handlerDetailData(){
|
|
|
let headTable = getDetailTableData();
|
|
|
handlerDetailData(valData,sortBy){
|
|
|
let kpiArr=[]
|
|
|
let kpiIdStr='';
|
|
|
if(this.header && this.header.length>0){
|
|
|
this.header.map(item=>{
|
|
|
if(item.isStatic){
|
|
|
|
|
|
}else{
|
|
|
kpiArr.push(item.key)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
if(kpiArr && kpiArr.length>0){
|
|
|
kpiIdStr=kpiArr.join(',');
|
|
|
}
|
|
|
let param={
|
|
|
kpiId:kpiIdStr
|
|
|
}
|
|
|
let sort=sortBy;
|
|
|
if(sort){
|
|
|
param.sort=sort;
|
|
|
}
|
|
|
let headTable = valData;
|
|
|
if(kpiIdStr){
|
|
|
//根据kpiId集合获取表格数据
|
|
|
let tableData=getDetailTableData(param);
|
|
|
headTable=tableData.data[0];
|
|
|
}
|
|
|
|
|
|
this.handleHeadContent(headTable)
|
|
|
|
|
|
},
|
|
|
//打开更多表格
|
|
|
handlerDetailDataNoPage(){
|
|
|
let headTable =getDetailTableDataNoPage();
|
|
|
this.handleHeadContent(headTable,'all');
|
|
|
this.handleHeadContent(headTable.data[0],'all');
|
|
|
this.widthStyle='';
|
|
|
// this.setDialog('table');
|
|
|
this.tableVisible=true;
|
|
|
},
|
|
|
//打开弹框
|
|
|
/*//打开弹框
|
|
|
setDialog(name,flg){
|
|
|
console.log("123",name,flg)
|
|
|
/* if(flg=='dialog'){
|
|
|
this.tableVisible=true;
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
}*/
|
|
|
this.dialogVisible=true;
|
|
|
|
|
|
this.dialogName=name;
|
|
|
},
|
|
|
},*/
|
|
|
//点击表格内容名称事件
|
|
|
clickListName(obj){
|
|
|
console.log("obj",obj)
|
|
|
let trendsParams=obj;
|
|
|
// this.trendSrc='http://127.0.0.1:8088/vue3/index.html#/vue3/pieDetailLine?resId=08586dba3a5b4a01ad88e8878eed6d53&kpiId=KPI7054BC34&flag=cpu&ident=1&trend=1&name=CPU%E4%BD%BF%E7%94%A8%E7%8E%87x&access_token=6e14ca48-4d05-42cf-b232-97981035824f'
|
|
|
this.trendSrc='https://192.168.0.69:8088/#/user/login/redirect=%2F';
|
|
|
this.widthStyle='';
|
|
|
this.setDialog('performance_trends')
|
|
|
if(obj.kpiIdent==1 || obj.isWarning==1){
|
|
|
let trendsParams=obj;
|
|
|
// this.trendSrc='http://127.0.0.1:8088/vue3/index.html#/vue3/pieDetailLine?resId=08586dba3a5b4a01ad88e8878eed6d53&kpiId=KPI7054BC34&flag=cpu&ident=1&trend=1&name=CPU%E4%BD%BF%E7%94%A8%E7%8E%87x&access_token=6e14ca48-4d05-42cf-b232-97981035824f'
|
|
|
this.trendSrc='https://192.168.0.69:8088/#/user/login/redirect=%2F';
|
|
|
this.widthStyle='';
|
|
|
// this.setDialog('performance_trends')
|
|
|
this.pressingValue=obj.kpiValue;
|
|
|
this.dialogNameStyle(obj)
|
|
|
|
|
|
this.trendVisible=true;
|
|
|
}
|
|
|
|
|
|
},
|
|
|
//End LSQ 2022/1/20 10:23 TODO
|
|
|
handlerHead() {
|
|
|
const head = this.optionsSetUp.dynamicAddTable;
|
|
|
this.header = head;
|
|
|
// this.headerAll=head;
|
|
|
},
|
|
|
handlerData() {
|
|
|
const tableData = this.optionsData;
|
...
|
...
|
@@ -458,8 +591,12 @@ export default { |
|
|
? this.handlerStaticData(tableData.staticData)
|
|
|
: this.handlerDynamicData(tableData.dynamicData, tableData.refreshTime);
|
|
|
},
|
|
|
handlerStaticData(data) {
|
|
|
this.list = data;
|
|
|
handlerStaticData(headTable) {
|
|
|
|
|
|
this.handlerDetailData(headTable[0]);
|
|
|
|
|
|
// this.handleHeadContent(headTable[0])
|
|
|
// this.list = data;
|
|
|
},
|
|
|
handlerDynamicData(data, refreshTime) {
|
|
|
if (!data) return;
|
...
|
...
|
@@ -510,11 +647,64 @@ export default { |
|
|
tableFiledWidth(index){
|
|
|
var styleJson = {};
|
|
|
if(this.optionsSetUp.dynamicAddTable[index] && this.optionsSetUp.dynamicAddTable[index].width ){
|
|
|
styleJson["width"] = this.optionsSetUp.dynamicAddTable[index].width
|
|
|
styleJson["width"] = this.optionsSetUp.dynamicAddTable[index].width;
|
|
|
}
|
|
|
return styleJson
|
|
|
},
|
|
|
//表格下探
|
|
|
//列最大宽
|
|
|
tableFiledMaxWidth(obj,index,idx){
|
|
|
let that=this;
|
|
|
this.$nextTick(() => {
|
|
|
let isOverflow=that.$refs[obj];
|
|
|
if(isOverflow && isOverflow[0]){
|
|
|
let cWidth = isOverflow[0].parentElement.scrollWidth;
|
|
|
let sWidth = isOverflow[0].scrollWidth;
|
|
|
that.isEllipsis[index+'-'+idx]=!((sWidth+10) > cWidth);
|
|
|
}
|
|
|
|
|
|
})
|
|
|
},
|
|
|
//列是否排序
|
|
|
tableFiledSort(index){
|
|
|
let isSort=false;
|
|
|
if(this.optionsSetUp.dynamicAddTable[index] && this.optionsSetUp.dynamicAddTable[index].sort ){
|
|
|
isSort = this.optionsSetUp.dynamicAddTable[index].sort;
|
|
|
}
|
|
|
return isSort;
|
|
|
},
|
|
|
//列展示的排序位置
|
|
|
tableFiledColumnSort(){
|
|
|
let headerSet=this.optionsSetUp.dynamicAddTable;
|
|
|
headerSet.map(item=>{
|
|
|
this.header.map(v=>{
|
|
|
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){
|
|
|
this.headerAll.map(v=>{
|
|
|
if(item.key==v.key){
|
|
|
v.columnSort=item.columnSort;
|
|
|
v.sort=item.sort?item.sort:false;
|
|
|
v.componentName=item.componentName?item.componentName:1;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
})
|
|
|
this.header.sort(this.compare('columnSort'))
|
|
|
this.headerAll.sort(this.compare('columnSort'))
|
|
|
},
|
|
|
compare(property){
|
|
|
return function(a,b){
|
|
|
let value1 = a[property];
|
|
|
let value2 = b[property];
|
|
|
return value1 - value2;
|
|
|
}
|
|
|
},
|
|
|
/* //表格下探
|
|
|
pressingDialog(itemMenu,value,flg){
|
|
|
this.pressingValue=value;
|
|
|
let styleStr='width: 300px;height: 200px;min-height: 200px;overflow: hidden;'
|
...
|
...
|
@@ -548,18 +738,116 @@ export default { |
|
|
}
|
|
|
// this.$refs.popoverMenu.showPopper = false;
|
|
|
|
|
|
},
|
|
|
},*/
|
|
|
pressingTimes(index,idx){
|
|
|
this.pressingVisible=index+'-'+idx;
|
|
|
},
|
|
|
closePressingDialog(){
|
|
|
this.pressingVisible=false;
|
|
|
// this.pressingVisible=false;
|
|
|
},
|
|
|
//弹框关闭确定
|
|
|
hideDialog(){
|
|
|
this.trendVisible=false;
|
|
|
},
|
|
|
okFunc(){
|
|
|
this.trendVisible=false;
|
|
|
},
|
|
|
//更多弹框关闭确定
|
|
|
hideDialogTable(){
|
|
|
this.tableVisible=false;
|
|
|
},
|
|
|
okFuncTable(){
|
|
|
this.tableVisible=false;
|
|
|
|
|
|
},
|
|
|
//排序
|
|
|
changeSort(item,flg){
|
|
|
if(this.sortCaret==flg){
|
|
|
this.sortCaret='';
|
|
|
this.sortBy='';
|
|
|
}else{
|
|
|
this.sortCaret=flg;
|
|
|
this.sortBy=item.key;
|
|
|
}
|
|
|
if(this.sortCaret=='ascending'){
|
|
|
//正序
|
|
|
}else if(this.sortCaret=='ascending'){
|
|
|
//倒序
|
|
|
}else{
|
|
|
//不排序
|
|
|
}
|
|
|
// this.handlerDetailData('',item.key)
|
|
|
// this.handlerDetailDataNoPage();
|
|
|
},
|
|
|
// 每页展示多少条
|
|
|
handleSizeChange(val){
|
|
|
// 切换页码重置初始页
|
|
|
this.currentPage = 1
|
|
|
//props.pageSize = val;
|
|
|
this.pageSize = val;
|
|
|
this.handlerDetailDataNoPage();
|
|
|
},
|
|
|
|
|
|
// 切换页码
|
|
|
handleCurrentChange(val){
|
|
|
//props.currentPage = val;
|
|
|
this.currentPage = val;
|
|
|
this.handlerDetailDataNoPage();
|
|
|
},
|
|
|
// 切换页码
|
|
|
prePage(val) {
|
|
|
// props.currentPage = val - 1;
|
|
|
this.currentPage = val-1;
|
|
|
this.handlerDetailDataNoPage();
|
|
|
},
|
|
|
|
|
|
// 切换页码
|
|
|
nextPage(val){
|
|
|
// props.currentPage = val + 1;
|
|
|
this.currentPage = val+1;
|
|
|
this.handlerDetailDataNoPage();
|
|
|
},
|
|
|
//计算弹框名称
|
|
|
dialogNameStyle(obj) {
|
|
|
const tableStyleSetup = this.optionsSetUp;
|
|
|
let kpiName = obj.kpiName ? '+' + obj.kpiName : '';
|
|
|
let dialogName = tableStyleSetup.tableName + kpiName;
|
|
|
if (tableStyleSetup.nameDefault) {
|
|
|
dialogName = tableStyleSetup.tableName + kpiName;
|
|
|
|
|
|
} else {
|
|
|
let nameResType = tableStyleSetup.nameResType ? obj.resType ? obj.resType + '|' : '' : '';
|
|
|
let nameIPAddress = tableStyleSetup.nameIPAddress ? obj.ipAddr ? obj.ipAddr + '|' : '' : '';
|
|
|
let nameResName = tableStyleSetup.nameResName ? obj.resName ? obj.resName + '|' : '' : '';
|
|
|
let nameKpiName = tableStyleSetup.nameKpiName ? obj.kpiName ? obj.kpiName + '|' : '' : '';
|
|
|
let nameKpiFlg = tableStyleSetup.nameKpiFlg ? obj.flag ? obj.flag + '|' : '' : '';
|
|
|
let name = nameResType + nameIPAddress + nameIPAddress + nameResName + nameKpiName + nameKpiFlg;
|
|
|
dialogName = name.substring(0, name.length - 1);
|
|
|
}
|
|
|
this.dialogName = dialogName;
|
|
|
return dialogName;
|
|
|
},
|
|
|
//下载
|
|
|
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)
|
|
|
}
|
|
|
})
|
|
|
console.log("kpiIdArr",kpiIdArr)
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
/* 本例子css */
|
|
|
.cursorClass{
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
.txtScroll-top {
|
|
|
overflow: hidden;
|
|
|
position: relative;
|
...
|
...
|
@@ -624,8 +912,8 @@ export default { |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
.basic-img{
|
|
|
/*display: flex;*/
|
|
|
/*.basic-img{
|
|
|
!*display: flex;*!
|
|
|
display: none;
|
|
|
cursor: pointer;
|
|
|
.info-img{
|
...
|
...
|
@@ -639,9 +927,9 @@ export default { |
|
|
|
|
|
}
|
|
|
.info-ul{
|
|
|
/*position: absolute;*/
|
|
|
!*position: absolute;*!
|
|
|
border:1px solid #d2d2d2;
|
|
|
/*padding: 16px 20px;*/
|
|
|
!*padding: 16px 20px;*!
|
|
|
padding-bottom: 5px;
|
|
|
z-index: 999999;
|
|
|
background: #ffffff;
|
...
|
...
|
@@ -670,13 +958,18 @@ export default { |
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}*/
|
|
|
.listName-link{
|
|
|
cursor: pointer;
|
|
|
color:#0d82e9;
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
.dialog-div{
|
|
|
.pageClass{
|
|
|
position: absolute;
|
|
|
bottom:30px;
|
|
|
|
|
|
}
|
|
|
/*.dialog-div{
|
|
|
background: rgba(0, 0, 0, 0.35);
|
|
|
position: fixed;
|
|
|
top: 0;
|
...
|
...
|
@@ -686,10 +979,10 @@ export default { |
|
|
z-index: 1;
|
|
|
}
|
|
|
.dialog-div-content{
|
|
|
/* display: flex;
|
|
|
!* display: flex;
|
|
|
align-items: center;
|
|
|
margin: 30px auto 0;
|
|
|
flex-flow: column;*/
|
|
|
flex-flow: column;*!
|
|
|
width:80%;
|
|
|
min-height: 700px;
|
|
|
max-height: 800px;
|
...
|
...
|
@@ -732,5 +1025,55 @@ export default { |
|
|
bottom: 0;
|
|
|
text-align: right;
|
|
|
}
|
|
|
}*/
|
|
|
.title .caret-wrapper {
|
|
|
display: inline-flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
height: 14px;
|
|
|
width: 14px;
|
|
|
vertical-align: middle;
|
|
|
cursor: pointer;
|
|
|
overflow: initial;
|
|
|
position: relative;
|
|
|
}
|
|
|
.title .sort-caret {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border: solid 5px transparent;
|
|
|
position: absolute;
|
|
|
left: 1px;
|
|
|
}
|
|
|
.title .sort-caret.ascending {
|
|
|
border-bottom-color: #c0c4cc;
|
|
|
top: -5px;
|
|
|
}
|
|
|
.title .sort-caret.descending {
|
|
|
border-top-color: #c0c4cc;
|
|
|
bottom: -3px;
|
|
|
}
|
|
|
.title .ascending .sort-caret.ascending {
|
|
|
border-bottom-color: #409eff;
|
|
|
}
|
|
|
.title .descending .sort-caret.descending {
|
|
|
border-top-color: #409eff;
|
|
|
}
|
|
|
.text-overflow{
|
|
|
white-space:nowrap;
|
|
|
overflow:hidden;
|
|
|
text-overflow:ellipsis;
|
|
|
|
|
|
/*word-break: break-all;
|
|
|
text-overflow: ellipsis;
|
|
|
overflow: hidden;
|
|
|
display: -webkit-box;
|
|
|
-webkit-line-clamp: 2;
|
|
|
-webkit-box-orient: vertical;*/
|
|
|
}
|
|
|
.width-80{
|
|
|
max-width:80%;
|
|
|
}
|
|
|
.padding-10{
|
|
|
padding:5px;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|