fix: 修改全局bugs_Global
This commit is contained in:
parent
cc340ce8c5
commit
6902b785e6
|
@ -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 });
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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">
|
||||
|
@ -63,7 +63,7 @@
|
|||
defineProps<{
|
||||
visible: boolean;
|
||||
action: string;
|
||||
selectData: string[] | undefined;
|
||||
currentSelectCount: number | undefined;
|
||||
}>(),
|
||||
{
|
||||
visible: false,
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -180,7 +180,12 @@
|
|||
ExtensionHistory,
|
||||
ExtensionHorizontalRule,
|
||||
ExtensionItalic,
|
||||
ExtensionOrderedList,
|
||||
// ExtensionOrderedList,
|
||||
ExtensionOrderedList.configure({
|
||||
HTMLAttributes: {
|
||||
class: 'my-custom-class',
|
||||
},
|
||||
}),
|
||||
ExtensionStrike,
|
||||
ExtensionText,
|
||||
ExtensionImage.configure({
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
:sql-code-editor-height="props.sqlCodeEditorHeight"
|
||||
@copy="copyListItem"
|
||||
@delete="deleteListItem"
|
||||
@change="emit('change')"
|
||||
@change="changeHandler"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -244,6 +244,10 @@
|
|||
}
|
||||
});
|
||||
|
||||
function changeHandler() {
|
||||
emit('change');
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
activeItemId,
|
||||
});
|
||||
|
|
|
@ -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]"
|
||||
|
|
|
@ -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';
|
||||
|
@ -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', {
|
||||
|
|
|
@ -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';
|
||||
|
@ -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',
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -79,6 +79,7 @@
|
|||
batchParams: BatchActionQueryParams;
|
||||
activeFolder: string;
|
||||
offspringIds: string[];
|
||||
condition?: TableQueryParams;
|
||||
}>();
|
||||
|
||||
const emits = defineEmits<{
|
||||
|
@ -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'));
|
||||
|
|
|
@ -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]">
|
||||
|
|
|
@ -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>
|
||||
|
@ -364,6 +365,7 @@
|
|||
:batch-params="batchParams"
|
||||
:active-folder="props.activeFolder"
|
||||
:offspring-ids="props.offspringIds"
|
||||
:condition="conditionParams"
|
||||
@success="successHandler"
|
||||
/>
|
||||
<CaseDetailDrawer
|
||||
|
@ -479,6 +481,7 @@
|
|||
|
||||
const keyword = ref<string>('');
|
||||
const filterRowCount = ref(0);
|
||||
const groupKeyword = ref<string>('');
|
||||
|
||||
const showType = ref<string>('list');
|
||||
|
||||
|
@ -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') {
|
||||
|
@ -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,
|
||||
|
|
|
@ -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')"
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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 || '';
|
||||
};
|
||||
|
@ -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,
|
||||
|
@ -345,7 +357,7 @@
|
|||
};
|
||||
}
|
||||
return {
|
||||
height: 'calc(100vh - 335px)',
|
||||
height: 'calc(100vh - 294px)',
|
||||
threshold: 200,
|
||||
fixedSize: true,
|
||||
buffer: 15,
|
||||
|
@ -370,6 +382,7 @@
|
|||
caseTree.value = mapTree<ModuleTreeNode>(caseTree.value, (node) => {
|
||||
return {
|
||||
...node,
|
||||
hideMoreAction: props.isModal,
|
||||
count: obj?.[node.id] || 0,
|
||||
};
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
@ -185,6 +185,7 @@
|
|||
searchMode: 'AND',
|
||||
combine: {},
|
||||
caseId: props.caseId,
|
||||
condition: { keyword: keyword.value },
|
||||
};
|
||||
showDrawer.value = false;
|
||||
emit('save', params);
|
||||
|
@ -207,8 +208,8 @@
|
|||
() => props.visible,
|
||||
(val) => {
|
||||
if (val) {
|
||||
getFetch();
|
||||
resetSelector();
|
||||
getFetch();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -214,6 +214,9 @@
|
|||
sourceId: props.caseId,
|
||||
projectId: currentProjectId.value,
|
||||
sourceType: currentSelectCase.value,
|
||||
condition: {
|
||||
keyword: keyword.value,
|
||||
},
|
||||
});
|
||||
await loadList();
|
||||
featureCaseStore.getCaseCounts(props.caseId);
|
||||
|
|
|
@ -63,13 +63,14 @@
|
|||
<div class="text-[var(--color-text-4)]">({{ modulesCount[activeFolder] }})</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-[8px]">
|
||||
<a-select
|
||||
<!-- TODO这个版本不做 -->
|
||||
<!-- <a-select
|
||||
v-model:model-value="version"
|
||||
:options="versionOptions"
|
||||
:placeholder="t('ms.case.associate.versionPlaceholder')"
|
||||
class="w-[200px]"
|
||||
allow-clear
|
||||
/>
|
||||
/> -->
|
||||
<a-input-search
|
||||
v-model="keyword"
|
||||
:placeholder="t('ms.case.associate.searchPlaceholder')"
|
||||
|
@ -78,10 +79,11 @@
|
|||
@press-enter="searchCase"
|
||||
@search="searchCase"
|
||||
/>
|
||||
<a-button type="outline" class="arco-btn-outline--secondary px-[8px]">
|
||||
<!-- TODO这个版本不做 -->
|
||||
<!-- <a-button type="outline" class="arco-btn-outline--secondary px-[8px]">
|
||||
<MsIcon type="icon-icon-filter" class="mr-[4px] text-[var(--color-text-4)]" />
|
||||
<div class="text-[var(--color-text-4)]">{{ t('common.filter') }}</div>
|
||||
</a-button>
|
||||
</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<ms-base-table v-bind="propsRes" no-disable v-on="propsEvent">
|
||||
|
@ -140,6 +142,7 @@
|
|||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { filter } from 'lodash-es';
|
||||
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
|
||||
|
@ -151,6 +154,7 @@
|
|||
import MsTree from '@/components/business/ms-tree/index.vue';
|
||||
import type { MsTreeNodeData } from '@/components/business/ms-tree/types';
|
||||
import TableFilter from '../../tableFilter.vue';
|
||||
import conditionStatus from '@/views/api-test/report/component/conditionStatus.vue';
|
||||
|
||||
import {
|
||||
addPrepositionRelation,
|
||||
|
@ -401,6 +405,13 @@
|
|||
filter: {
|
||||
caseLevel: caseFilters.value,
|
||||
},
|
||||
condition: {
|
||||
keyword: keyword.value,
|
||||
filter: {
|
||||
caseLevel: caseFilters.value,
|
||||
...propsRes.value.filter,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -414,6 +425,13 @@
|
|||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
excludeIds,
|
||||
condition: {
|
||||
keyword: keyword.value,
|
||||
filter: {
|
||||
caseLevel: caseFilters.value,
|
||||
...propsRes.value.filter,
|
||||
},
|
||||
},
|
||||
};
|
||||
modulesCount.value = await getCaseModulesCounts(emitTableParams);
|
||||
} catch (error) {
|
||||
|
@ -449,13 +467,16 @@
|
|||
const params = {
|
||||
id: props.caseId,
|
||||
excludeIds: [...excludeKeys],
|
||||
selectIds: selectorStatus === 'all' ? [] : [...selectedKeys],
|
||||
selectIds: [...selectedKeys] || [],
|
||||
selectAll: selectorStatus === 'all',
|
||||
moduleIds,
|
||||
versionId,
|
||||
refId: '',
|
||||
type: props.showType === 'preposition' ? 'PRE' : 'POST',
|
||||
projectId: currentProjectId.value,
|
||||
condition: {
|
||||
keyword: keyword.value,
|
||||
},
|
||||
};
|
||||
await addPrepositionRelation(params);
|
||||
Message.success(t('common.addSuccess'));
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<div
|
||||
v-else
|
||||
v-dompurify-html="detailForm?.prerequisite || '-'"
|
||||
class="markdown-body !break-words break-all"
|
||||
class="markdown-body list-item-css !break-words break-all"
|
||||
></div>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
|
|
|
@ -65,11 +65,12 @@
|
|||
<FeatureCaseTree
|
||||
ref="caseTreeRef"
|
||||
v-model:selected-keys="selectedKeys"
|
||||
v-model:group-keyword="groupKeyword"
|
||||
:all-names="rootModulesName"
|
||||
:active-folder="activeFolder"
|
||||
:is-expand-all="isExpandAll"
|
||||
:modules-count="modulesCount"
|
||||
:group-keyword="groupKeyword"
|
||||
:is-modal="false"
|
||||
@case-node-select="caseNodeSelect"
|
||||
@init="setRootModules"
|
||||
@drag-update="dragUpdate"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
position="bottom"
|
||||
class="ms-pop-confirm--hidden-icon"
|
||||
:ok-loading="loading"
|
||||
:on-before-ok="handleBeforeOk"
|
||||
:on-before-ok="beforeConfirm"
|
||||
:cancel-button-props="{ disabled: loading }"
|
||||
@popup-visible-change="reset"
|
||||
>
|
||||
|
@ -13,21 +13,19 @@
|
|||
<div class="mb-[8px] text-[14px] font-medium text-[var(--color-text-1)]">{{
|
||||
props.id ? t('system.userGroup.rename') : t('system.userGroup.createUserGroup')
|
||||
}}</div>
|
||||
<div v-outer="handleOutsideClick">
|
||||
<a-form ref="formRef" :model="form" layout="vertical">
|
||||
<a-form-item class="hidden-item" field="name" :rules="[{ validator: validateName }]">
|
||||
<a-input
|
||||
v-model="form.name"
|
||||
class="w-[245px]"
|
||||
:placeholder="t('system.userGroup.searchHolder')"
|
||||
allow-clear
|
||||
:max-length="255"
|
||||
@press-enter="handleBeforeOk(undefined)"
|
||||
@keyup.esc="handleCancel"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-form ref="formRef" :model="form" layout="vertical">
|
||||
<a-form-item class="hidden-item" field="name" :rules="[{ validator: validateName }]">
|
||||
<a-input
|
||||
v-model="form.name"
|
||||
class="w-[245px]"
|
||||
:placeholder="t('system.userGroup.searchHolder')"
|
||||
allow-clear
|
||||
:max-length="255"
|
||||
@press-enter="handleBeforeOk(undefined)"
|
||||
@keyup.esc="handleCancel"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</template>
|
||||
<slot></slot>
|
||||
</a-popconfirm>
|
||||
|
@ -139,16 +137,61 @@
|
|||
});
|
||||
};
|
||||
|
||||
function beforeConfirm(done?: (closed: boolean) => void) {
|
||||
if (loading.value) return;
|
||||
formRef.value?.validate(async (errors) => {
|
||||
if (!errors) {
|
||||
try {
|
||||
loading.value = true;
|
||||
|
||||
if (props.type === EnvAuthScopeEnum.PROJECT) {
|
||||
await updateOrAddEnv({ fileList: [], request: { ...store.currentEnvDetailInfo, name: form.name } });
|
||||
} else {
|
||||
const id = store.currentGroupId === NEW_ENV_GROUP ? undefined : store.currentGroupId;
|
||||
if (id) {
|
||||
const detail: Record<string, any> = await getGroupDetailEnv(id);
|
||||
const envGroupProject = detail?.environmentGroupInfo.filter(
|
||||
(item: any) => item.projectId && item.environmentId
|
||||
);
|
||||
const params = {
|
||||
id,
|
||||
name: form.name,
|
||||
description: detail.description,
|
||||
projectId: appStore.currentProjectId,
|
||||
envGroupProject,
|
||||
};
|
||||
|
||||
await groupUpdateEnv(params);
|
||||
}
|
||||
}
|
||||
Message.success(t('project.fileManagement.renameSuccess'));
|
||||
emit('success');
|
||||
handleCancel();
|
||||
if (done) {
|
||||
done(true);
|
||||
} else {
|
||||
currentVisible.value = false;
|
||||
}
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
if (done) {
|
||||
done(false);
|
||||
}
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
} else if (done) {
|
||||
done(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
currentVisible.value = props.visible;
|
||||
form.name = props.defaultName || '';
|
||||
});
|
||||
|
||||
const handleOutsideClick = () => {
|
||||
if (currentVisible.value) {
|
||||
handleCancel();
|
||||
}
|
||||
};
|
||||
function reset(val: boolean) {
|
||||
if (!val) {
|
||||
form.name = '';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div v-if="showTitle" class="title">
|
||||
<div v-if="!getIsVisited()" class="title">
|
||||
<span class="text-[var(--color-text-1)]">{{ t('project.environmental.httpTitle') }}</span>
|
||||
<span class="cursor-pointer text-[var(--color-text-2)]" @click="handleNoWarning">{{
|
||||
t('project.environmental.httpNoWarning')
|
||||
|
@ -115,6 +115,7 @@
|
|||
|
||||
import { getEnvModules } from '@/api/modules/api-test/management';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useVisit from '@/hooks/useVisit';
|
||||
import { useAppStore, useTableStore } from '@/store';
|
||||
import useProjectEnvStore from '@/store/modules/setting/useProjectEnvStore';
|
||||
import { findNodeNames } from '@/utils';
|
||||
|
@ -128,10 +129,10 @@
|
|||
|
||||
const appStore = useAppStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const visitedKey = 'notRemindHttp';
|
||||
const { addVisited, getIsVisited } = useVisit(visitedKey);
|
||||
const store = useProjectEnvStore();
|
||||
|
||||
const showTitle = computed(() => store.httpNoWarning);
|
||||
const tableStore = useTableStore();
|
||||
const addVisible = ref(false);
|
||||
const columns: MsTableColumn = [
|
||||
|
@ -229,8 +230,9 @@
|
|||
isCopy.value = false;
|
||||
addVisible.value = true;
|
||||
};
|
||||
|
||||
const handleNoWarning = () => {
|
||||
store.setHttpNoWarning(false);
|
||||
addVisited();
|
||||
};
|
||||
|
||||
watch(
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
ref="batchModalRef"
|
||||
v-model:visible="batchVisible"
|
||||
:action="batchAction"
|
||||
:select-data="selectData"
|
||||
:current-select-count="batchParams.currentSelectCount"
|
||||
@add-user-group="addUserGroup"
|
||||
/>
|
||||
</template>
|
||||
|
@ -117,6 +117,7 @@
|
|||
import { characterLimit, formatPhoneNumber } from '@/utils';
|
||||
import { hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import type { TableQueryParams } from '@/models/common';
|
||||
import {
|
||||
ActionProjectMember,
|
||||
ProjectMemberItem,
|
||||
|
@ -254,13 +255,20 @@
|
|||
};
|
||||
|
||||
// 跨页选择项
|
||||
const selectData = ref<string[] | undefined>([]);
|
||||
// const selectData = ref<string[] | undefined>([]);
|
||||
const batchParams = ref<BatchActionQueryParams>({
|
||||
selectedIds: [],
|
||||
selectAll: false,
|
||||
excludeIds: [],
|
||||
currentSelectCount: 0,
|
||||
});
|
||||
|
||||
// 批量移除项目成员
|
||||
const batchRemoveHandler = () => {
|
||||
const { selectedIds, excludeIds, selectAll } = batchParams.value;
|
||||
openModal({
|
||||
type: 'error',
|
||||
title: t('project.member.batchRemoveTip', { number: (selectData.value || []).length }),
|
||||
title: t('project.member.batchRemoveTip', { number: batchParams.value.currentSelectCount }),
|
||||
content: t('project.member.batchRemoveContent'),
|
||||
okText: t('project.member.deleteMemberConfirm'),
|
||||
cancelText: t('project.member.Cancel'),
|
||||
|
@ -269,9 +277,20 @@
|
|||
},
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
const params: ActionProjectMember = {
|
||||
const params: TableQueryParams = {
|
||||
selectAll: !!selectAll,
|
||||
excludeIds: excludeIds || [],
|
||||
selectIds: selectedIds || [],
|
||||
projectId: lastProjectId.value,
|
||||
userIds: selectData.value,
|
||||
keyword: keyword.value,
|
||||
condition: {
|
||||
keyword: keyword.value,
|
||||
filter: {
|
||||
...propsRes.value.filter,
|
||||
roleIds: roleIds.value ? [roleIds.value] : [],
|
||||
},
|
||||
combine: batchParams.value.condition,
|
||||
},
|
||||
};
|
||||
await batchRemoveMember(params);
|
||||
Message.success(t('project.member.deleteMemberSuccess'));
|
||||
|
@ -308,27 +327,22 @@
|
|||
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,
|
||||
userIds: batchParams.value.selectedIds || [],
|
||||
selectAll: !!selectAll,
|
||||
excludeIds: excludeIds || [],
|
||||
selectIds: selectedIds || [],
|
||||
keyword: keyword.value,
|
||||
roleIds: roleIds.value ? [roleIds.value] : [],
|
||||
condition: {
|
||||
keyword: keyword.value,
|
||||
filter: propsRes.value.filter,
|
||||
filter: {
|
||||
...propsRes.value.filter,
|
||||
roleIds: roleIds.value ? [roleIds.value] : [],
|
||||
},
|
||||
combine: batchParams.value.condition,
|
||||
},
|
||||
};
|
||||
|
@ -345,7 +359,6 @@
|
|||
// 表格批量处理
|
||||
const handleTableBatch = (event: BatchActionParams, params: BatchActionQueryParams) => {
|
||||
batchParams.value = params;
|
||||
selectData.value = params.selectedIds;
|
||||
if (event.eventTag === 'batchActionRemove') {
|
||||
batchRemoveHandler();
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
ref="batchModalRef"
|
||||
v-model:visible="showBatchModal"
|
||||
:action="batchAction"
|
||||
:select-data="selectedData"
|
||||
:current-select-count="batchParams.currentSelectCount"
|
||||
@add-project="addProjectOrAddUserGroup"
|
||||
@add-user-group="addProjectOrAddUserGroup"
|
||||
/>
|
||||
|
|
|
@ -5,9 +5,7 @@
|
|||
<a-alert :closable="true" class="mb-4">
|
||||
<div>
|
||||
{{ t('system.plugin.alertDescribe') }}
|
||||
<a class="mx-1" href="javascript:;">{{ t('system.plugin.viewTable') }}</a
|
||||
>{{ t('system.plugin.downAddress') }}
|
||||
<a class="mx-1" href="https://github.com/metersphere" target="_blank">{{ t('system.plugin.goDownload') }} </a>
|
||||
<span class="mx-1 text-[rgb(var(--primary-5))]" @click="openLink">{{ t('system.plugin.viewTable') }}</span>
|
||||
</div>
|
||||
</a-alert>
|
||||
<pluginTable />
|
||||
|
@ -25,6 +23,10 @@
|
|||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
function openLink() {
|
||||
window.open('https://metersphere.io/docs/v3.x/plugin/', '_blank');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
@ -42,8 +42,8 @@ export default {
|
|||
'The project can not integrate with the platform and the default template of the platform is not available, be careful!',
|
||||
'system.plugin.alertDescribe':
|
||||
'The MeterSphere v3.0 release supports plug-ins of DevOps、 API imports、 requests、 project management、 protocols、 and other types',
|
||||
'system.plugin.viewTable': 'View the form',
|
||||
'system.plugin.downAddress': 'More open source plug-ins can be downloaded here',
|
||||
'system.plugin.viewTable': 'View details',
|
||||
'system.plugin.downAddress': 'Click the link to open a new page',
|
||||
'system.plugin.goDownload': 'downloads',
|
||||
'system.plugin.deletePluginTip': 'Are you sure to delete the {name} plugin?',
|
||||
'system.plugin.disablePluginTip': 'Are you sure to disable the {name} plugin?',
|
||||
|
|
|
@ -64,8 +64,8 @@ export default {
|
|||
'system.plugin.disablePluginContent': '项目无法与该平台集成且该平台默认模板不可用,谨慎操作!',
|
||||
'system.plugin.alertDescribe':
|
||||
'MeterSphere v3.0 版本支持 DevOps、API 导入、请求、项目管理、协议 类型的插件,具体支持插件请',
|
||||
'system.plugin.viewTable': '查看表格',
|
||||
'system.plugin.downAddress': '更多开源插件,请在此下载',
|
||||
'system.plugin.viewTable': '查看详情',
|
||||
'system.plugin.downAddress': '点击新开网页打开链接',
|
||||
'system.plugin.goDownload': '去下载',
|
||||
'system.plugin.totalNum': '共',
|
||||
'system.plugin.dataList': '项数据',
|
||||
|
|
Loading…
Reference in New Issue