diff --git a/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue b/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue index 7edc286e18..ab46efc3b0 100644 --- a/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue +++ b/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue @@ -38,6 +38,8 @@ :form-label-width="formLabelWidth" :issue-template="issueTemplate" class="custom-case-form" + @inputSearch="handleInputSearch" + ref="customFieldItem" /> @@ -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) => { diff --git a/test-track/frontend/src/business/case/components/common/CaseCustomFiledFormItem.vue b/test-track/frontend/src/business/case/components/common/CaseCustomFiledFormItem.vue index 79e474a159..41d952c449 100644 --- a/test-track/frontend/src/business/case/components/common/CaseCustomFiledFormItem.vue +++ b/test-track/frontend/src/business/case/components/common/CaseCustomFiledFormItem.vue @@ -21,6 +21,8 @@ :form="form" :default-open="defaultOpen" :disabled="isPublic" + @inputSearch="handleInputSearch" + ref="customFiled" /> @@ -38,6 +40,8 @@ :data="item" :form="form" prop="defaultValue" + @inputSearch="handleInputSearch" + ref="customFiled" /> @@ -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