fix: 修改部分bugs
This commit is contained in:
parent
d117e72f1f
commit
3bf668e8f1
|
@ -34,15 +34,15 @@
|
|||
<template #name="{ record }">
|
||||
<div class="flex items-center">
|
||||
<a-tooltip :content="record.name">
|
||||
<div class="one-line-text max-w-[200px] cursor-pointer text-[rgb(var(--primary-5))]">{{ record.name }}</div>
|
||||
<div class="one-line-text max-w-[200px] cursor-pointer text-[rgb(var(--primary-5))]">{{
|
||||
characterLimit(record.name)
|
||||
}}</div>
|
||||
</a-tooltip>
|
||||
<a-popover :title="record.name" position="bottom">
|
||||
<a-button type="text" class="ml-2 px-0"> {{ t('project.commonScript.preview') }}</a-button>
|
||||
<template #title>
|
||||
<div class="w-[436px] bg-[var(--color-bg-3)] px-2 pb-2">
|
||||
<span style="word-break: break-all">
|
||||
{{ record.name }}
|
||||
</span>
|
||||
<span style="word-break: break-all"> {{ characterLimit(record.name) }} </span>
|
||||
</div>
|
||||
</template>
|
||||
<template #content>
|
||||
|
@ -169,6 +169,7 @@
|
|||
} from '@/api/modules/project-management/commonScript';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import { characterLimit } from '@/utils';
|
||||
import { hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import { BugOptionItem } from '@/models/bug-management';
|
||||
|
@ -253,6 +254,7 @@
|
|||
isTag: true,
|
||||
width: 440,
|
||||
showDrag: true,
|
||||
tagPosition: 'tr',
|
||||
},
|
||||
{
|
||||
title: 'project.commonScript.createUser',
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
:no-more-data="noMoreData"
|
||||
raggable
|
||||
:virtual-list-props="{
|
||||
height: 'calc(100vh - 160px)',
|
||||
height: 'calc(100vh - 136px)',
|
||||
}"
|
||||
@reach-bottom="handleReachBottom"
|
||||
>
|
||||
|
|
|
@ -129,6 +129,7 @@
|
|||
:tag-list="record[item.dataIndex as string]"
|
||||
type="primary"
|
||||
theme="outline"
|
||||
:tag-position="item.tagPosition"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="item.slotName === SpecialColumnEnum.OPERATION">
|
||||
|
|
|
@ -1,28 +1,11 @@
|
|||
<template>
|
||||
<div v-if="props.actionConfig" ref="refWrapper" class="flex flex-row flex-nowrap">
|
||||
<div class="title">{{ t('msTable.batch.selected', { count: props.selectRowCount }) }}</div>
|
||||
<template v-for="(element, idx) in baseAction" :key="element.label">
|
||||
<a-divider v-if="element.isDivider" class="divider mx-0 my-[6px]" />
|
||||
<a-button
|
||||
v-if="!element.isDivider && !element.children && hasAllPermission(element.permission as string[]) && hasAnyPermission(element.anyPermission as string[])"
|
||||
class="ml-[12px]"
|
||||
:class="{
|
||||
'arco-btn-outline--danger': element.danger,
|
||||
'ml-[8px]': idx === 0,
|
||||
}"
|
||||
type="outline"
|
||||
:size="props.size"
|
||||
@click="handleSelect(element)"
|
||||
>{{ t(element.label as string) }}</a-button
|
||||
>
|
||||
<!-- baseAction多菜单选择 -->
|
||||
<a-dropdown
|
||||
v-if="!element.isDivider && element.children && hasAllPermission(element.permission as string[]) && hasAnyPermission(element.anyPermission as string[])"
|
||||
position="tr"
|
||||
:size="props.size"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<div class="title one-line-text">{{ t('msTable.batch.selected', { count: props.selectRowCount }) }}</div>
|
||||
<div>
|
||||
<template v-for="(element, idx) in baseAction" :key="element.label">
|
||||
<a-divider v-if="element.isDivider" class="divider mx-0 my-[6px]" />
|
||||
<a-button
|
||||
v-if="!element.isDivider && !element.children && hasAllPermission(element.permission as string[]) && hasAnyPermission(element.anyPermission as string[])"
|
||||
class="ml-[12px]"
|
||||
:class="{
|
||||
'arco-btn-outline--danger': element.danger,
|
||||
|
@ -30,20 +13,39 @@
|
|||
}"
|
||||
type="outline"
|
||||
:size="props.size"
|
||||
@click="handleSelect"
|
||||
@click="handleSelect(element)"
|
||||
>{{ t(element.label as string) }}</a-button
|
||||
>
|
||||
<template #content>
|
||||
<template v-for="item in element.children" :key="item.label">
|
||||
<a-divider v-if="element.isDivider" margin="4px" />
|
||||
<a-doption v-else :value="item" :class="{ delete: item.danger }">
|
||||
{{ t(item.label as string) }}
|
||||
</a-doption>
|
||||
<!-- baseAction多菜单选择 -->
|
||||
<a-dropdown
|
||||
v-if="!element.isDivider && element.children && hasAllPermission(element.permission as string[]) && hasAnyPermission(element.anyPermission as string[])"
|
||||
position="tr"
|
||||
:size="props.size"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<a-button
|
||||
class="ml-[12px]"
|
||||
:class="{
|
||||
'arco-btn-outline--danger': element.danger,
|
||||
'ml-[8px]': idx === 0,
|
||||
}"
|
||||
type="outline"
|
||||
:size="props.size"
|
||||
@click="handleSelect"
|
||||
>{{ t(element.label as string) }}</a-button
|
||||
>
|
||||
<template #content>
|
||||
<template v-for="item in element.children" :key="item.label">
|
||||
<a-divider v-if="element.isDivider" margin="4px" />
|
||||
<a-doption v-else :value="item" :class="{ delete: item.danger }">
|
||||
{{ t(item.label as string) }}
|
||||
</a-doption>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<!-- baseAction多菜单选择 -->
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<!-- baseAction多菜单选择 -->
|
||||
</template>
|
||||
</div>
|
||||
<div v-if="moreActionLength > 0" class="drop-down relative ml-[8px] inline-block">
|
||||
<a-dropdown position="tr" @select="handleSelect">
|
||||
<a-button type="outline" :size="props.size"><MsIcon type="icon-icon_more_outlined" /></a-button>
|
||||
|
@ -209,7 +211,7 @@
|
|||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
max-width: 400px;
|
||||
color: var(--color-text-2);
|
||||
}
|
||||
.delete {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<a-tooltip :content="tagsTooltip">
|
||||
<a-tooltip :content="tagsTooltip" :position="props.tagPosition" :mouse-enter-delay="300">
|
||||
<div class="flex max-w-[440px] flex-row" @click="emit('click')">
|
||||
<MsTag v-for="tag of showTagList" :key="tag.id" :width="getTagWidth(tag)" :size="props.size" v-bind="attrs">
|
||||
{{ props.isStringTag ? tag : tag[props.nameKey] }}
|
||||
|
@ -23,11 +23,26 @@
|
|||
nameKey?: string;
|
||||
isStringTag?: boolean; // 是否是字符串数组的标签
|
||||
size?: Size;
|
||||
tagPosition?:
|
||||
| 'top'
|
||||
| 'tl'
|
||||
| 'tr'
|
||||
| 'bottom'
|
||||
| 'bl'
|
||||
| 'br'
|
||||
| 'left'
|
||||
| 'lt'
|
||||
| 'lb'
|
||||
| 'right'
|
||||
| 'rt'
|
||||
| 'rb'
|
||||
| undefined; // 提示位置防止窗口抖动
|
||||
}>(),
|
||||
{
|
||||
showNum: 2,
|
||||
nameKey: 'name',
|
||||
size: 'medium',
|
||||
tagPosition: 'top',
|
||||
}
|
||||
);
|
||||
const emit = defineEmits<{
|
||||
|
|
|
@ -423,7 +423,7 @@
|
|||
<template #operationPre="{ record }">
|
||||
<a-popover
|
||||
v-model:popupVisible="record.moreSettingPopoverVisible"
|
||||
position="tl"
|
||||
position="tr"
|
||||
trigger="click"
|
||||
:title="t('common.setting')"
|
||||
:content-style="{ width: '480px' }"
|
||||
|
|
|
@ -485,7 +485,8 @@
|
|||
},
|
||||
onBeforeOk: async () => {
|
||||
try {
|
||||
await batchCleanOutDefinition(await getBatchParams());
|
||||
console.log(getBatchParams(), ' getBatchParams() getBatchParams()');
|
||||
// await batchCleanOutDefinition(await getBatchParams());
|
||||
Message.success(t('common.deleteSuccess'));
|
||||
resetSelector();
|
||||
loadApiList(true);
|
||||
|
|
|
@ -588,6 +588,14 @@
|
|||
getTime();
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (route.query.type === 'API_SCENARIO') {
|
||||
showDetailDrawer.value = false;
|
||||
} else {
|
||||
showCaseDetailDrawer.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.moduleType,
|
||||
(val) => {
|
||||
|
|
|
@ -900,6 +900,10 @@
|
|||
}
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
detailVisible.value = false;
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
// 组件销毁时关闭轮询
|
||||
pause();
|
||||
|
|
|
@ -1141,6 +1141,7 @@
|
|||
};
|
||||
if (isMove.value) {
|
||||
await batchMoveToModules(params);
|
||||
groupKeyword.value = '';
|
||||
Message.success(t('caseManagement.featureCase.batchMoveSuccess'));
|
||||
} else {
|
||||
await batchCopyToModules(params);
|
||||
|
@ -1160,6 +1161,7 @@
|
|||
function handleMoveCaseModalCancel() {
|
||||
showBatchMoveDrawer.value = false;
|
||||
selectedModuleKeys.value = [];
|
||||
groupKeyword.value = '';
|
||||
}
|
||||
|
||||
function caseNodeSelect(keys: string[]) {
|
||||
|
@ -1686,6 +1688,10 @@
|
|||
}
|
||||
);
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
showDetailDrawer.value = false;
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
emitTableParams,
|
||||
initData,
|
||||
|
|
|
@ -88,6 +88,7 @@
|
|||
class="w-[152px]"
|
||||
mode="button"
|
||||
:step="100"
|
||||
:precision="0"
|
||||
:min="0"
|
||||
:default-value="1000"
|
||||
:max="600000"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<div
|
||||
v-if="!record.integrated"
|
||||
type="text"
|
||||
class="one-line-text flex w-full"
|
||||
class="one-line-text w-full"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
>{{ record.resourceNum }}
|
||||
|
@ -35,8 +35,7 @@
|
|||
<template #resourceName="{ record }">
|
||||
<div
|
||||
v-if="!record.integrated"
|
||||
type="text"
|
||||
class="one-line-text flex max-w-[300px]"
|
||||
class="one-line-text max-w-[300px]"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
>{{ record.resourceName }}
|
||||
|
@ -642,6 +641,14 @@
|
|||
}
|
||||
}
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
if (props.moduleType === 'API_CASE') {
|
||||
showCaseDetailDrawer.value = false;
|
||||
} else {
|
||||
showDetailDrawer.value = false;
|
||||
}
|
||||
});
|
||||
|
||||
await tableStore.initColumn(groupColumnsMap[props.group].key, groupColumnsMap[props.group].columns, 'drawer', true);
|
||||
</script>
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<div
|
||||
v-if="props.moduleType === TaskCenterEnum.API_SCENARIO"
|
||||
type="text"
|
||||
class="one-line-text flex w-full"
|
||||
class="one-line-text w-full"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
>{{ record.resourceNum }}
|
||||
|
@ -38,8 +38,7 @@
|
|||
<template #resourceName="{ record }">
|
||||
<div
|
||||
v-if="props.moduleType === TaskCenterEnum.API_SCENARIO"
|
||||
type="text"
|
||||
class="one-line-text flex max-w-[300px]"
|
||||
class="one-line-text max-w-[300px]"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
>{{ record.resourceName }}
|
||||
|
|
|
@ -417,6 +417,10 @@
|
|||
}
|
||||
});
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
showDetailVisible.value = false;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
fetchData();
|
||||
updateColumns();
|
||||
|
|
|
@ -18,11 +18,15 @@
|
|||
<span class="operation hover:text-[rgb(var(--primary-5))]">
|
||||
<span @click="templateManagement">{{ t('system.orgTemplate.TemplateManagementList') }}</span>
|
||||
<a-divider
|
||||
v-if="(hasEnablePermission && isEnableProject) || props.cardItem.key === 'BUG'"
|
||||
v-if="hasEnablePermission && isEnableProject && props.cardItem.key === 'BUG'"
|
||||
direction="vertical"
|
||||
/>
|
||||
</span>
|
||||
<span v-if="props.cardItem.key === 'BUG'" class="operation hover:text-[rgb(var(--primary-5))]">
|
||||
<a-divider
|
||||
v-if="!(hasEnablePermission && isEnableProject) && props.cardItem.key === 'BUG'"
|
||||
direction="vertical"
|
||||
/>
|
||||
<span @click="workflowSetup">{{ t('system.orgTemplate.workflowSetup') }}</span>
|
||||
<a-divider
|
||||
v-if="hasEnablePermission && props.mode === 'organization' && isEnableProject"
|
||||
|
|
|
@ -551,6 +551,9 @@
|
|||
}
|
||||
|
||||
function handleNameClick(record: LogItem) {
|
||||
if (record.type === 'DELETE') {
|
||||
return;
|
||||
}
|
||||
const routeQuery: Record<string, any> = {
|
||||
orgId: record.organizationId,
|
||||
pId: record.projectId,
|
||||
|
|
Loading…
Reference in New Issue