feat: 联想弹层,反显不经过接口及翻页显示修改

This commit is contained in:
GAOANG
2024-07-03 16:36:42 +08:00
parent 105c8cb768
commit d72eec1a1b
6 changed files with 392 additions and 361 deletions

View File

@ -426,13 +426,18 @@
</template>
</a-input>
</a-form-item>
<template v-if="data.isSubFormChild">
<template v-if="data.isSubFormChild || data.type === 'associate-popup'">
<a-form-item v-if="hasKey('sepTextField')" label="文本存储字段">
<a-select v-model:value="data.options.sepTextField" :allow-clear="true" :placeholder="t('请选择文本字段')" size="mini">
<a-select-option v-for="fItem in findTableFields(data)" :key="fItem.key" :value="fItem.bindField">{{ fItem.label }}</a-select-option>
</a-select>
</a-form-item>
</template>
<template v-if="data.type === 'associate-popup'">
<a-form-item v-if="hasKey('backPagination')" label="后端分页">
<a-switch v-model:checked="data.options.backPagination" />
</a-form-item>
</template>
<!-- 响应式布局只对主表字段生效 -->
<template v-if="!data.isSubFormChild">
<a-form-item v-if="hasKey('responsive')" label="响应式">
@ -1576,13 +1581,15 @@
}
function findTableFields(obj) {
if (!props.widgetForm?.list) {
return [];
}
const bTable = obj.bindTable;
const pTable = props.widgetForm.list.find((item) => item.type === 'form' && item.bindTable === bTable);
if (!pTable) {
return [];
const tableFormList = props.widgetForm.list.filter(item => item.type !== 'form' && item.type !== 'associate-popup')
return tableFormList;
}
return pTable.children;
}

View File

@ -373,6 +373,8 @@ export const advanceComponents = [
datasourceType: 'api',
dataSource: undefined,
dataSourceId: undefined,
sepTextField: '',
backPagination: false,
labelField: 'label',
valueField: 'value',
apiConfig: {