|
@@ -198,20 +198,8 @@ export default {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- watch: {
|
|
|
|
- tableheight(val) {
|
|
|
|
- // 为了避免频繁触发resize函数导致页面卡顿,使用定时器
|
|
|
|
- if (!this.heightTimer) {
|
|
|
|
- // 一旦监听到的screenWidth值改变,就将其重新赋给data里的screenWidth
|
|
|
|
- this.screenHeight = val;
|
|
|
|
- this.heightTimer = true;
|
|
|
|
- setTimeout(function () {
|
|
|
|
- this.heightTimer = false;
|
|
|
|
- }, 400);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ console.log(this,'this')
|
|
this.onLoadHeight();
|
|
this.onLoadHeight();
|
|
this.changeWindow();
|
|
this.changeWindow();
|
|
this.getLogModel();
|
|
this.getLogModel();
|
|
@@ -231,30 +219,7 @@ export default {
|
|
column.label,
|
|
column.label,
|
|
]);
|
|
]);
|
|
},
|
|
},
|
|
- /* 设置初始视窗高度*/
|
|
|
|
- onLoadHeight() {
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- let actual = this.getFontSize()
|
|
|
|
- this.tableheight = document.body.clientHeight - actual;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- /* 设置窗口变化高度*/
|
|
|
|
- changeWindow() {
|
|
|
|
- window.onresize = () => {
|
|
|
|
- return (() => {
|
|
|
|
- let actual = this.getFontSize()
|
|
|
|
- this.tableheight = document.body.clientHeight - actual;
|
|
|
|
- })();
|
|
|
|
- };
|
|
|
|
- },
|
|
|
|
- //得到根标签的值
|
|
|
|
- getFontSize(){
|
|
|
|
- let num = getComputedStyle(window.document.documentElement)[
|
|
|
|
- "font-size"
|
|
|
|
- ]; //得到html中fontSize的值
|
|
|
|
- let size = num.substring(0, num.length - 2); //去除px
|
|
|
|
- return (350 / 80) * size;
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
selectAll() {
|
|
selectAll() {
|
|
if (this.robotValue.length < this.logOptions.length) {
|
|
if (this.robotValue.length < this.logOptions.length) {
|
|
this.robotValue = [];
|
|
this.robotValue = [];
|