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"
|
:name="item.slotName"
|
||||||
v-bind="{ record, rowIndex, column, dataIndex: item.dataIndex, columnConfig: item }"
|
v-bind="{ record, rowIndex, column, dataIndex: item.dataIndex, columnConfig: item }"
|
||||||
>
|
>
|
||||||
{{ record[item.dataIndex as string] || (attrs.emptyDataShowLine ? '-' : '') }}
|
{{ getDisplayValue(record[item.dataIndex as string]) }}
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -374,6 +374,15 @@
|
||||||
const isEnter = ref<boolean>(false);
|
const isEnter = ref<boolean>(false);
|
||||||
|
|
||||||
const { rowKey }: Partial<MsTableProps<any>> = attrs;
|
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 = ({
|
const currentSpanMethod = ({
|
||||||
rowIndex,
|
rowIndex,
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
</MsButton>
|
</MsButton>
|
||||||
<a-divider v-permission="['PROJECT_TEST_PLAN:READ+ASSOCIATION']" direction="vertical" :margin="8"></a-divider>
|
<a-divider v-permission="['PROJECT_TEST_PLAN:READ+ASSOCIATION']" direction="vertical" :margin="8"></a-divider>
|
||||||
<MsPopconfirm
|
<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')"
|
:sub-title-tip="t('testPlan.featureCase.disassociateTipContent')"
|
||||||
:ok-text="t('common.confirm')"
|
:ok-text="t('common.confirm')"
|
||||||
:loading="disassociateLoading"
|
:loading="disassociateLoading"
|
||||||
|
@ -191,6 +191,7 @@
|
||||||
import useModal from '@/hooks/useModal';
|
import useModal from '@/hooks/useModal';
|
||||||
import useTableStore from '@/hooks/useTableStore';
|
import useTableStore from '@/hooks/useTableStore';
|
||||||
import useAppStore from '@/store/modules/app';
|
import useAppStore from '@/store/modules/app';
|
||||||
|
import { characterLimit } from '@/utils';
|
||||||
import { hasAnyPermission } from '@/utils/permission';
|
import { hasAnyPermission } from '@/utils/permission';
|
||||||
|
|
||||||
import { ReviewUserItem } from '@/models/caseManagement/caseReview';
|
import { ReviewUserItem } from '@/models/caseManagement/caseReview';
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
<div class="folder-name">{{ t('caseManagement.caseReview.allCases') }}</div>
|
<div class="folder-name">{{ t('caseManagement.caseReview.allCases') }}</div>
|
||||||
<div class="folder-count">({{ allCount }})</div>
|
<div class="folder-count">({{ allCount }})</div>
|
||||||
</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>
|
</div>
|
||||||
<a-divider class="my-[8px]" />
|
<a-divider class="my-[8px]" />
|
||||||
<a-spin class="min-h-[200px] w-full" :loading="loading">
|
<a-spin class="min-h-[200px] w-full" :loading="loading">
|
||||||
|
@ -51,6 +58,7 @@
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useVModel } from '@vueuse/core';
|
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 MsIcon from '@/components/pure/ms-icon-font/index.vue';
|
||||||
import MsTree from '@/components/business/ms-tree/index.vue';
|
import MsTree from '@/components/business/ms-tree/index.vue';
|
||||||
import type { MsTreeNodeData } from '@/components/business/ms-tree/types';
|
import type { MsTreeNodeData } from '@/components/business/ms-tree/types';
|
||||||
|
@ -63,7 +71,6 @@
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modulesCount?: Record<string, number>; // 模块数量统计对象
|
modulesCount?: Record<string, number>; // 模块数量统计对象
|
||||||
isExpandAll?: boolean; // 是否展开所有节点
|
|
||||||
selectedKeys: string[]; // 选中的节点 key
|
selectedKeys: string[]; // 选中的节点 key
|
||||||
}>();
|
}>();
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -85,14 +92,10 @@
|
||||||
|
|
||||||
const activeFolder = ref<string>('all');
|
const activeFolder = ref<string>('all');
|
||||||
const allCount = ref(0);
|
const allCount = ref(0);
|
||||||
const isExpandAll = ref(props.isExpandAll);
|
const isExpandAll = ref(false);
|
||||||
|
function expandHandler() {
|
||||||
watch(
|
isExpandAll.value = !isExpandAll.value;
|
||||||
() => props.isExpandAll,
|
}
|
||||||
(val) => {
|
|
||||||
isExpandAll.value = val;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function getFolderClass(id: string) {
|
function getFolderClass(id: string) {
|
||||||
return activeFolder.value === id ? 'folder-text folder-text--active' : 'folder-text';
|
return activeFolder.value === id ? 'folder-text folder-text--active' : 'folder-text';
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<ExecuteForm v-model:form="form" is-dblclick-placeholder class="execute-form" />
|
<ExecuteForm v-model:form="form" is-dblclick-placeholder class="execute-form" />
|
||||||
<a-button
|
<a-button type="primary" class="mt-[12px]" :loading="submitLoading" @click="() => submit()">
|
||||||
type="primary"
|
|
||||||
class="mt-[12px]"
|
|
||||||
:disabled="submitDisabled"
|
|
||||||
:loading="submitLoading"
|
|
||||||
@click="() => submit()"
|
|
||||||
>
|
|
||||||
{{ t('caseManagement.caseReview.commitResult') }}
|
{{ t('caseManagement.caseReview.commitResult') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-modal
|
<a-modal
|
||||||
|
@ -17,7 +11,6 @@
|
||||||
body-class="p-0"
|
body-class="p-0"
|
||||||
:width="800"
|
:width="800"
|
||||||
:cancel-button-props="{ disabled: submitLoading }"
|
:cancel-button-props="{ disabled: submitLoading }"
|
||||||
:ok-button-props="{ disabled: submitDisabled }"
|
|
||||||
:ok-loading="submitLoading"
|
:ok-loading="submitLoading"
|
||||||
:ok-text="t('caseManagement.caseReview.commitResult')"
|
:ok-text="t('caseManagement.caseReview.commitResult')"
|
||||||
@before-ok="submit"
|
@before-ok="submit"
|
||||||
|
@ -27,7 +20,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useEventListener } from '@vueuse/core';
|
import { useEventListener } from '@vueuse/core';
|
||||||
import { Message } from '@arco-design/web-vue';
|
import { Message } from '@arco-design/web-vue';
|
||||||
|
|
||||||
|
@ -60,11 +53,6 @@
|
||||||
|
|
||||||
const modalVisible = ref(false);
|
const modalVisible = ref(false);
|
||||||
const submitLoading = ref(false);
|
const submitLoading = ref(false);
|
||||||
const submitDisabled = computed(
|
|
||||||
() =>
|
|
||||||
form.value.lastExecResult !== 'SUCCESS' &&
|
|
||||||
(form.value.content === '' || form.value.content?.trim() === '<p style=""></p>')
|
|
||||||
);
|
|
||||||
|
|
||||||
// 双击富文本内容打开弹窗
|
// 双击富文本内容打开弹窗
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
|
@ -395,6 +395,7 @@
|
||||||
if (activeId.value !== item.id) {
|
if (activeId.value !== item.id) {
|
||||||
activeCaseId.value = item.caseId;
|
activeCaseId.value = item.caseId;
|
||||||
activeId.value = item.id;
|
activeId.value = item.id;
|
||||||
|
activeTab.value = 'detail';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
v-if="activeTab === 'featureCase'"
|
v-if="activeTab === 'featureCase'"
|
||||||
ref="featureCaseRef"
|
ref="featureCaseRef"
|
||||||
:repeat-case="detail.repeatCase"
|
:repeat-case="detail.repeatCase"
|
||||||
@refresh="getStatistics"
|
@refresh="initDetail"
|
||||||
/>
|
/>
|
||||||
<!-- TODO 先不上 -->
|
<!-- TODO 先不上 -->
|
||||||
<!-- <BugManagement v-if="activeTab === 'defectList'" :plan-id="detail.id" /> -->
|
<!-- <BugManagement v-if="activeTab === 'defectList'" :plan-id="detail.id" /> -->
|
||||||
|
@ -314,6 +314,7 @@
|
||||||
// 生成报告
|
// 生成报告
|
||||||
async function handleGenerateReport() {
|
async function handleGenerateReport() {
|
||||||
try {
|
try {
|
||||||
|
loading.value = true;
|
||||||
await generateReport({
|
await generateReport({
|
||||||
projectId: appStore.currentProjectId,
|
projectId: appStore.currentProjectId,
|
||||||
testPlanId: detail.value.id as string,
|
testPlanId: detail.value.id as string,
|
||||||
|
@ -322,6 +323,8 @@
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue