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() { function handleDrawerCancel() {
showDrawer.value = false; showDrawer.value = false;
} }
watch(
() => showDrawer.value,
(val) => {
if (!val) {
selectFile.value = [];
}
}
);
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>

View File

@ -28,7 +28,17 @@
@clear="searchList" @clear="searchList"
/></div> /></div>
</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 }"> <template #name="{ record }">
<MsTag <MsTag
v-if="record.fileType.toLowerCase() === 'jar'" v-if="record.fileType.toLowerCase() === 'jar'"

View File

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

View File

@ -818,7 +818,7 @@
fetchData(); fetchData();
if (route.query.id) { 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 <a-form-item
v-if="form.selectedAttrsId === 'systemTags'" v-if="form.selectedAttrsId === 'systemTags'"
field="tags" field="tags"
:validate-trigger="['blur', 'input']"
:label="t('caseManagement.featureCase.batchUpdate')" :label="t('caseManagement.featureCase.batchUpdate')"
asterisk-position="end" asterisk-position="end"
:rules="[{ required: true, message: t('caseManagement.featureCase.PleaseInputTags') }]" :rules="[{ required: true, message: t('caseManagement.featureCase.PleaseInputTags') }]"

View File

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

View File

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

View File

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

View File

@ -339,6 +339,7 @@
function handleDrawerCancel() { function handleDrawerCancel() {
linkDemandDrawer.value = false; linkDemandDrawer.value = false;
platformKeyword.value = '';
} }
// //
async function cancelLink(record: DemandItem) { 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 根模块名称列表 * @param names 根模块名称列表
*/ */
function setRootModules(names: string[]) { function setRootModules(names: string[], isSetDefaultKey: boolean) {
rootModulesName.value = names; rootModulesName.value = names;
if (isSetDefaultKey) {
activeFolder.value = 'all';
}
} }
// //