feat(测试跟踪): 用例下创建缺陷,自定义字段下拉框选项支持远程搜索
This commit is contained in:
parent
085c4c70b3
commit
e8e3238d57
|
@ -38,6 +38,8 @@
|
|||
:form-label-width="formLabelWidth"
|
||||
:issue-template="issueTemplate"
|
||||
class="custom-case-form"
|
||||
@inputSearch="handleInputSearch"
|
||||
ref="customFieldItem"
|
||||
/>
|
||||
</el-form>
|
||||
<!-- 未开启第三方 -->
|
||||
|
@ -146,7 +148,7 @@ import {
|
|||
getFollow,
|
||||
getComments,
|
||||
getTapdUser,
|
||||
getPlatformTransitions,
|
||||
getPlatformTransitions, getPlatformFormOption,
|
||||
} from "@/api/issue";
|
||||
import {
|
||||
uploadIssueAttachment,
|
||||
|
@ -447,6 +449,17 @@ export default {
|
|||
// this.getComments();
|
||||
});
|
||||
},
|
||||
handleInputSearch(data, query) {
|
||||
getPlatformFormOption({
|
||||
optionMethod: data.optionMethod,
|
||||
workspaceId: getCurrentWorkspaceId(),
|
||||
platform: this.issueTemplate.platform,
|
||||
query
|
||||
}).then((r) => {
|
||||
data.options = r.data;
|
||||
this.$refs.customFieldItem.stopLoading();
|
||||
});
|
||||
},
|
||||
save(reset) {
|
||||
let isValidate = true;
|
||||
this.$refs["form"].validate((valid) => {
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
:form="form"
|
||||
:default-open="defaultOpen"
|
||||
:disabled="isPublic"
|
||||
@inputSearch="handleInputSearch"
|
||||
ref="customFiled"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
@ -38,6 +40,8 @@
|
|||
:data="item"
|
||||
:form="form"
|
||||
prop="defaultValue"
|
||||
@inputSearch="handleInputSearch"
|
||||
ref="customFiled"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
@ -104,6 +108,16 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleInputSearch(data, query) {
|
||||
this.$emit('inputSearch', data, query);
|
||||
},
|
||||
stopLoading() {
|
||||
this.$refs.customFiled.forEach(item => {
|
||||
item.stopLoading();
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
customFieldRowNums() {
|
||||
let size = this.issueTemplate.customFields
|
||||
|
|
Loading…
Reference in New Issue