fix: 修复工单详情问题

This commit is contained in:
Orange 2021-01-13 16:49:38 +08:00
parent 4013ea6212
commit bac7cef23c
5 changed files with 60 additions and 0 deletions

View File

@ -813,6 +813,8 @@
"user": "用户",
"Status": "状态",
"Open": "待处理",
"OrgName":"组织名称",
"AssignedInfo":"审批信息",
"OpenTicket": "创建工单",
"HandleTicket": "处理工单",
"FinishedTicket": "完成工单",

View File

@ -784,6 +784,7 @@
"AssignedMe": "Assigned me",
"Assignee": "Assignee",
"RequestPerm":"Request Perm",
"AssignedInfo":"Assigned Info",
"OpenTicket": "Open Ticket",
"HandleTicket": "Handle Ticket",
"FinishedTicket": "Finished Ticket",
@ -804,6 +805,7 @@
"user": "User",
"Status": "Status",
"Open": "Open",
"OrgName":"Org name",
"IP": "IP",
"Hostname": "Hostname",
"Asset": "Asset",

View File

@ -3,6 +3,7 @@
:object="object"
:detail-card-items="detailCardItems"
:special-card-items="specialCardItems"
:assigned-card-items="assignedCardItems"
:approve="handleApprove"
:close="handleClose"
:reject="handleReject"
@ -120,6 +121,10 @@ export default {
key: this.$t('tickets.Assignee'),
value: (this.object.processor_display === 'No') ? '' : this.object.processor_display
},
{
key: this.$t('tickets.OrgName'),
value: this.object.org_name
},
{
key: this.$t('common.dateCreated'),
value: toSafeLocalDateStr(this.object.date_created)
@ -158,6 +163,26 @@ export default {
}
]
},
assignedCardItems() {
return [
{
key: this.$t('applications.appName'),
value: this.object.meta.approve_applications
},
{
key: this.$t('tickets.SystemUser'),
value: this.object.meta.approve_system_users
},
{
key: this.$t('common.dateStart'),
value: toSafeLocalDateStr(this.object.meta.approve_date_start)
},
{
key: this.$t('common.dateExpired'),
value: toSafeLocalDateStr(this.object.meta.approve_date_expired)
}
]
},
hasActionPerm() {
return this.object.assignees.indexOf(this.$store.state.users.profile.id) !== -1
}

View File

@ -3,6 +3,7 @@
:object="object"
:detail-card-items="detailCardItems"
:special-card-items="specialCardItems"
:assigned-card-items="assignedCardItems"
:approve="handleApprove"
:close="handleClose"
:reject="handleReject"
@ -117,6 +118,10 @@ export default {
key: this.$t('tickets.Assignee'),
value: (this.object.processor_display === 'No') ? '' : this.object.processor_display
},
{
key: this.$t('tickets.OrgName'),
value: this.object.org_name
},
{
key: this.$t('common.dateCreated'),
value: toSafeLocalDateStr(this.object.date_created)
@ -155,6 +160,26 @@ export default {
}
]
},
assignedCardItems() {
return [
{
key: this.$t('assets.Asset'),
value: this.object.meta.approve_assets
},
{
key: this.$t('tickets.SystemUser'),
value: this.object.meta.approve_system_users
},
{
key: this.$t('common.dateStart'),
value: toSafeLocalDateStr(this.object.meta.approve_date_start)
},
{
key: this.$t('common.dateExpired'),
value: toSafeLocalDateStr(this.object.meta.approve_date_expired)
}
]
},
hasActionPerm() {
return this.object.assignees.indexOf(this.$store.state.users.profile.id) !== -1
}

View File

@ -3,6 +3,7 @@
<el-col :span="17">
<Details :detail-card-items="detailCardItems" :title="$t('common.BasicInfo')" />
<Details :detail-card-items="specialCardItems" :title="$t('common.ApplyInfo')" />
<Details v-if="object.action === 'approve'" :detail-card-items="assignedCardItems" :title="$t('tickets.AssignedInfo')" />
<slot id="MoreDetails" />
<Comments :object="object" v-bind="$attrs" />
</el-col>
@ -31,7 +32,12 @@ export default {
detailCardItems: {
type: Array,
default: () => ([])
},
assignedCardItems: {
type: Array,
default: () => ([])
}
},
data() {
return {}