fix(功能用例): 脑图用例详情保存回显问题
This commit is contained in:
parent
d95a034f46
commit
e5a1488710
|
@ -179,7 +179,17 @@
|
||||||
const selectedNode: MinderJsonNode = window.minder.getSelectedNode();
|
const selectedNode: MinderJsonNode = window.minder.getSelectedNode();
|
||||||
const priority = (formItem.value.find((item) => item.title === 'Case Priority' || item.title === '用例等级')
|
const priority = (formItem.value.find((item) => item.title === 'Case Priority' || item.title === '用例等级')
|
||||||
?.value || 'P0') as string;
|
?.value || 'P0') as string;
|
||||||
const priorityNumber = Number(priority.match(/\d+/)?.[0]) || 0;
|
|
||||||
|
const selectedNodePriorityNumber = selectedNode?.data?.priority ? selectedNode?.data?.priority : 0;
|
||||||
|
const realPriorityNumber = selectedNodePriorityNumber > 0 ? selectedNodePriorityNumber - 1 : 0;
|
||||||
|
const priorityNumber = Number(priority.match(/\d+/)?.[0]) || realPriorityNumber || 0;
|
||||||
|
formItem.value.forEach((item) => {
|
||||||
|
formRules.value.forEach((rule) => {
|
||||||
|
if (item.field === rule.name) {
|
||||||
|
rule.value = item.value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
if (selectedNode?.data) {
|
if (selectedNode?.data) {
|
||||||
selectedNode.data = {
|
selectedNode.data = {
|
||||||
...selectedNode.data,
|
...selectedNode.data,
|
||||||
|
|
Loading…
Reference in New Issue