Ben Lin
2024-07-03 46c3d28c5633baaddad0da441185310b9360a45b
src/views/tigerprojects/system/lowcode/detail/detail.vue
@@ -47,7 +47,7 @@
  });
  const objParams = inject('objParams') as Ref<any>;
  const data = inject('data') as Ref<Recordable[]>;
  const others = inject('others') as Ref<Recordable[]>;
  const keyFieldValues = inject('keyFieldValues') as Ref<Recordable[]>;
  const go = useGo();
  const [registerDrawer, { openDrawer }] = useDrawer();
  const [registerItemAdd, { openModal: openItemModal }] = useModal();
@@ -60,11 +60,11 @@
  const EntityCustFunction = ref([
    {
      ActionItem(params, data, ...args) {},
      EditOperation(data, d, u) {},
      EditOperation(data, d, u, item) {},
      GetBaseColumns(type: string | undefined) {},
      GetSearchForm(type: string | undefined) {},
      GetCrudForm(type: string | undefined, ...args) {},
      OthersValues(val, id) {},
      KeyFieldValues(val, id) {},
      GetSelectSuccess(d, u, ...args) {},
      OpenSelectItem(openItemModal: Fn, ...args) {},
    } as EntityCustFunctionType,
@@ -80,18 +80,18 @@
      GetBaseColumns,
      GetSearchForm,
      GetCrudForm,
      OthersValues,
      KeyFieldValues,
      GetSelectSuccess,
      OpenSelectItem,
    },
  ] = isNullOrUnDef(custImport.value['default'])
    ? EntityCustFunction.value
    : custImport.value['default']();
  others.value = OthersValues(objParams['CODE'], objParams['ID']);
  keyFieldValues.value = KeyFieldValues(objParams['CODE'], objParams['ID']);
  const [registerTable, { getForm, reload, setProps }] = useTable({
    title: `${objParams['firstTitle']}列表`,
    api: getListByPage,
    searchInfo: { TABLE_NAME: objParams['Name'], ...objParams['others'] },
    searchInfo: { TABLE_NAME: objParams['Name'], ...objParams['keyFieldValues'] },
    columns: GetBaseColumns(),
    formConfig: {
      labelWidth: 140,
@@ -203,7 +203,7 @@
      entityName: props.entityName,
      formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`),
      crudColSlots: colSlots.value,
      others: others.value,
      keyFieldValues: keyFieldValues.value,
      isExistSql: isExistSql,
    });
  }