fix(测试跟踪): 脑图中版本筛选功能失效
--bug=1012876 --user=陈建星 [测试跟踪]github#10373脑图中版本筛选功能失效 https://www.tapd.cn/55049933/s/1167035
This commit is contained in:
parent
54b868bf6b
commit
35f9595df5
|
@ -733,9 +733,11 @@
|
||||||
|
|
||||||
<select id="listForMinder" resultType="io.metersphere.track.dto.TestCaseDTO">
|
<select id="listForMinder" resultType="io.metersphere.track.dto.TestCaseDTO">
|
||||||
select
|
select
|
||||||
<include refid="io.metersphere.base.mapper.TestCaseMapper.Base_Column_List"/>,
|
test_case.*,
|
||||||
<include refid="io.metersphere.base.mapper.TestCaseMapper.Blob_Column_List"/>
|
project_version.name as versionName,
|
||||||
|
project_version.id as versionId
|
||||||
from test_case
|
from test_case
|
||||||
|
left join project_version on project_version.id = test_case.version_id
|
||||||
<include refid="queryWhereCondition"/>
|
<include refid="queryWhereCondition"/>
|
||||||
<if test="request.nodeId != null">
|
<if test="request.nodeId != null">
|
||||||
and test_case.node_id = #{request.nodeId}
|
and test_case.node_id = #{request.nodeId}
|
||||||
|
|
|
@ -54,7 +54,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.43",
|
"vue-minder-editor-plus": "1.0.44",
|
||||||
"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",
|
||||||
|
|
|
@ -122,15 +122,18 @@ export default {
|
||||||
this.defaultMode = Number.parseInt(model);
|
this.defaultMode = Number.parseInt(model);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.initData();
|
||||||
if (this.selectNode && this.selectNode.data) {
|
|
||||||
this.handleNodeSelect(this.selectNode);
|
|
||||||
} else {
|
|
||||||
this.parse(this.importJson.root, this.treeNodes);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initData() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.selectNode && this.selectNode.data) {
|
||||||
|
this.handleNodeSelect(this.selectNode);
|
||||||
|
} else {
|
||||||
|
this.parse(this.importJson.root, this.treeNodes);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
getNoCaseModuleIds(ids, nodes) {
|
getNoCaseModuleIds(ids, nodes) {
|
||||||
if (nodes) {
|
if (nodes) {
|
||||||
nodes.forEach(node => {
|
nodes.forEach(node => {
|
||||||
|
|
|
@ -104,6 +104,7 @@
|
||||||
ref="testCaseList">
|
ref="testCaseList">
|
||||||
</test-case-list>
|
</test-case-list>
|
||||||
<test-case-minder
|
<test-case-minder
|
||||||
|
:current-version="currentVersion"
|
||||||
:tree-nodes="treeNodes"
|
:tree-nodes="treeNodes"
|
||||||
:project-id="projectId"
|
:project-id="projectId"
|
||||||
:condition="condition"
|
:condition="condition"
|
||||||
|
|
|
@ -87,6 +87,7 @@ name: "TestCaseMinder",
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
currentVersion: String,
|
||||||
condition: Object,
|
condition: Object,
|
||||||
projectId: String,
|
projectId: String,
|
||||||
},
|
},
|
||||||
|
@ -120,6 +121,9 @@ name: "TestCaseMinder",
|
||||||
if (this.$refs.minder) {
|
if (this.$refs.minder) {
|
||||||
this.$refs.minder.handleNodeSelect(this.selectNode);
|
this.$refs.minder.handleNodeSelect(this.selectNode);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
currentVersion() {
|
||||||
|
this.$refs.minder.initData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -182,6 +186,7 @@ name: "TestCaseMinder",
|
||||||
return {
|
return {
|
||||||
request: {
|
request: {
|
||||||
projectId: this.projectId,
|
projectId: this.projectId,
|
||||||
|
versionId: this.currentVersion,
|
||||||
orders: this.condition.orders
|
orders: this.condition.orders
|
||||||
},
|
},
|
||||||
result: this.result,
|
result: this.result,
|
||||||
|
@ -330,12 +335,7 @@ name: "TestCaseMinder",
|
||||||
this.saveExtraNode[parent.newId ? parent.newId : parent.id] = nodes;
|
this.saveExtraNode[parent.newId ? parent.newId : parent.id] = nodes;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildSaveCase(node, parent, preNode, nextNode) {
|
validate(parent, data) {
|
||||||
let data = node.data;
|
|
||||||
if (!data.text) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent.id === 'root') {
|
if (parent.id === 'root') {
|
||||||
this.throwError(this.$t('test_track.case.minder_all_module_tip'));
|
this.throwError(this.$t('test_track.case.minder_all_module_tip'));
|
||||||
}
|
}
|
||||||
|
@ -347,6 +347,14 @@ name: "TestCaseMinder",
|
||||||
if (data.type === 'node') {
|
if (data.type === 'node') {
|
||||||
this.throwError(this.$t('test_track.case.minder_is_module_tip', [data.text]));
|
this.throwError(this.$t('test_track.case.minder_is_module_tip', [data.text]));
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
buildSaveCase(node, parent, preNode, nextNode) {
|
||||||
|
let data = node.data;
|
||||||
|
if (!data.text) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.validate(parent, data);
|
||||||
|
|
||||||
let isChange = false;
|
let isChange = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue