ec310739 by lihua

fix

1 parent c73c8f6e
......@@ -293,10 +293,10 @@ watch(
form.value.fieldRQVOS = [{...tableFormTpl}]
fieldsDisabled.value = false
}
if (level == 2) {
fieldsDisabled.value = isChildHaveData === 'Y' ? true : false
}
if (level >= 3) {
// if (level == 2) { //新增的时候出问题
// fieldsDisabled.value = isChildHaveData === 'Y' ? true : false
// }
if (level >= 2) {
fieldsDisabled.value = true
}
}
......@@ -375,14 +375,14 @@ function inputTypeChange (val, item) {
}
const loading = ref(false)
function getDetail () {
function getDetail (treeCurrNode) {
loading.value = true
return getMetaStandardDetail(props.guid).then((res:any) => {
if (res.code === proxy.$passCode) {
const data = res.data
data.fieldRQVOS = data.fieldRSVOS
form.value = { ...data }
let { level, isChildHaveData, children } = treeCurrentNode.value
let { level, isChildHaveData, children } = treeCurrNode || treeCurrentNode.value
if (level == 1) {
// 所选为一级节点,当前二级节点
fieldsTableShow.value = false
......@@ -459,7 +459,7 @@ watch(
getTreeSelectOptions().then(() => {
loading.value = false
let guid = props.currentNode?.guid;
treeCurrentNode.value = props.currentNode
let node = treeCurrentNode.value = props.currentNode
if (guid) {
let getNode = (object: any) => {
for (const select of object) {
......@@ -474,12 +474,9 @@ watch(
}
}
}
let node = getNode(treeSelectData.value);
if (node) {
treeCurrentNode.value = node;
}
node = getNode(treeSelectData.value);
}
getDetail().then(() => formatOptions(treeSelectData.value))
getDetail(node).then(() => formatOptions(treeSelectData.value))
})
treeCurrentNode.value = props.currentNode
} else {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!