|
@ -125,13 +125,25 @@ const formSchema = ref(props.formAllSchemas?.formSchema) |
|
|
// formField form表单中的字段 |
|
|
// formField form表单中的字段 |
|
|
// searchField 查询列表中的字段 |
|
|
// searchField 查询列表中的字段 |
|
|
// type 发起事件位置 type=tableForm 是明细中发起的 否则 为主表发起的 |
|
|
// type 发起事件位置 type=tableForm 是明细中发起的 否则 为主表发起的 |
|
|
|
|
|
// searchCondition 查询条件 |
|
|
const searchTableRef = ref() |
|
|
const searchTableRef = ref() |
|
|
const opensearchTable = (formField, searchField, searchTitle, searchAllSchemas, searchPage, type, row) => { |
|
|
const opensearchTable = (formField, searchField, searchTitle, searchAllSchemas, searchPage, type, row, searchCondition) => { |
|
|
|
|
|
const _searchCondition = {} |
|
|
|
|
|
// 判断查询条件中,是否存在指向主表的数据 |
|
|
|
|
|
if (searchCondition && searchCondition.length > 0) { |
|
|
|
|
|
searchCondition.forEach(item => { |
|
|
|
|
|
// 查询条件为主表某字段,需要赋值主表数据 |
|
|
|
|
|
if (item.isMainValue) { |
|
|
|
|
|
_searchCondition[item.key] = formRef.value.formModel[item.value] |
|
|
|
|
|
} else { |
|
|
|
|
|
_searchCondition[item.key] = item.value |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
const _searchTableTitle = searchTitle |
|
|
const _searchTableTitle = searchTitle |
|
|
const _searchTableAllSchemas = searchAllSchemas |
|
|
const _searchTableAllSchemas = searchAllSchemas |
|
|
const _searchTablePage = searchPage |
|
|
const _searchTablePage = searchPage |
|
|
console.log(_searchTablePage) |
|
|
searchTableRef.value.open(_searchTableTitle, _searchTableAllSchemas, _searchTablePage, formField, searchField, type, row, _searchCondition) |
|
|
searchTableRef.value.open(_searchTableTitle, _searchTableAllSchemas, _searchTablePage, formField, searchField, type, row) |
|
|
|
|
|
} |
|
|
} |
|
|
// 弹层确定返回所选数据 |
|
|
// 弹层确定返回所选数据 |
|
|
// val : 弹层列表row 数据 |
|
|
// val : 弹层列表row 数据 |
|
@ -302,7 +314,8 @@ const inpuFocus = (headerItem, row, index) => { |
|
|
headerItem.tableForm.searchAllSchemas, |
|
|
headerItem.tableForm.searchAllSchemas, |
|
|
headerItem.tableForm.searchPage, |
|
|
headerItem.tableForm.searchPage, |
|
|
'tableForm', |
|
|
'tableForm', |
|
|
row |
|
|
row, |
|
|
|
|
|
headerItem.tableForm.searchCondition |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|