fix(测试计划): 修复测试计划拖拽限制&修复接口用例列表切换数据不正确问题&重复执行限制

This commit is contained in:
xinxin.wu 2024-06-17 20:36:40 +08:00 committed by Craftsman
parent 3d1a66ba59
commit 9bd8d96c8a
3 changed files with 23 additions and 14 deletions

View File

@ -235,6 +235,11 @@
</div>
</slot>
</template>
<!-- 控制拖拽类 -->
<template #tr="{ record }">
<tr :class="!record.parent ? 'parent-tr' : 'children-tr'" />
</template>
</a-table>
<div
v-if="showBatchAction || !!attrs.showPagination"

View File

@ -166,18 +166,7 @@
}
);
// onBeforeMount(() => {
// if (props.reportId) {
// loadCaseList();
// }
// });
watch(
() => props.reportId,
(val) => {
if (val) {
loadCaseList();
}
}
);
onMounted(() => {
loadCaseList();
});
</script>

View File

@ -251,6 +251,7 @@
<MsButton
v-if="isShowExecuteButton(record, ['PROJECT_TEST_PLAN:READ+EXECUTE'])"
class="!mx-0"
:disabled="executeId == record.id"
@click="executePlan(record)"
>{{ t('testPlan.testPlanIndex.execution') }}</MsButton
>
@ -945,7 +946,9 @@
}
}
const executeId = ref<string>('');
async function singleExecute(id: string) {
executeId.value = id;
try {
const params: ExecutePlan = {
executeId: id,
@ -957,6 +960,8 @@
fetchData();
} catch (error) {
console.log(error);
} finally {
executeId.value = '';
}
}
@ -1535,4 +1540,14 @@
padding-top: 8px;
color: var(--color-text-1);
}
:deep(.parent-tr) {
.arco-table-drag-handle {
pointer-events: none;
.arco-table-cell {
svg {
color: transparent;
}
}
}
}
</style>