Ben Lin
2025-03-08 697c405ac874da346e74df40266763370355154d
src/views/tigerprojects/system/lowcode/detail/detail.vue
@@ -128,7 +128,7 @@
      GetUseForm,
      GetUseModals,
    },
    ActionColumn
    ActionColumn,
  ] = isNullOrUnDef(custImport.value['default'])
    ? EntityCustFunction.value
    : custImport.value['default']();
@@ -142,22 +142,27 @@
  /* 表单中插槽渲染按钮打开模态框useModal方法 */
  const modals = GetUseModals && isFunction(GetUseModals) ? GetUseModals() : { useModalData: {} };
  const useModalData = ref(modals['useModalData']);
  const CurrTabInfo = objParams['Tabs'].filter(q=>q.entityName == props.entityName)[0];
  /* 页签信息,表格需要根据页签信息中对应的实体名来查询对应表的数据 */
  const CurrTabInfo = objParams['Tabs'].filter((q) => q.entityName == props.entityName)[0];
  const [registerTable, { getForm, reload, setProps }] = useTable({
    title: `${CurrTabInfo.tableTitle}列表`,
    api: getListByPage,
    searchInfo: { TABLE_NAME: CurrTabInfo.entityName, ...objParams['keyFieldValues'] },
    columns: GetBaseColumns(CurrTabInfo.entityName),
    api: getListByPage, //通用查询方法
    searchInfo: {
      TABLE_NAME: CurrTabInfo.entityName,
      NeedInclude: CurrTabInfo.NeedInclude,
      ...objParams['keyFieldValues'],
    }, //查询条件中的TABLE_NAME传入页签信息中对应的实体名CurrTabInfo.entityName
    columns: GetBaseColumns(CurrTabInfo.entityName), //传入页签信息中对应的实体名CurrTabInfo.entityName获取表格字段信息
    formConfig: {
      labelWidth: 140,
      schemas: GetSearchForm(CurrTabInfo.entityName),
      schemas: GetSearchForm(CurrTabInfo.entityName), //传入页签信息中对应的实体名CurrTabInfo.entityName获取查询表单的字段信息
    },
    useSearchForm: true,
    showTableSetting: true,
    bordered: true,
    canResize: true,
    showIndexColumn: false,
    actionColumn:  ActionColumn
    actionColumn: ActionColumn
      ? ActionColumn
      : {
          width: 120,
@@ -192,7 +197,7 @@
      colSlots,
    };
    const _actionItem: ActionItem[] = [];
    const actionItem = GenerateActionButton(params, buttons, openDrawer, reload,_actionItem);
    const actionItem = GenerateActionButton(params, buttons, openDrawer, reload, _actionItem);
    if (isNullOrUnDef(custImport.value['default'])) {
      return actionItem;
    }