fix(测试跟踪): 模块编辑不生效

--bug=1010489 --user=陈建星 【测试跟踪】-功能用例-脑图-编辑模块名称保存后未生效 https://www.tapd.cn/55049933/s/1107872
This commit is contained in:
chenjianxing 2022-02-22 18:02:23 +08:00 committed by 刘瑞斌
parent c7517df458
commit bf5f8b5cbd
3 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,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.41",
"vue-minder-editor-plus": "1.0.42",
"vue-papa-parse": "^2.0.0",
"vue-pdf": "^4.2.0",
"vue-router": "^3.1.3",

View File

@ -219,7 +219,7 @@ export default {
data: {
text: nodeData.name,
id: nodeData.id,
disable: this.moduleDisable,
disable: this.moduleDisable || nodeData.id === 'root',
tagEnable: this.tagEnable,
type: 'node',
level: nodeData.level,

View File

@ -269,14 +269,14 @@ name: "TestCaseMinder",
}
let pId = parent ? (parent.newId ? parent.newId : parent.id) : null;
if (!isModuleNodeData(parent)) {
if (parent && !isModuleNodeData(parent)) {
this.throwError(this.$t('test_track.case.minder_not_module_tip', [data.text]));
}
let module = {
id: data.id,
name: data.text,
level: parent.level + 1,
level: parent ? parent.level + 1 : data.level,
parentId: pId
};
data.level = module.level;