fix 多个tag下不同项目下用例保存
This commit is contained in:
parent
8574b1467f
commit
0ace484dd0
|
@ -17,6 +17,7 @@
|
||||||
:draggable="true"
|
:draggable="true"
|
||||||
:select-node.sync="selectNode"
|
:select-node.sync="selectNode"
|
||||||
@refreshTable="refreshTable"
|
@refreshTable="refreshTable"
|
||||||
|
:current-project="currentProject"
|
||||||
ref="nodeTree"/>
|
ref="nodeTree"/>
|
||||||
</ms-aside-container>
|
</ms-aside-container>
|
||||||
|
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
:read-only="testCaseReadOnly"
|
:read-only="testCaseReadOnly"
|
||||||
:tree-nodes="treeNodes"
|
:tree-nodes="treeNodes"
|
||||||
:select-node="selectNode"
|
:select-node="selectNode"
|
||||||
|
:current-project="currentProject"
|
||||||
ref="testCaseEditDialog">
|
ref="testCaseEditDialog">
|
||||||
</test-case-edit>
|
</test-case-edit>
|
||||||
|
|
||||||
|
|
|
@ -250,6 +250,9 @@
|
||||||
},
|
},
|
||||||
selectNode: {
|
selectNode: {
|
||||||
type: Object
|
type: Object
|
||||||
|
},
|
||||||
|
currentProject: {
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -330,9 +333,11 @@
|
||||||
param.nodePath = item.path;
|
param.nodePath = item.path;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(localStorage.getItem(CURRENT_PROJECT)) {
|
|
||||||
param.projectId = JSON.parse(localStorage.getItem(CURRENT_PROJECT)).id;
|
if (this.currentProject) {
|
||||||
|
param.projectId = this.currentProject.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
param.name = param.name.trim();
|
param.name = param.name.trim();
|
||||||
if (param.name == '') {
|
if (param.name == '') {
|
||||||
this.$warning(this.$t('test_track.case.input_name'));
|
this.$warning(this.$t('test_track.case.input_name'));
|
||||||
|
|
|
@ -57,6 +57,9 @@
|
||||||
props: {
|
props: {
|
||||||
treeNodes: {
|
treeNodes: {
|
||||||
type: Array
|
type: Array
|
||||||
|
},
|
||||||
|
currentProject: {
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -106,8 +109,8 @@
|
||||||
}
|
}
|
||||||
param.name = this.form.name.trim();
|
param.name = this.form.name.trim();
|
||||||
param.label = this.form.name;
|
param.label = this.form.name;
|
||||||
if (localStorage.getItem(CURRENT_PROJECT)) {
|
if (this.currentProject) {
|
||||||
param.projectId = JSON.parse(localStorage.getItem(CURRENT_PROJECT)).id;
|
param.projectId = this.currentProject.id;
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
<node-edit ref="nodeEdit" :tree-nodes="treeNodes" @refresh="refreshNode" />
|
<node-edit ref="nodeEdit" :current-project="currentProject" :tree-nodes="treeNodes" @refresh="refreshNode" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -83,6 +83,9 @@ export default {
|
||||||
draggable: {
|
draggable: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
currentProject: {
|
||||||
|
type: Object
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
Loading…
Reference in New Issue