From 0b5531a342910186b4bd6a948a58e26a8bf26870 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Tue, 15 Feb 2022 10:39:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A=20=E4=BF=AE=E6=94=B9=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=8A=98=E5=8F=A0=20block=20=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/charts/Panel.vue | 1 + src/views/charts/PanelChartList.vue | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) 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 }) } From 2e81ba0ca36dd8354d4681cb212440860e74898a Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Tue, 15 Feb 2022 23:27:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?CN-300=20feat:=20=E5=B7=A6=E4=BE=A7?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=A0=B7=E5=BC=8F=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/components/index.scss | 1 + .../views/detections/detection-filter.scss | 66 +++++++++++++ src/views/detections/DetectionFilter.vue | 42 +++++++- src/views/detections/DetectionSearch.vue | 28 +++++- src/views/detections/Index.vue | 97 ++++++++++++++++++- 5 files changed, 227 insertions(+), 7 deletions(-) create mode 100644 src/assets/css/components/views/detections/detection-filter.scss 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/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 @@