fix(缺陷管理): 回收站排序问题&&批量编辑标签变更历史缺少&&用例数字无法点击跳转
--bug=1038760 --user=宋昌昌 【缺陷管理】缺陷批量编辑标签变更历史中没有记录 https://www.tapd.cn/55049933/s/1491888 --bug=1038804 --user=宋昌昌 【缺陷管理】回收站中用例排序为删除时间升序 https://www.tapd.cn/55049933/s/1491955 --bug=1038766 --user=宋昌昌 【缺陷管理】缺陷中用例数字段无法点击 https://www.tapd.cn/55049933/s/1491956
This commit is contained in:
parent
f18e51a4e3
commit
9154d7cb7f
|
@ -132,7 +132,7 @@ public class ApiDefinitionController {
|
|||
@CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project")
|
||||
public Pager<List<ApiDefinitionDTO>> getPage(@Validated @RequestBody ApiDefinitionPageRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "pos desc");
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : request.getDeleted() ? "delete_time desc" : "pos desc");
|
||||
return PageUtils.setPageInfo(page, apiDefinitionService.getApiDefinitionPage(request, SessionUtils.getUserId()));
|
||||
}
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ public class ApiTestCaseController {
|
|||
@RequiresPermissions(PermissionConstants.PROJECT_API_DEFINITION_CASE_READ)
|
||||
public Pager<List<ApiTestCaseDTO>> pageTrash(@Validated @RequestBody ApiTestCasePageRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "pos desc");
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "delete_time desc");
|
||||
return PageUtils.setPageInfo(page, apiTestCaseService.page(request, true));
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public class ApiScenarioController {
|
|||
@CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project")
|
||||
public Pager<List<ApiScenarioDTO>> getTrashPage(@Validated @RequestBody ApiScenarioPageRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "pos desc");
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "delete_time desc");
|
||||
request.setDeleted(true);
|
||||
return PageUtils.setPageInfo(page, apiScenarioService.getScenarioPage(request));
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ public class BugController {
|
|||
}
|
||||
|
||||
@PostMapping("/sync/all")
|
||||
@Operation(summary = "缺陷管理-列表-同步缺陷(全量)")
|
||||
@Operation(summary = "缺陷管理-列表-同步缺陷(企业)")
|
||||
@RequiresPermissions(PermissionConstants.PROJECT_BUG_UPDATE)
|
||||
@CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project")
|
||||
public void syncAll(@RequestBody BugSyncRequest request) {
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BugTrashController {
|
|||
@RequiresPermissions(PermissionConstants.PROJECT_BUG_READ)
|
||||
public Pager<List<BugDTO>> page(@Validated @RequestBody BugPageRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "create_time desc");
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "delete_time desc");
|
||||
request.setUseTrash(true);
|
||||
return PageUtils.setPageInfo(page, bugService.list(request));
|
||||
}
|
||||
|
|
|
@ -1611,6 +1611,7 @@ public class BugService {
|
|||
bugs.forEach(bug -> {
|
||||
LogDTO log = new LogDTO(bug.getProjectId(), project.getOrganizationId(), bug.getId(), currentUser, operationType, module, bug.getTitle());
|
||||
log.setPath(path);
|
||||
log.setHistory(true);
|
||||
log.setMethod(HttpMethodConstants.POST.name());
|
||||
if (batchUpdate) {
|
||||
// 批量更新只记录TAG的变更内容
|
||||
|
|
|
@ -42,7 +42,7 @@ public class FunctionalCaseTrashController {
|
|||
@CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project")
|
||||
public Pager<List<FunctionalCasePageDTO>> getFunctionalCasePage(@Validated @RequestBody FunctionalCasePageRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "pos desc");
|
||||
StringUtils.isNotBlank(request.getSortString()) ? request.getSortString() : "delete_time desc");
|
||||
return PageUtils.setPageInfo(page, functionalCaseService.getFunctionalCasePage(request, true));
|
||||
}
|
||||
|
||||
|
|
|
@ -271,6 +271,7 @@
|
|||
visible: boolean;
|
||||
detailId: string; // 详情 id
|
||||
detailIndex: number; // 详情 下标
|
||||
detailDefaultTab: string; // 详情默认 tab
|
||||
tableData: any[]; // 表格数据
|
||||
pagination: MsPaginationI; // 分页器对象
|
||||
pageChange: (page: number) => Promise<void>; // 分页变更函数
|
||||
|
@ -381,7 +382,7 @@
|
|||
currentCustomFields.value = customFieldsRes.customFields || [];
|
||||
if (detailInfo.value.customFields && Array.isArray(detailInfo.value.customFields)) {
|
||||
const MULTIPLE_TYPE = ['MULTIPLE_SELECT', 'MULTIPLE_INPUT', 'CHECKBOX', 'MULTIPLE_MEMBER'];
|
||||
const SINGRADIO_TYPE = ['RADIO', 'SELECT', 'MEMBER'];
|
||||
const SINGLE_TYPE = ['RADIO', 'SELECT', 'MEMBER'];
|
||||
detail.customFields.forEach((item) => {
|
||||
if (MULTIPLE_TYPE.includes(item.type)) {
|
||||
const multipleOptions = getOptionFromTemplate(
|
||||
|
@ -389,11 +390,13 @@
|
|||
);
|
||||
// 如果该值在选项中已经被删除掉
|
||||
const optionsIds = (multipleOptions || []).map((e: any) => e.value);
|
||||
if (item.type !== 'MULTIPLE_INPUT') {
|
||||
const currentDefaultValue = optionsIds.filter((e: any) => JSON.parse(item.value).includes(e));
|
||||
tmpObj[item.id] = currentDefaultValue;
|
||||
} else {
|
||||
tmpObj[item.id] = JSON.parse(item.value);
|
||||
if (item.value) {
|
||||
if (item.type !== 'MULTIPLE_INPUT') {
|
||||
const currentDefaultValue = optionsIds.filter((e: any) => JSON.parse(item.value).includes(e));
|
||||
tmpObj[item.id] = currentDefaultValue;
|
||||
} else {
|
||||
tmpObj[item.id] = JSON.parse(item.value);
|
||||
}
|
||||
}
|
||||
} else if (item.type === 'INT' || item.type === 'FLOAT') {
|
||||
tmpObj[item.id] = Number(item.value);
|
||||
|
@ -402,7 +405,7 @@
|
|||
if (arr && arr instanceof Array && arr.length > 0) {
|
||||
tmpObj[item.id] = arr[arr.length - 1];
|
||||
}
|
||||
} else if (SINGRADIO_TYPE.includes(item.type)) {
|
||||
} else if (SINGLE_TYPE.includes(item.type)) {
|
||||
const multipleOptions = getOptionFromTemplate(
|
||||
currentCustomFields.value.find((filed: any) => item.id === filed.fieldId)
|
||||
);
|
||||
|
@ -630,7 +633,11 @@
|
|||
() => showDrawerVisible.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
activeTab.value = 'detail';
|
||||
if (props.detailDefaultTab) {
|
||||
activeTab.value = props.detailDefaultTab;
|
||||
} else {
|
||||
activeTab.value = 'detail';
|
||||
}
|
||||
} else {
|
||||
const query = { ...route.query };
|
||||
delete query.id;
|
||||
|
|
|
@ -301,13 +301,13 @@
|
|||
}
|
||||
|
||||
onMounted(async () => {
|
||||
getEnabledModules();
|
||||
getFetch();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.bugId,
|
||||
() => {
|
||||
getEnabledModules();
|
||||
getFetch();
|
||||
}
|
||||
);
|
||||
|
|
|
@ -55,6 +55,12 @@
|
|||
</div>
|
||||
</template>
|
||||
|
||||
<template #relationCaseCount="{ record, rowIndex }">
|
||||
<a-button type="text" class="px-0" @click="showRelateCaseCount(record.id, rowIndex)">{{
|
||||
record.relationCaseCount
|
||||
}}</a-button>
|
||||
</template>
|
||||
|
||||
<template #createUserFilter="{ columnConfig }">
|
||||
<TableFilter
|
||||
v-model:visible="createUserFilterVisible"
|
||||
|
@ -185,6 +191,7 @@
|
|||
v-model:visible="detailVisible"
|
||||
:detail-id="activeDetailId"
|
||||
:detail-index="activeCaseIndex"
|
||||
:detail-default-tab="activeDetailTab"
|
||||
:current-platform="currentPlatform"
|
||||
:table-data="propsRes.data"
|
||||
:page-change="propsEvent.pageChange"
|
||||
|
@ -273,6 +280,7 @@
|
|||
const detailVisible = ref(false);
|
||||
const activeDetailId = ref<string>('');
|
||||
const activeCaseIndex = ref<number>(0);
|
||||
const activeDetailTab = ref<string>('');
|
||||
const currentDeleteObj = reactive<{ id: string; title: string }>({ id: '', title: '' });
|
||||
const deleteVisible = ref(false);
|
||||
const batchEditVisible = ref(false);
|
||||
|
@ -407,7 +415,7 @@
|
|||
{
|
||||
title: 'bugManagement.numberOfCase',
|
||||
dataIndex: 'relationCaseCount',
|
||||
slotName: 'numberOfCase',
|
||||
slotName: 'relationCaseCount',
|
||||
width: 80,
|
||||
showDrag: true,
|
||||
showInTable: true,
|
||||
|
@ -677,9 +685,17 @@
|
|||
detailVisible.value = true;
|
||||
activeDetailId.value = id;
|
||||
activeCaseIndex.value = rowIndex - 1;
|
||||
activeDetailTab.value = 'detail';
|
||||
}
|
||||
};
|
||||
|
||||
const showRelateCaseCount = async (id: string, rowIndex: number) => {
|
||||
detailVisible.value = true;
|
||||
activeDetailId.value = id;
|
||||
activeCaseIndex.value = rowIndex - 1;
|
||||
activeDetailTab.value = 'case';
|
||||
};
|
||||
|
||||
const handleCopy = (record: BugListItem) => {
|
||||
router.push({
|
||||
name: RouteEnum.BUG_MANAGEMENT_DETAIL,
|
||||
|
|
Loading…
Reference in New Issue