|
@@ -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
|
385
|
- }
|
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;
|
|
|
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>
|