mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-01 19:49:10 +08:00
fix: 修复缺陷管理等bug
This commit is contained in:
parent
3a2adf5889
commit
ec3cc8b8c0
@ -1,4 +1,6 @@
|
||||
export interface BatchModel {
|
||||
import type { TableQueryParams } from '@/models/common';
|
||||
|
||||
export interface BatchModel extends TableQueryParams {
|
||||
id?: string;
|
||||
organizationId?: string;
|
||||
memberIds?: string[];
|
||||
|
@ -108,14 +108,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.showType,
|
||||
(val) => {
|
||||
if (val === 'Storage') {
|
||||
initRepositories();
|
||||
}
|
||||
watchEffect(() => {
|
||||
if (props.showType === 'Storage') {
|
||||
initRepositories();
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* 初始化模块文件数量
|
||||
|
@ -776,6 +776,10 @@
|
||||
.left-bug-detail {
|
||||
height: 88%;
|
||||
}
|
||||
.tab-pane-container {
|
||||
@apply flex-1 overflow-y-auto px-4;
|
||||
.ms-scroll-bar();
|
||||
}
|
||||
//:deep(.w-full .arco-form-item-label) {
|
||||
// display: inline-block;
|
||||
// width: 100%;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="pr-4">
|
||||
<div class="pl-2 pt-4">
|
||||
<a-scrollbar
|
||||
:style="{
|
||||
overflow: 'auto',
|
||||
|
@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<MsCard
|
||||
:special-height="10"
|
||||
no-content-padding
|
||||
divider-has-p-x
|
||||
has-breadcrumb
|
||||
:title="title"
|
||||
:loading="loading"
|
||||
@ -22,7 +19,7 @@
|
||||
</template>
|
||||
<a-form ref="formRef" :model="form" layout="vertical">
|
||||
<div class="flex flex-row">
|
||||
<div class="left mt-[16px] min-w-[732px] grow pl-[24px]">
|
||||
<div class="left mt-[16px] min-w-[732px] grow">
|
||||
<!-- 平台默认模板不展示缺陷名称, 描述 -->
|
||||
<a-form-item
|
||||
v-if="!isPlatformDefaultTemplate"
|
||||
|
@ -851,18 +851,6 @@
|
||||
checkSyncStatus();
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
setLoadListParams({ projectId: projectId.value });
|
||||
setCurrentPlatform();
|
||||
setExportOptionData();
|
||||
initFilterOptions();
|
||||
fetchData();
|
||||
if (route.query.id) {
|
||||
// 分享或成功进来的页面
|
||||
handleShowDetail(route.query.id as string, 0);
|
||||
}
|
||||
});
|
||||
|
||||
let customColumns: MsTableColumn = [];
|
||||
async function getColumnHeaders() {
|
||||
try {
|
||||
@ -883,6 +871,19 @@
|
||||
await getColumnHeaders();
|
||||
|
||||
await tableStore.initColumn(TableKeyEnum.BUG_MANAGEMENT, columns.concat(customColumns), 'drawer');
|
||||
|
||||
onMounted(() => {
|
||||
setLoadListParams({ projectId: projectId.value });
|
||||
setCurrentPlatform();
|
||||
setExportOptionData();
|
||||
initFilterOptions();
|
||||
fetchData();
|
||||
if (route.query.id) {
|
||||
// 分享或成功进来的页面
|
||||
handleShowDetail(route.query.id as string, 0);
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
// 组件销毁时关闭轮询
|
||||
pause();
|
||||
|
@ -369,20 +369,6 @@
|
||||
return customFieldToColumns(res);
|
||||
};
|
||||
|
||||
const customColumns = await getCustomFieldColumns();
|
||||
|
||||
customColumns.forEach((item) => {
|
||||
if (item.title === '严重程度' || item.title === 'Bug Degree') {
|
||||
item.showInTable = true;
|
||||
item.titleSlotName = 'severityFilter';
|
||||
item.slotName = 'severity';
|
||||
} else {
|
||||
item.showInTable = false;
|
||||
}
|
||||
});
|
||||
|
||||
await tableStore.initColumn(TableKeyEnum.BUG_MANAGEMENT_RECYCLE, columns.concat(customColumns), 'drawer');
|
||||
|
||||
const { propsRes, propsEvent, loadList, setKeyword, setLoadListParams, setProps } = useTable(
|
||||
getRecycleList,
|
||||
{
|
||||
@ -534,6 +520,28 @@
|
||||
statusFilterOptions.value = res.statusOption;
|
||||
}
|
||||
|
||||
let customColumns: MsTableColumn = [];
|
||||
|
||||
async function getColumnHeaders() {
|
||||
try {
|
||||
customColumns = await getCustomFieldColumns();
|
||||
customColumns.forEach((item) => {
|
||||
if (item.title === '严重程度' || item.title === 'Bug Degree') {
|
||||
item.showInTable = true;
|
||||
item.titleSlotName = 'severityFilter';
|
||||
item.slotName = 'severity';
|
||||
} else {
|
||||
item.showInTable = false;
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
await getColumnHeaders();
|
||||
|
||||
await tableStore.initColumn(TableKeyEnum.BUG_MANAGEMENT_RECYCLE, columns.concat(customColumns), 'drawer');
|
||||
|
||||
onMounted(() => {
|
||||
setLoadListParams({ projectId: projectId.value });
|
||||
initFilterOptions();
|
||||
|
@ -258,13 +258,29 @@
|
||||
const batchVisible = ref<boolean>(false);
|
||||
const batchAction = ref('');
|
||||
const batchModalRef = ref();
|
||||
const batchParams = ref<BatchActionQueryParams>({
|
||||
selectedIds: [],
|
||||
selectAll: false,
|
||||
excludeIds: [],
|
||||
currentSelectCount: 0,
|
||||
});
|
||||
|
||||
// 添加到用户组
|
||||
const addUserGroup = async (target: string[]) => {
|
||||
const { selectedIds, excludeIds, selectAll } = batchParams.value;
|
||||
const params = {
|
||||
projectId: lastProjectId.value,
|
||||
userIds: selectData.value,
|
||||
roleIds: target,
|
||||
selectAll: !!selectAll,
|
||||
excludeIds: excludeIds || [],
|
||||
selectIds: selectedIds || [],
|
||||
keyword: props.keyword,
|
||||
condition: {
|
||||
keyword: props.keyword,
|
||||
filter: propsRes.value.filter,
|
||||
combine: batchParams.value.condition,
|
||||
},
|
||||
};
|
||||
try {
|
||||
await batchModalRef.value.batchRequestFun(addProjectUserGroup, params);
|
||||
@ -277,6 +293,7 @@
|
||||
|
||||
// 表格批量处理
|
||||
const handleTableBatch = (event: BatchActionParams, params: BatchActionQueryParams) => {
|
||||
batchParams.value = params;
|
||||
selectData.value = params.selectedIds;
|
||||
if (event.eventTag === 'batchActionRemove') {
|
||||
batchRemoveHandler();
|
||||
|
@ -147,6 +147,7 @@
|
||||
import { characterLimit, formatPhoneNumber } from '@/utils';
|
||||
import { hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import type { TableQueryParams } from '@/models/common';
|
||||
import type { AddOrUpdateMemberModel, BatchAddProjectModel, LinkList, MemberItem } from '@/models/setting/member';
|
||||
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||
|
||||
@ -313,13 +314,30 @@
|
||||
];
|
||||
|
||||
const batchAction = ref('');
|
||||
const batchParams = ref<BatchActionQueryParams>({
|
||||
selectedIds: [],
|
||||
selectAll: false,
|
||||
excludeIds: [],
|
||||
currentSelectCount: 0,
|
||||
});
|
||||
|
||||
// 添加到项目和用户组
|
||||
const addProjectOrAddUserGroup = async (target: string[], type: string) => {
|
||||
const currentType = batchList.find((item) => item.type === type);
|
||||
const params: BatchAddProjectModel = {
|
||||
|
||||
const { selectedIds, excludeIds, selectAll } = batchParams.value;
|
||||
const params: TableQueryParams = {
|
||||
organizationId: lastOrganizationId.value,
|
||||
memberIds: selectedData.value,
|
||||
selectAll: !!selectAll,
|
||||
excludeIds: excludeIds || [],
|
||||
selectIds: selectedIds || [],
|
||||
keyword: keyword.value,
|
||||
condition: {
|
||||
keyword: keyword.value,
|
||||
filter: propsRes.value.filter,
|
||||
combine: batchParams.value.condition,
|
||||
},
|
||||
};
|
||||
if (type === 'project') {
|
||||
params.projectIds = target;
|
||||
@ -334,6 +352,7 @@
|
||||
// 批量操作
|
||||
const handleTableBatch = (event: BatchActionParams, params: BatchActionQueryParams) => {
|
||||
showBatchModal.value = true;
|
||||
batchParams.value = params;
|
||||
selectedData.value = params.selectedIds;
|
||||
if (event.eventTag) batchAction.value = event.eventTag;
|
||||
if (event.eventTag === 'batchAddProject') getData(getProjectList);
|
||||
|
Loading…
Reference in New Issue
Block a user