From 090e4d5bf9968a3f70bc4d0a49b587b0bc806437 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Sun, 7 Apr 2024 20:06:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=94=A8=E4=BE=8B=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=85=B3=E8=81=94=E7=94=A8=E4=BE=8B=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E5=9B=9E=E6=98=BE=E5=B7=B2=E9=80=89=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BB=A5=E5=8F=8A=E6=95=B0=E5=AD=97=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E7=A7=91=E5=AD=A6=E8=AE=B0=E6=95=B0=E6=B3=95?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1038347 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001038347 --bug=1037248 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037248 --- .../io/metersphere/api/mapper/ExtApiTestCaseMapper.xml | 6 +++--- .../src/components/business/ms-case-associate/index.vue | 8 +++++++- .../src/components/pure/ms-form-create/form-create.ts | 2 ++ .../caseReview/components/create/associateDrawer.vue | 2 ++ frontend/src/views/case-management/caseReview/create.vue | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml index eae85f556a..5d8b37bf46 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml +++ b/backend/services/api-test/src/main/java/io/metersphere/api/mapper/ExtApiTestCaseMapper.xml @@ -446,19 +446,19 @@ #{value} - + and atc.create_user in (#{value}) - + and atc.update_user in (#{value}) - + and atc.delete_user in (#{value}) diff --git a/frontend/src/components/business/ms-case-associate/index.vue b/frontend/src/components/business/ms-case-associate/index.vue index 0721757cb2..4c9d29361d 100644 --- a/frontend/src/components/business/ms-case-associate/index.vue +++ b/frontend/src/components/business/ms-case-associate/index.vue @@ -187,6 +187,7 @@ moduleOptions?: { label: string; value: string }[]; // 功能模块对应用例下拉 confirmLoading: boolean; associatedIds: string[]; // 已关联用例id集合用于去重已关联 + hasNotAssociatedIds?: string[]; type: RequestModuleEnum[keyof RequestModuleEnum]; moduleCountParams?: TableQueryParams; // 获取模块树数量额外的参数 hideProjectSelect?: boolean; // 是否隐藏项目选择 @@ -352,7 +353,7 @@ }, ]; - const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable( + const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector, setTableSelected } = useTable( props.getTableFunc, { columns, @@ -396,6 +397,11 @@ projectId: innerProject.value, excludeIds: [...props.associatedIds], // 已经存在的关联的id列表 }); + if (props.hasNotAssociatedIds && props.hasNotAssociatedIds.length > 0) { + props.hasNotAssociatedIds.forEach((hasNotAssociatedId) => { + setTableSelected(hasNotAssociatedId); + }); + } } const combine = ref>({}); diff --git a/frontend/src/components/pure/ms-form-create/form-create.ts b/frontend/src/components/pure/ms-form-create/form-create.ts index 399dffbb76..54fa0e0e0f 100644 --- a/frontend/src/components/pure/ms-form-create/form-create.ts +++ b/frontend/src/components/pure/ms-form-create/form-create.ts @@ -131,6 +131,8 @@ export const INT = { value: 0, props: { precision: 0, + max: 999999999999999, + min: -999999999999999, placeholder: t('formCreate.PleaseEnter'), }, }; diff --git a/frontend/src/views/case-management/caseReview/components/create/associateDrawer.vue b/frontend/src/views/case-management/caseReview/components/create/associateDrawer.vue index ead20a912b..da0365fa17 100644 --- a/frontend/src/views/case-management/caseReview/components/create/associateDrawer.vue +++ b/frontend/src/views/case-management/caseReview/components/create/associateDrawer.vue @@ -8,6 +8,7 @@ :get-table-func="getCaseList" :confirm-loading="confirmLoading" :associated-ids="[]" + :has-not-associated-ids="props.hasNotAssociatedIds" :type="RequestModuleEnum.CASE_MANAGEMENT" :table-params="{ reviewId: props.reviewId }" hide-project-select @@ -94,6 +95,7 @@ project: string; reviewId?: string; reviewers?: string[]; + hasNotAssociatedIds?: string[]; }>(); const emit = defineEmits<{ (e: 'update:visible', val: boolean): void; diff --git a/frontend/src/views/case-management/caseReview/create.vue b/frontend/src/views/case-management/caseReview/create.vue index 1958074000..a18d00bc58 100644 --- a/frontend/src/views/case-management/caseReview/create.vue +++ b/frontend/src/views/case-management/caseReview/create.vue @@ -193,7 +193,7 @@ v-model:visible="caseAssociateVisible" v-model:project="caseAssociateProject" :reviewers="reviewForm.reviewers" - :associated-ids="selectedAssociateCasesParams.selectIds" + :has-not-associated-ids="selectedAssociateCasesParams.selectIds" @success="writeAssociateCases" />