fix(测试用例): 评审关联用例列表创建人不支持筛选
--bug=1044876 --user=宋昌昌 【测试用例】评审详情-创建人不支持筛选 https://www.tapd.cn/55049933/s/1560027
This commit is contained in:
parent
4e1d8064c7
commit
e98ad1d4c2
|
@ -19,13 +19,16 @@
|
||||||
<update id="updateStatus">
|
<update id="updateStatus">
|
||||||
update case_review_functional_case
|
update case_review_functional_case
|
||||||
set status = #{status},
|
set status = #{status},
|
||||||
update_time = UNIX_TIMESTAMP()*1000
|
update_time = UNIX_TIMESTAMP() * 1000
|
||||||
where review_id = #{reviewId} and case_id = #{caseId}
|
where review_id = #{reviewId}
|
||||||
|
and case_id = #{caseId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="getCaseIdsByReviewId" parameterType="java.lang.String" resultType="java.lang.String">
|
<select id="getCaseIdsByReviewId" parameterType="java.lang.String" resultType="java.lang.String">
|
||||||
select case_id from case_review_functional_case where review_id = #{reviewId}
|
select case_id
|
||||||
|
from case_review_functional_case
|
||||||
|
where review_id = #{reviewId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="page" resultType="io.metersphere.functional.dto.ReviewFunctionalCaseDTO">
|
<select id="page" resultType="io.metersphere.functional.dto.ReviewFunctionalCaseDTO">
|
||||||
|
@ -50,7 +53,8 @@
|
||||||
review_id = #{request.reviewId}
|
review_id = #{request.reviewId}
|
||||||
AND functional_case.deleted = #{deleted}
|
AND functional_case.deleted = #{deleted}
|
||||||
<if test="userId != null and userId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id = #{request.reviewId} and crfcu.user_id = #{userId})
|
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id =
|
||||||
|
#{request.reviewId} and crfcu.user_id = #{userId})
|
||||||
</if>
|
</if>
|
||||||
<include refid="queryWhereCondition"/>
|
<include refid="queryWhereCondition"/>
|
||||||
order by
|
order by
|
||||||
|
@ -63,7 +67,6 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<sql id="queryWhereCondition">
|
<sql id="queryWhereCondition">
|
||||||
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
<if test="request.moduleIds != null and request.moduleIds.size() > 0">
|
||||||
and functional_case.module_id in
|
and functional_case.module_id in
|
||||||
|
@ -83,7 +86,8 @@
|
||||||
</include>
|
</include>
|
||||||
<choose>
|
<choose>
|
||||||
<when test='request.searchMode == "AND"'>
|
<when test='request.searchMode == "AND"'>
|
||||||
AND <include refid="queryCombine"/>
|
AND
|
||||||
|
<include refid="queryCombine"/>
|
||||||
</when>
|
</when>
|
||||||
<when test='request.searchMode == "OR"'>
|
<when test='request.searchMode == "OR"'>
|
||||||
and (
|
and (
|
||||||
|
@ -131,7 +135,7 @@
|
||||||
#{key}
|
#{key}
|
||||||
and JSON_CONTAINS(`value`, json_array(#{value}))
|
and JSON_CONTAINS(`value`, json_array(#{value}))
|
||||||
</when>
|
</when>
|
||||||
<when test="key=='create_user'">
|
<when test="key == 'create_user' || key == 'createUserName'">
|
||||||
and functional_case.create_user in
|
and functional_case.create_user in
|
||||||
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
<include refid="io.metersphere.system.mapper.BaseMapper.filterInWrapper"/>
|
||||||
</when>
|
</when>
|
||||||
|
@ -310,7 +314,8 @@
|
||||||
review_id = #{request.reviewId}
|
review_id = #{request.reviewId}
|
||||||
AND functional_case.deleted = #{deleted}
|
AND functional_case.deleted = #{deleted}
|
||||||
<if test="userId != null and userId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id = #{request.reviewId} and crfcu.user_id = #{userId})
|
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id =
|
||||||
|
#{request.reviewId} and crfcu.user_id = #{userId})
|
||||||
</if>
|
</if>
|
||||||
<include refid="queryWhereConditionByBaseQueryRequest"/>
|
<include refid="queryWhereConditionByBaseQueryRequest"/>
|
||||||
</select>
|
</select>
|
||||||
|
@ -325,10 +330,11 @@
|
||||||
review_id = #{request.reviewId}
|
review_id = #{request.reviewId}
|
||||||
AND functional_case.deleted = #{deleted}
|
AND functional_case.deleted = #{deleted}
|
||||||
<if test="userId != null and userId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id = #{request.reviewId} and crfcu.user_id = #{userId})
|
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id =
|
||||||
|
#{request.reviewId} and crfcu.user_id = #{userId})
|
||||||
</if>
|
</if>
|
||||||
<include refid="queryWhereConditionByBaseQueryRequest"/>
|
<include refid="queryWhereConditionByBaseQueryRequest"/>
|
||||||
<if test="request.excludeIds != null and request.excludeIds.size() > 0" >
|
<if test="request.excludeIds != null and request.excludeIds.size() > 0">
|
||||||
and crfc.id not in
|
and crfc.id not in
|
||||||
<foreach collection="request.excludeIds" item="excludeId" open="(" separator="," close=")">
|
<foreach collection="request.excludeIds" item="excludeId" open="(" separator="," close=")">
|
||||||
#{excludeId}
|
#{excludeId}
|
||||||
|
@ -356,7 +362,8 @@
|
||||||
</include>
|
</include>
|
||||||
<choose>
|
<choose>
|
||||||
<when test='request.condition.searchMode == "AND"'>
|
<when test='request.condition.searchMode == "AND"'>
|
||||||
AND <include refid="baseQueryCombine"/>
|
AND
|
||||||
|
<include refid="baseQueryCombine"/>
|
||||||
</when>
|
</when>
|
||||||
<when test='request.condition.searchMode == "OR"'>
|
<when test='request.condition.searchMode == "OR"'>
|
||||||
and (
|
and (
|
||||||
|
@ -378,14 +385,10 @@
|
||||||
|
|
||||||
|
|
||||||
<select id="getPos" resultType="java.lang.Long">
|
<select id="getPos" resultType="java.lang.Long">
|
||||||
SELECT
|
SELECT pos
|
||||||
pos
|
FROM case_review_functional_case
|
||||||
FROM
|
WHERE review_id = #{reviewId}
|
||||||
case_review_functional_case
|
ORDER BY pos DESC
|
||||||
WHERE
|
|
||||||
review_id = #{reviewId}
|
|
||||||
ORDER BY
|
|
||||||
pos DESC
|
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -455,14 +458,16 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countModuleIdByRequest" resultType="io.metersphere.functional.dto.FunctionalCaseModuleCountDTO">
|
<select id="countModuleIdByRequest" resultType="io.metersphere.functional.dto.FunctionalCaseModuleCountDTO">
|
||||||
SELECT functional_case.module_id AS moduleId, count(functional_case.id) AS dataCount, functional_case.project_id AS projectId, project.name AS projectName
|
SELECT functional_case.module_id AS moduleId, count(functional_case.id) AS dataCount, functional_case.project_id
|
||||||
|
AS projectId, project.name AS projectName
|
||||||
FROM case_review_functional_case crfc
|
FROM case_review_functional_case crfc
|
||||||
LEFT JOIN functional_case ON crfc.case_id = functional_case.id
|
LEFT JOIN functional_case ON crfc.case_id = functional_case.id
|
||||||
LEFT JOIN project ON functional_case.project_id = project.id
|
LEFT JOIN project ON functional_case.project_id = project.id
|
||||||
WHERE crfc.review_id = #{request.reviewId}
|
WHERE crfc.review_id = #{request.reviewId}
|
||||||
AND functional_case.deleted = #{deleted}
|
AND functional_case.deleted = #{deleted}
|
||||||
<if test="userId != null and userId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
AND crfc.case_id in (select crfcu.case_id from case_review_functional_case_user crfcu where crfcu.review_id = #{request.reviewId} and crfcu.user_id = #{userId})
|
AND crfc.case_id in (select crfcu.case_id from case_review_functional_case_user crfcu where crfcu.review_id
|
||||||
|
= #{request.reviewId} and crfcu.user_id = #{userId})
|
||||||
</if>
|
</if>
|
||||||
<include refid="queryWhereCondition"/>
|
<include refid="queryWhereCondition"/>
|
||||||
GROUP BY module_id
|
GROUP BY module_id
|
||||||
|
@ -475,7 +480,8 @@
|
||||||
WHERE crfc.review_id = #{request.reviewId}
|
WHERE crfc.review_id = #{request.reviewId}
|
||||||
AND functional_case.deleted = #{deleted}
|
AND functional_case.deleted = #{deleted}
|
||||||
<if test="userId != null and userId != ''">
|
<if test="userId != null and userId != ''">
|
||||||
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id = #{request.reviewId} and crfcu.user_id = #{userId})
|
AND crfc.case_id in (select case_id from case_review_functional_case_user crfcu where crfcu.review_id =
|
||||||
|
#{request.reviewId} and crfcu.user_id = #{userId})
|
||||||
</if>
|
</if>
|
||||||
<include refid="queryWhereCondition"/>
|
<include refid="queryWhereCondition"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -375,7 +375,7 @@
|
||||||
import { StartReviewStatus } from '@/enums/caseEnum';
|
import { StartReviewStatus } from '@/enums/caseEnum';
|
||||||
import { CaseManagementRouteEnum } from '@/enums/routeEnum';
|
import { CaseManagementRouteEnum } from '@/enums/routeEnum';
|
||||||
import { TableKeyEnum } from '@/enums/tableEnum';
|
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||||
import { FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
import { FilterRemoteMethodsEnum, FilterSlotNameEnum } from '@/enums/tableFilterEnum';
|
||||||
|
|
||||||
import { getCaseLevels } from '@/views/case-management/caseManagementFeature/components/utils';
|
import { getCaseLevels } from '@/views/case-management/caseManagementFeature/components/utils';
|
||||||
|
|
||||||
|
@ -413,9 +413,11 @@
|
||||||
const msCaseReviewMinderRef = ref<InstanceType<typeof MsCaseReviewMinder>>();
|
const msCaseReviewMinderRef = ref<InstanceType<typeof MsCaseReviewMinder>>();
|
||||||
|
|
||||||
const moduleTree = computed(() => unref(caseReviewStore.moduleTree));
|
const moduleTree = computed(() => unref(caseReviewStore.moduleTree));
|
||||||
|
|
||||||
async function initModules() {
|
async function initModules() {
|
||||||
await caseReviewStore.initModules(route.query.id as string);
|
await caseReviewStore.initModules(route.query.id as string);
|
||||||
}
|
}
|
||||||
|
|
||||||
const moduleNamePath = computed(() => {
|
const moduleNamePath = computed(() => {
|
||||||
return props.activeFolder === 'all'
|
return props.activeFolder === 'all'
|
||||||
? t('caseManagement.featureCase.allCase')
|
? t('caseManagement.featureCase.allCase')
|
||||||
|
@ -498,6 +500,14 @@
|
||||||
dataIndex: 'createUserName',
|
dataIndex: 'createUserName',
|
||||||
showTooltip: true,
|
showTooltip: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
|
filterConfig: {
|
||||||
|
mode: 'remote',
|
||||||
|
loadOptionParams: {
|
||||||
|
projectId: appStore.currentProjectId,
|
||||||
|
},
|
||||||
|
remoteMethod: FilterRemoteMethodsEnum.PROJECT_PERMISSION_MEMBER,
|
||||||
|
placeholderText: t('caseManagement.featureCase.PleaseSelect'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: hasOperationPermission.value ? 'common.operation' : '',
|
title: hasOperationPermission.value ? 'common.operation' : '',
|
||||||
|
@ -558,6 +568,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const modulesCount = computed(() => caseReviewStore.modulesCount);
|
const modulesCount = computed(() => caseReviewStore.modulesCount);
|
||||||
|
|
||||||
async function getModuleCount() {
|
async function getModuleCount() {
|
||||||
let params: TableQueryParams;
|
let params: TableQueryParams;
|
||||||
if (showType.value === 'list') {
|
if (showType.value === 'list') {
|
||||||
|
@ -697,6 +708,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const disassociateLoading = ref(false);
|
const disassociateLoading = ref(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解除关联
|
* 解除关联
|
||||||
* @param record 关联用例项
|
* @param record 关联用例项
|
||||||
|
@ -892,12 +904,15 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectChangeReviewer(val: boolean, record?: any) {
|
function selectChangeReviewer(val: boolean, record?: any) {
|
||||||
if (!val) {
|
if (!val) {
|
||||||
changeReviewer(record);
|
changeReviewer(record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const reviewCommentFileIds = ref<string[]>([]);
|
const reviewCommentFileIds = ref<string[]>([]);
|
||||||
|
|
||||||
// 提交评审结果
|
// 提交评审结果
|
||||||
function commitResult() {
|
function commitResult() {
|
||||||
dialogFormRef.value?.validate(async (errors) => {
|
dialogFormRef.value?.validate(async (errors) => {
|
||||||
|
@ -1074,6 +1089,7 @@
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.case-show-type {
|
.case-show-type {
|
||||||
@apply grid grid-cols-2;
|
@apply grid grid-cols-2;
|
||||||
|
|
||||||
.show-type-icon {
|
.show-type-icon {
|
||||||
:deep(.arco-radio-button-content) {
|
:deep(.arco-radio-button-content) {
|
||||||
@apply flex;
|
@apply flex;
|
||||||
|
@ -1083,28 +1099,36 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.arco-radio-label) {
|
:deep(.arco-radio-label) {
|
||||||
@apply inline-flex;
|
@apply inline-flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.param-input:not(.arco-input-focus, .arco-select-view-focus)) {
|
:deep(.param-input:not(.arco-input-focus, .arco-select-view-focus)) {
|
||||||
&:not(:hover) {
|
&:not(:hover) {
|
||||||
border-color: transparent !important;
|
border-color: transparent !important;
|
||||||
|
|
||||||
.arco-input::placeholder {
|
.arco-input::placeholder {
|
||||||
@apply invisible;
|
@apply invisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arco-select-view-icon {
|
.arco-select-view-icon {
|
||||||
@apply invisible;
|
@apply invisible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arco-select-view-value {
|
.arco-select-view-value {
|
||||||
color: var(--color-text-brand);
|
color: var(--color-text-brand);
|
||||||
}
|
}
|
||||||
|
|
||||||
.arco-input-suffix {
|
.arco-input-suffix {
|
||||||
@apply invisible;
|
@apply invisible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-show-type {
|
.list-show-type {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
:deep(.arco-radio-button-content) {
|
:deep(.arco-radio-button-content) {
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue