xufenglei
2018-04-27 c597ff5895ae803ce5584f3e8463d8f9224b0fa4
src/app/routes/reports/query/query.component.ts
@@ -131,7 +131,7 @@
            if (!!text) {
                example.or().andEqualTo({ name: 'monitorPointId', value: this.monitorPoint.id })
                .andLike({name: 'text', value: text});
            }else {
            } else {
                example.or().andEqualTo({ name: 'monitorPointId', value: this.monitorPoint.id });
            }
            this.deviceService.getPageByExample(null, example).subscribe(
@@ -182,7 +182,7 @@
                    });
                    this._sensors = {};
                    // 未选 或者 半选状态
                }else {
                } else {
                    // 全选操作
                    children.forEach(element => {
                        element['checked'] = true;
@@ -191,7 +191,7 @@
                    data['checked'] = true;
                    data['halfChecked'] = false;
                }
            }else {
            } else {
                const parentData = event.node.parent.data;
                data['checked'] = !data['checked'];
                if (data['checked']) {
@@ -349,10 +349,10 @@
            } else {
                this._sensors = {};
            }
        }else {
        } else {
             if (!!data.checked) {
                this._sensors [data.id] = data.sensorKey;
             }else {
             } else {
                delete this._sensors[data.id];
             }
        }
@@ -693,9 +693,23 @@
    public sensorTableFocus(index) {
        this.sensorTableFocusIndex = index;
    }
    public sensorTableBlur(index) {
        this.sensorTableFocusIndex = -1;
    }
    public sensorSelectVisible = false;
    public treeMouseOverOccur = false;
    public onTreeMouseOver(event) {
        this.treeMouseOverOccur = true;
    }
    public onTreeMouseOut(event) {
        this.treeMouseOverOccur = false;
        setTimeout(() => {
            if (!this.treeMouseOverOccur) {
                this.sensorSelectVisible =  false;
            }
        }, 900);
    }
}