|
@ -92,17 +92,12 @@ const queryFormColsNumComputed = computed(() => { |
|
|
const handleQueryFormShowField = () => { |
|
|
const handleQueryFormShowField = () => { |
|
|
tools.table.queryFormDisplayFields = []; |
|
|
tools.table.queryFormDisplayFields = []; |
|
|
if (tools.table.moreQueryStatus) { |
|
|
if (tools.table.moreQueryStatus) { |
|
|
tools.props.queryFormFields.forEach((item: any) => { |
|
|
tools.table.queryFormDisplayFields = [...tools.table.queryFormFields]; |
|
|
tools.table.queryFormDisplayFields.push(item); |
|
|
|
|
|
item.showIf = () => { |
|
|
|
|
|
return true; |
|
|
|
|
|
}; |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
// 一行应该显示的字段个数 |
|
|
// 一行应该显示的字段个数 |
|
|
const rowColsNum = queryFormColsNumComputed.value * (tools.props.queryFormRowNum || 1); |
|
|
const rowColsNum = queryFormColsNumComputed.value * (tools.props.queryFormRowNum || 1); |
|
|
let currRowColsNum = 0; |
|
|
let currRowColsNum = 0; |
|
|
tools.props.queryFormFields.forEach((item: any) => { |
|
|
tools.table.queryFormFields.forEach((item: any) => { |
|
|
if (Tools.hasOwnProperty(item, 'colSpan')) { |
|
|
if (Tools.hasOwnProperty(item, 'colSpan')) { |
|
|
currRowColsNum += item.colSpan; |
|
|
currRowColsNum += item.colSpan; |
|
|
} else { |
|
|
} else { |
|
@ -110,13 +105,6 @@ const handleQueryFormShowField = () => { |
|
|
} |
|
|
} |
|
|
if (currRowColsNum <= rowColsNum) { |
|
|
if (currRowColsNum <= rowColsNum) { |
|
|
tools.table.queryFormDisplayFields.push(item); |
|
|
tools.table.queryFormDisplayFields.push(item); |
|
|
item.showIf = (form) => { |
|
|
|
|
|
return true; |
|
|
|
|
|
}; |
|
|
|
|
|
} else { |
|
|
|
|
|
item.showIf = (form) => { |
|
|
|
|
|
return false; |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@ -166,7 +154,7 @@ const handleToolbarActions = () => { |
|
|
const rowColsNum = queryFormColsNumComputed.value * (tools.props.queryFormRowNum || 1); |
|
|
const rowColsNum = queryFormColsNumComputed.value * (tools.props.queryFormRowNum || 1); |
|
|
let currRowColsNum = 0; |
|
|
let currRowColsNum = 0; |
|
|
let showQueryFormFieldNum = 0; |
|
|
let showQueryFormFieldNum = 0; |
|
|
tools.props.queryFormFields.forEach((item: any) => { |
|
|
tools.table.queryFormFields.forEach((item: any) => { |
|
|
if (Tools.hasOwnProperty(item, 'colSpan')) { |
|
|
if (Tools.hasOwnProperty(item, 'colSpan')) { |
|
|
currRowColsNum += item.colSpan; |
|
|
currRowColsNum += item.colSpan; |
|
|
} else { |
|
|
} else { |
|
@ -176,7 +164,7 @@ const handleToolbarActions = () => { |
|
|
showQueryFormFieldNum += 1; |
|
|
showQueryFormFieldNum += 1; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
if (showQueryFormFieldNum < tools.props.queryFormFields.length) { |
|
|
if (showQueryFormFieldNum < tools.table.queryFormFields.length) { |
|
|
moreQueryShow = true; |
|
|
moreQueryShow = true; |
|
|
} |
|
|
} |
|
|
tools.props.toolbarActions.forEach((btn: any, index) => { |
|
|
tools.props.toolbarActions.forEach((btn: any, index) => { |
|
|