This commit is contained in:
OrangeM21
2020-06-07 23:13:07 +08:00
parent d536930568
commit 1c9f62f2ec
7 changed files with 31 additions and 9 deletions

View File

@@ -151,6 +151,7 @@
"DateLastWeek": "最近一周", "DateLastWeek": "最近一周",
"DateLastMonth": "最近一月", "DateLastMonth": "最近一月",
"DateLast3Months": "最近三月", "DateLast3Months": "最近三月",
"MFAConfirm": "MFA 认证",
"Yes": "是", "Yes": "是",
"No": "否", "No": "否",
"Remove":"删除", "Remove":"删除",

View File

@@ -150,6 +150,7 @@
"DateLastWeek": "Last week", "DateLastWeek": "Last week",
"DateLastMonth": "Last month", "DateLastMonth": "Last month",
"DateLast3Months": "Last 3 months", "DateLast3Months": "Last 3 months",
"MFAConfirm": "MFA Confirm",
"Yes": "Yes", "Yes": "Yes",
"Remove":"Remove", "Remove":"Remove",
"No": "No", "No": "No",

View File

@@ -1,12 +1,13 @@
<template><div> <template><div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="14"> <el-col :span="18">
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" /> <ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
</el-col> </el-col>
<el-col :span="10"> <el-col :span="6">
<QuickActions type="primary" :actions="quickActions" /> <QuickActions type="primary" :actions="quickActions" />
</el-col> </el-col>
</el-row> </el-row>
<Dialog width="50" :title="this.$t('common.MFAConfirm')" :visible.sync="showMFADialog" />
<Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()"> <Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()">
<el-form label-position="right" label-width="80px" :model="dialogInfo"> <el-form label-position="right" label-width="80px" :model="dialogInfo">
<el-form-item :label="this.$t('assets.Hostname')"> <el-form-item :label="this.$t('assets.Hostname')">
@@ -48,6 +49,7 @@ export default {
data() { data() {
return { return {
showDialog: false, showDialog: false,
showMFADialog: false,
dialogInfo: { dialogInfo: {
asset: '', asset: '',
username: '', username: '',
@@ -109,6 +111,14 @@ export default {
hasDelete: false, // can set function(row, value) hasDelete: false, // can set function(row, value)
canDelete: false, canDelete: false,
extraActions: [ extraActions: [
{
name: this.$t('common.View'),
title: this.$t('common.View'),
type: 'primary',
callback: function(val) {
this.showMFADialog = true
}.bind(this)
},
{ {
name: this.$t('common.Delete'), name: this.$t('common.Delete'),
title: this.$t('common.Delete'), title: this.$t('common.Delete'),

View File

@@ -1,9 +1,9 @@
<template> <template>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="14"> <el-col :span="18">
<DetailCard :items="detailCardItems" /> <DetailCard :items="detailCardItems" />
</el-col> </el-col>
<el-col :span="10"> <el-col :span="6">
<RelationCard ref="RelationCard" type="info" style="margin-top: 15px" v-bind="nodeRelationConfig" /> <RelationCard ref="RelationCard" type="info" style="margin-top: 15px" v-bind="nodeRelationConfig" />
</el-col> </el-col>
</el-row> </el-row>

View File

@@ -8,7 +8,7 @@
<QuickActions type="primary" :actions="quickActions" /> <QuickActions type="primary" :actions="quickActions" />
</el-col> </el-col>
</el-row> </el-row>
<Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showMFADialog" /> <Dialog width="50" :title="this.$t('common.MFAConfirm')" :visible.sync="showMFADialog" />
<Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()"> <Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()">
<el-form label-position="right" label-width="80px" :model="dialogInfo"> <el-form label-position="right" label-width="80px" :model="dialogInfo">
<el-form-item :label="this.$t('assets.Hostname')"> <el-form-item :label="this.$t('assets.Hostname')">

View File

@@ -1,9 +1,9 @@
<template> <template>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="14"> <el-col :span="18">
<DetailCard :items="detailCardItems" /> <DetailCard :items="detailCardItems" />
</el-col> </el-col>
<el-col :span="10" /> <el-col :span="6" />
</el-row> </el-row>
</template> </template>

View File

@@ -1,14 +1,15 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="14"> <el-col :span="18">
<ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" /> <ListTable ref="ListTable" :table-config="tableConfig" :header-actions="headerActions" />
</el-col> </el-col>
<el-col :span="10"> <el-col :span="6">
<QuickActions type="primary" :actions="quickActions" /> <QuickActions type="primary" :actions="quickActions" />
<RelationCard type="info" style="margin-top: 15px" v-bind="nodeRelationConfig" /> <RelationCard type="info" style="margin-top: 15px" v-bind="nodeRelationConfig" />
</el-col> </el-col>
</el-row> </el-row>
<Dialog width="50" :title="this.$t('common.MFAConfirm')" :visible.sync="showMFADialog" />
<Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()"> <Dialog width="50" :title="this.$t('assets.UpdateAssetUserToken')" :visible.sync="showDialog" @confirm="handleConfirm()" @cancel="handleCancel()">
<el-form label-position="right" label-width="80px" :model="dialogInfo"> <el-form label-position="right" label-width="80px" :model="dialogInfo">
<el-form-item :label="this.$t('assets.Hostname')"> <el-form-item :label="this.$t('assets.Hostname')">
@@ -59,6 +60,7 @@ export default {
password: '', password: '',
key: '' key: ''
}, },
showMFADialog: false,
AutoPushConfig: { AutoPushConfig: {
icon: 'fa-info', icon: 'fa-info',
title: this.$t('assets.QuickUpdate'), title: this.$t('assets.QuickUpdate'),
@@ -152,6 +154,14 @@ export default {
hasDelete: false, // can set function(row, value) hasDelete: false, // can set function(row, value)
canDelete: false, canDelete: false,
extraActions: [ extraActions: [
{
name: this.$t('common.View'),
title: this.$t('common.View'),
type: 'primary',
callback: function(val) {
this.showMFADialog = true
}.bind(this)
},
{ {
name: 'delete', name: 'delete',
title: this.$t('common.Delete'), title: this.$t('common.Delete'),