mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-26 15:07:04 +00:00
perf: update route
This commit is contained in:
@@ -157,19 +157,19 @@ export default {
|
|||||||
label: '过滤',
|
label: '过滤',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '全部账号',
|
label: '最近发现',
|
||||||
value: ''
|
value: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '拥有的',
|
label: '最近被登录',
|
||||||
value: 'windows'
|
value: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '收藏夹',
|
label: '最近修改',
|
||||||
value: 'linux'
|
value: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '最近访问',
|
label: '最近改密',
|
||||||
value: ''
|
value: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -178,23 +178,23 @@ export default {
|
|||||||
label: '风险账号',
|
label: '风险账号',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
label: '过期的密码',
|
label: '僵尸账号',
|
||||||
value: 'true'
|
value: 'true'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '冲突的密码',
|
label: '幽灵账号',
|
||||||
value: 'true'
|
value: 'true'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '违法策略',
|
label: '弱密码',
|
||||||
value: 'true'
|
value: 'true'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '禁用的资源',
|
label: '长时间未改密',
|
||||||
value: 'true'
|
value: 'true'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '回收站',
|
label: '长时间未验证',
|
||||||
value: 'true'
|
value: 'true'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="summary-zone">
|
<div v-show="summary" class="summary-zone">
|
||||||
<span v-for="item of summary" :key="item.title">
|
<span v-for="item of summary" :key="item.title">
|
||||||
<SummaryCard :body="item.body" :title="item.title" />
|
<SummaryCard :body="item.body" :title="item.title" />
|
||||||
</span>
|
</span>
|
||||||
@@ -35,37 +35,11 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
filters: {
|
filters: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: null
|
||||||
},
|
},
|
||||||
summary: {
|
summary: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: null
|
||||||
return [
|
|
||||||
{
|
|
||||||
title: '最近一周发现',
|
|
||||||
body: {
|
|
||||||
route: { name: `SessionList`, params: { activeMenu: 'OnlineList' }},
|
|
||||||
count: 10,
|
|
||||||
disabled: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '最近一月发现',
|
|
||||||
body: {
|
|
||||||
route: { name: `SessionList`, params: { activeMenu: 'OnlineList' }},
|
|
||||||
count: 321,
|
|
||||||
disabled: 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '待确认',
|
|
||||||
body: {
|
|
||||||
count: 544,
|
|
||||||
disabled: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
expand: {
|
expand: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -114,6 +88,7 @@ export default {
|
|||||||
width: calc(100% - 70px);
|
width: calc(100% - 70px);
|
||||||
|
|
||||||
.summary-zone {
|
.summary-zone {
|
||||||
|
padding-top: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
@@ -121,7 +96,6 @@ export default {
|
|||||||
.quick-filter-zone {
|
.quick-filter-zone {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
padding-bottom: 10px;
|
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -169,7 +143,7 @@ export default {
|
|||||||
|
|
||||||
.expand-bar {
|
.expand-bar {
|
||||||
float: right;
|
float: right;
|
||||||
display: inline-block;
|
display: block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
i {
|
i {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QuickFilter :filters="quickFilters" />
|
<QuickFilter :filters="quickFilters" :summary="quickSummary" @filter="handleQuickFilter" />
|
||||||
<TableAction
|
<TableAction
|
||||||
v-if="hasActions"
|
v-if="hasActions"
|
||||||
:date-pick="handleDateChange"
|
:date-pick="handleDateChange"
|
||||||
@@ -58,6 +58,10 @@ export default {
|
|||||||
quickFilters: {
|
quickFilters: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => null
|
default: () => null
|
||||||
|
},
|
||||||
|
quickSummary: {
|
||||||
|
type: Array,
|
||||||
|
default: () => null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -215,6 +219,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleQuickFilter() {
|
||||||
|
|
||||||
|
},
|
||||||
handleActionInitialDone() {
|
handleActionInitialDone() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.actionInit = true
|
this.actionInit = true
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
ref="ListTable"
|
ref="ListTable"
|
||||||
:header-actions="headerActions"
|
:header-actions="headerActions"
|
||||||
:quick-filters="quickFilters"
|
:quick-filters="quickFilters"
|
||||||
|
:quick-summary="quickSummary"
|
||||||
:table-config="iTableConfig"
|
:table-config="iTableConfig"
|
||||||
v-on="$listeners"
|
v-on="$listeners"
|
||||||
/>
|
/>
|
||||||
|
@@ -3,8 +3,8 @@ import i18n from '@/i18n/i18n'
|
|||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: 'scan',
|
path: 'check',
|
||||||
name: 'AccountScan',
|
name: 'AccountCheck',
|
||||||
component: empty,
|
component: empty,
|
||||||
redirect: {
|
redirect: {
|
||||||
name: 'AccountPushList'
|
name: 'AccountPushList'
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
ref="AssetTreeTable"
|
ref="AssetTreeTable"
|
||||||
:header-actions="headerActions"
|
:header-actions="headerActions"
|
||||||
:quick-filters="quickFilters"
|
:quick-filters="quickFilters"
|
||||||
|
:quick-summary="quickSummary"
|
||||||
:table-config="tableConfig"
|
:table-config="tableConfig"
|
||||||
:tree-setting="treeSetting"
|
:tree-setting="treeSetting"
|
||||||
/>
|
/>
|
||||||
@@ -51,6 +52,31 @@ export default {
|
|||||||
// ?assets=0不显示资产. =1显示资产
|
// ?assets=0不显示资产. =1显示资产
|
||||||
treeUrl: '/api/v1/assets/nodes/children/tree/?assets=1'
|
treeUrl: '/api/v1/assets/nodes/children/tree/?assets=1'
|
||||||
},
|
},
|
||||||
|
quickSummary: [
|
||||||
|
{
|
||||||
|
title: '最近一周发现',
|
||||||
|
body: {
|
||||||
|
route: { name: `SessionList`, params: { activeMenu: 'OnlineList' }},
|
||||||
|
count: 10,
|
||||||
|
disabled: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '最近一月发现',
|
||||||
|
body: {
|
||||||
|
route: { name: `SessionList`, params: { activeMenu: 'OnlineList' }},
|
||||||
|
count: 321,
|
||||||
|
disabled: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '待确认',
|
||||||
|
body: {
|
||||||
|
count: 544,
|
||||||
|
disabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
quickFilters: [
|
quickFilters: [
|
||||||
{
|
{
|
||||||
label: '快速过滤',
|
label: '快速过滤',
|
||||||
|
@@ -4,14 +4,14 @@
|
|||||||
<span class="title">{{ title }}</span>
|
<span class="title">{{ title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<slot>
|
<slot>
|
||||||
<h1 class="no-margins">
|
<h3 class="no-margins">
|
||||||
<span v-if="body.disabled" class="num">
|
<span v-if="body.disabled" class="num">
|
||||||
{{ body.count }}
|
{{ body.count }}
|
||||||
</span>
|
</span>
|
||||||
<router-link v-else :to="body.route">
|
<router-link v-else :to="body.route">
|
||||||
<span class="num disabled-link">{{ body.count }}</span>
|
<span class="num disabled-link">{{ body.count }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</h1>
|
</h3>
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -42,9 +42,10 @@ export default {
|
|||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 600;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 20px;
|
text-transform: uppercase;
|
||||||
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,6 +62,7 @@ export default {
|
|||||||
|
|
||||||
.disabled-link {
|
.disabled-link {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user