mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
Fixed: Fix issues in the edit form of the account list (#4714)
* Fixed: Fix issues in the edit form of the account list * Fixed: Switch Add Template And Edit --------- Co-authored-by: zhaojisen <1301338853@qq.com>
This commit is contained in:
@@ -144,6 +144,7 @@ export default {
|
||||
const vm = this
|
||||
return {
|
||||
addTemplate: false,
|
||||
isUpdateAccount: false,
|
||||
currentAccountColumn: {},
|
||||
showPasswordHistoryDialog: false,
|
||||
showViewSecretDialog: false,
|
||||
@@ -209,7 +210,7 @@ export default {
|
||||
},
|
||||
platform: {
|
||||
label: this.$t('Platform'),
|
||||
width: '120px',
|
||||
width: '170px',
|
||||
formatter: PlatformFormatter,
|
||||
formatterArgs: {
|
||||
platformAttr: 'asset.platform'
|
||||
@@ -394,6 +395,8 @@ export default {
|
||||
accountCreateUpdateTitle() {
|
||||
if (this.addTemplate) {
|
||||
return this.$t('AddAccountByTemplate')
|
||||
} else if (this.isUpdateAccount) {
|
||||
return this.$t('UpdateAccount')
|
||||
} else {
|
||||
return this.$t('AddAccount')
|
||||
}
|
||||
@@ -434,6 +437,7 @@ export default {
|
||||
},
|
||||
addAccountSuccess() {
|
||||
Reflect.deleteProperty(this.$route.query, 'flag')
|
||||
this.isUpdateAccount = false
|
||||
this.$refs.ListTable.reloadTable()
|
||||
},
|
||||
async getAssetDetail() {
|
||||
|
||||
@@ -46,14 +46,15 @@ export const accountOtherActions = (vm) => [
|
||||
title: vm.$t('Edit'),
|
||||
can: vm.$hasPerm('accounts.change_account') && !vm.$store.getters.currentOrgIsRoot,
|
||||
callback: ({ row }) => {
|
||||
const data = {
|
||||
...vm.asset,
|
||||
...row.asset
|
||||
}
|
||||
vm.isUpdateAccount = true
|
||||
// const data = {
|
||||
// ...vm.asset,
|
||||
// ...row.asset
|
||||
// }
|
||||
// vm.iAsset = data
|
||||
vm.account = row
|
||||
vm.iAsset = data
|
||||
vm.addTemplate = false
|
||||
vm.showAddDialog = false
|
||||
vm.accountCreateUpdateTitle = vm.$t('UpdateAccount')
|
||||
setTimeout(() => {
|
||||
vm.showAddDialog = true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user