2121 </el-card >
2222
2323 <el-button type =" primary" class =" mb-16" @click =" createApiKey" >
24- {{ $t('views.applicationOverview.appInfo.APIKeyDialog.creatApiKey ') }}
24+ {{ $t('common.create ') }}
2525 </el-button >
2626 <el-table :data =" apiKey" class =" mb-16" :loading =" loading" >
2727 <el-table-column prop =" secret_key" label =" API Key" >
3434 </el-button >
3535 </template >
3636 </el-table-column >
37- <el-table-column
38- :label =" $t('views.applicationOverview.appInfo.APIKeyDialog.status')"
39- width =" 60"
40- >
37+ <el-table-column :label =" $t('common.status')" width =" 80" >
4138 <template #default =" { row } " >
4239 <div @click.stop >
4340 <el-switch size =" small" v-model =" row.is_active" @change =" changeState($event, row)" />
4441 </div >
4542 </template >
4643 </el-table-column >
47- <el-table-column
48- prop =" name"
49- :label =" $t('views.applicationOverview.appInfo.APIKeyDialog.creationDate')"
50- width =" 170"
51- >
44+ <el-table-column prop =" name" :label =" $t('common.createDate')" width =" 170" >
5245 <template #default =" { row } " >
5346 {{ datetimeFormat(row.create_time) }}
5447 </template >
5548 </el-table-column >
56- <el-table-column
57- :label =" $t('views.applicationOverview.appInfo.APIKeyDialog.operations')"
58- align =" left"
59- width =" 80"
60- >
49+ <el-table-column :label =" $t('common.setting')" align =" left" width =" 80" >
6150 <template #default =" { row } " >
6251 <span class =" mr-4" >
63- <el-tooltip
64- effect =" dark"
65- :content =" $t('views.applicationOverview.appInfo.APIKeyDialog.settings')"
66- placement =" top"
67- >
52+ <el-tooltip effect =" dark" :content =" $t('common.settings')" placement =" top" >
6853 <el-button type =" primary" text @click.stop =" settingApiKey(row)" >
6954 <el-icon ><Setting /></el-icon >
7055 </el-button >
7156 </el-tooltip >
7257 </span >
73- <el-tooltip
74- effect =" dark"
75- :content =" $t('views.applicationOverview.appInfo.APIKeyDialog.delete')"
76- placement =" top"
77- >
58+ <el-tooltip effect =" dark" :content =" $t('common.delete')" placement =" top" >
7859 <el-button type =" primary" text @click =" deleteApiKey(row)" >
7960 <el-icon >
8061 <Delete />
@@ -95,7 +76,7 @@ import systemKeyApi from '@/api/system-api-key'
9576import { datetimeFormat } from ' @/utils/time'
9677import { MsgSuccess , MsgConfirm } from ' @/utils/message'
9778import { t } from ' @/locales'
98- import SettingAPIKeyDialog from ' . /SettingAPIKeyDialog.vue'
79+ import SettingAPIKeyDialog from ' @/views/application-overview/component /SettingAPIKeyDialog.vue'
9980
10081const route = useRoute ()
10182const {
@@ -123,23 +104,23 @@ watch(dialogVisible, (bool) => {
123104})
124105
125106function settingApiKey(row : any ) {
126- SettingAPIKeyDialogRef .value .open (row )
107+ SettingAPIKeyDialogRef .value .open (row , ' USER ' )
127108}
128109
129110function deleteApiKey(row : any ) {
130111 MsgConfirm (
131112 // @ts-ignore
132- ` ${t (' views.applicationOverview.appInfo.APIKeyDialog .msgConfirm1' )}: ${row .secret_key }? ` ,
133- t (' views.applicationOverview.appInfo.APIKeyDialog .msgConfirm2' ),
113+ ` ${t (' common .msgConfirm1' )}: ${row .secret_key }? ` ,
114+ t (' common .msgConfirm2' ),
134115 {
135- confirmButtonText: t (' views.applicationOverview.appInfo.APIKeyDialog.confirmDelete ' ),
136- cancelButtonText: t (' views.applicationOverview.appInfo.APIKeyDialog .cancel' ),
116+ confirmButtonText: t (' common.delete ' ),
117+ cancelButtonText: t (' common .cancel' ),
137118 confirmButtonClass: ' danger'
138119 }
139120 )
140121 .then (() => {
141122 systemKeyApi .delAPIKey (row .id , loading ).then (() => {
142- MsgSuccess (t (' views.applicationOverview.appInfo.APIKeyDialog .deleteSuccess' ))
123+ MsgSuccess (t (' common .deleteSuccess' ))
143124 getApiKeyList ()
144125 })
145126 })
0 commit comments