fix: 将class移入公共css中,修改编辑器报红线的代码格式
This commit is contained in:
@@ -99,6 +99,25 @@
|
|||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
.detection-event-severity-color-block {
|
||||||
|
width: 5px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 2.5px;
|
||||||
|
margin-left: -16px;
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
.detection-event-severity-block {
|
||||||
|
font-family: NotoSansHans-Medium;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #046EC9;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 2px 10px;
|
||||||
|
background: rgba(56,172,210,0.10);
|
||||||
|
border: 1px solid #ADC7DB;
|
||||||
|
box-shadow: 0 2px 4px 0 rgba(51,51,51,0.02);
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cn-detection__body {
|
.cn-detection__body {
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
<div class="cn-header">
|
<div class="cn-header">
|
||||||
<div class="cn-header__banner">
|
<div class="cn-header__banner">
|
||||||
<div class="banner__left">
|
<div class="banner__left">
|
||||||
<span @click="shrink" class="shrink-button" :class="{'shrink-button--collapse': showMenu}"><i class="cn-icon cn-icon-navigation"></i></span>
|
<span @click="shrink" class="shrink-button" :class="{'shrink-button--collapse': showMenu}"><i
|
||||||
|
class="cn-icon cn-icon-navigation"></i></span>
|
||||||
<img alt="loading..." height="26" :src="logo?logo:require('../../assets/img/logo-header.svg')"/>
|
<img alt="loading..." height="26" :src="logo?logo:require('../../assets/img/logo-header.svg')"/>
|
||||||
</div>
|
</div>
|
||||||
<!--个人操作-->
|
<!--个人操作-->
|
||||||
@@ -12,23 +13,27 @@
|
|||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<div id="header-to-english" :style="language === 'en'?'color:#0091ff':''" @click="changeLocal('en')">English</div>
|
<div id="header-to-english" :style="language === 'en'?'color:#0091ff':''" @click="changeLocal('en')">
|
||||||
|
English
|
||||||
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<div id="header-to-chinese" :style="language === 'cn'?'color:#0091ff':''" @click="changeLocal('cn')">中文</div>
|
<div id="header-to-chinese" :style="language === 'cn'?'color:#0091ff':''" @click="changeLocal('cn')">
|
||||||
|
中文
|
||||||
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
<div class='login-user header-menu--item'>{{username}} <i class="cn-icon cn-icon-arrow-down"></i></div>
|
<div class='login-user header-menu--item'>{{ username }} <i class="cn-icon cn-icon-arrow-down"></i></div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<div id="header-to-changepin" @click="showPinDialog">{{$t('overall.changePassword')}}</div>
|
<div id="header-to-changepin" @click="showPinDialog">{{ $t('overall.changePassword') }}</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<div id="header-to-logout" @click="logout">{{$t('overall.logout')}}</div>
|
<div id="header-to-logout" @click="logout">{{ $t('overall.logout') }}</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
@@ -38,7 +43,8 @@
|
|||||||
<div class="cn-header__nav">
|
<div class="cn-header__nav">
|
||||||
<i class="cn-icon cn-icon-a-NetworkAnalytics"></i>
|
<i class="cn-icon cn-icon-a-NetworkAnalytics"></i>
|
||||||
<el-breadcrumb class="header__left-breadcrumb" :separator="route.indexOf('detection') === -1 ? '>' : ''">
|
<el-breadcrumb class="header__left-breadcrumb" :separator="route.indexOf('detection') === -1 ? '>' : ''">
|
||||||
<el-breadcrumb-item class="header__left-breadcrumb-item" :id="`breadcrumb${item}`" :title="item" v-for="(item,index) in breadcrumb" :key="item">
|
<el-breadcrumb-item class="header__left-breadcrumb-item" :id="`breadcrumb${item}`" :title="item"
|
||||||
|
v-for="(item,index) in breadcrumb" :key="item">
|
||||||
<template v-if="index===3">
|
<template v-if="index===3">
|
||||||
<div class="header__left-breadcrumb-item-select">
|
<div class="header__left-breadcrumb-item-select">
|
||||||
<el-popover placement="bottom-start"
|
<el-popover placement="bottom-start"
|
||||||
@@ -52,16 +58,17 @@
|
|||||||
@hide="hideBreadcrumbPopover()"
|
@hide="hideBreadcrumbPopover()"
|
||||||
trigger="click">
|
trigger="click">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<div class="breadcrumb-button" id="breadcrumbButton" :class="showBackground?'breadcrumb-button__active':''" >
|
<div class="breadcrumb-button" id="breadcrumbButton"
|
||||||
|
:class="showBackground?'breadcrumb-button__active':''">
|
||||||
<span id="breadcrumbValue">
|
<span id="breadcrumbValue">
|
||||||
<template v-if="curTabProp === 'qtype'">
|
<template v-if="curTabProp === 'qtype'">
|
||||||
<span>{{dnsQtypeMapData.get(item) ? dnsQtypeMapData.get(item):item}}</span>
|
<span>{{ dnsQtypeMapData.get(item) ? dnsQtypeMapData.get(item) : item }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="curTabProp === 'rcode'">
|
<template v-else-if="curTabProp === 'rcode'">
|
||||||
<span>{{dnsRcodeMapData.get(item) ? dnsRcodeMapData.get(item):item}}</span>
|
<span>{{ dnsRcodeMapData.get(item) ? dnsRcodeMapData.get(item) : item }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>{{item}}</span>
|
<span>{{ item }}</span>
|
||||||
</template>
|
</template>
|
||||||
</span><i class="cn-icon-xiala cn-icon"></i>
|
</span><i class="cn-icon-xiala cn-icon"></i>
|
||||||
</div>
|
</div>
|
||||||
@@ -74,15 +81,16 @@
|
|||||||
@input="dropDownSearch"></el-input>
|
@input="dropDownSearch"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<ul class="select-dropdown" id="breadcrumbSelectDropdown" @scroll="scrollList()">
|
<ul class="select-dropdown" id="breadcrumbSelectDropdown" @scroll="scrollList()">
|
||||||
<li v-for="item in breadcrumbColumnValueListShow" title='' :key="item" :id="item" class="select-dropdown__item" @click="changeValue(item)" :class="selected?'':''">
|
<li v-for="item in breadcrumbColumnValueListShow" title='' :key="item" :id="item"
|
||||||
|
class="select-dropdown__item" @click="changeValue(item)" :class="selected?'':''">
|
||||||
<template v-if="curTabProp === 'qtype'">
|
<template v-if="curTabProp === 'qtype'">
|
||||||
<span>{{dnsQtypeMapData.get(item) ? dnsQtypeMapData.get(item):item}}</span>
|
<span>{{ dnsQtypeMapData.get(item) ? dnsQtypeMapData.get(item) : item }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="curTabProp === 'rcode'">
|
<template v-else-if="curTabProp === 'rcode'">
|
||||||
<span>{{dnsRcodeMapData.get(item) ? dnsRcodeMapData.get(item):item}}</span>
|
<span>{{ dnsRcodeMapData.get(item) ? dnsRcodeMapData.get(item) : item }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>{{item}}</span>
|
<span>{{ item }}</span>
|
||||||
</template>
|
</template>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -91,38 +99,39 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="index===2">
|
<template v-else-if="index===2">
|
||||||
<span v-if="route===wholeScreenRouterMapping.dns" >{{$t(item)}}</span>
|
<span v-if="route===wholeScreenRouterMapping.dns">{{ $t(item) }}</span>
|
||||||
<span v-else class="route-menu" @click="jump(route,item,'',3)">{{$t(item)}}</span>
|
<span v-else class="route-menu" @click="jump(route,item,'',3)">{{ $t(item) }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="index===1">
|
<template v-else-if="index===1">
|
||||||
<span class="route-menu" @click="jump(route,'','',2)" v-if="route.indexOf('detection') === -1">{{item}}</span>
|
<span class="route-menu" @click="jump(route,'','',2)"
|
||||||
<!-- <div class="header__left-breadcrumb-item-select" v-if="route.indexOf('detection') > -1">-->
|
v-if="route.indexOf('detection') === -1">{{ item }}</span>
|
||||||
<!-- <el-popover placement="bottom-start"-->
|
<!-- <div class="header__left-breadcrumb-item-select" v-if="route.indexOf('detection') > -1">-->
|
||||||
<!-- v-if="route.indexOf('detection') > -1"-->
|
<!-- <el-popover placement="bottom-start"-->
|
||||||
<!-- ref="breadcrumbPopover"-->
|
<!-- v-if="route.indexOf('detection') > -1"-->
|
||||||
<!-- :show-arrow="false"-->
|
<!-- ref="breadcrumbPopover"-->
|
||||||
<!-- :append-to-body="false"-->
|
<!-- :show-arrow="false"-->
|
||||||
<!-- :hide-after="0"-->
|
<!-- :append-to-body="false"-->
|
||||||
<!-- :show-after="0"-->
|
<!-- :hide-after="0"-->
|
||||||
<!-- popper-class="breadcrumb__popper"-->
|
<!-- :show-after="0"-->
|
||||||
<!-- trigger="click">-->
|
<!-- popper-class="breadcrumb__popper"-->
|
||||||
<!-- <template #reference>-->
|
<!-- trigger="click">-->
|
||||||
<!-- <div class="breadcrumb-button" id="breadcrumbButton2" :class="showBackground?'breadcrumb-button__active':''" v-if="route.indexOf('detection') > -1">-->
|
<!-- <template #reference>-->
|
||||||
<!-- <span id="breadcrumbValue2"> {{item}}</span><i class="cn-icon-xiala cn-icon"></i>-->
|
<!-- <div class="breadcrumb-button" id="breadcrumbButton2" :class="showBackground?'breadcrumb-button__active':''" v-if="route.indexOf('detection') > -1">-->
|
||||||
<!-- </div>-->
|
<!-- <span id="breadcrumbValue2"> {{item}}</span><i class="cn-icon-xiala cn-icon"></i>-->
|
||||||
<!-- </template>-->
|
<!-- </div>-->
|
||||||
<!-- <el-row type="flex" justify="center" style="width: fit-content;flex-direction: column;">-->
|
<!-- </template>-->
|
||||||
<!-- <ul class="select-dropdown" id="breadcrumbSelectDropdown2">-->
|
<!-- <el-row type="flex" justify="center" style="width: fit-content;flex-direction: column;">-->
|
||||||
<!-- <li v-for="item in detectionMenuList" title='' :key="item.name" :id="item.name" class="select-dropdown__item" @click="jump(item.path,'','',2)">-->
|
<!-- <ul class="select-dropdown" id="breadcrumbSelectDropdown2">-->
|
||||||
<!-- <span>{{$t(item.i18n)}}</span>-->
|
<!-- <li v-for="item in detectionMenuList" title='' :key="item.name" :id="item.name" class="select-dropdown__item" @click="jump(item.path,'','',2)">-->
|
||||||
<!-- </li>-->
|
<!-- <span>{{$t(item.i18n)}}</span>-->
|
||||||
<!-- </ul>-->
|
<!-- </li>-->
|
||||||
<!-- </el-row>-->
|
<!-- </ul>-->
|
||||||
<!-- </el-popover>-->
|
<!-- </el-row>-->
|
||||||
<!-- </div>-->
|
<!-- </el-popover>-->
|
||||||
|
<!-- </div>-->
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>{{item}}</span>
|
<span>{{ item }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-breadcrumb-item>
|
</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
@@ -140,22 +149,26 @@
|
|||||||
<div class="cn-menu__left">
|
<div class="cn-menu__left">
|
||||||
<div class="left-menu" v-for="menu in otherMenu" :key="menu.id" @click="jump(menu.route,'','',0)">
|
<div class="left-menu" v-for="menu in otherMenu" :key="menu.id" @click="jump(menu.route,'','',0)">
|
||||||
<i :class="menu.icon"></i>
|
<i :class="menu.icon"></i>
|
||||||
<span>{{$t(menu.i18n || menu.name)}}</span>
|
<span>{{ $t(menu.i18n || menu.name) }}</span>
|
||||||
<i class="cn-icon cn-icon-right"></i>
|
<i class="cn-icon cn-icon-right"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cn-menu__middle">
|
<div class="cn-menu__middle">
|
||||||
<div class="middle-menus middle-menus--network-analytics">
|
<div class="middle-menus middle-menus--network-analytics">
|
||||||
<div class="middle-menus__header">{{$t('overall.networkAnalytics')}}</div>
|
<div class="middle-menus__header">{{ $t('overall.networkAnalytics') }}</div>
|
||||||
<div class="middle-menus__body">
|
<div class="middle-menus__body">
|
||||||
<div style="width: 260px;">
|
<div style="width: 260px;">
|
||||||
<template v-for="(menu, index) in networkAnalyticsMenu.children" :key="index">
|
<template v-for="(menu, index) in networkAnalyticsMenu.children" :key="index">
|
||||||
<div class="middle-menu" v-if="index < 5" @click="jump(menu.route,'','',2)">{{$t(menu.i18n || menu.name)}}</div>
|
<div class="middle-menu" v-if="index < 5" @click="jump(menu.route,'','',2)">
|
||||||
|
{{ $t(menu.i18n || menu.name) }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<template v-for="(menu, index) in networkAnalyticsMenu.children" :key="index">
|
<template v-for="(menu, index) in networkAnalyticsMenu.children" :key="index">
|
||||||
<div class="middle-menu" v-if="index >= 5 && index < 10" @click="jump(menu.route,'','',2)">{{$t(menu.i18n || menu.name)}}</div>
|
<div class="middle-menu" v-if="index >= 5 && index < 10" @click="jump(menu.route,'','',2)">
|
||||||
|
{{ $t(menu.i18n || menu.name) }}
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -188,8 +201,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click="showChangePin = false">{{$t('overall.cancel')}}</el-button>
|
<el-button @click="showChangePin = false">{{ $t('overall.cancel') }}</el-button>
|
||||||
<el-button type="primary" @click="submit">{{$t('overall.update')}}</el-button>
|
<el-button type="primary" @click="submit">{{ $t('overall.update') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -197,14 +210,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { useRoute } from 'vue-router'
|
|
||||||
import { get, put } from '@/utils/http'
|
import { get, put } from '@/utils/http'
|
||||||
import {
|
import {
|
||||||
curTabState,
|
curTabState,
|
||||||
dbDrilldownTableConfig,
|
|
||||||
entityType,
|
entityType,
|
||||||
networkOverviewSearchUrl,
|
|
||||||
networkOverviewTabList,
|
|
||||||
networkTable,
|
networkTable,
|
||||||
operationType,
|
operationType,
|
||||||
storageKey,
|
storageKey,
|
||||||
@@ -213,9 +222,16 @@ import {
|
|||||||
} from '@/utils/constants'
|
} from '@/utils/constants'
|
||||||
import { api } from '@/utils/api'
|
import { api } from '@/utils/api'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { combineTabList, getDefaultCurTab, getTabList, overwriteUrl, urlParamsHandler, combinDrilldownTableWithUserConfig,getDnsMapData } from '@/utils/tools'
|
import {
|
||||||
|
combineTabList,
|
||||||
|
getDefaultCurTab,
|
||||||
|
getTabList,
|
||||||
|
overwriteUrl,
|
||||||
|
urlParamsHandler,
|
||||||
|
combinDrilldownTableWithUserConfig,
|
||||||
|
getDnsMapData
|
||||||
|
} from '@/utils/tools'
|
||||||
import { getNowTime, getSecond } from '@/utils/date-util'
|
import { getNowTime, getSecond } from '@/utils/date-util'
|
||||||
import { db } from '@/indexedDB'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Header',
|
name: 'Header',
|
||||||
@@ -238,17 +254,32 @@ export default {
|
|||||||
newPwd2: ''
|
newPwd2: ''
|
||||||
},
|
},
|
||||||
changePassFormRules: {
|
changePassFormRules: {
|
||||||
oldPwd: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
oldPwd: [{
|
||||||
newPwd: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
required: true,
|
||||||
newPwd2: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }, { validator: passwordComparison, trigger: 'blur' }]
|
message: this.$t('validate.required'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}],
|
||||||
|
newPwd: [{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('validate.required'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}],
|
||||||
|
newPwd2: [{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('validate.required'),
|
||||||
|
trigger: 'blur'
|
||||||
|
}, {
|
||||||
|
validator: passwordComparison,
|
||||||
|
trigger: 'blur'
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
showMenu: false,
|
showMenu: false,
|
||||||
dropDownValue: '',
|
dropDownValue: '',
|
||||||
breadcrumbColumnValueListShow: [],
|
breadcrumbColumnValueListShow: [],
|
||||||
curTabProp:'',
|
curTabProp: '',
|
||||||
dnsRcodeMapData:[],
|
dnsRcodeMapData: [],
|
||||||
dnsQtypeMapData:[],
|
dnsQtypeMapData: [],
|
||||||
isDnsMapType:false,
|
isDnsMapType: false,
|
||||||
valueMeta: [],
|
valueMeta: [],
|
||||||
showBackground: false,
|
showBackground: false,
|
||||||
selected: false,
|
selected: false,
|
||||||
@@ -297,10 +328,21 @@ export default {
|
|||||||
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
||||||
this.$store.getters.menuList.forEach(menu => {
|
this.$store.getters.menuList.forEach(menu => {
|
||||||
if (this.$_.isEmpty(menu.children) && menu.route) {
|
if (this.$_.isEmpty(menu.children) && menu.route) {
|
||||||
breadcrumbMap.push({ name: this.$t(menu.i18n), path: menu.route, columnName: menu.columnName, columnValue: menu.columnValue })
|
breadcrumbMap.push({
|
||||||
|
name: this.$t(menu.i18n),
|
||||||
|
path: menu.route,
|
||||||
|
columnName: menu.columnName,
|
||||||
|
columnValue: menu.columnValue
|
||||||
|
})
|
||||||
} else if (!this.$_.isEmpty(menu.children)) {
|
} else if (!this.$_.isEmpty(menu.children)) {
|
||||||
menu.children.forEach(child => {
|
menu.children.forEach(child => {
|
||||||
breadcrumbMap.push({ name: child.i18n ? this.$t(child.i18n) : child.name, parentName: menu.i18n ? this.$t(menu.i18n) : menu.name, path: child.route, columnName: child.columnName, columnValue: child.columnValue })
|
breadcrumbMap.push({
|
||||||
|
name: child.i18n ? this.$t(child.i18n) : child.name,
|
||||||
|
parentName: menu.i18n ? this.$t(menu.i18n) : menu.name,
|
||||||
|
path: child.route,
|
||||||
|
columnName: child.columnName,
|
||||||
|
columnValue: child.columnValue
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -345,8 +387,15 @@ export default {
|
|||||||
},
|
},
|
||||||
setup () {
|
setup () {
|
||||||
const dateRangeValue = 60
|
const dateRangeValue = 60
|
||||||
const { startTime, endTime } = getNowTime(dateRangeValue)
|
const {
|
||||||
const chartTimeFilter = ref({ startTime, endTime, dateRangeValue })
|
startTime,
|
||||||
|
endTime
|
||||||
|
} = getNowTime(dateRangeValue)
|
||||||
|
const chartTimeFilter = ref({
|
||||||
|
startTime,
|
||||||
|
endTime,
|
||||||
|
dateRangeValue
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
chartTimeFilter,
|
chartTimeFilter,
|
||||||
entityType // 所有entity类型,用于header下拉框选择
|
entityType // 所有entity类型,用于header下拉框选择
|
||||||
@@ -377,25 +426,25 @@ export default {
|
|||||||
window.location.reload()
|
window.location.reload()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCurTabByLabel(label){
|
getCurTabByLabel (label) {
|
||||||
let curTab = null
|
let curTab = null
|
||||||
let tableType = this.$route.params ? this.$route.params.typeName : 'networkOverview'
|
const tableType = this.$route.params ? this.$route.params.typeName : 'networkOverview'
|
||||||
let curTableInCode = networkTable[tableType] ? networkTable[tableType] : networkTable.networkOverview
|
const curTableInCode = networkTable[tableType] ? networkTable[tableType] : networkTable.networkOverview
|
||||||
if (curTableInCode && curTableInCode.tabList) {
|
if (curTableInCode && curTableInCode.tabList) {
|
||||||
curTab = curTableInCode.tabList.find(item => item.label == label)
|
curTab = curTableInCode.tabList.find(item => item.label == label)
|
||||||
}
|
}
|
||||||
return curTab
|
return curTab
|
||||||
},
|
},
|
||||||
async initDropdownList () {
|
async initDropdownList () {
|
||||||
//是否需要dns的qtype和rcode的数据字典
|
// 是否需要dns的qtype和rcode的数据字典
|
||||||
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
||||||
let currentValue = document.getElementById('breadcrumbValue') ? document.getElementById('breadcrumbValue').innerText : ''
|
const currentValue = document.getElementById('breadcrumbValue') ? document.getElementById('breadcrumbValue').innerText : ''
|
||||||
let columnName = this.getUrlParam(this.curTabState.thirdMenu, '')
|
const columnName = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||||
let type = 'ip'
|
let type = 'ip'
|
||||||
let tableType = this.$route.params ? this.$route.params.typeName : 'networkOverview'
|
const tableType = this.$route.params ? this.$route.params.typeName : 'networkOverview'
|
||||||
let curTableInCode = networkTable[tableType] ? networkTable[tableType] : networkTable.networkOverview
|
const curTableInCode = networkTable[tableType] ? networkTable[tableType] : networkTable.networkOverview
|
||||||
if (curTableInCode && curTableInCode.tabList) {
|
if (curTableInCode && curTableInCode.tabList) {
|
||||||
let curTab = curTableInCode.tabList.find(item => item.label == columnName)
|
const curTab = curTableInCode.tabList.find(item => item.label == columnName)
|
||||||
if (curTab) {
|
if (curTab) {
|
||||||
type = curTab.prop
|
type = curTab.prop
|
||||||
}
|
}
|
||||||
@@ -417,9 +466,9 @@ export default {
|
|||||||
const selectedDom = document.getElementById(item)
|
const selectedDom = document.getElementById(item)
|
||||||
if (selectedDom) {
|
if (selectedDom) {
|
||||||
let itemName = item
|
let itemName = item
|
||||||
if(this.curTabProp === 'qtype'){
|
if (this.curTabProp === 'qtype') {
|
||||||
itemName = this.dnsQtypeMapData.get(item)
|
itemName = this.dnsQtypeMapData.get(item)
|
||||||
}else if(this.curTabProp === 'rcode'){
|
} else if (this.curTabProp === 'rcode') {
|
||||||
itemName = this.dnsRcodeMapData.get(item)
|
itemName = this.dnsRcodeMapData.get(item)
|
||||||
}
|
}
|
||||||
if (itemName === currentValue) {
|
if (itemName === currentValue) {
|
||||||
@@ -454,34 +503,34 @@ export default {
|
|||||||
changeValue (value) {
|
changeValue (value) {
|
||||||
// 设置面包屑显示的内容及hover时的title
|
// 设置面包屑显示的内容及hover时的title
|
||||||
let valName = value
|
let valName = value
|
||||||
if(this.tab === 'qtype'){
|
if (this.tab === 'qtype') {
|
||||||
valName =this.dnsQtypeMapData.get(value)
|
valName = this.dnsQtypeMapData.get(value)
|
||||||
}else if(this.tab === 'rcode'){
|
} else if (this.tab === 'rcode') {
|
||||||
valName =this.dnsRcodeMapData.get(value)
|
valName = this.dnsRcodeMapData.get(value)
|
||||||
}
|
}
|
||||||
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
||||||
document.getElementById('breadcrumbValue').innerText = value
|
document.getElementById('breadcrumbValue').innerText = value
|
||||||
//document.getElementById('breadcrumbButton').setAttribute('title', valName)
|
// document.getElementById('breadcrumbButton').setAttribute('title', valName)
|
||||||
document.getElementById(this.valueMenuId).setAttribute('title', valName)
|
document.getElementById(this.valueMenuId).setAttribute('title', valName)
|
||||||
document.getElementById('breadcrumbButton').click()
|
document.getElementById('breadcrumbButton').click()
|
||||||
// const columnName = this.$store.getters.getBreadcrumbColumnName
|
// const columnName = this.$store.getters.getBreadcrumbColumnName
|
||||||
const columnName = this.getUrlParam(this.curTabState.thirdMenu, '')
|
const columnName = this.getUrlParam(this.curTabState.thirdMenu, '')
|
||||||
//const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
|
// const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
|
||||||
let curTab = this.getCurTabByLabel()
|
const curTab = this.getCurTabByLabel()
|
||||||
if (curTab) {
|
if (curTab) {
|
||||||
const queryCondition = []
|
const queryCondition = []
|
||||||
const searchProps = curTab.dillDownProp
|
const searchProps = curTab.dillDownProp
|
||||||
if (curTab.prop === 'protocolPort') {
|
if (curTab.prop === 'protocolPort') {
|
||||||
const valueGroup = value.split(':')
|
const valueGroup = value.split(':')
|
||||||
if (valueGroup) {
|
if (valueGroup) {
|
||||||
queryCondition.push("common_l7_protocol='" + valueGroup[0] + "'")
|
queryCondition.push('common_l7_protocol=\'' + valueGroup[0] + '\'')
|
||||||
queryCondition.push('common_server_port=' + valueGroup[1])
|
queryCondition.push('common_server_port=' + valueGroup[1])
|
||||||
}
|
}
|
||||||
console.log(queryCondition.join(' AND '))
|
console.log(queryCondition.join(' AND '))
|
||||||
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' AND ')
|
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' AND ')
|
||||||
} else {
|
} else {
|
||||||
searchProps.forEach(item => {
|
searchProps.forEach(item => {
|
||||||
queryCondition.push(item + "='" + value.replaceAll("'", "\\\\'") + "'")
|
queryCondition.push(item + '=\'' + value.replaceAll('\'', '\\\\\'') + '\'')
|
||||||
})
|
})
|
||||||
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' OR ')
|
this.urlChangeParams[this.curTabState.queryCondition] = queryCondition.join(' OR ')
|
||||||
}
|
}
|
||||||
@@ -495,7 +544,10 @@ export default {
|
|||||||
submit () {
|
submit () {
|
||||||
this.$refs.changePassForm.validate((valid) => {
|
this.$refs.changePassForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
put(api.pin, { oldPin: this.changePassForm.oldPwd, newPin: this.changePassForm.newPwd }).then(res => {
|
put(api.pin, {
|
||||||
|
oldPin: this.changePassForm.oldPwd,
|
||||||
|
newPin: this.changePassForm.newPwd
|
||||||
|
}).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$message.success('Success')
|
this.$message.success('Success')
|
||||||
this.showChangePin = false
|
this.showChangePin = false
|
||||||
@@ -517,7 +569,7 @@ export default {
|
|||||||
this.urlChangeParams = {}
|
this.urlChangeParams = {}
|
||||||
},
|
},
|
||||||
async handleCurDrilldownTableConfig (thirdMenu, fourthMenu) {
|
async handleCurDrilldownTableConfig (thirdMenu, fourthMenu) {
|
||||||
const userId = localStorage.getItem(storageKey.userId)
|
// const userId = localStorage.getItem(storageKey.userId)
|
||||||
const tableType = this.$route.params ? this.$route.params.typeName : 'networkOverview'
|
const tableType = this.$route.params ? this.$route.params.typeName : 'networkOverview'
|
||||||
const drillDownTableConfigs = await combinDrilldownTableWithUserConfig()
|
const drillDownTableConfigs = await combinDrilldownTableWithUserConfig()
|
||||||
const currentTableConfig = drillDownTableConfigs.find(config => config.route === tableType)
|
const currentTableConfig = drillDownTableConfigs.find(config => config.route === tableType)
|
||||||
@@ -564,11 +616,11 @@ export default {
|
|||||||
child.columnName = columnName
|
child.columnName = columnName
|
||||||
this.urlChangeParams[this.curTabState.thirdMenu] = columnName
|
this.urlChangeParams[this.curTabState.thirdMenu] = columnName
|
||||||
this.urlChangeParams[this.curTabState.fourthMenu] = columnValue
|
this.urlChangeParams[this.curTabState.fourthMenu] = columnValue
|
||||||
//const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
|
// const tabObjGroup = networkOverviewTabList.filter(item => item.label == columnName)
|
||||||
//let curTab = this.getCurTabByLabel()
|
// let curTab = this.getCurTabByLabel()
|
||||||
//const type = curTab ? curTab.prop : ''
|
// const type = curTab ? curTab.prop : ''
|
||||||
//this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
// this.curTabProp = this.$route.query.dimensionType ? this.$route.query.dimensionType : null
|
||||||
//this.urlChangeParams[this.curTabState.dimensionType] = type
|
// this.urlChangeParams[this.curTabState.dimensionType] = type
|
||||||
this.urlChangeParams[this.curTabState.panelName] = columnValue
|
this.urlChangeParams[this.curTabState.panelName] = columnValue
|
||||||
} else if (columnName) { // 点击的为列名
|
} else if (columnName) { // 点击的为列名
|
||||||
child.columnValue = ''
|
child.columnValue = ''
|
||||||
@@ -605,11 +657,20 @@ export default {
|
|||||||
})
|
})
|
||||||
} else if (opeType === 3) {
|
} else if (opeType === 3) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
query: { ...this.$route.query, fourthPanel: '', t: +new Date() }
|
query: {
|
||||||
|
...this.$route.query,
|
||||||
|
fourthPanel: '',
|
||||||
|
t: +new Date()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
} else if (opeType != 4) {
|
} else if (opeType != 4) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
query: { ...this.$route.query, fourthPanel: '', thirdPanel: '', t: +new Date() }
|
query: {
|
||||||
|
...this.$route.query,
|
||||||
|
fourthPanel: '',
|
||||||
|
thirdPanel: '',
|
||||||
|
t: +new Date()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if (route === this.route) {
|
if (route === this.route) {
|
||||||
|
|||||||
@@ -178,25 +178,3 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
.detection-event-severity-color-block {
|
|
||||||
width: 5px;
|
|
||||||
height: 20px;
|
|
||||||
border-radius: 2.5px;
|
|
||||||
margin-left: -16px;
|
|
||||||
margin-right: 12px;
|
|
||||||
}
|
|
||||||
.detection-event-severity-block {
|
|
||||||
font-family: NotoSansHans-Medium;
|
|
||||||
font-size: 12px;
|
|
||||||
color: #046EC9;
|
|
||||||
font-weight: 500;
|
|
||||||
padding: 2px 10px;
|
|
||||||
background: rgba(56,172,210,0.10);
|
|
||||||
border: 1px solid #ADC7DB;
|
|
||||||
box-shadow: 0 2px 0.28571rem 0 rgb(51 51 51 / 2%);
|
|
||||||
border-radius: 3px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user