|
|
|
@ -1781,7 +1781,7 @@ const showImagePreview = ref(false) |
|
|
|
controlData.value.item.label = "关联表单" |
|
|
|
} |
|
|
|
controlData.value.item.showLabel = true */ |
|
|
|
console.log(controlData.value.control.fillRoles.master) |
|
|
|
//console.log(controlData.value.control.fillRoles.master) |
|
|
|
if(controlData.value.control.fillRoles&&controlData.value.control.fillRoles.master.length==0){ |
|
|
|
controlData.value.control.fillRoles.master = [ |
|
|
|
{ |
|
|
|
@ -2129,11 +2129,11 @@ function formidChanged(){ |
|
|
|
let dataOnlyChild = JSON.parse(JSON.stringify(data.children)) |
|
|
|
let dataOnlyChild1 = JSON.parse(JSON.stringify(data.children)) |
|
|
|
dataExceptChild = dataExceptChild.filter((obj: { type: string }) => obj.type!== 'table'); |
|
|
|
console.log(dataExceptChild) |
|
|
|
//console.log(dataExceptChild) |
|
|
|
dataExceptChild = removeFirstNumElements(dataExceptChild,8); |
|
|
|
dataOnlyChild = dataOnlyChild.filter((obj: { type: string }) => obj.type== 'table'); |
|
|
|
dataOnlyChild1 = dataOnlyChild1.filter((obj: { type: string }) => obj.type== 'table'); |
|
|
|
console.log(dataOnlyChild1) |
|
|
|
//console.log(dataOnlyChild1) |
|
|
|
dataOnlyChild1.forEach((element: any) => { |
|
|
|
element.children = removeFirstNumElements(element.children,6); |
|
|
|
}); |
|
|
|
@ -2145,15 +2145,15 @@ function formidChanged(){ |
|
|
|
let resDataExceptChild = ref(dataExceptChild) |
|
|
|
let resDataOnlyChild = ref(dataOnlyChild) |
|
|
|
let resDataOnlyChild1 = ref(dataOnlyChild1) |
|
|
|
console.log(resDataOnlyChild1.value) |
|
|
|
//console.log(resDataOnlyChild1.value) |
|
|
|
//console.log(resDataOnlyChild.value) |
|
|
|
let childTableCount = 0 |
|
|
|
for(let n = 0;n<resDataOnlyChild.value.length;n++){ |
|
|
|
console.log(resDataOnlyChild.value[n]) |
|
|
|
//console.log(resDataOnlyChild.value[n]) |
|
|
|
resDataOnlyChild.value[n].disabled=false |
|
|
|
childTableCount++ |
|
|
|
} |
|
|
|
console.log(childTableCount) |
|
|
|
//console.log(childTableCount) |
|
|
|
currentChildTableCount = childTableCount |
|
|
|
asfasfFieldTree.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
@ -2252,7 +2252,7 @@ function formidChangedOptionsValue3(){ |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const currentFormChildTableFieldsForFillRole = ref<Tree[]>() |
|
|
|
const associatedFormsCurrentFormFieldTree = ref<Tree[]>() |
|
|
|
const associatedFormsCurrentFormFieldTree1 = ref<Tree[]>() |
|
|
|
const associatedFormsCurrentFormFieldTreeNoTable = ref<Tree[]>() |
|
|
|
@ -2270,8 +2270,9 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
}else{ |
|
|
|
let resData = ref(data.children) |
|
|
|
let resDataExceptSystemFields = JSON.parse(JSON.stringify(data.children)) |
|
|
|
let currentFormChildTableFields = JSON.parse(JSON.stringify(data.children)) |
|
|
|
let resDataNoTable = JSON.parse(JSON.stringify(data.children)) |
|
|
|
console.log("fdsfdsasdfahjdsaflksjl;kjsdolkfjlksdjiofweklsdjknfsadkoljsfdao") |
|
|
|
|
|
|
|
resDataExceptSystemFields = removeFirstNumElements(resDataExceptSystemFields,8) |
|
|
|
resDataExceptSystemFields.forEach((element: any) => { |
|
|
|
if(element.type=="table"){ |
|
|
|
@ -2279,8 +2280,12 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
element.children = removeFirstNumElements(element.children,6) |
|
|
|
} |
|
|
|
}); |
|
|
|
console.log(resDataExceptSystemFields) |
|
|
|
//let rootid_ = data.value.label |
|
|
|
//在此组装当前表单子表字段数据 |
|
|
|
currentFormChildTableFields = currentFormChildTableFields.filter( (item: { type: string }) => item.type == "table" ) |
|
|
|
currentFormChildTableFields.forEach((element: any) => { |
|
|
|
element.children = removeFirstNumElements(element.children,6) |
|
|
|
}); |
|
|
|
|
|
|
|
associatedFormsCurrentFormFieldTree.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '当前表单-'+data.treeAttrs.show, |
|
|
|
@ -2288,8 +2293,6 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
disabled: true, |
|
|
|
}] |
|
|
|
|
|
|
|
|
|
|
|
associatedFormsCurrentFormFieldTree1.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '当前表单-'+data.treeAttrs.show, |
|
|
|
@ -2297,6 +2300,13 @@ getAssociatedFormsCurrentFieldTree().then(({ data }) => { |
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
disabled: true, |
|
|
|
}] |
|
|
|
currentFormChildTableFieldsForFillRole.value = [{ |
|
|
|
id: 'rootid_'+data.label, |
|
|
|
label: '当前表单-'+data.treeAttrs.show, |
|
|
|
children: [...currentFormChildTableFields], |
|
|
|
treeAttrs: data.treeAttrs, |
|
|
|
disabled: true, |
|
|
|
}] |
|
|
|
|
|
|
|
resDataNoTable = resDataNoTable.filter((item: { type: string | null }) => item.type!="table") |
|
|
|
|
|
|
|
@ -2646,7 +2656,10 @@ function selectedOrDelChildRole(){ |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//将已被选择的要填充的关联其他表单的表单的子表字段设为不可选择 |
|
|
|
function childRoleRightChanged(){ |
|
|
|
alert(1) |
|
|
|
} |
|
|
|
|
|
|
|
//确定回调 |
|
|
|
function handleDetermine(){ |
|
|
|
@ -4663,7 +4676,9 @@ const radioChangeSet = (val:any) => { |
|
|
|
:associated-forms-current-form-field-tree= "associatedFormsCurrentFormFieldTree" |
|
|
|
:asfasf-child-table-fields = "asfasfChildTableFields" |
|
|
|
:current-key="controlData.control.fillRoles.child[index].id" |
|
|
|
:current-form-child-table-fields-for-fill-role = "currentFormChildTableFieldsForFillRole" |
|
|
|
@selected-or-del-child-role = "selectedOrDelChildRole" |
|
|
|
@child-role-right-changed = "childRoleRightChanged" |
|
|
|
@del-role = "delChildRole" |
|
|
|
> |
|
|
|
</AssociatedFormsChildFillRole> |
|
|
|
|