refator: 将脑图整体布局保存在浏览器端
This commit is contained in:
parent
c8c9c4460c
commit
ee0a41fa02
|
@ -50,7 +50,7 @@
|
||||||
"vue-float-action-button": "^0.6.6",
|
"vue-float-action-button": "^0.6.6",
|
||||||
"vue-i18n": "^8.15.3",
|
"vue-i18n": "^8.15.3",
|
||||||
"vue-jsonpath-picker": "^1.1.5",
|
"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-papa-parse": "^2.0.0",
|
||||||
"vue-pdf": "^4.2.0",
|
"vue-pdf": "^4.2.0",
|
||||||
"vue-router": "^3.1.3",
|
"vue-router": "^3.1.3",
|
||||||
|
|
|
@ -11,7 +11,9 @@
|
||||||
:tag-edit-check="tagEditCheck"
|
:tag-edit-check="tagEditCheck"
|
||||||
:priority-disable-check="priorityDisableCheck"
|
:priority-disable-check="priorityDisableCheck"
|
||||||
:distinct-tags="distinctTags"
|
:distinct-tags="distinctTags"
|
||||||
|
:default-mold="minderModel"
|
||||||
@afterMount="$emit('afterMount')"
|
@afterMount="$emit('afterMount')"
|
||||||
|
@moldChange="handleMoldChange"
|
||||||
@save="save"
|
@save="save"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,6 +27,7 @@ export default {
|
||||||
name: "MsModuleMinder",
|
name: "MsModuleMinder",
|
||||||
components: {MsFullScreenButton},
|
components: {MsFullScreenButton},
|
||||||
props: {
|
props: {
|
||||||
|
minderKey: String,
|
||||||
treeNodes: {
|
treeNodes: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
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: {
|
methods: {
|
||||||
|
handleMoldChange(index) {
|
||||||
|
if (this.minderKey) {
|
||||||
|
localStorage.setItem(this.minderKey + 'minderModel', index);
|
||||||
|
}
|
||||||
|
},
|
||||||
save(data) {
|
save(data) {
|
||||||
this.$emit('save', data)
|
this.$emit('save', data)
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
:tree-nodes="treeNodes"
|
:tree-nodes="treeNodes"
|
||||||
:data-map="dataMap"
|
:data-map="dataMap"
|
||||||
:tags="tags"
|
:tags="tags"
|
||||||
|
minder-key="testCase"
|
||||||
:select-node="selectNode"
|
:select-node="selectNode"
|
||||||
:distinct-tags="tags"
|
:distinct-tags="tags"
|
||||||
:tag-edit-check="tagEditCheck()"
|
:tag-edit-check="tagEditCheck()"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
:data-map="dataMap"
|
:data-map="dataMap"
|
||||||
:tags="tags"
|
:tags="tags"
|
||||||
:tag-enable="true"
|
:tag-enable="true"
|
||||||
|
minder-key="testPlan"
|
||||||
:select-node="selectNode"
|
:select-node="selectNode"
|
||||||
:distinct-tags="[...tags, this.$t('test_track.plan.plan_status_prepare')]"
|
:distinct-tags="[...tags, this.$t('test_track.plan.plan_status_prepare')]"
|
||||||
@afterMount="handleAfterMount"
|
@afterMount="handleAfterMount"
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
:data-map="dataMap"
|
:data-map="dataMap"
|
||||||
:tags="tags"
|
:tags="tags"
|
||||||
:tag-enable="true"
|
:tag-enable="true"
|
||||||
|
minder-key="testReview"
|
||||||
:select-node="selectNode"
|
:select-node="selectNode"
|
||||||
:distinct-tags="[...tags, $t('test_track.plan.plan_status_prepare')]"
|
:distinct-tags="[...tags, $t('test_track.plan.plan_status_prepare')]"
|
||||||
@afterMount="handleAfterMount"
|
@afterMount="handleAfterMount"
|
||||||
|
|
Loading…
Reference in New Issue