mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
Merge pull request #4317 from jumpserver/pr@dev@ticket_flow
perf: Ticket flow detail error
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
<GenericTicketDetail
|
||||
:detail-card-items="detailCardItems"
|
||||
:object="object"
|
||||
:special-card-items="specialCardItems"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { formatTime, getDateTimeStamp } from '@/utils/index'
|
||||
import { toSafeLocalDateStr } from '@/utils/time'
|
||||
import GenericTicketDetail from '@/views/tickets/TicketFlow/components/GenericTicketDetail'
|
||||
|
||||
@@ -49,55 +47,17 @@ export default {
|
||||
value: toSafeLocalDateStr(this.object.date_updated)
|
||||
}
|
||||
]
|
||||
},
|
||||
specialCardItems() {
|
||||
const approvalData = [
|
||||
{
|
||||
key: this.$t('OneAssigneeType'),
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: this.$t('OneAssignee'),
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: this.$t('TwoAssigneeType'),
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
key: this.$t('TwoAssignee'),
|
||||
value: ''
|
||||
}]
|
||||
this.object.rules.forEach(item => {
|
||||
if (item.level === 1) {
|
||||
approvalData[0].value = item.strategy.label
|
||||
approvalData[1].value = item.assignees_display.join(',')
|
||||
} else {
|
||||
approvalData[2].value = item.strategy.label
|
||||
approvalData[3].value = item.assignees_display.join(',')
|
||||
}
|
||||
})
|
||||
return approvalData.slice(0, this.object.rules.length * 2)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatTime(dateStr) {
|
||||
return formatTime(getDateTimeStamp(dateStr))
|
||||
},
|
||||
toSafeLocalDateStr(dataStr) {
|
||||
return toSafeLocalDateStr(dataStr)
|
||||
},
|
||||
reloadPage() {
|
||||
window.location.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.assets{
|
||||
margin-top: 14px;
|
||||
}
|
||||
.feed-activity-list .feed-element {
|
||||
border-bottom: 1px solid #e7eaec;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user