fix(功能用例&缺陷管理): 修改功能用例和缺陷管理一些bug

This commit is contained in:
xinxin.wu 2024-05-28 18:56:33 +08:00 committed by 刘瑞斌
parent 7576c92ea1
commit 7ce58c3137
11 changed files with 36 additions and 138 deletions

View File

@ -242,6 +242,15 @@
function handleDrawerCancel() {
showDrawer.value = false;
}
watch(
() => showDrawer.value,
(val) => {
if (!val) {
selectFile.value = [];
}
}
);
</script>
<style lang="less" scoped>

View File

@ -28,7 +28,17 @@
@clear="searchList"
/></div>
</div>
<ms-base-table v-bind="propsRes" ref="tableRef" v-model:selected-key="selectedKey" no-disable v-on="propsEvent">
<ms-base-table
v-bind="propsRes"
ref="tableRef"
v-model:selected-key="selectedKey"
:action-config="{
baseAction: [],
moreAction: [],
}"
no-disable
v-on="propsEvent"
>
<template #name="{ record }">
<MsTag
v-if="record.fileType.toLowerCase() === 'jar'"

View File

@ -56,7 +56,7 @@
field="value"
asterisk-position="end"
:label="t('bugManagement.batchUpdate.update')"
validate-trigger="blur"
:validate-trigger="['blur', 'input']"
:rules="[{ required: true, message: t('bugManagement.batchUpdate.required.value') }]"
>
<template v-if="valueMode === 'tags'">

View File

@ -818,7 +818,7 @@
fetchData();
if (route.query.id) {
//
handleShowDetail(route.query.id as string, 0);
handleShowDetail(route.query.id as string, -1);
}
});

View File

@ -32,6 +32,7 @@
<a-form-item
v-if="form.selectedAttrsId === 'systemTags'"
field="tags"
:validate-trigger="['blur', 'input']"
:label="t('caseManagement.featureCase.batchUpdate')"
asterisk-position="end"
:rules="[{ required: true, message: t('caseManagement.featureCase.PleaseInputTags') }]"

View File

@ -1460,7 +1460,7 @@
onMounted(async () => {
if (route.query.id) {
showCaseDetail(route.query.id as string, 0);
showCaseDetail(route.query.id as string, -1);
}
await initFilter();
initData();

View File

@ -188,7 +188,8 @@
}
emits(
'init',
caseTree.value.map((e) => e.name)
caseTree.value.map((e) => e.name),
isSetDefaultKey
);
} catch (error) {
// eslint-disable-next-line no-console
@ -213,7 +214,7 @@
try {
await deleteCaseModuleTree(node.id);
Message.success(t('caseManagement.featureCase.deleteSuccess'));
initModules(selectedNodeKeys.value[0] === node.id);
initModules(true);
} catch (error) {
console.log(error);
}

View File

@ -681,6 +681,8 @@
await batchDeleteRecycleCase(getBatchParams());
Message.success(t('common.deleteSuccess'));
resetSelector();
getRecycleModules();
activeFolder.value = 'all';
initRecycleList();
} catch (error) {
console.log(error);
@ -741,6 +743,8 @@
await deleteRecycleCaseList(record.id);
Message.success(t('common.deleteSuccess'));
resetSelector();
getRecycleModules();
activeFolder.value = 'all';
initRecycleList();
} catch (error) {
console.log(error);

View File

@ -339,6 +339,7 @@
function handleDrawerCancel() {
linkDemandDrawer.value = false;
platformKeyword.value = '';
}
//
async function cancelLink(record: DemandItem) {

View File

@ -1,131 +0,0 @@
<template>
<MsDrawer
v-model:visible="showDrawer"
:mask="false"
:title="t('caseManagement.featureCase.associatedFile')"
:ok-text="t('caseManagement.featureCase.associated')"
:ok-loading="drawerLoading"
:width="1200"
:mask-closable="false"
unmount-on-close
:show-continue="false"
@confirm="handleDrawerConfirm"
@cancel="handleDrawerCancel"
>
<div class="flex items-center justify-between">
<div>XXXXXX <span>(101)</span></div>
<a-input-search
v-model="keyword"
:max-length="255"
:placeholder="t('project.member.searchMember')"
allow-clear
@search="searchHandler"
@press-enter="searchHandler"
@clear="searchHandler"
></a-input-search>
</div>
<ms-base-table ref="tableRef" v-bind="propsRes" v-on="propsEvent">
<template #demandName="{ record }">
<span class="ml-1 text-[rgb(var(--primary-5))]">
{{ record.demandName }}
<span>({{ (record.children || []).length || 0 }})</span></span
>
</template>
</ms-base-table>
</MsDrawer>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import type { MsTableColumn } from '@/components/pure/ms-table/type';
import useTable from '@/components/pure/ms-table/useTable';
import { getDemandList } from '@/api/modules/case-management/featureCase';
import { useI18n } from '@/hooks/useI18n';
const { t } = useI18n();
const columns: MsTableColumn = [
{
title: 'caseManagement.featureCase.tableColumnID',
slotName: 'demandId',
dataIndex: 'demandId',
showInTable: true,
width: 200,
},
{
title: 'caseManagement.featureCase.tableColumnName',
slotName: 'demandName',
dataIndex: 'demandName',
width: 300,
},
{
title: 'caseManagement.featureCase.platformDemandState',
width: 300,
dataIndex: 'status',
showInTable: true,
showTooltip: true,
ellipsis: true,
},
{
title: 'caseManagement.featureCase.platformDemandHandler',
width: 300,
dataIndex: 'handler',
showInTable: true,
showTooltip: true,
ellipsis: true,
},
{
title: 'caseManagement.featureCase.IterationPlan',
width: 300,
dataIndex: 'iterationPlan',
showInTable: true,
showTooltip: true,
ellipsis: true,
},
];
const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable(getDemandList, {
columns,
rowKey: 'id',
scroll: { x: '100%' },
selectable: false,
showSetting: false,
});
const showDrawer = ref<boolean>(false);
const drawerLoading = ref<boolean>(false);
function handleDrawerConfirm() {
// const selectedIds = [...propsRes.value.selectedKeys];
// tableSelected.value = propsRes.value.data.filter((item: any) => selectedIds.indexOf(item.id) > -1);
// emit('save', tableSelected.value);
// showDrawer.value = false;
// propsRes.value.selectedKeys.clear();
}
function handleDrawerCancel() {
showDrawer.value = false;
}
const keyword = ref<string>('');
const initData = async () => {
setLoadListParams({ keyword: keyword.value });
loadList();
};
const searchHandler = () => {
initData();
resetSelector();
};
onMounted(() => {
resetSelector();
});
</script>
<style scoped></style>

View File

@ -264,8 +264,11 @@
* 设置根模块名称列表
* @param names 根模块名称列表
*/
function setRootModules(names: string[]) {
function setRootModules(names: string[], isSetDefaultKey: boolean) {
rootModulesName.value = names;
if (isSetDefaultKey) {
activeFolder.value = 'all';
}
}
//