[Fix][UI Next] Fix a few errors in the task group. (#8322)
This commit is contained in:
parent
b75f67a56a
commit
222506ae35
|
|
@ -97,9 +97,15 @@ export function useTable(
|
|||
variables.totalPage = values[0].totalPage
|
||||
variables.tableData = values[0].totalList.map(
|
||||
(item: any, index: number) => {
|
||||
item.projectName = _.find(values[1], {
|
||||
code: item.projectCode
|
||||
}).name
|
||||
let projectName = ''
|
||||
if (values[1]) {
|
||||
let project = _.find(values[1], { code: item.projectCode })
|
||||
if (project) {
|
||||
projectName = project.name
|
||||
}
|
||||
}
|
||||
|
||||
item.projectName = projectName
|
||||
item.createTime = format(
|
||||
new Date(item.createTime),
|
||||
'yyyy-MM-dd HH:mm:ss'
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ const taskGroupQueue = defineComponent({
|
|||
</NCard>
|
||||
<Card
|
||||
class={styles['table-card']}
|
||||
title={t('resource.task_group_option.option')}
|
||||
title={t('resource.task_group_queue.queue')}
|
||||
>
|
||||
<div>
|
||||
<NDataTable
|
||||
|
|
|
|||
|
|
@ -98,9 +98,15 @@ export function useTable(
|
|||
variables.totalPage = values[0].totalPage
|
||||
variables.tableData = values[0].totalList.map(
|
||||
(item: any, index: number) => {
|
||||
item.taskGroupName = _.find(taskGroupList, {
|
||||
id: item.groupId
|
||||
}).name
|
||||
let taskGroupName = ''
|
||||
if (taskGroupList) {
|
||||
let taskGroup = _.find(taskGroupList, { id: item.groupId })
|
||||
if (taskGroup) {
|
||||
taskGroupName = taskGroup.name
|
||||
}
|
||||
}
|
||||
|
||||
item.taskGroupName = taskGroupName
|
||||
item.createTime = format(
|
||||
new Date(item.createTime),
|
||||
'yyyy-MM-dd HH:mm:ss'
|
||||
|
|
|
|||
Loading…
Reference in New Issue