Merge remote-tracking branch 'origin/v1.0' into v1.0
This commit is contained in:
commit
1e4db9b55f
|
@ -27,4 +27,5 @@ public interface ExtUserRoleMapper {
|
||||||
List<User> getBesideOrgMemberList(@Param("orgId") String orgId);
|
List<User> getBesideOrgMemberList(@Param("orgId") String orgId);
|
||||||
|
|
||||||
|
|
||||||
|
List<User> getTestManagerAndTestUserList(@Param("request") QueryMemberRequest request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,12 @@
|
||||||
join role r on r.id = ur.role_id
|
join role r on r.id = ur.role_id
|
||||||
where w.id = #{workspaceId} and ur.user_id = #{userId}
|
where w.id = #{workspaceId} and ur.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getTestManagerAndTestUserList" resultType="io.metersphere.base.domain.User">
|
||||||
|
SELECT distinct `user`.* FROM user_role INNER JOIN `user` ON user_role.user_id = `user`.id
|
||||||
|
WHERE user_role.source_id = #{request.workspaceId} And user_role.role_id in ('test_manager', 'test_user')
|
||||||
|
<if test="request.name != null">
|
||||||
|
AND `user`.name like CONCAT('%', #{request.name},'%')
|
||||||
|
</if>
|
||||||
|
order by user_role.update_time desc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -274,4 +274,14 @@ public class UserController {
|
||||||
return userService.updateUserPassword(request);
|
return userService.updateUserPassword(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取工作空间成员用户 不分页
|
||||||
|
*/
|
||||||
|
@PostMapping("/ws/member/tester/list")
|
||||||
|
@RequiresRoles(value = {RoleConstants.ORG_ADMIN, RoleConstants.TEST_MANAGER,
|
||||||
|
RoleConstants.TEST_USER, RoleConstants.TEST_VIEWER}, logical = Logical.OR)
|
||||||
|
public List<User> getTestManagerAndTestUserList(@RequestBody QueryMemberRequest request) {
|
||||||
|
return userService.getTestManagerAndTestUserList(request);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,4 +457,7 @@ public class UserService {
|
||||||
return extUserMapper.getDefaultLanguage(key);
|
return extUserMapper.getDefaultLanguage(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<User> getTestManagerAndTestUserList(QueryMemberRequest request) {
|
||||||
|
return extUserRoleMapper.getTestManagerAndTestUserList(request);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,7 +409,7 @@
|
||||||
},
|
},
|
||||||
getMaintainerOptions() {
|
getMaintainerOptions() {
|
||||||
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||||
this.$post('/user/ws/member/list/all', {workspaceId:workspaceId}, response => {
|
this.$post('/user/ws/member/tester/list', {workspaceId:workspaceId}, response => {
|
||||||
this.maintainerOptions = response.data;
|
this.maintainerOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -188,7 +188,7 @@
|
||||||
},
|
},
|
||||||
setPrincipalOptions() {
|
setPrincipalOptions() {
|
||||||
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||||
this.$post('/user/ws/member/list/all', {workspaceId:workspaceId}, response => {
|
this.$post('/user/ws/member/tester/list', {workspaceId:workspaceId}, response => {
|
||||||
this.principalOptions = response.data;
|
this.principalOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -30,24 +30,23 @@
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span @click.stop="clickt = 'stop'">
|
<span @click.stop="clickt = 'stop'">
|
||||||
<el-dropdown v-permission="['test_manager','test_user']" class="test-case-status" @command="statusChange">
|
<el-dropdown class="test-case-status" @command="statusChange">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<plan-status-table-item :value="scope.row.status"/>
|
<plan-status-table-item :value="scope.row.status"/>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown" chang>
|
<el-dropdown-menu slot="dropdown" chang>
|
||||||
<el-dropdown-item :command="{id: scope.row.id, status: 'Prepare'}">
|
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Prepare'}">
|
||||||
{{$t('test_track.plan.plan_status_prepare')}}
|
{{$t('test_track.plan.plan_status_prepare')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="{id: scope.row.id, status: 'Underway'}">
|
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Underway'}">
|
||||||
{{$t('test_track.plan.plan_status_running')}}
|
{{$t('test_track.plan.plan_status_running')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="{id: scope.row.id, status: 'Completed'}">
|
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Completed'}">
|
||||||
{{$t('test_track.plan.plan_status_completed')}}
|
{{$t('test_track.plan.plan_status_completed')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</span>
|
</span>
|
||||||
<plan-status-table-item v-permission="['test_viewer']" :value="scope.row.status"/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -115,7 +114,7 @@
|
||||||
import MsTableOperator from "../../../common/components/MsTableOperator";
|
import MsTableOperator from "../../../common/components/MsTableOperator";
|
||||||
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
|
||||||
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
import PlanStageTableItem from "../../common/tableItems/plan/PlanStageTableItem";
|
||||||
import {_filter, _sort} from "../../../../../common/js/utils";
|
import {_filter, _sort, checkoutTestManagerOrTestUser} from "../../../../../common/js/utils";
|
||||||
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
import TestReportTemplateList from "../view/comonents/TestReportTemplateList";
|
||||||
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
|
||||||
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
|
||||||
|
@ -137,6 +136,7 @@
|
||||||
condition: {},
|
condition: {},
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
isTestManagerOrTestUser: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
statusFilters: [
|
statusFilters: [
|
||||||
|
@ -160,6 +160,7 @@
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.projectId = this.$route.params.projectId;
|
this.projectId = this.$route.params.projectId;
|
||||||
|
this.isTestManagerOrTestUser = checkoutTestManagerOrTestUser();
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
setMaintainerOptions() {
|
setMaintainerOptions() {
|
||||||
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
let workspaceId = localStorage.getItem(WORKSPACE_ID);
|
||||||
this.$post('/user/ws/member/list/all', {workspaceId:workspaceId}, response => {
|
this.$post('/user/ws/member/tester/list', {workspaceId:workspaceId}, response => {
|
||||||
this.executorOptions = response.data;
|
this.executorOptions = response.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -89,27 +89,26 @@
|
||||||
:label="$t('test_track.plan_view.execute_result')">
|
:label="$t('test_track.plan_view.execute_result')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<span @click.stop="clickt = 'stop'">
|
<span @click.stop="clickt = 'stop'">
|
||||||
<el-dropdown v-permission="['test_manager','test_user']" class="test-case-status" @command="statusChange" >
|
<el-dropdown class="test-case-status" @command="statusChange" >
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<status-table-item :value="scope.row.status"/>
|
<status-table-item :value="scope.row.status"/>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown" chang>
|
<el-dropdown-menu slot="dropdown" chang>
|
||||||
<el-dropdown-item :command="{id: scope.row.id, status: 'Pass'}">
|
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Pass'}">
|
||||||
{{$t('test_track.plan_view.pass')}}
|
{{$t('test_track.plan_view.pass')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="{id: scope.row.id, status: 'Failure'}">
|
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Failure'}">
|
||||||
{{$t('test_track.plan_view.failure')}}
|
{{$t('test_track.plan_view.failure')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="{id: scope.row.id, status: 'Blocking'}">
|
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Blocking'}">
|
||||||
{{$t('test_track.plan_view.blocking')}}
|
{{$t('test_track.plan_view.blocking')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item :command="{id: scope.row.id, status: 'Skip'}">
|
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Skip'}">
|
||||||
{{$t('test_track.plan_view.skip')}}
|
{{$t('test_track.plan_view.skip')}}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</span>
|
</span>
|
||||||
<status-table-item v-permission="['test_viewer']" :value="scope.row.status"/>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -199,6 +198,7 @@
|
||||||
selectIds: new Set(),
|
selectIds: new Set(),
|
||||||
testPlan: {},
|
testPlan: {},
|
||||||
isReadOnly: false,
|
isReadOnly: false,
|
||||||
|
isTestManagerOrTestUser: false,
|
||||||
priorityFilters: [
|
priorityFilters: [
|
||||||
{text: 'P0', value: 'P0'},
|
{text: 'P0', value: 'P0'},
|
||||||
{text: 'P1', value: 'P1'},
|
{text: 'P1', value: 'P1'},
|
||||||
|
@ -244,6 +244,7 @@
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.refreshTableAndPlan();
|
this.refreshTableAndPlan();
|
||||||
|
this.isTestManagerOrTestUser = checkoutTestManagerOrTestUser();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTableData() {
|
initTableData() {
|
||||||
|
|
Loading…
Reference in New Issue