fad05b68 by lihua

fix

1 parent 7f12e518
...@@ -293,10 +293,10 @@ watch( ...@@ -293,10 +293,10 @@ watch(
293 form.value.fieldRQVOS = [{...tableFormTpl}] 293 form.value.fieldRQVOS = [{...tableFormTpl}]
294 fieldsDisabled.value = false 294 fieldsDisabled.value = false
295 } 295 }
296 if (level == 2) { 296 // if (level == 2) { //新增的时候出问题
297 fieldsDisabled.value = isChildHaveData === 'Y' ? true : false 297 // fieldsDisabled.value = isChildHaveData === 'Y' ? true : false
298 } 298 // }
299 if (level >= 3) { 299 if (level >= 2) {
300 fieldsDisabled.value = true 300 fieldsDisabled.value = true
301 } 301 }
302 } 302 }
...@@ -375,14 +375,14 @@ function inputTypeChange (val, item) { ...@@ -375,14 +375,14 @@ function inputTypeChange (val, item) {
375 } 375 }
376 376
377 const loading = ref(false) 377 const loading = ref(false)
378 function getDetail () { 378 function getDetail (treeCurrNode) {
379 loading.value = true 379 loading.value = true
380 return getMetaStandardDetail(props.guid).then((res:any) => { 380 return getMetaStandardDetail(props.guid).then((res:any) => {
381 if (res.code === proxy.$passCode) { 381 if (res.code === proxy.$passCode) {
382 const data = res.data 382 const data = res.data
383 data.fieldRQVOS = data.fieldRSVOS 383 data.fieldRQVOS = data.fieldRSVOS
384 form.value = { ...data } 384 form.value = { ...data }
385 let { level, isChildHaveData, children } = treeCurrentNode.value 385 let { level, isChildHaveData, children } = treeCurrNode || treeCurrentNode.value
386 if (level == 1) { 386 if (level == 1) {
387 // 所选为一级节点,当前二级节点 387 // 所选为一级节点,当前二级节点
388 fieldsTableShow.value = false 388 fieldsTableShow.value = false
...@@ -459,7 +459,7 @@ watch( ...@@ -459,7 +459,7 @@ watch(
459 getTreeSelectOptions().then(() => { 459 getTreeSelectOptions().then(() => {
460 loading.value = false 460 loading.value = false
461 let guid = props.currentNode?.guid; 461 let guid = props.currentNode?.guid;
462 treeCurrentNode.value = props.currentNode 462 let node = treeCurrentNode.value = props.currentNode
463 if (guid) { 463 if (guid) {
464 let getNode = (object: any) => { 464 let getNode = (object: any) => {
465 for (const select of object) { 465 for (const select of object) {
...@@ -474,12 +474,9 @@ watch( ...@@ -474,12 +474,9 @@ watch(
474 } 474 }
475 } 475 }
476 } 476 }
477 let node = getNode(treeSelectData.value); 477 node = getNode(treeSelectData.value);
478 if (node) {
479 treeCurrentNode.value = node;
480 }
481 } 478 }
482 getDetail().then(() => formatOptions(treeSelectData.value)) 479 getDetail(node).then(() => formatOptions(treeSelectData.value))
483 }) 480 })
484 treeCurrentNode.value = props.currentNode 481 treeCurrentNode.value = props.currentNode
485 } else { 482 } else {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!