Authored by 王涛

Merge branch 'master-ajreport-lushangqing' into 'master'

仪表盘组件---部分功能1



See merge request !15
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 您确定要对当前指标进行过滤处理? 53 您确定要对当前指标进行过滤处理?
54 </div> 54 </div>
55 <div v-if="dialogName=='performance_trends'" class="txtScroll-top"> 55 <div v-if="dialogName=='performance_trends'" class="txtScroll-top">
56 - <div>性能趋势{{pressingValue.kpiValue}}</div> 56 +<!-- <div>性能趋势{{pressingValue.kpiValue}}</div>-->
57 <iframe :src="trendSrc" class="layadmin-iframe" style="height: 99.5%!important;width: 100%;"/> 57 <iframe :src="trendSrc" class="layadmin-iframe" style="height: 99.5%!important;width: 100%;"/>
58 </div> 58 </div>
59 <div v-if="dialogName=='pressing_times'" class="txtScroll-top"> 59 <div v-if="dialogName=='pressing_times'" class="txtScroll-top">
@@ -65,9 +65,9 @@ @@ -65,9 +65,9 @@
65 placeholder="压制次数(必填,建议100以内)" 65 placeholder="压制次数(必填,建议100以内)"
66 /> 66 />
67 </div> 67 </div>
68 - <div v-if="dialogName=='include_capacity_forecast'" class="txtScroll-top"> 68 +<!-- <div v-if="dialogName=='include_capacity_forecast'" class="txtScroll-top">
69 纳入容量预测{{pressingValue}} 69 纳入容量预测{{pressingValue}}
70 - </div> 70 + </div>-->
71 </template> 71 </template>
72 </customDialog> 72 </customDialog>
73 </div> 73 </div>
@@ -51,6 +51,22 @@ export const monitorGaugeRate = { @@ -51,6 +51,22 @@ export const monitorGaugeRate = {
51 placeholder: '', 51 placeholder: '',
52 value: '', 52 value: '',
53 }, 53 },
  54 + {
  55 + type: 'el-input-text',
  56 + label: 'kpiId',
  57 + name: 'kpiId',
  58 + required: false,
  59 + placeholder: '',
  60 + value: 'KPI7054BC34',
  61 + },
  62 + {
  63 + type: 'el-input-text',
  64 + label: 'targetId',
  65 + name: 'targetId',
  66 + required: false,
  67 + placeholder: '',
  68 + value: 'x86server_cpurate',
  69 + },
54 [ 70 [
55 { 71 {
56 name: "下探设置", 72 name: "下探设置",
@@ -28,11 +28,12 @@ export default { @@ -28,11 +28,12 @@ export default {
28 }, 28 },
29 data() { 29 data() {
30 return { 30 return {
  31 + marginStyle:'',//弹框距离顶部距离
  32 + heightStyle:'',//弹框遮罩层高度
  33 + widthStyle:';',//弹框宽度样式
31 isDisplay:false, 34 isDisplay:false,
32 tableDataValue: {}, 35 tableDataValue: {},
33 tableDataValueHead: {}, 36 tableDataValueHead: {},
34 - heightStyle:'',  
35 - marginStyle:'',  
36 resType:'', 37 resType:'',
37 options: { 38 options: {
38 series: [ 39 series: [
@@ -212,6 +213,13 @@ export default { @@ -212,6 +213,13 @@ export default {
212 } 213 }
213 return detailMenuBox; 214 return detailMenuBox;
214 }, 215 },
  216 + kpiIdStyle(){
  217 + let obj={
  218 + kpiId:this.optionsSetup.kpiId,
  219 + targetId:this.optionsSetup.targetId
  220 + }
  221 + return obj;
  222 + }
215 }, 223 },
216 watch: { 224 watch: {
217 value: { 225 value: {
@@ -236,6 +244,7 @@ export default { @@ -236,6 +244,7 @@ export default {
236 editorOptions() { 244 editorOptions() {
237 this.setOptions() 245 this.setOptions()
238 this.setOptionsData() 246 this.setOptionsData()
  247 + window.addEventListener("scroll", this.handleScroll, true); //监听滚动事件
239 }, 248 },
240 setOptions() { 249 setOptions() {
241 const optionsSetup = this.optionsSetup; 250 const optionsSetup = this.optionsSetup;
@@ -382,7 +391,42 @@ export default { @@ -382,7 +391,42 @@ export default {
382 } 391 }
383 series[0].data = data 392 series[0].data = data
384 series[0].detail = detail 393 series[0].detail = detail
  394 + },
  395 + handleScroll(e){
  396 + let serviceTop = 44;
  397 +
  398 + let hotelTop = 344;
  399 +
  400 + if (e.target.scrollTop > 44 && e.target.scrollTop < 344) {
  401 +
  402 + this.selectNum = 0;
385 } 403 }
  404 +
  405 + if (e.target.scrollTop > 344) {
  406 +
  407 + this.selectNum = 1;
  408 +
  409 + }
  410 + // let scroll=window.pageYOffset;
  411 + let scroll=document.documentElement.scrollTop;
  412 + let documentHeight=document.documentElement.clientHeight;
  413 + if (self != top) {
  414 + //嵌入到监控系统iframe中弹框位置样式
  415 + // let documentHeight=document.body.scrollHeight;
  416 + this.heightStyle="height:"+(documentHeight+230)+'px;top:'+scroll+'px';
  417 + if(scroll<600){
  418 + this.marginStyle+="margin-top:"+(110)+'px;';
  419 +
  420 + }else{
  421 + this.marginStyle+="margin-top:"+(230)+'px;';
  422 +
  423 + }
  424 + }else{
  425 + //ajreport中弹框位置样式
  426 + this.heightStyle="height:"+(documentHeight+scroll)+'px;';
  427 + this.marginStyle+="margin-top:"+(scroll+100)+'px;';
  428 + }
  429 + },
386 } 430 }
387 }; 431 };
388 </script> 432 </script>