fix: 脑图样式冲突以及功能优化

This commit is contained in:
chenjianxing 2021-03-12 16:57:34 +08:00
parent f4ed49fde5
commit 74deed5032
3 changed files with 66 additions and 26 deletions

View File

@ -49,7 +49,7 @@
"xml-js": "^1.6.11",
"yan-progress": "^1.0.3",
"jsonpath": "^1.1.0",
"vue-minder-editor-plus": "^1.0.14",
"vue-minder-editor-plus": "^1.0.16",
"jsencrypt": "^3.1.0"
},
"devDependencies": {

View File

@ -0,0 +1,65 @@
<template>
<ms-module-minder
:tree-nodes="treeNodes"/>
</template>
<script>
import MsModuleMinder from "@/business/components/common/components/MsModuleMinder";
export default {
name: "TestCaseMinder",
components: {MsModuleMinder},
data() {
return{
testCase: [],
dataMap: new Map()
}
},
props: {
treeNodes: {
type: Array,
default() {
return []
}
},
condition: Object,
projectId: String
},
mounted() {
// this.getTestCases();
},
methods: {
getTestCases() {
if (this.projectId) {
this.result = this.$get('/test/case/list/detail/' + this.projectId,response => {
this.testCase = response.data;
console.log(this.testCase)
this.parse();
});
}
},
parse() {
this.testCase.forEach(item => {
let mapItem = this.dataMap.get(item.moduleId);
let nodeItem = {
id: item.id,
name: item.name,
}
if (mapItem) {
mapItem.push(item);
} else {
mapItem = [];
mapItem.push(item);
}
if (item.tags && item.tags.length > 0) {
item.tags = JSON.parse(item.tags);
}
})
}
},
}
</script>
<style scoped>
</style>

View File

@ -1,25 +0,0 @@
<template>
<ms-module-minder
:tree-nodes="treeNodes"/>
</template>
<script>
import MsModuleMinder from "@/business/components/common/components/MsModuleMinder";
export default {
name: "TestcaseMinder",
components: {MsModuleMinder},
props: {
treeNodes: {
type: Array,
default() {
return []
}
}
},
}
</script>
<style scoped>
</style>