fix(接口测试): 修复接口定义高级搜索创建人无效的缺陷 (#11138)

--bug=1010788 --user=王孝刚 [接口测试] github#11114接口定义高级搜索创建人查询无效
https://www.tapd.cn/55049933/s/1112995

Co-authored-by: wxg0103 <727495428@qq.com>
This commit is contained in:
metersphere-bot 2022-03-03 15:34:38 +08:00 committed by GitHub
parent ab306e68f1
commit 16975588c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 5 deletions

View File

@ -162,7 +162,7 @@
</if>
</if>
<if test="${condition}.creator != null">
and api_definition.create_user
and api_definition.user_id
<include refid="condition">
<property name="object" value="${condition}.creator"/>
</include>

View File

@ -288,7 +288,7 @@ export default {
}
this.httpConfig.conditions[index].details = [this.pathDetails];
} else {
if (this.condition.details.length === 0) {
if (this.condition.type === "MODULE" && this.condition.details.length === 0) {
this.$warning(this.$t('api_test.environment.module_warning'));
return;
}

View File

@ -415,6 +415,34 @@ export const PRINCIPAL = {
}
};
export const PRINCIPALAPI = {
key: "creator",
name: 'MsTableSearchSelect',
label: 'api_test.definition.request.responsible',
operator: {
options: [OPERATORS.IN, OPERATORS.NOT_IN, OPERATORS.CURRENT_USER],
change: function (component, value) { // 运算符change事件
if (value === OPERATORS.CURRENT_USER.value) {
component.value = value;
}
}
},
options: { // 异步获取候选项
url: "/user/list",
labelKey: "name",
valueKey: "id",
showLabel: option => {
return option.label + "(" + option.value + ")";
}
},
props: {
multiple: true
},
isShow: operator => {
return operator !== OPERATORS.CURRENT_USER.value;
}
};
export const STAGE = {
key: "stage",
name: 'MsTableSearchSelect',
@ -532,7 +560,7 @@ export const TEST_CASE_CONFIGS = [NAME, API_TAGS, MODULE, PRIORITY, CREATE_TIME,
export const TEST_PLAN_CONFIGS = [NAME, UPDATE_TIME, CREATE_TIME, PRINCIPAL, TEST_PLAN_STATUS, STAGE];
export const API_DEFINITION_CONFIGS = [NAME, API_METHOD, API_PATH, API_STATUS, API_TAGS, UPDATE_TIME, CREATE_TIME, CREATOR,ISREFERENCE];
export const API_DEFINITION_CONFIGS = [NAME, API_METHOD, API_PATH, API_STATUS, API_TAGS, UPDATE_TIME, CREATE_TIME, PRINCIPALAPI, ISREFERENCE];
export const API_CASE_CONFIGS = [NAME, API_CASE_PRIORITY, API_TAGS, API_CASE_RESULT, UPDATE_TIME, CREATE_TIME, CREATOR,ISREFERENCE];

View File

@ -1184,7 +1184,7 @@ export default {
api_path: "路径",
api_definition_path: "API路径",
api_case_path: "用例路径",
api_principal: "责人",
api_principal: "人",
api_last_time: "最后更新时间",
api_case_number: "用例数",
api_case_status: "用例状态",

View File

@ -1184,7 +1184,7 @@ export default {
api_path: "路徑",
api_definition_path: "API路徑",
api_case_path: "用例路徑",
api_principal: "責人",
api_principal: "人",
api_last_time: "最後更新時間",
api_case_number: "用例數",
api_case_status: "用例狀態",