From ee0a41fa02bbcb69fcaf30b5f6b9e7819cae09cf Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 29 Apr 2021 16:55:08 +0800 Subject: [PATCH] =?UTF-8?q?refator:=20=E5=B0=86=E8=84=91=E5=9B=BE=E6=95=B4?= =?UTF-8?q?=E4=BD=93=E5=B8=83=E5=B1=80=E4=BF=9D=E5=AD=98=E5=9C=A8=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 +- .../common/components/MsModuleMinder.vue | 19 +++++++++++++++++++ .../track/common/minder/TestCaseMinder.vue | 1 + .../track/common/minder/TestPlanMinder.vue | 1 + .../track/common/minder/TestReviewMinder.vue | 1 + 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 18e6e3be48..4ed6fd9b31 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -50,7 +50,7 @@ "vue-float-action-button": "^0.6.6", "vue-i18n": "^8.15.3", "vue-jsonpath-picker": "^1.1.5", - "vue-minder-editor-plus": "^1.0.23", + "vue-minder-editor-plus": "^1.0.24", "vue-papa-parse": "^2.0.0", "vue-pdf": "^4.2.0", "vue-router": "^3.1.3", diff --git a/frontend/src/business/components/common/components/MsModuleMinder.vue b/frontend/src/business/components/common/components/MsModuleMinder.vue index 1af6930155..10e03fd81c 100644 --- a/frontend/src/business/components/common/components/MsModuleMinder.vue +++ b/frontend/src/business/components/common/components/MsModuleMinder.vue @@ -11,7 +11,9 @@ :tag-edit-check="tagEditCheck" :priority-disable-check="priorityDisableCheck" :distinct-tags="distinctTags" + :default-mold="minderModel" @afterMount="$emit('afterMount')" + @moldChange="handleMoldChange" @save="save" /> @@ -25,6 +27,7 @@ export default { name: "MsModuleMinder", components: {MsFullScreenButton}, props: { + minderKey: String, treeNodes: { type: Array, default() { @@ -98,7 +101,23 @@ export default { }) } }, + computed: { + minderModel() { + if (this.minderKey) { + let model = localStorage.getItem(this.minderKey + 'minderModel'); + if (model) { + return Number.parseInt(model); + } + } + return 3; + } + }, methods: { + handleMoldChange(index) { + if (this.minderKey) { + localStorage.setItem(this.minderKey + 'minderModel', index); + } + }, save(data) { this.$emit('save', data) }, diff --git a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue index 55545a0c20..eefa5f5097 100644 --- a/frontend/src/business/components/track/common/minder/TestCaseMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestCaseMinder.vue @@ -4,6 +4,7 @@ :tree-nodes="treeNodes" :data-map="dataMap" :tags="tags" + minder-key="testCase" :select-node="selectNode" :distinct-tags="tags" :tag-edit-check="tagEditCheck()" diff --git a/frontend/src/business/components/track/common/minder/TestPlanMinder.vue b/frontend/src/business/components/track/common/minder/TestPlanMinder.vue index 55af1933fe..a006f7af0d 100644 --- a/frontend/src/business/components/track/common/minder/TestPlanMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestPlanMinder.vue @@ -5,6 +5,7 @@ :data-map="dataMap" :tags="tags" :tag-enable="true" + minder-key="testPlan" :select-node="selectNode" :distinct-tags="[...tags, this.$t('test_track.plan.plan_status_prepare')]" @afterMount="handleAfterMount" diff --git a/frontend/src/business/components/track/common/minder/TestReviewMinder.vue b/frontend/src/business/components/track/common/minder/TestReviewMinder.vue index 301358ea09..68e02d22b6 100644 --- a/frontend/src/business/components/track/common/minder/TestReviewMinder.vue +++ b/frontend/src/business/components/track/common/minder/TestReviewMinder.vue @@ -5,6 +5,7 @@ :data-map="dataMap" :tags="tags" :tag-enable="true" + minder-key="testReview" :select-node="selectNode" :distinct-tags="[...tags, $t('test_track.plan.plan_status_prepare')]" @afterMount="handleAfterMount"