diff --git a/src/components/DesignForm/formControlPropertiNew.vue b/src/components/DesignForm/formControlPropertiNew.vue index 8b94a30..2e610a1 100644 --- a/src/components/DesignForm/formControlPropertiNew.vue +++ b/src/components/DesignForm/formControlPropertiNew.vue @@ -1260,6 +1260,29 @@ const getPropByPath = (obj: any, path: string, val: any) => { } } // 属性设置相关结束 + + const showAssociatedFormsFillRole = ref(true) + + //关联表单数据填充时无法获取当前表单新增且保存的字段,只有关闭重启后方能获取----bug修改 + const saveRefreshFormControlAttr = () => { + + //啊啊啊 + + + //setTimeout(() => { + + getAssociatedFormsCurrentFieldTree1() + + + + showAssociatedFormsFillRole.value = false; + // 等待一个短时间的延迟,确保组件卸载完成 + setTimeout(() => { + showAssociatedFormsFillRole.value = true; + }, 200); + //}, 13000); + }; + // 多选固定选项删除 const delSelectOption = (index: number, type?: string) => { //liwenxuan 20240508 checkbox 删除选项时提醒 start @@ -1616,7 +1639,7 @@ const eventClick = (type: string, tooltip?: string) => { emits('openDialog', { type: type, title: tooltip, direction: 'ltr' }) } getDataSource() - defineExpose({ getFormFieldBySource }) + defineExpose({ getFormFieldBySource,saveRefreshFormControlAttr }) //判断输入框是否可写 const isNotWrite = (val:any) =>{ // console.log("判断输入框是否可写--->",val,props.customerformid) @@ -2266,22 +2289,26 @@ function formidChangedOptionsValue3(){ }); } } -const currentFormChildTableFieldsForFillRole = ref() -const associatedFormsCurrentFormFieldTree = ref() -const associatedFormsCurrentFormFieldTree1 = ref() -const associatedFormsCurrentFormFieldTreeNoTable = ref() -const associatedFormsCurrentFormFieldTreeForGlxxsz = ref() +let currentFormChildTableFieldsForFillRole = ref() +let associatedFormsCurrentFormFieldTree = ref() +let associatedFormsCurrentFormFieldTree1 = ref() +let associatedFormsCurrentFormFieldTreeNoTable = ref() +let associatedFormsCurrentFormFieldTreeForGlxxsz = ref() let associatedFormsCurrentFormFieldTreeForGlxxszExceptSelf = ref() let resDataForGlxxszExceptself: any[] = [] let resDataForGlxxszExceptself1: any[] = [] let getAssociatedFormsCurrentFieldTreeData:any +getAssociatedFormsCurrentFieldTree1() +function getAssociatedFormsCurrentFieldTree1(){ getAssociatedFormsCurrentFieldTree().then(({ data }) => { // console.log(data) getAssociatedFormsCurrentFieldTreeData = JSON.parse(JSON.stringify(data)) // console.log(getAssociatedFormsCurrentFieldTreeData) if(data.id==="cfid为空"||data.id==="masterTable为null"){ + //alert("cfid为空") }else{ + let resData = ref(data.children) let resDataExceptSystemFields = JSON.parse(JSON.stringify(data.children)) let currentFormChildTableFields = JSON.parse(JSON.stringify(data.children)) @@ -2357,7 +2384,7 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { } }); - +} const customerFormTree = ref() @@ -4834,13 +4861,14 @@ const radioChangeSet = (val:any) => { - +