From 1b1a635f2e8adf44deef4296cb1f184da3411ede Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 19 Jul 2022 18:39:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AF=84=E5=AE=A1=E5=92=8C=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=85=B3=E8=81=94=E9=9C=80=E6=B1=82=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1015009 --user=陈建星 【测试跟踪】用例评审-编辑用例评审-可以编辑关联需求信息,但是不生效 https://www.tapd.cn/55049933/s/1204783 --- .../case/components/TestCaseEditOtherInfo.vue | 64 +++++++++++-------- .../components/TestReviewTestCaseEdit.vue | 4 ++ 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue b/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue index 36ef2656c9..cb8c962684 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue @@ -18,12 +18,17 @@ - + + + + @@ -160,6 +165,7 @@ export default { demandOptions: [], relationshipCount: 0, demandValue: [], + demandLabel: '', //sysList:this.sysList,//一级选择框的数据 props: { multiple: true, @@ -386,34 +392,29 @@ export default { } }, getDemandOptions() { - if (this.demandOptions.length === 0) { - this.result = {loading: true}; - this.$get("/issues/demand/list/" + this.projectId).then(response => { - this.demandOptions = []; - if (response.data.data && response.data.data.length > 0) { - this.buildDemandCascaderOptions(response.data.data, this.demandOptions, []); - } - this.demandOptions.unshift({ - value: 'other', - label: 'Other: ' + this.$t('test_track.case.other'), - platform: 'Other' - }); - if (this.form.demandId === 'other') { - this.demandValue = ['other']; - } - this.result = {loading: false}; - }).catch(() => { - this.demandOptions.unshift({ - value: 'other', - label: 'Other: ' + this.$t('test_track.case.other'), - platform: 'Other' - }); - if (this.form.demandId === 'other') { - this.demandValue = ['other']; - } - this.result = {loading: false}; - }); + this.result = {loading: true}; + this.demandLabel = ''; + this.$get("/issues/demand/list/" + this.projectId).then(response => { + this.demandOptions = []; + if (response.data.data && response.data.data.length > 0) { + this.buildDemandCascaderOptions(response.data.data, this.demandOptions, []); + } + this.addOtherOption(); + }).catch(() => { + this.addOtherOption(); + }); + }, + addOtherOption() { + this.demandOptions.unshift({ + value: 'other', + label: 'Other: ' + this.$t('test_track.case.other'), + platform: 'Other' + }); + if (this.form.demandId === 'other') { + this.demandValue = ['other']; + this.demandLabel = 'Other: ' + this.$t('test_track.case.other'); } + this.result = {loading: false}; }, buildDemandCascaderOptions(data, options, pathArray) { data.forEach(item => { @@ -421,6 +422,9 @@ export default { label: item.platform + ': ' + item.name, value: item.id } + if (this.form.demandId === item.id) { + this.demandLabel = option.label; + } options.push(option); pathArray.push(item.id); if (item.id === this.form.demandId) { @@ -475,4 +479,8 @@ export default { word-break: break-all; margin-right: 5px; } + +.demandInput { + width: 200px; +} diff --git a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue index a4c17aeacb..9efdb60f07 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseEdit.vue @@ -428,6 +428,10 @@ export default { this.testCaseTemplate = template; initFuc(testCase.id); }); + + if (this.$refs.otherInfo) { + this.$refs.otherInfo.reset(); + } }, openTestTestCase(item) { let testCaseData = this.$router.resolve(