From 45ad8d15b548bf9c71137effe120354ad5dec8c9 Mon Sep 17 00:00:00 2001 From: hanyuxia Date: Mon, 1 Apr 2024 15:00:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20CN-1592=20=20UI=20=E6=96=B0=E5=A2=9ETag?= =?UTF-8?q?=E6=A3=80=E7=B4=A2=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/css/components/index.scss | 1 + src/assets/css/components/views/tag/tag.scss | 261 ++++++ src/components/table/tag/TagTable.vue | 771 ++++++++++++++++++ src/permission.js | 2 + src/utils/constants.js | 30 + .../NetworkOverviewPerformanceEvent.vue | 8 +- src/views/tag/Tag.vue | 394 +++++++++ 7 files changed, 1465 insertions(+), 2 deletions(-) create mode 100644 src/assets/css/components/views/tag/tag.scss create mode 100644 src/components/table/tag/TagTable.vue create mode 100644 src/views/tag/Tag.vue diff --git a/src/assets/css/components/index.scss b/src/assets/css/components/index.scss index 3879a517..7761e294 100644 --- a/src/assets/css/components/index.scss +++ b/src/assets/css/components/index.scss @@ -44,6 +44,7 @@ @import './views/charts/chartMap'; @import 'views/charts/chartRelationShipList'; @import 'views/report/report'; +@import 'views/tag/tag'; @import 'components/rightBox/report/reportBox'; @import './views/charts2/panel'; diff --git a/src/assets/css/components/views/tag/tag.scss b/src/assets/css/components/views/tag/tag.scss new file mode 100644 index 00000000..abb2c6eb --- /dev/null +++ b/src/assets/css/components/views/tag/tag.scss @@ -0,0 +1,261 @@ +.cn-tag { + background: #fff; + margin: 10px; + height: calc(100% - 20px) !important; + display: flex; + flex-direction: row; + .cn-tag-right { + flex: 1; + .list-page .main-container { + padding: 0; + + .cn-table { + height: calc(100% - 62px) !important; + + .el-table--fit.el-table--border { + height: calc(100% - 55px) !important; + } + .el-table__header th:first-of-type { + border-right: none; + } + .has-gutter .el-table-column--selection .el-checkbox { + border-left: none; + display: none; + } + .el-scrollbar__bar.is-vertical { + z-index: 1000; + } + .el-table__row .el-table-column--selection .cell { + padding: 0; + } + .el-table__row.expanded { + td { + border-bottom: none; + } + } + .el-table__body-wrapper { + .el-table__expanded-cell { + z-index: 100; + } + } + .el-table__fixed, + .el-table__fixed-right { + .el-table__expanded-cell { + visibility: hidden; + } + } + .el-table__expanded-cell { + .down { + margin-left: 32px; + height: 100%; + width: calc(100% - 32px); + background: #fff; //盖住fixed产生的阴影 + :deep .is-leaf { + color: #1b2e3b; + background: #ebeef5; + } + .el-range-editor--small.el-input__wrapper { + height: 32px; + line-height: 32px; + } + .cn-detection__footer { + text-align: center; + display: flex; + justify-content: center; + .el-pagination__jump { + margin-left: 3px; + } + .el-pagination__goto { + display: none; + } + .el-input--small { + width: 46px !important; + .el-input__wrapper { + height: 22px; + } + } + .el-pagination--small { + .btn-prev { + margin-right: 10px; + } + .btn-next { + margin-left: 10px; + } + &span { + color: $--color-text-primary; + } + } + } + } + .block.drop-down-time { + margin: 15px 0 14px 0; + .el-date-editor { + justify-content: center; + .el-range-separator { + width: 24px; + } + .el-input__icon.el-range__close-icon { + display: none; + } + } + } + .expand { + min-height: 95px; + display: flex; + flex-wrap: wrap; + position: relative; + .panel-chart__no-data { + line-height: 95px; + } + .expand-cell { + display: flex; + background: #FFFFFF; + border: 1px solid #E7EAED; + border-radius: 2px; + margin: 0 12px 16px 0; + width: 300px; + height: 97px; + .expand-right { + background: #F9F9F9; + border-radius: 2px; + width: 97px; + height: 94px; + position: relative; + .demo-progress { + position: absolute; + top: 21px; + left: 18.5px; + } + .demo-progress,.demo-progress .el-progress-circle { + width: 57px !important; + height: 57px !important; + } + } + .expand-left { + text-align: center; + width: calc(100% - 97px); + display: flex; + flex-direction: column; + justify-content: center; + .expand-name { + font-size: 12px; + color: #666666; + font-weight: 400; + margin-bottom: 4px; + display: flex; + align-items: center; + justify-content: center; + i { + padding: 2px 3px 0 0; + } + } + .expand-time { + font-size: 12px; + color: #666666; + margin-bottom: 4px; + div:nth-of-type(1) { + font-size: 12px; + color: #999999; + } + } + .expand-icon { + display: flex; + justify-content: space-evenly; + margin: 0 8px; + font-size: 14px; + .table-operation-item--no-border { + cursor: pointer; + position: relative; + font-size: 16px; + } + .table-operation-item--disabled { + cursor: not-allowed; + filter: grayscale(1); + opacity: .6; + } + } + } + } + } + } + } + } + .table-operation-all { + width: 300px; + position: absolute; + bottom: 17px; + z-index: 2; + left: 20px; + line-height: 24px; + height: 24px; + display: flex; + .el-checkbox { + width: 14px; + height: 14px; + padding: 0; + .el-checkbox__input,.el-checkbox__inner { + width: 100%; + height: 100%; + min-width: unset; + } + } + .table-operation-all-span { + height: 24px; + display: flex; + span { + margin: 0 10px; + font-size: 14px; + color: #666666; + letter-spacing: 0; + font-weight: 400; + } + .table-operation-back-down { + font-weight: 500; + height: 24px; + background: #D7D7D7; + border-radius: 2px; + cursor: not-allowed; + span { + margin: 3px 8px; + font-size: 12px; + color: #FFFFFF; + } + } + .table-operation-back-down div { + color: #FFFFFF; + height: 24px; + background: #D7D7D7; + border-radius: 2px; + i { + font-size: 25px; + top: calc(50% - 12px); + } + } + .table-operation-back-down.table-operation-all-checkbox { + background: #0091ff; + cursor: pointer; + } + .table-operation-back-down.table-operation-all-loading { + background: #D7D7D7; + } + } + } + .table-operation-items { + .table-operation-item--no-border { + margin-right: 16px; + cursor: pointer; + position: relative; + font-size: 16px; + } + .table-operation-item--no-border:last-of-type { + margin-right: 0; + } + .table-operation-item--no-border { + display: flex; + justify-content: center; + flex-direction: column; + position: relative; + } + } + } +} diff --git a/src/components/table/tag/TagTable.vue b/src/components/table/tag/TagTable.vue new file mode 100644 index 00000000..15c9d83b --- /dev/null +++ b/src/components/table/tag/TagTable.vue @@ -0,0 +1,771 @@ + + + diff --git a/src/permission.js b/src/permission.js index d18e9e32..d3ce16f5 100644 --- a/src/permission.js +++ b/src/permission.js @@ -162,6 +162,8 @@ export function handleComponent (code) { return () => import('@/views/detections/detectionPolicies/PolicyForm') case 'report': return () => import('@/views/report/Report') + //case 'tag': + //return () => import('@/views/tag/Tag') case 'knowledgeBase': return () => import('@/views/setting/KnowledgeBase') case 'userDefinedLibrary': diff --git a/src/utils/constants.js b/src/utils/constants.js index 547be9ad..fe474acd 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -311,6 +311,36 @@ export const metricOptions = [ } ] +export const tagIntentOptions = [ + { + value: 'Malicious', + label: 'tag.intent.malicious' + }, + { + value: 'Benign', + label: 'tag.intent.benign' + }, + { + value: 'Unknown', + label: 'tag.intent.unknown' + } +] + +export const tagCategoryOptions = [ + { + value: 'Malicious', + label: 'tag.intent.malicious' + }, + { + value: 'Benign', + label: 'tag.intent.benign' + }, + { + value: 'Unknown', + label: 'tag.intent.unknown' + } +] + export const metricType = { Bits: 'Bits/s', Packets: 'Packets/s', diff --git a/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue b/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue index b2f1d14a..e7987048 100644 --- a/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue +++ b/src/views/charts2/charts/networkOverview/NetworkOverviewPerformanceEvent.vue @@ -167,8 +167,12 @@ export default { }) }, resize () { - this.myChart.resize() - this.myChart2.resize() + if(this.myChart) { + this.myChart.resize() + } + if(this.myChart2) { + this.myChart2.resize() + } } }, computed: { diff --git a/src/views/tag/Tag.vue b/src/views/tag/Tag.vue new file mode 100644 index 00000000..9b79898a --- /dev/null +++ b/src/views/tag/Tag.vue @@ -0,0 +1,394 @@ + + +