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} #{value}
</foreach> </foreach>
</when> </when>
<when test="key == 'creator'">
AND issues.creator IN
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</when>
</choose> </choose>
</if> </if>
</foreach> </foreach>
</if> </if>
</where> </where>
</sql> </sql>

View File

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