feat: uesrTable 添加重置2fa的按钮
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "nz-icon"; /* Project id 2030432 */
|
||||
src: url('iconfont.woff2?t=1628678895024') format('woff2'),
|
||||
url('iconfont.woff?t=1628678895024') format('woff'),
|
||||
url('iconfont.ttf?t=1628678895024') format('truetype');
|
||||
src: url('iconfont.woff2?t=1628837277704') format('woff2'),
|
||||
url('iconfont.woff?t=1628837277704') format('woff'),
|
||||
url('iconfont.ttf?t=1628837277704') format('truetype');
|
||||
}
|
||||
|
||||
.nz-icon {
|
||||
@@ -13,6 +13,10 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.nz-icon-reset:before {
|
||||
content: "\e618";
|
||||
}
|
||||
|
||||
.nz-icon-yanzhengma:before {
|
||||
content: "\e736";
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: "nz-icon"; /* Project id 2030432 */
|
||||
src: url('./font/iconfont.woff2?t=1628678895024') format('woff2'),
|
||||
url('./font/iconfont.woff?t=1628678895024') format('woff'),
|
||||
url('./font/iconfont.ttf?t=1628678895024') format('truetype');
|
||||
src: url('./font/iconfont.woff2?t=1628837277704') format('woff2'),
|
||||
url('./font/iconfont.woff?t=1628837277704') format('woff'),
|
||||
url('./font/iconfont.ttf?t=1628837277704') format('truetype');
|
||||
}
|
||||
|
||||
.nz-icon {
|
||||
@@ -13,6 +13,10 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.nz-icon-reset:before {
|
||||
content: "\e618";
|
||||
}
|
||||
|
||||
.nz-icon-yanzhengma:before {
|
||||
content: "\e736";
|
||||
}
|
||||
|
||||
@@ -574,6 +574,7 @@ const cn = {
|
||||
confirmOvertime: '确定关闭吗?', // Are you sure you want to delete?
|
||||
killTerm: '确认关闭 terminal 吗?',
|
||||
resetPrompt: '确认重置吗?',
|
||||
resetMfa: '确认重置2FA吗?',
|
||||
confirmBatchDelete: '确定删除这{0}条数据吗?',
|
||||
assetConfirmDelete: '关联的Endpoint和告警将会被删除,确认删除吗?',
|
||||
zoomStatusPrompt: '您的浏览器目前处于缩放状态,页面可能会出现错位,建议100%大小。',
|
||||
@@ -725,7 +726,8 @@ const cn = {
|
||||
disable: '关闭',
|
||||
enableMfa: '开启',
|
||||
forceEnable: '强制开启',
|
||||
mfaTitle: 'Two-Factor Authentication'
|
||||
mfaTitle: 'Two-Factor Authentication',
|
||||
resetMfa: '重置2FA'
|
||||
},
|
||||
roles: {
|
||||
roles: '角色',
|
||||
|
||||
@@ -582,6 +582,7 @@ const en = {
|
||||
confirmOvertime: "Are you sure it's off?",
|
||||
killTerm: 'Are you sure you want to kill terminal?',
|
||||
resetPrompt: 'Are you sure to reset?',
|
||||
resetMfa: 'Are you sure to reset 2FA?',
|
||||
confirmBatchDelete: 'Are you sure to delete these {0} pieces of data',
|
||||
assetConfirmDelete: 'Related endpoints and alerts will be removed, are you sure you want to delete this asset?', // Related endpoints and alerts will be removed, are you sure you want to delete this asset?
|
||||
zoomStatusPrompt: 'Your browser is currently in zoom state, the page may appear dislocation, the proposed 100% size.',
|
||||
@@ -734,7 +735,8 @@ const en = {
|
||||
disable: 'Disable',
|
||||
enableMfa: 'Enable',
|
||||
forceEnable: 'Force enable',
|
||||
mfaTitle: 'Two-Factor Authentication'
|
||||
mfaTitle: 'Two-Factor Authentication',
|
||||
resetMfa: 'Reset 2FA'
|
||||
},
|
||||
roles: {
|
||||
roles: 'Role',
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-has="'user_edit'" :command="['edit', scope.row]"><i class="nz-icon nz-icon-edit"></i><span class="operation-dropdown-text">{{$t('overall.edit')}}</span></el-dropdown-item>
|
||||
<el-dropdown-item v-has="'user_delete'" :command="['delete', scope.row]" :disabled="scope.row.id === 1"><i class="nz-icon nz-icon-delete"></i><span class="operation-dropdown-text">{{$t('overall.delete')}}</span></el-dropdown-item>
|
||||
<el-dropdown-item v-has="'user_edit'" :command="['reset_mfa', scope.row]"><i class="nz-icon nz-icon-reset"></i><span class="operation-dropdown-text">{{$t('config.user.resetMfa')}}</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
@@ -184,12 +185,16 @@ export default {
|
||||
/deep/ .el-tag.el-tag--mini{
|
||||
border-radius: 10px;
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
height: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.user-name-top{
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.user-name-bottom{
|
||||
color: #999999;
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
:height="mainTableHeight"
|
||||
:table-data="tableData"
|
||||
@del="del"
|
||||
@reset_mfa="resetMfa"
|
||||
@edit="edit"
|
||||
@orderBy="tableDataSort"
|
||||
@reload="getTableData"
|
||||
@@ -46,7 +47,8 @@ import userBox from '@/components/common/rightBox/administration/userBox'
|
||||
import nzDataList from '@/components/common/table/nzDataList'
|
||||
import dataListMixin from '@/components/common/mixin/dataList'
|
||||
import userTable from '@/components/common/table/settings/userTable'
|
||||
|
||||
import MessageBox from 'element-ui/packages/message-box/src/main'
|
||||
import i18n from '@/components/common/i18n'
|
||||
export default {
|
||||
name: 'user',
|
||||
components: {
|
||||
@@ -121,6 +123,22 @@ export default {
|
||||
this.rightBox.show = true
|
||||
}
|
||||
})
|
||||
},
|
||||
resetMfa (row) {
|
||||
MessageBox.confirm(i18n.t('tip.resetMfa'), {
|
||||
confirmButtonText: i18n.t('tip.yes'),
|
||||
cancelButtonText: i18n.t('tip.no'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$delete('/sys/user/resetMfa', { ids: row.id }).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.$message.success(this.$t('tip.resetSuccess'))
|
||||
this.getTableData()
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user