| | |
| | | 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( |
| | |
| | | }); |
| | | this._sensors = {}; |
| | | // 未选 或者 半选状态 |
| | | }else { |
| | | } else { |
| | | // 全选操作 |
| | | children.forEach(element => { |
| | | element['checked'] = true; |
| | |
| | | data['checked'] = true; |
| | | data['halfChecked'] = false; |
| | | } |
| | | }else { |
| | | } else { |
| | | const parentData = event.node.parent.data; |
| | | data['checked'] = !data['checked']; |
| | | if (data['checked']) { |
| | |
| | | ); break; |
| | | } |
| | | } |
| | | // 第一步,省市区 赋值变 并 改变监控点选项 |
| | | // 第一步,省市区 赋值变 并 改变监控站点选项 |
| | | public setAreasData(areas: {label: string, value: string}[] ) { |
| | | let isChanged = false; |
| | | isChanged = areas.some( (item , index: number) => { |
| | | // this._areas[index] 为null 改变 监控点选项 |
| | | // this._areas[index] 为null 改变 监控站点选项 |
| | | return this._areas.length < areas.length |
| | | || !this._areas[index] |
| | | || this._areas[index].value !== item.value; |
| | |
| | | } |
| | | } |
| | | |
| | | // 第二步 设置 监控点, 值变 改变设备选项,值为null 置空设备选项和设备值 |
| | | // 第二步 设置 监控站点, 值变 改变设备选项,值为null 置空设备选项和设备值 |
| | | public _monitorPoint: MonitorPoint; |
| | | get monitorPoint(): MonitorPoint { |
| | | return this._monitorPoint; |
| | |
| | | } |
| | | |
| | | } |
| | | // 第三步 设置 监控点 |
| | | // 第三步 设置 监控站点 |
| | | public _device: Device; |
| | | set device(val: Device) { |
| | | this._device = val; |
| | |
| | | } else { |
| | | this._sensors = {}; |
| | | } |
| | | }else { |
| | | } else { |
| | | if (!!data.checked) { |
| | | this._sensors [data.id] = data.sensorKey; |
| | | }else { |
| | | } else { |
| | | delete this._sensors[data.id]; |
| | | } |
| | | } |
| | |
| | | const names = ['辖区', '地区', '时间', '项目']; |
| | | switch ( this.dataCondition.areaRange ) { |
| | | case AreaRange.MONITORPOINT : |
| | | names[0] = '监控点'; |
| | | names[0] = '监控站点'; |
| | | names[1] = this._monitorPoint.name; break; |
| | | case AreaRange.DEVICE : |
| | | names[0] = '设备'; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | |