fix(缺陷管理): 缺陷列表部分字段支持排序

This commit is contained in:
song-cc-rock 2024-02-22 20:04:17 +08:00 committed by Craftsman
parent d8d40f1a6d
commit 5b3e2c1716
2 changed files with 61 additions and 42 deletions

View File

@ -14,7 +14,7 @@
</resultMap> </resultMap>
<select id="list" resultMap="BugDTO"> <select id="list" resultMap="BugDTO">
select b.id, b.num, b.title, b.handle_user, b.create_user, b.create_time, b.update_time, b.delete_time, b.delete_user, select b.id, b.num, b.title, b.handle_user, b.create_user, b.create_time, b.update_user, b.update_time, b.delete_user, b.delete_time,
b.project_id, b.template_id, b.platform, b.status, b.tags from bug b b.project_id, b.template_id, b.platform, b.status, b.tags from bug b
<include refid="queryWhereCondition"/> <include refid="queryWhereCondition"/>
</select> </select>

View File

@ -158,12 +158,7 @@
import router from '@/router'; import router from '@/router';
import {useAppStore, useTableStore} from '@/store'; import {useAppStore, useTableStore} from '@/store';
import useLicenseStore from '@/store/modules/setting/license'; import useLicenseStore from '@/store/modules/setting/license';
import { import {customFieldDataToTableData, customFieldToColumns, downloadByteFile, tableParamsToRequestParams,} from '@/utils';
customFieldDataToTableData,
customFieldToColumns,
downloadByteFile,
tableParamsToRequestParams,
} from '@/utils';
import {BugEditCustomField, BugListItem} from '@/models/bug-management'; import {BugEditCustomField, BugListItem} from '@/models/bug-management';
import {RouteEnum} from '@/enums/routeEnum'; import {RouteEnum} from '@/enums/routeEnum';
@ -249,12 +244,20 @@
dataIndex: 'num', dataIndex: 'num',
slotName: 'num', slotName: 'num',
width: 80, width: 80,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
}, },
{ {
title: 'bugManagement.bugName', title: 'bugManagement.bugName',
dataIndex: 'title', dataIndex: 'title',
width: 200, width: 200,
showTooltip: true, showTooltip: true,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
}, },
{ {
title: 'bugManagement.status', title: 'bugManagement.status',
@ -296,6 +299,10 @@
width: 112, width: 112,
showTooltip: true, showTooltip: true,
showDrag: true, showDrag: true,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
}, },
{ {
title: 'bugManagement.updateUser', title: 'bugManagement.updateUser',
@ -303,18 +310,30 @@
width: 112, width: 112,
showTooltip: true, showTooltip: true,
showDrag: true, showDrag: true,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
}, },
{ {
title: 'bugManagement.createTime', title: 'bugManagement.createTime',
dataIndex: 'createTime', dataIndex: 'createTime',
showDrag: true, showDrag: true,
width: 199, width: 199,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
}, },
{ {
title: 'bugManagement.updateTime', title: 'bugManagement.updateTime',
dataIndex: 'updateTime', dataIndex: 'updateTime',
showDrag: true, showDrag: true,
width: 199, width: 199,
sortable: {
sortDirections: ['ascend', 'descend'],
sorter: true,
}
}, },
{ {
title: 'common.operation', title: 'common.operation',