Skip to content

Commit

Permalink
fix: 修改全局bugs_Global
Browse files Browse the repository at this point in the history
  • Loading branch information
fit2cloudwxx authored and fit2-zhao committed Apr 18, 2024
1 parent cc340ce commit 6902b78
Show file tree
Hide file tree
Showing 28 changed files with 248 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function addProjectUserGroup(data: ActionProjectMember) {
}

// 批量移除项目成员
export function batchRemoveMember(data: ActionProjectMember) {
export function batchRemoveMember(data: TableQueryParams) {
return MSR.post({ url: BatchRemoveMemberUrl, data });
}

Expand Down
22 changes: 22 additions & 0 deletions frontend/src/assets/style/global.less
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,25 @@ body {
border: 0.5px solid var(--color-text-input-border); /* 设置近似 0.5px 的边框 */
border-radius: 4px;
}
.markdown-body ol {
list-style: decimal !important;
}
.markdown-body ul {
list-style: disc !important;
}
.markdown-body ul li[data-type='taskItem'] {
height: 24px;
line-height: 24px;
list-style: none !important;
@apply my-6 flex items-center;
label {
margin-right: 4px;
@apply flex items-center;
}
> div {
@apply flex items-center;
> p {
margin-bottom: 0;
}
}
}
4 changes: 2 additions & 2 deletions frontend/src/components/business/ms-batch-modal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<template #title>
{{ batchTitle }}
<div class="text-[var(--color-text-4)]">
{{ t('msBatchModal.batchModalSubTitle', { count: (props.selectData || []).length }) }}
{{ t('msBatchModal.batchModalSubTitle', { count: props.currentSelectCount }) }}
</div>
</template>
<a-spin :loading="loading" class="w-full">
Expand Down Expand Up @@ -63,7 +63,7 @@
defineProps<{
visible: boolean;
action: string;
selectData: string[] | undefined;
currentSelectCount: number | undefined;
}>(),
{
visible: false,
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/business/ms-case-associate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@
keyword: keyword.value,
projectId: innerProject.value,
excludeIds: [...props.associatedIds], // 已经存在的关联的id列表
condition: {
keyword: keyword.value,
},
});
if (props.hasNotAssociatedIds && props.hasNotAssociatedIds.length > 0) {
props.hasNotAssociatedIds.forEach((hasNotAssociatedId) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@
Object.keys(config).forEach((key) => {
const value = res[configKey][key];
config[key] = value || config[key];
dynamicForm.value[configKey].status = value !== undefined ? 1 : 0;
// @desc 填过的一定是通过的 未通过的没有保留 根据填过来判断状态
dynamicForm.value[configKey].status = value ? 1 : 0;
});
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<template>
<MsDrawer v-model:visible="innerVisible" :title="t('ms.personal')" :width="960" :footer="false" no-content-padding>
<MsDrawer
v-model:visible="innerVisible"
:title="t('ms.personal')"
:width="960"
:footer="false"
unmount-on-close
no-content-padding
>
<div class="flex h-full w-full">
<div class="h-full w-[208px] bg-[var(--color-text-n9)]">
<MsMenuPanel
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/pure/ms-rich-text/MsRichText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,12 @@
ExtensionHistory,
ExtensionHorizontalRule,
ExtensionItalic,
ExtensionOrderedList,
// ExtensionOrderedList,
ExtensionOrderedList.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
}),
ExtensionStrike,
ExtensionText,
ExtensionImage.configure({
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/views/api-test/components/condition/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
:sql-code-editor-height="props.sqlCodeEditorHeight"
@copy="copyListItem"
@delete="deleteListItem"
@change="emit('change')"
@change="changeHandler"
/>
</div>
</template>
Expand Down Expand Up @@ -244,6 +244,10 @@
}
});
function changeHandler() {
emit('change');
}
defineExpose({
activeItemId,
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/api-test/components/condition/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{{ `${t('apiTestDebug.wait')}${item.delay}` }} ms
</div>
<div v-else class="flex min-w-[42px] items-center justify-between">
<div class="one-line-text"> {{ t(conditionTypeNameMap[item.processorType]) }}</div>
<div class="one-line-text"> {{ item.name || t(conditionTypeNameMap[item.processorType]) }}</div>
<a-badge
v-if="item.processorType === RequestConditionProcessor.REQUEST_SCRIPT"
class="ml-1 mt-[2px] min-w-[48px]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,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 { ApiDefinitionDetail } from '@/models/apiTest/management';
Expand Down Expand Up @@ -664,7 +665,7 @@
* 删除接口
*/
function deleteApi(record?: ApiDefinitionDetail, isBatch?: boolean, params?: BatchActionQueryParams) {
let title = t('apiTestManagement.deleteApiTipTitle', { name: record?.name });
let title = t('apiTestManagement.deleteApiTipTitle', { name: characterLimit(record?.name) });
let selectIds = [record?.id || ''];
if (isBatch) {
title = t('apiTestManagement.batchDeleteApiTip', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,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 { ApiCaseDetail } from '@/models/apiTest/management';
Expand Down Expand Up @@ -788,7 +789,7 @@
? t('case.batchDeleteCaseTip', {
count: batchParams.value.currentSelectCount || tableSelected.value.length,
})
: t('apiTestManagement.deleteApiTipTitle', { name: record?.name });
: t('apiTestManagement.deleteApiTipTitle', { name: characterLimit(record?.name) });
openModal({
type: 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,14 @@
'bg-white',
]"
>
<MsSplitBox expand-direction="right" :max="0.7" :min="0.7" :size="900" direction="horizontal">
<MsSplitBox
expand-direction="right"
:size="0.8"
:max="0.7"
:min="0.6"
direction="horizontal"
:class="{ 'left-bug-detail': activeTab === 'comment' }"
>
<template #first>
<div class="leftWrapper h-full">
<a-spin :loading="detailLoading" class="w-full">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
batchParams: BatchActionQueryParams;
activeFolder: string;
offspringIds: string[];
condition?: TableQueryParams;
}>();
const emits = defineEmits<{
Expand Down Expand Up @@ -186,6 +187,9 @@
tags: form.value.tags,
moduleIds: props.activeFolder === 'all' ? [] : [props.activeFolder, ...props.offspringIds],
customField: form.value.selectedAttrsId === 'systemTags' ? {} : customField,
condition: {
...props.condition,
},
};
await batchEditAttrs(params);
Message.success(t('caseManagement.featureCase.editSuccess'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
ref="wrapperRef"
:class="[`${!commentInputIsActive ? 'h-[calc(100%-72px)]' : 'h-[calc(100%-286px)]'}`, 'bg-white']"
>
<MsSplitBox :size="900" :max="0.7" :min="0.5" direction="horizontal" expand-direction="right">
<MsSplitBox :size="0.8" :max="0.7" :min="0.6" direction="horizontal" expand-direction="right">
<template #first>
<div class="leftWrapper h-full">
<div class="header h-[50px]">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,10 @@
v-if="showBatchMoveDrawer"
ref="caseTreeRef"
v-model:selected-keys="selectedModuleKeys"
v-model:group-keyword="groupKeyword"
:active-folder="props.activeFolder"
:is-expand-all="true"
is-modal
:is-modal="true"
@case-node-select="caseNodeSelect"
></FeatureCaseTree>
</a-modal>
Expand All @@ -364,6 +365,7 @@
:batch-params="batchParams"
:active-folder="props.activeFolder"
:offspring-ids="props.offspringIds"
:condition="conditionParams"
@success="successHandler"
/>
<CaseDetailDrawer
Expand Down Expand Up @@ -479,6 +481,7 @@
const keyword = ref<string>('');
const filterRowCount = ref(0);
const groupKeyword = ref<string>('');
const showType = ref<string>('list');
Expand Down Expand Up @@ -934,6 +937,12 @@
const caseFilters = ref<string[]>([]);
const executeResultFilters = ref<string[]>([]);
const conditionParams = ref({
keyword: '',
filter: {},
combine: {},
});
async function initTableParams() {
let moduleIds: string[] = [];
if (props.activeFolder && props.activeFolder !== 'all') {
Expand All @@ -943,11 +952,18 @@
moduleIds = [...featureCaseStore.moduleId, ...props.offspringIds];
}
}
conditionParams.value = {
keyword: keyword.value,
filter: propsRes.value.filter,
combine: batchParams.value.condition,
};
return {
keyword: keyword.value,
moduleIds,
projectId: currentProjectId.value,
excludeIds: batchParams.value.excludeIds,
selectAll: batchParams.value.selectAll,
selectIds: batchParams.value.selectedIds as string[],
filter: {
reviewStatus: statusFilters.value,
caseLevel: caseFilters.value,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
<template>
<a-spin class="min-h-[400px] w-full" :loading="loading">
<a-input
v-if="props.isModal"
v-model:model-value="moduleKeyword"
:placeholder="t('caseManagement.caseReview.folderSearchPlaceholder')"
allow-clear
class="mb-[16px]"
:max-length="255"
/>
<MsTree
v-model:focus-node-key="focusNodeKey"
:selected-keys="props.selectedKeys"
:data="caseTree"
:keyword="props.groupKeyword"
:keyword="moduleKeyword"
:node-more-actions="caseMoreActions"
:expand-all="props.isExpandAll"
:empty-text="t('common.noData')"
Expand Down Expand Up @@ -69,6 +77,7 @@

<script setup lang="ts">
import { computed, ref, watch } from 'vue';
import { useVModel } from '@vueuse/core';
import { Message } from '@arco-design/web-vue';
import MsButton from '@/components/pure/ms-button/index.vue';
Expand All @@ -84,6 +93,7 @@
moveCaseModuleTree,
updateCaseModuleTree,
} from '@/api/modules/case-management/featureCase';
import { ProjectMemberOptions } from '@/api/requrls/project-management/projectMember';
import { useI18n } from '@/hooks/useI18n';
import useModal from '@/hooks/useModal';
import useAppStore from '@/store/modules/app';
Expand All @@ -108,15 +118,17 @@
isExpandAll: boolean; // 是否展开用例节点
allNames?: string[]; // 所有的模块name列表
modulesCount?: Record<string, number>; // 模块数量统计对象
groupKeyword?: string; // 搜索关键字
groupKeyword: string; // 搜索关键字
}>();
const emits = defineEmits(['update:selectedKeys', 'caseNodeSelect', 'init', 'dragUpdate']);
const emits = defineEmits(['update:selectedKeys', 'caseNodeSelect', 'init', 'dragUpdate', 'update:groupKeyword']);
const currentProjectId = computed(() => appStore.currentProjectId);
const caseTree = ref<ModuleTreeNode[]>([]);
const moduleKeyword = useVModel(props, 'groupKeyword', emits);
const setFocusKey = (node: MsTreeNodeData) => {
focusNodeKey.value = node.id || '';
};
Expand Down Expand Up @@ -160,7 +172,7 @@
caseTree.value = mapTree<ModuleTreeNode>(res, (e) => {
return {
...e,
hideMoreAction: e.id === 'root',
hideMoreAction: e.id === 'root' || props.isModal,
draggable: e.id !== 'root' && !props.isModal,
disabled: e.id === props.activeFolder && props.isModal,
count: props.modulesCount?.[e.id] || 0,
Expand Down Expand Up @@ -345,7 +357,7 @@
};
}
return {
height: 'calc(100vh - 335px)',
height: 'calc(100vh - 294px)',
threshold: 200,
fixedSize: true,
buffer: 15,
Expand All @@ -370,6 +382,7 @@
caseTree.value = mapTree<ModuleTreeNode>(caseTree.value, (node) => {
return {
...node,
hideMoreAction: props.isModal,
count: obj?.[node.id] || 0,
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@confirm="handleDrawerConfirm"
@cancel="handleDrawerCancel"
>
<div class="flex items-center justify-between">
<div class="mb-4 flex items-center justify-between">
<div class="font-medium">{{ t('caseManagement.featureCase.defectList') }}</div>
<div>
<a-input-search
Expand Down Expand Up @@ -185,6 +185,7 @@
searchMode: 'AND',
combine: {},
caseId: props.caseId,
condition: { keyword: keyword.value },
};
showDrawer.value = false;
emit('save', params);
Expand All @@ -207,8 +208,8 @@
() => props.visible,
(val) => {
if (val) {
getFetch();
resetSelector();
getFetch();
}
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@
sourceId: props.caseId,
projectId: currentProjectId.value,
sourceType: currentSelectCase.value,
condition: {
keyword: keyword.value,
},
});
await loadList();
featureCaseStore.getCaseCounts(props.caseId);
Expand Down

0 comments on commit 6902b78

Please sign in to comment.