fix: 修复工单详情 account 显示

This commit is contained in:
Bai
2023-02-17 18:46:16 +08:00
committed by Jiangjie.Bai
parent 49abdf52c2
commit e82d444cf3
3 changed files with 6 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ export default {
return object.type === 'login_confirm' ? [] : [
{
key: this.$t('acl.apply_login_asset'),
value: object.apply_login_asset.name
value: object.apply_login_asset?.name
},
{
key: this.$t('acl.apply_login_account'),

View File

@@ -49,7 +49,7 @@
</template>
<script>
import { formatTime, getDateTimeStamp } from '@/utils/index'
import { formatTime, getDateTimeStamp } from '@/utils'
import { toSafeLocalDateStr } from '@/utils/common'
import { STATUS_MAP, treeNodes } from '../../const'
import GenericTicketDetail from '@/views/tickets/components/GenericTicketDetail'
@@ -57,6 +57,7 @@ import AccountFormatter from '@/views/perms/AssetPermission/components/AccountFo
import Select2 from '@/components/FormFields/Select2'
import BasicTree from '@/components/FormFields/BasicTree'
import IBox from '@/components/IBox'
import { AccountLabelMapper } from '@/views/perms/const'
export default {
name: '',
@@ -127,7 +128,7 @@ export default {
},
{
key: this.$tc('perms.Account'),
value: object.apply_accounts.join(', ')
value: object.apply_accounts.map(item => AccountLabelMapper[item] || item).join(', ')
},
{
key: this.$tc('assets.Action'),
@@ -169,7 +170,7 @@ export default {
},
{
key: this.$tc('perms.Account'),
value: (object.apply_accounts || []).join(', ')
value: object.apply_accounts.map(item => AccountLabelMapper[item] || item).join(', ')
},
{
key: this.$tc('assets.Action'),

View File

@@ -4,7 +4,7 @@
<script>
import { STATUS_MAP } from '../const'
import { formatTime, getDateTimeStamp } from '@/utils/index'
import { formatTime, getDateTimeStamp } from '@/utils'
import { toSafeLocalDateStr } from '@/utils/common'
import GenericTicketDetail from '@/views/tickets/components/GenericTicketDetail'