feat_测试跟踪_缺陷管理_创建人增加筛选

This commit is contained in:
wxg0103 2021-10-15 11:27:46 +08:00 committed by 刘瑞斌
parent 7c23bf7a09
commit 7de403fc49
2 changed files with 23 additions and 3 deletions

View File

@ -89,10 +89,17 @@
#{value}
</foreach>
</when>
<when test="key == 'creator'">
AND issues.creator IN
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</when>
</choose>
</if>
</foreach>
</if>
</where>
</sql>

View File

@ -86,8 +86,9 @@
:field="item"
:fields-width="fieldsWidth"
column-key="creator"
:filters="creatorFilters"
sortable
min-width="100"
min-width="100px"
:label="$t('custom_field.issue_creator')"
prop="creatorName">
</ms-table-column>
@ -186,6 +187,7 @@ import MsMainContainer from "@/business/components/common/components/MsMainConta
import {getCurrentProjectID} from "@/common/js/utils";
import {getIssueTemplate} from "@/network/custom-field-template";
import {getProjectMember} from "@/network/user";
import {post} from "@/common/js/ajax";
export default {
name: "IssueList",
@ -221,7 +223,8 @@ export default {
],
issueTemplate: {},
members: [],
isThirdPart: false
isThirdPart: false,
creatorFilters: []
};
},
watch: {
@ -279,6 +282,9 @@ export default {
return getCurrentProjectID();
}
},
created() {
this.getMaintainerOptions();
},
methods: {
tableDoLayout() {
this.$refs.table.doLayout();
@ -289,9 +295,16 @@ export default {
getIssues() {
this.page.condition.projectId = this.projectId;
this.page.condition.orders = getLastTableSortField(this.tableHeaderKey);
this.page.result = getIssues(this.page);
},
getMaintainerOptions() {
this.$post('/user/project/member/tester/list', {projectId: getCurrentProjectID()}, response => {
this.creatorFilters = response.data.map(u => {
return {text: u.name, value: u.id};
});
});
},
handleEdit(data) {
this.$refs.issueEdit.open(data);
},