diff --git a/src/assets/css/components/index.scss b/src/assets/css/components/index.scss index ad16c89a..d1d61e49 100644 --- a/src/assets/css/components/index.scss +++ b/src/assets/css/components/index.scss @@ -20,6 +20,7 @@ @import './views/entityExplorer/entityList/row'; @import 'views/entityExplorer/entityList/detail-overview'; @import './views/detections/detections'; +@import './views/detections/detection-filter'; @import './views/charts/panel'; @import 'views/charts/chartIpOpenPortBar'; @import './views/charts/chartTable'; diff --git a/src/assets/css/components/views/detections/detection-filter.scss b/src/assets/css/components/views/detections/detection-filter.scss new file mode 100644 index 00000000..e28c5f99 --- /dev/null +++ b/src/assets/css/components/views/detections/detection-filter.scss @@ -0,0 +1,66 @@ +.detection-filter-case { + display: flex; + flex-direction: column; + width: 280px; + padding: 10px; + margin-right: 10px; + background-color: white; + + .detection-filter { + display: flex; + flex-direction: column; + margin-bottom: 10px; + + .filter__header { + display: flex; + flex: 0 0 32px; + align-items: center; + padding-left: 10px; + color: #666; + background-color: #F3F7FA; + cursor: pointer; + + span { + font-size: 14px; + padding-left: 6px; + } + i { + font-size: 12px; + transition: all linear .1s; + transform: rotate(0) translate(0, 2px); + } + i.arrow-rotate { + transform: rotate(90deg) translate(2px, 3px); + } + } + .filter__body { + padding: 5px 0 0 15px; + + .el-checkbox-group { + display: flex; + flex-direction: column; + + .el-checkbox { + display: flex; + align-items: center; + padding: 5px 0; + + .filter__checkbox-label { + display: flex; + align-items: center; + + .severity-color-block { + width: 4px; + height: 15px; + border-radius: 2px; + } + } + + &:last-of-type { + padding-bottom: 0; + } + } + } + } + } +} diff --git a/src/views/charts/Panel.vue b/src/views/charts/Panel.vue index 7bae66d5..e2d278df 100644 --- a/src/views/charts/Panel.vue +++ b/src/views/charts/Panel.vue @@ -114,6 +114,7 @@ export default { }, recursionParamsConvert (chart) { chart.params = chart.params ? JSON.parse(chart.params) : {} + chart.firstShow = false if (chart.type === 94) { chart.oldH = chart.h /* chart.params = { diff --git a/src/views/charts/PanelChartList.vue b/src/views/charts/PanelChartList.vue index 8e0f7787..fcf88881 100644 --- a/src/views/charts/PanelChartList.vue +++ b/src/views/charts/PanelChartList.vue @@ -134,7 +134,6 @@ export default { this.emitter.emit('groupParentCalcHeight', { chart, childrenList: this.copyDataList }) }, groupParentCalcHeight (chart, childrenList) { - // console.log(chart, childrenList) setTimeout(() => { const parent = this.copyDataList.find(chartitem => chartitem.id === chart.parent.id) const children = parent.children.find(item => item.id === chart.id) @@ -192,6 +191,26 @@ export default { setTimeout(() => { this.gridLayoutShow = true }) + setTimeout(() => { + this.copyDataList.forEach(item => { + // if (item.type === 95) { + // console.log(item.h, item.name) + // item.children.forEach(children => { + // console.log(children.name, children.h, children.y) + // }) + // let parentH = 1.5 + // parentH += getGroupHeight(item.children) + // if (parentH !== item.h) { + // item.h = parentH + // } + // } + if (item.type === 94 && !item.firstShow) { + item.firstShow = true + this.copyDataList = [...this.copyDataList] + this.emitter.emit('groupParentCalcHeight', { chart: item, childrenList: this.copyDataList }) + } + }) + }, 200) this.gridLayoutLoading = false }) } diff --git a/src/views/detections/DetectionFilter.vue b/src/views/detections/DetectionFilter.vue index 3703c50f..0a54e76c 100644 --- a/src/views/detections/DetectionFilter.vue +++ b/src/views/detections/DetectionFilter.vue @@ -1,11 +1,49 @@ diff --git a/src/views/detections/DetectionSearch.vue b/src/views/detections/DetectionSearch.vue index 47dfffdc..8cfc0ec2 100644 --- a/src/views/detections/DetectionSearch.vue +++ b/src/views/detections/DetectionSearch.vue @@ -1,5 +1,5 @@