fix(测试计划): 测试计划详情缺陷
--bug=1040799 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040799 --bug=1040861 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040861 --bug=1040917 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040917 --bug=1040857 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040857 --bug=1040876 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040876 --bug=1040834 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001040834
This commit is contained in:
parent
93af7780c2
commit
70fcf72a21
|
@ -203,7 +203,7 @@
|
|||
:name="item.slotName"
|
||||
v-bind="{ record, rowIndex, column, dataIndex: item.dataIndex, columnConfig: item }"
|
||||
>
|
||||
{{ record[item.dataIndex as string] || (attrs.emptyDataShowLine ? '-' : '') }}
|
||||
{{ getDisplayValue(record[item.dataIndex as string]) }}
|
||||
</slot>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -374,6 +374,15 @@
|
|||
const isEnter = ref<boolean>(false);
|
||||
|
||||
const { rowKey }: Partial<MsTableProps<any>> = attrs;
|
||||
|
||||
// 显示值 (不处理0)
|
||||
function getDisplayValue(value: any) {
|
||||
if (value === '' || value === null || value === undefined || Number.isNaN(value)) {
|
||||
return attrs.emptyDataShowLine ? '-' : '';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// 第一行表格合并
|
||||
const currentSpanMethod = ({
|
||||
rowIndex,
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
</MsButton>
|
||||
<a-divider v-permission="['PROJECT_TEST_PLAN:READ+ASSOCIATION']" direction="vertical" :margin="8"></a-divider>
|
||||
<MsPopconfirm
|
||||
:title="t('testPlan.featureCase.disassociateTip', { name: record.name })"
|
||||
:title="t('testPlan.featureCase.disassociateTip', { name: characterLimit(record.name) })"
|
||||
:sub-title-tip="t('testPlan.featureCase.disassociateTipContent')"
|
||||
:ok-text="t('common.confirm')"
|
||||
:loading="disassociateLoading"
|
||||
|
@ -191,6 +191,7 @@
|
|||
import useModal from '@/hooks/useModal';
|
||||
import useTableStore from '@/hooks/useTableStore';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { characterLimit } from '@/utils';
|
||||
import { hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import { ReviewUserItem } from '@/models/caseManagement/caseReview';
|
||||
|
|
|
@ -13,6 +13,13 @@
|
|||
<div class="folder-name">{{ t('caseManagement.caseReview.allCases') }}</div>
|
||||
<div class="folder-count">({{ allCount }})</div>
|
||||
</div>
|
||||
<a-tooltip
|
||||
:content="isExpandAll ? t('testPlan.testPlanIndex.collapseAll') : t('testPlan.testPlanIndex.expandAll')"
|
||||
>
|
||||
<MsButton type="icon" status="secondary" class="!mr-0 p-[4px]" position="top" @click="expandHandler">
|
||||
<MsIcon :type="isExpandAll ? 'icon-icon_folder_collapse1' : 'icon-icon_folder_expansion1'" />
|
||||
</MsButton>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<a-divider class="my-[8px]" />
|
||||
<a-spin class="min-h-[200px] w-full" :loading="loading">
|
||||
|
@ -51,6 +58,7 @@
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useVModel } from '@vueuse/core';
|
||||
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||
import MsTree from '@/components/business/ms-tree/index.vue';
|
||||
import type { MsTreeNodeData } from '@/components/business/ms-tree/types';
|
||||
|
@ -63,7 +71,6 @@
|
|||
|
||||
const props = defineProps<{
|
||||
modulesCount?: Record<string, number>; // 模块数量统计对象
|
||||
isExpandAll?: boolean; // 是否展开所有节点
|
||||
selectedKeys: string[]; // 选中的节点 key
|
||||
}>();
|
||||
const emit = defineEmits<{
|
||||
|
@ -85,14 +92,10 @@
|
|||
|
||||
const activeFolder = ref<string>('all');
|
||||
const allCount = ref(0);
|
||||
const isExpandAll = ref(props.isExpandAll);
|
||||
|
||||
watch(
|
||||
() => props.isExpandAll,
|
||||
(val) => {
|
||||
isExpandAll.value = val;
|
||||
}
|
||||
);
|
||||
const isExpandAll = ref(false);
|
||||
function expandHandler() {
|
||||
isExpandAll.value = !isExpandAll.value;
|
||||
}
|
||||
|
||||
function getFolderClass(id: string) {
|
||||
return activeFolder.value === id ? 'folder-text folder-text--active' : 'folder-text';
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
<template>
|
||||
<ExecuteForm v-model:form="form" is-dblclick-placeholder class="execute-form" />
|
||||
<a-button
|
||||
type="primary"
|
||||
class="mt-[12px]"
|
||||
:disabled="submitDisabled"
|
||||
:loading="submitLoading"
|
||||
@click="() => submit()"
|
||||
>
|
||||
<a-button type="primary" class="mt-[12px]" :loading="submitLoading" @click="() => submit()">
|
||||
{{ t('caseManagement.caseReview.commitResult') }}
|
||||
</a-button>
|
||||
<a-modal
|
||||
|
@ -17,7 +11,6 @@
|
|||
body-class="p-0"
|
||||
:width="800"
|
||||
:cancel-button-props="{ disabled: submitLoading }"
|
||||
:ok-button-props="{ disabled: submitDisabled }"
|
||||
:ok-loading="submitLoading"
|
||||
:ok-text="t('caseManagement.caseReview.commitResult')"
|
||||
@before-ok="submit"
|
||||
|
@ -27,7 +20,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { useEventListener } from '@vueuse/core';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
|
||||
|
@ -60,11 +53,6 @@
|
|||
|
||||
const modalVisible = ref(false);
|
||||
const submitLoading = ref(false);
|
||||
const submitDisabled = computed(
|
||||
() =>
|
||||
form.value.lastExecResult !== 'SUCCESS' &&
|
||||
(form.value.content === '' || form.value.content?.trim() === '<p style=""></p>')
|
||||
);
|
||||
|
||||
// 双击富文本内容打开弹窗
|
||||
onMounted(() => {
|
||||
|
|
|
@ -395,6 +395,7 @@
|
|||
if (activeId.value !== item.id) {
|
||||
activeCaseId.value = item.caseId;
|
||||
activeId.value = item.id;
|
||||
activeTab.value = 'detail';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
v-if="activeTab === 'featureCase'"
|
||||
ref="featureCaseRef"
|
||||
:repeat-case="detail.repeatCase"
|
||||
@refresh="getStatistics"
|
||||
@refresh="initDetail"
|
||||
/>
|
||||
<!-- TODO 先不上 -->
|
||||
<!-- <BugManagement v-if="activeTab === 'defectList'" :plan-id="detail.id" /> -->
|
||||
|
@ -314,6 +314,7 @@
|
|||
// 生成报告
|
||||
async function handleGenerateReport() {
|
||||
try {
|
||||
loading.value = true;
|
||||
await generateReport({
|
||||
projectId: appStore.currentProjectId,
|
||||
testPlanId: detail.value.id as string,
|
||||
|
@ -322,6 +323,8 @@
|
|||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue