refactor: 用例的子节点禁止打用例和优先级标签
This commit is contained in:
parent
6c48395284
commit
4df9605589
|
@ -50,7 +50,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.21",
|
||||
"vue-minder-editor-plus": "^1.0.23",
|
||||
"vue-papa-parse": "^2.0.0",
|
||||
"vue-pdf": "^4.2.0",
|
||||
"vue-router": "^3.1.3",
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
:progress-enable="false"
|
||||
:tags="tags"
|
||||
:height="height"
|
||||
:tag-edit-check="tagEditCheck"
|
||||
:priority-disable-check="priorityDisableCheck"
|
||||
:distinct-tags="distinctTags"
|
||||
@afterMount="$emit('afterMount')"
|
||||
@save="save"
|
||||
|
@ -55,7 +57,10 @@ export default {
|
|||
},
|
||||
selectNode: {
|
||||
type: Object,
|
||||
}
|
||||
},
|
||||
tagDisableCheck: Function,
|
||||
tagEditCheck: Function,
|
||||
priorityDisableCheck: Function
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
:tags="tags"
|
||||
:select-node="selectNode"
|
||||
:distinct-tags="tags"
|
||||
:tag-edit-check="tagEditCheck()"
|
||||
:priority-disable-check="priorityDisableCheck()"
|
||||
@save="save"
|
||||
ref="minder"
|
||||
/>
|
||||
|
@ -16,7 +18,7 @@ import MsModuleMinder from "@/business/components/common/components/MsModuleMind
|
|||
import {
|
||||
appendChild,
|
||||
getTestCaseDataMap,
|
||||
parseCase, updateNode
|
||||
parseCase, priorityDisableCheck, tagEditCheck, updateNode
|
||||
} from "@/business/components/track/common/minder/minderUtils";
|
||||
import {getNodePath} from "@/common/js/utils";
|
||||
export default {
|
||||
|
@ -167,6 +169,12 @@ name: "TestCaseMinder",
|
|||
throw new Error(tip);
|
||||
}
|
||||
},
|
||||
tagEditCheck() {
|
||||
return tagEditCheck;
|
||||
},
|
||||
priorityDisableCheck() {
|
||||
return priorityDisableCheck;
|
||||
},
|
||||
addCase(data, type) {
|
||||
let nodeData = parseCase(data, new Map());
|
||||
let minder = window.minder;
|
||||
|
|
|
@ -230,3 +230,27 @@ export function tagBatch(distinctTags) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function tagEditCheck(resourceName) {
|
||||
let minder = window.minder;
|
||||
let selectNodes = minder.getSelectedNodes();
|
||||
if (selectNodes && selectNodes.length > 0) {
|
||||
let resource = selectNodes[0].getParent().data.resource;
|
||||
if (resource && resource.indexOf('用例') > -1 && resourceName === '用例') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
export function priorityDisableCheck() {
|
||||
let minder = window.minder;
|
||||
let selectNodes = minder.getSelectedNodes();
|
||||
if (selectNodes && selectNodes.length > 0) {
|
||||
let resource = selectNodes[0].getParent().data.resource;
|
||||
if (resource && resource.indexOf('用例') > -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue