|
|
@ -102,6 +102,12 @@ const props = defineProps({ |
|
|
|
required: true, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
// 详情数据 |
|
|
|
detailData: { |
|
|
|
type: Object, |
|
|
|
required: true, |
|
|
|
default: null |
|
|
|
} |
|
|
|
// // 主表参数 |
|
|
|
// masterParmas: { |
|
|
|
// type: Object, |
|
|
@ -127,14 +133,14 @@ const formSchema = ref(props.formAllSchemas?.formSchema) |
|
|
|
// type 发起事件位置 type=tableForm 是明细中发起的 否则 为主表发起的 |
|
|
|
// searchCondition 查询条件 |
|
|
|
const searchTableRef = ref() |
|
|
|
const opensearchTable = (formField, searchField, searchTitle, searchAllSchemas, searchPage, type, row, searchCondition) => { |
|
|
|
const opensearchTable = (formField, searchField, searchTitle, searchAllSchemas, searchPage, searchCondition, type, row ) => { |
|
|
|
const _searchCondition = {} |
|
|
|
// 判断查询条件中,是否存在指向主表的数据 |
|
|
|
if (searchCondition && searchCondition.length > 0) { |
|
|
|
searchCondition.forEach(item => { |
|
|
|
// 查询条件为主表某字段,需要赋值主表数据 |
|
|
|
// 查询条件为主表某字段,需要赋值主表数据,数据来源是详情的,赋值需要从row中获取 |
|
|
|
if (item.isMainValue) { |
|
|
|
_searchCondition[item.key] = formRef.value.formModel[item.value] |
|
|
|
_searchCondition[item.key] = formRef.value.formModel[item.value]?formRef.value.formModel[item.value]:props.detailData[item.value] |
|
|
|
} else { |
|
|
|
_searchCondition[item.key] = item.value |
|
|
|
} |
|
|
@ -313,9 +319,9 @@ const inpuFocus = (headerItem, row, index) => { |
|
|
|
headerItem.tableForm.searchTitle, |
|
|
|
headerItem.tableForm.searchAllSchemas, |
|
|
|
headerItem.tableForm.searchPage, |
|
|
|
headerItem.tableForm.searchCondition, |
|
|
|
'tableForm', |
|
|
|
row, |
|
|
|
headerItem.tableForm.searchCondition |
|
|
|
) |
|
|
|
} |
|
|
|
</script> |
|
|
|