diff --git a/template/src/entities/System.ts b/template/src/entities/System.ts index 1481630..c6130f2 100644 --- a/template/src/entities/System.ts +++ b/template/src/entities/System.ts @@ -18,6 +18,14 @@ const entityDesc: EntityDesc = { name: '系统', attr: { name: '名称', + description: '描述', + config: '设置', + platform: '平台', + super: '超级系统', + folder: '代码目录名', + style: '样式', + entity: '关联对象', + entityId: '关联对象id', }, r: { owner: '所有者', diff --git a/template/src/exceptionHandler.ts b/template/src/exceptionHandler.ts index ba44180..db8e455 100644 --- a/template/src/exceptionHandler.ts +++ b/template/src/exceptionHandler.ts @@ -10,6 +10,7 @@ import { } from '@project/types/Exception'; import { FeatureDict } from '@project/features'; import { AFD } from '@project/types/RuntimeCxt'; +// import { OakUserInfoLoadingException, OakApplicationLoadingException } from 'oak-general-business'; /** * 构造backUrl @@ -39,7 +40,10 @@ export const handler = async (reason: any, features: AFD) => { content: reason.message, type: 'error', }); - } else if (reason instanceof ExampleException) { + }/* else if (reason instanceof OakUserInfoLoadingException || reason instanceof OakApplicationLoadingException) { + // 暂不处理,在oak-general-business的page的生命周期里,等token加载完成了会刷新页面的 + console.warn(reason); + } */else if (reason instanceof ExampleException) { console.log('在此处理ExampleException'); } else { console.warn(reason); diff --git a/template/src/pages/console/relation/entityList/web.pc.tsx b/template/src/pages/console/relation/entityList/web.pc.tsx index 6617e9e..5171c1c 100644 --- a/template/src/pages/console/relation/entityList/web.pc.tsx +++ b/template/src/pages/console/relation/entityList/web.pc.tsx @@ -15,7 +15,7 @@ export default function Render(props: WebComponentProps diff --git a/template/src/pages/console/userRelation/upsert/byUser/index.ts b/template/src/pages/console/userRelation/upsert/byUser/index.ts index 43746d9..42c0adb 100644 --- a/template/src/pages/console/userRelation/upsert/byUser/index.ts +++ b/template/src/pages/console/userRelation/upsert/byUser/index.ts @@ -1,11 +1,11 @@ export default OakComponent({ isList: false, formData({ features }) { - const state = features.console.getState(); + const state = features.console.getContext(); if (state) { return { - entity: state.mode, - entityId: state.id, + entity: state.entity, + entityId: state.entityId, }; } return { diff --git a/template/src/pages/console/userRelation/upsert/index.ts b/template/src/pages/console/userRelation/upsert/index.ts index 43746d9..42c0adb 100644 --- a/template/src/pages/console/userRelation/upsert/index.ts +++ b/template/src/pages/console/userRelation/upsert/index.ts @@ -1,11 +1,11 @@ export default OakComponent({ isList: false, formData({ features }) { - const state = features.console.getState(); + const state = features.console.getContext(); if (state) { return { - entity: state.mode, - entityId: state.id, + entity: state.entity, + entityId: state.entityId, }; } return { diff --git a/template/web/src/app/components/consoleHeader/index.tsx b/template/web/src/app/components/consoleHeader/index.tsx index 46be1cc..9b5de4b 100644 --- a/template/web/src/app/components/consoleHeader/index.tsx +++ b/template/web/src/app/components/consoleHeader/index.tsx @@ -34,13 +34,13 @@ export default function render() { }); }} > - + /> */}
{features.locales.t('common::name')}
diff --git a/templateFiles/initializeFeatures.ts b/templateFiles/initializeFeatures.ts index 28c2e93..055d5dc 100644 --- a/templateFiles/initializeFeatures.ts +++ b/templateFiles/initializeFeatures.ts @@ -1,6 +1,9 @@ import { FeatureDict } from '@project/features'; import { BasicFeatures } from 'oak-frontend-base/es/features'; import { EntityDict } from '@project/oak-app-domain'; +// import accessConfiguration from "@project/configuration/access"; +// import { initialize as initializeOgb0Features, FeatureDict as Ogb0FeatureDict } from "oak-general-business/es/features"; +// import Qiniu from 'oak-general-business/es/utils/cos/qiniu'; /** * Initialize your features when app loads. @@ -8,5 +11,6 @@ import { EntityDict } from '@project/oak-app-domain'; * @param features */ export default async function initialize(features: FeatureDict & BasicFeatures) { - + // await initializeOgb0Features(features, accessConfiguration, undefined, [Qiniu]); + // features.locales.loadServerData(['projectName-l-common', 'projectName-l-error', ‘projectName-l-menu]); } \ No newline at end of file