mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 20:19:16 +08:00
fix(任务中心): 修复跳转后,所属项目显示错误的缺陷
--bug=1042913 --user=王孝刚 【系统设置】系统/组织-任务中心-资源ID/名称跳转-非当前项目的资源也在当前项目下显示的 https://www.tapd.cn/55049933/s/1534413
This commit is contained in:
parent
7c7ce38072
commit
4cbd273f13
@ -24,6 +24,8 @@ public class TaskCenterDTO implements Serializable {
|
||||
|
||||
@Schema(description = "项目id")
|
||||
private String projectId;
|
||||
@Schema(description = "组织id")
|
||||
private String organizationId;
|
||||
|
||||
@Schema(description = "报告id")
|
||||
private String id;
|
||||
|
@ -25,6 +25,9 @@ public class TaskCenterScheduleDTO implements Serializable {
|
||||
@Schema(description = "项目id")
|
||||
private String projectId;
|
||||
|
||||
@Schema(description = "组织id")
|
||||
private String organizationId;
|
||||
|
||||
@Schema(description = "任务id")
|
||||
private String id;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.system.mapper.ExtScheduleMapper">
|
||||
<select id="taskCenterSchedulelist" resultType="io.metersphere.system.dto.taskcenter.TaskCenterScheduleDTO">
|
||||
select task.*, QRTZ_TRIGGERS.NEXT_FIRE_TIME AS next_time from (
|
||||
select task.*, QRTZ_TRIGGERS.NEXT_FIRE_TIME AS next_time, project.organization_id from (
|
||||
<if test="request.scheduleTagType == 'API_IMPORT'">
|
||||
SELECT
|
||||
schedule.id,
|
||||
|
@ -28,7 +28,7 @@
|
||||
type="text"
|
||||
class="one-line-text w-full"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
@click="showDetail(record)"
|
||||
>{{ record.resourceNum }}
|
||||
</div>
|
||||
</template>
|
||||
@ -37,7 +37,7 @@
|
||||
v-if="!record.integrated"
|
||||
class="one-line-text max-w-[300px]"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
@click="showDetail(record)"
|
||||
>{{ record.resourceName }}
|
||||
</div>
|
||||
</template>
|
||||
@ -539,18 +539,22 @@
|
||||
/**
|
||||
* 跳转接口用例详情
|
||||
*/
|
||||
function showDetail(id: string) {
|
||||
function showDetail(record: any) {
|
||||
if (!hasJumpPermission.value) {
|
||||
return;
|
||||
}
|
||||
if (props.moduleType === 'API_CASE') {
|
||||
openNewPage(RouteEnum.API_TEST_MANAGEMENT, {
|
||||
cId: id,
|
||||
orgId: record.organizationId,
|
||||
pId: record.projectId,
|
||||
cId: record.resourceId,
|
||||
});
|
||||
}
|
||||
if (props.moduleType === 'API_SCENARIO') {
|
||||
openNewPage(RouteEnum.API_TEST_SCENARIO, {
|
||||
id,
|
||||
orgId: record.organizationId,
|
||||
pId: record.projectId,
|
||||
id: record.resourceId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@
|
||||
type="text"
|
||||
class="one-line-text w-full"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
@click="showDetail(record)"
|
||||
>{{ record.resourceNum }}
|
||||
</div>
|
||||
</template>
|
||||
@ -62,7 +62,7 @@
|
||||
"
|
||||
class="one-line-text max-w-[300px]"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
@click="showDetail(record)"
|
||||
>{{ record.resourceName }}
|
||||
</div>
|
||||
</template>
|
||||
@ -550,18 +550,22 @@
|
||||
* 跳转接口用例详情
|
||||
*/
|
||||
|
||||
function showDetail(id: string) {
|
||||
function showDetail(record: any) {
|
||||
if (!hasJumpPermission.value) {
|
||||
return;
|
||||
}
|
||||
if (props.moduleType === TaskCenterEnum.API_SCENARIO) {
|
||||
openNewPage(RouteEnum.API_TEST_SCENARIO, {
|
||||
id,
|
||||
orgId: record.organizationId,
|
||||
pId: record.projectId,
|
||||
id: record.resourceId,
|
||||
});
|
||||
}
|
||||
if (props.moduleType === TaskCenterEnum.TEST_PLAN) {
|
||||
openNewPage(RouteEnum.TEST_PLAN_INDEX_DETAIL, {
|
||||
id,
|
||||
orgId: record.organizationId,
|
||||
pId: record.projectId,
|
||||
id: record.resourceId,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
type="text"
|
||||
class="one-line-text w-full"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
@click="showDetail(record)"
|
||||
>{{ record.resourceNum }}
|
||||
</div>
|
||||
</template>
|
||||
@ -37,7 +37,7 @@
|
||||
v-if="!record.integrated"
|
||||
class="one-line-text max-w-[300px]"
|
||||
:class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']"
|
||||
@click="showDetail(record.resourceId)"
|
||||
@click="showDetail(record)"
|
||||
>{{ record.resourceName }}
|
||||
</div>
|
||||
</template>
|
||||
@ -75,7 +75,7 @@
|
||||
<MsButton
|
||||
class="!mr-0"
|
||||
:disabled="record.historyDeleted || !hasAnyPermission(permissionsMap[props.group].report)"
|
||||
@click="viewReport(record.id, record.integrated)"
|
||||
@click="viewReport(record)"
|
||||
>{{ t('project.taskCenter.viewReport') }}
|
||||
</MsButton>
|
||||
</a-tooltip>
|
||||
@ -84,7 +84,7 @@
|
||||
<MsButton
|
||||
class="!mr-0"
|
||||
:disabled="record.historyDeleted || !hasAnyPermission(permissionsMap[props.group].report)"
|
||||
@click="viewReport(record.id, record.integrated)"
|
||||
@click="viewReport(record)"
|
||||
>{{ t('project.taskCenter.viewReport') }}
|
||||
</MsButton>
|
||||
</div>
|
||||
@ -420,19 +420,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
function viewReport(id: string, type: boolean) {
|
||||
function viewReport(record: any) {
|
||||
openNewPage(RouteEnum.TEST_PLAN_REPORT_DETAIL, {
|
||||
id,
|
||||
type: type ? 'GROUP' : 'TEST_PLAN',
|
||||
orgId: record.organizationId,
|
||||
pId: record.projectId,
|
||||
id: record.id,
|
||||
type: record.integrated ? 'GROUP' : 'TEST_PLAN',
|
||||
});
|
||||
}
|
||||
|
||||
function showDetail(id: string) {
|
||||
function showDetail(record: any) {
|
||||
if (!hasJumpPermission.value) {
|
||||
return;
|
||||
}
|
||||
openNewPage(RouteEnum.TEST_PLAN_INDEX_DETAIL, {
|
||||
id,
|
||||
orgId: record.organizationId,
|
||||
pId: record.projectId,
|
||||
id: record.resourceId,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user