fix: 脑图保存顺序

This commit is contained in:
chenjianxing 2021-12-20 20:27:11 +08:00 committed by jianxing
parent 955616f78a
commit 3ab559ef19
5 changed files with 36 additions and 21 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.38",
"vue-minder-editor-plus": "1.0.39",
"vue-papa-parse": "^2.0.0",
"vue-pdf": "^4.2.0",
"vue-router": "^3.1.3",

View File

@ -9,6 +9,7 @@
:progress-enable="false"
:tags="tags"
:height="height"
:move-enable="moveEnable"
:tag-edit-check="tagEditCheck"
:priority-disable-check="priorityDisableCheck"
:distinct-tags="distinctTags"
@ -75,7 +76,11 @@ export default {
default() {
return true;
}
}
},
moveEnable: {
type: Boolean,
default: true
},
},
data() {
return {

View File

@ -9,6 +9,7 @@
:distinct-tags="tags"
:module-disable="false"
:show-module-tag="true"
:move-enable="moveEnable"
:tag-edit-check="tagEditCheck()"
@afterMount="handleAfterMount"
:priority-disable-check="priorityDisableCheck()"
@ -80,6 +81,10 @@ name: "TestCaseMinder",
disabled() {
return !hasPermission('PROJECT_TRACK_CASE:READ+EDIT');
},
moveEnable() {
//
return !this.condition.orders || this.condition.orders.length < 1;
}
},
watch: {
selectNode() {
@ -366,17 +371,20 @@ name: "TestCaseMinder",
if (isChange) {
testCase.targetId = null; //
if (this.isCaseNode(preNode)) {
let preId = preNode.data.id;
if (preId && preId.length > 15) {
testCase.targetId = preId;
testCase.moveMode = 'AFTER';
}
} else if (this.isCaseNode(nextNode)) {
let nextId = nextNode.data.id;
if (nextId && nextId.length > 15) {
testCase.targetId = nextId;
testCase.moveMode = 'BEFORE';
if (this.moveEnable) {
if (this.isCaseNode(preNode)) {
let preId = preNode.data.id;
if (preId && preId.length > 15) {
testCase.targetId = preId;
testCase.moveMode = 'AFTER';
}
} else if (this.isCaseNode(nextNode)) {
let nextId = nextNode.data.id;
if (nextId && nextId.length > 15) {
testCase.targetId = nextId;
testCase.moveMode = 'BEFORE';
}
}
}
@ -403,7 +411,7 @@ name: "TestCaseMinder",
data.id = "";
},
isCaseNode(node) {
if (node && node.resource && node.resource.indexOf(this.$t('api_test.definition.request.case')) > -1) {
if (node && node.data.resource && node.data.resource.indexOf(this.$t('api_test.definition.request.case')) > -1) {
return true;
}
return false;

View File

@ -2212,7 +2212,7 @@ export default {
zentao_bug_build: "禅道 影响版本",
zentao_bug_assigned: "禅道 处理人",
third_party_integrated: "集成第三方平台",
use_third_party: "使用 Jira 缺陷模板",
use_third_party: "使用 Jira 缺陷模板",
update_third_party_bugs: "更新第三方平台的缺陷",
sync_bugs: "同步缺陷"
},

View File

@ -1361,7 +1361,7 @@ export default {
error_report_jmx: "導出JMX文件失敗",
scenario_warning: "引用的場景步驟及子步驟都無法添加其他步驟",
scenario_step_warning: "當前步驟下不能添加其他步驟",
scenario_error: "不能引用或製自身!",
scenario_error: "不能引用或製自身!",
},
request: {
debug: "調試",
@ -2171,8 +2171,8 @@ export default {
export_report: "導出報告",
no_case_relevance: "沒有關聯用例",
automatically_update_status: "自動更新狀態",
allow_associated_repetitive_cases: "允許關聯重複用例",
automatically_update_status_tip: "當功能用例關聯的接口或性能用例在測試計劃執行後,自動更新功能用例的狀態",
allow_associated_repetitive_cases: "允許關聯重復用例",
allow_associated_repetitive_cases_tip: "是否允許同一個測試計劃中多次關聯相同用例"
},
issue: {
@ -2211,6 +2211,8 @@ export default {
tapd_current_owner: "Tapd 處理人",
zentao_bug_build: "禪道 影響版本",
zentao_bug_assigned: "禪道 處理人",
third_party_integrated: "集成第三方平臺",
use_third_party: "使用 Jira 缺陷模板",
update_third_party_bugs: "更新第三方平臺的缺陷",
sync_bugs: "同步缺陷"
},
@ -2713,10 +2715,6 @@ export default {
upload_file: "上傳文件",
delete_file: "刪除文件",
},
project_app_manager: {
name: "應用設置",
edit: "編輯應用設置"
},
project_track_case: {
name: "測試用例",
read: "查詢用例",
@ -2739,6 +2737,10 @@ export default {
relevance_or_cancel: "關聯/取消關聯用例",
},
project_app_manager: {
name: "應用設置",
edit: "編輯應用設置"
},
project_track_plan: {
name: "測試計劃",
read: "查詢測試計劃",