NEZ-1895 perf : 添加token列,取消Administration - api keys添加按钮

This commit is contained in:
likexuan
2022-06-10 10:41:25 +08:00
parent e6161147ce
commit b0b625ce60
3 changed files with 16 additions and 5 deletions

View File

@@ -10,11 +10,6 @@
@search="search"> @search="search">
<template v-slot:top-tool-left> <template v-slot:top-tool-left>
</template>
<template v-slot:top-tool-right>
<button id="api-key-add" v-has="'system_apiKey_add'" :title="$t('config.system.notification.create')" class="top-tool-btn margin-r-10" type="button" @click="addApiKey">
<i class="nz-icon-create-square nz-icon"></i>
</button>
</template> </template>
<template v-slot:default="slotProps"> <template v-slot:default="slotProps">
<api-key-table <api-key-table

View File

@@ -5,6 +5,7 @@
:api="url" :api="url"
:custom-table-title.sync="tools.customTableTitle" :custom-table-title.sync="tools.customTableTitle"
:from="fromRoute.apiKey" :from="fromRoute.apiKey"
class="api-key"
:layout="['searchInput', 'elementSet', 'pagination']" :layout="['searchInput', 'elementSet', 'pagination']"
:search-msg="searchMsg" :search-msg="searchMsg"
@search="search"> @search="search">
@@ -87,6 +88,11 @@ export default {
prop: 'name', prop: 'name',
minWidth: 100, minWidth: 100,
show: true show: true
}, {
label: this.$t('asset.talon.token'),
prop: 'token',
minWidth: 180,
show: true
}, { }, {
label: this.$t('config.system.apiKey.expireAt'), label: this.$t('config.system.apiKey.expireAt'),
prop: 'expireAt', prop: 'expireAt',

View File

@@ -38,6 +38,9 @@
</template> </template>
<template v-if="item.prop == 'name'"> <template v-if="item.prop == 'name'">
{{scope.row[item.prop]?scope.row[item.prop]:'-'}} {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</template>
<template v-if="item.prop == 'token'">
{{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</template> </template>
<template v-if="item.prop == 'expireAt'"> <template v-if="item.prop == 'expireAt'">
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}} {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}}
@@ -97,10 +100,17 @@ export default {
}, { }, {
label: this.$t('overall.name'), label: this.$t('overall.name'),
prop: 'name', prop: 'name',
minWidth: 100,
show: true
}, {
label: this.$t('asset.talon.token'),
prop: 'token',
minWidth: 180,
show: true show: true
}, { }, {
label: this.$t('config.system.apiKey.expireAt'), label: this.$t('config.system.apiKey.expireAt'),
prop: 'expireAt', prop: 'expireAt',
minWidth: 100,
show: true show: true
}, { }, {
label: this.$t('config.system.apiKey.creatAt'), label: this.$t('config.system.apiKey.creatAt'),