CN-1071: entity explorer在列表页点击后退时,没有返回首页

This commit is contained in:
刘洪洪
2023-06-16 16:33:58 +08:00
parent cfa742a95c
commit f8456e57a3
6 changed files with 340 additions and 185 deletions

View File

@@ -10,6 +10,7 @@
:column-list="columnList"
:operator-list="operatorList"
:connection-list="connectionList"
:default-mode="defaultMode"
:full-text="true"
:class="{'advanced-search--show-list': showList}"
@search="search"
@@ -51,6 +52,9 @@
import AdvancedSearch from '@/components/advancedSearch/Index'
import _ from 'lodash'
import { storageKey } from '@/utils/constants'
import { useRoute } from 'vue-router'
import { ref } from 'vue'
import { columnList } from '@/utils/static-data'
export default {
name: 'CnSearch',
components: {
@@ -64,183 +68,7 @@ export default {
},
data () {
return {
columnList: [
{
name: 'entity_type',
type: 'string',
label: 'Entity type'
},
{
name: 'ip_addr',
type: 'string',
label: 'IP.Address'
},
{
name: 'ip_location_country',
type: 'string',
label: 'IP.Country'
},
{
name: 'ip_location_province',
type: 'string',
label: 'IP.Province'
},
{
name: 'ip_location_city',
type: 'string',
label: 'IP.City'
},
{
name: 'ip_asn',
type: 'string',
label: 'IP.ASN'
},
{
name: 'dns_server_role',
type: 'string',
label: 'IP.DNS server role'
},
{
name: 'dns_server_org',
type: 'string',
label: 'IP.DNS server organization'
},
{
name: 'dns_server_os',
type: 'string',
label: 'IP.Operating system'
},
{
name: 'dns_server_software',
type: 'string',
label: 'IP.DNS server software'
},
{
name: 'domain_name',
type: 'string',
label: 'Domain.Name'
},
{
name: 'domain_category',
type: 'string',
label: 'Domain.Category'
},
{
name: 'domain_category_group',
type: 'string',
label: 'Domain.Category group'
},
{
name: 'domain_reputation_level',
type: 'string',
label: 'Domain.Reputation'
},
{
name: 'domain_whois_email',
type: 'string',
label: 'Domain.Whois email'
},
{
name: 'domain_whois_name_servers',
type: 'string',
label: 'Domain.Whois nameserver'
},
{
name: 'domain_whois_registrar',
type: 'string',
label: 'Domain.Whois registrar'
},
{
name: 'domain_whois_org',
type: 'string',
label: 'Domain.Whois organization'
},
{
name: 'domain_whois_address',
type: 'string',
label: 'Domain.Whois address'
},
{
name: 'domain_whois_city',
type: 'string',
label: 'Domain.Whois city'
},
{
name: 'domain_whois_state',
type: 'string',
label: 'Domain.Whois state'
},
{
name: 'domain_whois_country',
type: 'string',
label: 'Domain.Whois country'
},
{
name: 'domain_icp_owner',
type: 'string',
label: 'Domain.ICP owner'
},
{
name: 'domain_icp_company_name',
type: 'string',
label: 'Domain.ICP company'
},
{
name: 'domain_icp_company_type',
type: 'string',
label: 'Domain.ICP company type'
},
{
name: 'domain_icp_site_license',
type: 'string',
label: 'Domain.ICP site license'
},
{
name: 'domain_icp_site_name',
type: 'string',
label: 'Domain.ICP site'
},
{
name: 'app_name',
type: 'string',
label: 'APP.Name'
},
{
name: 'app_id',
type: 'string',
label: 'APP.ID'
},
{
name: 'app_category',
type: 'string',
label: 'APP.Category'
},
{
name: 'app_subcategory',
type: 'string',
label: 'APP.Subcategory'
},
{
name: 'app_risk',
type: 'string',
label: 'APP.Risk'
},
{
name: 'app_description',
type: 'string',
label: 'APP.Description'
},
{
name: 'app_longname',
type: 'string',
label: 'APP.Long name'
},
{
name: 'app_technology',
type: 'string',
label: 'APP.Technology'
}
],
columnList: columnList,
operatorList: ['=', '!=', /* '>', '<', '>=', '<=', */'IN', 'NOT IN', 'LIKE', 'NOT LIKE'],
connectionList: [
{
@@ -256,6 +84,14 @@ export default {
history: []
}
},
setup () {
// 根据地址栏添加mode即text和tag模式默认text
const { query } = useRoute()
const defaultMode = ref(query.mode || 'text')
return {
defaultMode
}
},
methods: {
search ({ str, q, metaList }) {
if (str) {