fix(功能用例): 修改缺陷管理&用例管理评论列表回复对象错误&筛选提示错误
This commit is contained in:
parent
ab359ae179
commit
2c486bafaf
|
@ -14,6 +14,7 @@
|
|||
v-model:model-value="caseType"
|
||||
class="ml-2 max-w-[100px]"
|
||||
:placeholder="t('caseManagement.featureCase.PleaseSelect')"
|
||||
@change="changeCaseTypeHandler"
|
||||
>
|
||||
<a-option v-for="item of props?.moduleOptions" :key="item.value" :value="item.value">
|
||||
{{ t(item.label) }}
|
||||
|
@ -672,17 +673,14 @@
|
|||
}
|
||||
);
|
||||
|
||||
// 用例类型改变
|
||||
watch(
|
||||
() => caseType.value,
|
||||
(val) => {
|
||||
if (val) {
|
||||
emit('update:currentSelectCase', val);
|
||||
function changeCaseTypeHandler(
|
||||
value: string | number | boolean | Record<string, any> | (string | number | boolean | Record<string, any>)[]
|
||||
) {
|
||||
caseType.value = value as keyof typeof CaseLinkEnum;
|
||||
emit('update:currentSelectCase', caseType.value);
|
||||
initModules();
|
||||
searchCase();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => innerProject.value,
|
||||
|
|
|
@ -36,11 +36,12 @@ export default defineComponent({
|
|||
},
|
||||
setup(props, { emit }) {
|
||||
const { commentList, disabled, uploadImage, previewUrl } = toRefs(props);
|
||||
const currentItem = reactive<{ id: string; commentType: CommentType; commentStatus: string }>({
|
||||
const currentItem = reactive<{ id: string; commentType: CommentType; commentStatus: string; replyId: string }>({
|
||||
id: '',
|
||||
commentType: 'ADD',
|
||||
// 控制回复编辑删除按钮的状态
|
||||
commentStatus: 'normal',
|
||||
replyId: '', // 回复人
|
||||
});
|
||||
const expendedIds = ref<string[]>([]); // 展开的评论id
|
||||
// 被@的用户id
|
||||
|
@ -75,7 +76,7 @@ export default defineComponent({
|
|||
commentType: currentItem.commentType,
|
||||
fetchType: currentItem.commentType === 'EDIT' ? 'UPDATE' : 'ADD',
|
||||
notifier: noticeUserIds.value.join(';'),
|
||||
replyUser: item.createUser,
|
||||
replyUser: currentItem.replyId || item.createUser,
|
||||
parentId,
|
||||
};
|
||||
if (currentItem.commentType === 'EDIT') {
|
||||
|
@ -106,12 +107,14 @@ export default defineComponent({
|
|||
};
|
||||
|
||||
const handleReply = (item: CommentItem) => {
|
||||
currentItem.replyId = '';
|
||||
if (item.childComments && Array.isArray(item.childComments)) {
|
||||
// 点击的是父级评论的回复
|
||||
currentItem.id = item.id;
|
||||
} else {
|
||||
// 子级评论
|
||||
currentItem.id = item.parentId || '';
|
||||
currentItem.replyId = item.createUser;
|
||||
}
|
||||
currentItem.commentType = 'REPLY';
|
||||
};
|
||||
|
|
|
@ -135,6 +135,7 @@
|
|||
v-model:status-filters="createUserFilters"
|
||||
:title="(columnConfig.title as string)"
|
||||
:list="memberOptions"
|
||||
label-key="label"
|
||||
@search="loadApiList(false)"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
|
|
|
@ -150,6 +150,7 @@
|
|||
v-model:status-filters="createUserFilters"
|
||||
:title="(columnConfig.title as string)"
|
||||
:list="memberOptions"
|
||||
label-key="label"
|
||||
@search="loadCaseList"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
:extra-text="getExecuteStatusExtraText(step)"
|
||||
size="small"
|
||||
class="ml-[4px]"
|
||||
/>
|
||||
/>-{{ props.finalExecuteStatus }}
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<span type="text" class="one-line-text cursor-pointer px-0 text-[rgb(var(--primary-5))]">{{ record.num }}</span>
|
||||
</template>
|
||||
<template #name="{ record }">
|
||||
<div type="text">{{ characterLimit(record.name) }}</div>
|
||||
<div class="one-line-text">{{ characterLimit(record.name) }}</div>
|
||||
</template>
|
||||
<template #caseLevel="{ record }">
|
||||
<a-select
|
||||
|
@ -136,6 +136,7 @@
|
|||
v-model:status-filters="updateUserFilters"
|
||||
:title="(columnConfig.title as string)"
|
||||
:list="memberOptions"
|
||||
label-key="label"
|
||||
@search="initData()"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
|
@ -149,6 +150,7 @@
|
|||
v-model:status-filters="createUserFilters"
|
||||
:title="(columnConfig.title as string)"
|
||||
:list="memberOptions"
|
||||
label-key="label"
|
||||
@search="initData()"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
|
@ -241,7 +243,7 @@
|
|||
>
|
||||
<template #tree-slot-title="node">
|
||||
<a-tooltip :content="`${node.name}`" position="tl">
|
||||
<div class="one-line-text w-[300px] text-[var(--color-text-1)]">{{ node.name }}</div>
|
||||
<div class="one-line-text text-[var(--color-text-1)]">{{ node.name }}</div>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</a-tree-select>
|
||||
|
@ -567,7 +569,7 @@
|
|||
'title': 'caseManagement.featureCase.tableColumnID',
|
||||
'slotName': 'num',
|
||||
'dataIndex': 'num',
|
||||
'width': 200,
|
||||
'width': 130,
|
||||
'showInTable': true,
|
||||
'sortable': {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
|
@ -585,7 +587,7 @@
|
|||
dataIndex: 'name',
|
||||
showInTable: true,
|
||||
showTooltip: true,
|
||||
width: 300,
|
||||
width: 180,
|
||||
editType: hasAnyPermission(['FUNCTIONAL_CASE:READ+UPDATE']) ? ColumnEditTypeEnum.INPUT : undefined,
|
||||
sortable: {
|
||||
sortDirections: ['ascend', 'descend'],
|
||||
|
@ -601,7 +603,7 @@
|
|||
dataIndex: 'caseLevel',
|
||||
titleSlotName: 'caseLevelFilter',
|
||||
showInTable: true,
|
||||
width: 200,
|
||||
width: 150,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
|
@ -610,7 +612,7 @@
|
|||
slotName: 'reviewStatus',
|
||||
titleSlotName: 'reviewStatusFilter',
|
||||
showInTable: true,
|
||||
width: 200,
|
||||
width: 150,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
|
@ -619,7 +621,7 @@
|
|||
slotName: 'lastExecuteResult',
|
||||
titleSlotName: 'executeResultFilter',
|
||||
showInTable: true,
|
||||
width: 200,
|
||||
width: 150,
|
||||
showDrag: true,
|
||||
},
|
||||
// {
|
||||
|
@ -636,7 +638,7 @@
|
|||
slotName: 'moduleId',
|
||||
dataIndex: 'moduleId',
|
||||
showInTable: true,
|
||||
width: 300,
|
||||
width: 200,
|
||||
showDrag: true,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -384,7 +384,7 @@
|
|||
caseTree.value = mapTree<ModuleTreeNode>(caseTree.value, (node) => {
|
||||
return {
|
||||
...node,
|
||||
hideMoreAction: props.isModal,
|
||||
hideMoreAction: node.id === 'root' || props.isModal,
|
||||
count: obj?.[node.id] || 0,
|
||||
};
|
||||
});
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<span class="text-[var(--color-text-4)]"> ({{ recycleModulesCount[activeFolder] || 0 }})</span>
|
||||
</div>
|
||||
<template #content>
|
||||
<div class="text-[14px] font-medium text-[var(--color-text-1)]">
|
||||
<div class="max-w-[400px] text-[14px] font-medium text-[var(--color-text-1)]">
|
||||
{{ moduleNamePath }}
|
||||
<span class="text-[var(--color-text-4)]">({{ recycleModulesCount[activeFolder] || 0 }})</span>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
:mouse-enter-delay="300"
|
||||
:disabled="!item[props.labelKey || 'text']"
|
||||
>
|
||||
<div class="one-line-text">
|
||||
<div class="one-line-text max-w-[120px]">
|
||||
<slot name="item" :item="item" :index="index"></slot>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
|
|
|
@ -155,6 +155,7 @@
|
|||
|
||||
async function okHandler() {
|
||||
if (validateKeyWord.value.trim() !== '' && validateKeyWord.value !== orgName.value) {
|
||||
Message.success(t('system.orgTemplate.orgNameTip'));
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
|
|
|
@ -211,4 +211,5 @@ export default {
|
|||
'system.orgTemplate.pleaseEnterAPITip': 'Please enter the field API',
|
||||
'system.orgTemplate.apiFieldNotEmpty': 'The field API cannot be empty',
|
||||
'system.orgTemplate.selectThirdPlatType': 'Please select the third party platform',
|
||||
'system.orgTemplate.orgNameTip': 'The organization name is incorrect',
|
||||
};
|
||||
|
|
|
@ -200,4 +200,5 @@ export default {
|
|||
'system.orgTemplate.pleaseEnterAPITip': '请输入字段API',
|
||||
'system.orgTemplate.apiFieldNotEmpty': '字段 API 不能为空',
|
||||
'system.orgTemplate.selectThirdPlatType': '请选择三方平台',
|
||||
'system.orgTemplate.orgNameTip': '组织名称不正确',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue