Skip to content

Commit

Permalink
根据xdef自动生成模型编辑页面
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Oct 5, 2023
1 parent 13d9300 commit 762de26
Show file tree
Hide file tree
Showing 42 changed files with 47,222 additions and 25 deletions.
5 changes: 4 additions & 1 deletion docs/dev-guide/xui/xpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,7 @@ responseKey是Nop平台的ajaxFetch函数负责识别的,amis本身并不支
}
]
}
````
````

## API返回列表数据
返回列表数据时会normalizeApiResponseData函数会自动将列表包装为 {items:list},这样确保返回的data在使用时始终是Map对象。
18 changes: 18 additions & 0 deletions nop-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,24 @@
<version>${nop-entropy.version}</version>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-dev-core</artifactId>
<version>${nop-entropy.version}</version>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-dev-service</artifactId>
<version>${nop-entropy.version}</version>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-dev-web</artifactId>
<version>${nop-entropy.version}</version>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-wf-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public abstract class AbstractResource implements IResource {
public AbstractResource(String path) {
if (!path.startsWith("/") && path.indexOf(':') < 0)
throw new NopException(ERR_RESOURCE_INVALID_PATH).param(ARG_RESOURCE_PATH, path);
if (path.endsWith("/") && !path.equals("/"))
if (path.endsWith("/") && !path.equals("/") && !path.endsWith(":/"))
throw new NopException(ERR_RESOURCE_INVALID_PATH).param(ARG_RESOURCE_PATH, path);
this.path = path;
}
Expand Down
10 changes: 10 additions & 0 deletions nop-demo/nop-quarkus-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@
<artifactId>nop-sys-web</artifactId>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-dev-web</artifactId>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-dev-service</artifactId>
</dependency>

<dependency>
<groupId>io.github.entropy-cloud</groupId>
<artifactId>nop-graphql-gateway</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27421,6 +27421,203 @@
"name": "io.nop.demo.domain.ProductionOrder",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"fields": [],
"methods": [
{
"name": "addModelPath",
"parameterTypes": [
"io.nop.dev.core.module.DevResourcePath"
]
},
{
"name": "getModelPaths",
"parameterTypes": []
},
{
"name": "getModuleId",
"parameterTypes": []
},
{
"name": "getModuleName",
"parameterTypes": []
},
{
"name": "getRootPath",
"parameterTypes": []
},
{
"name": "setModelPaths",
"parameterTypes": [
"java.util.List"
]
},
{
"name": "setModuleId",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "setModuleName",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "setRootPath",
"parameterTypes": [
"java.lang.String"
]
}
],
"name": "io.nop.dev.core.module.DevModuleResourcePaths",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"fields": [],
"methods": [
{
"name": "getDevResourcePath",
"parameterTypes": []
},
{
"name": "getEditorObjName",
"parameterTypes": []
},
{
"name": "getModelType",
"parameterTypes": []
},
{
"name": "isExists",
"parameterTypes": []
},
{
"name": "setDevResourcePath",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "setEditorObjName",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "setExists",
"parameterTypes": [
"boolean"
]
},
{
"name": "setModelType",
"parameterTypes": [
"java.lang.String"
]
}
],
"name": "io.nop.dev.core.module.DevResourcePath",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"fields": [
{
"allowUnsafeAccess": false,
"allowWrite": true,
"name": "INSTANCE"
}
],
"methods": [
{
"name": "getNamespace",
"parameterTypes": []
},
{
"name": "getResource",
"parameterTypes": [
"java.lang.String",
"io.nop.core.resource.IResourceStore"
]
},
{
"name": "register",
"parameterTypes": []
},
{
"name": "unregister",
"parameterTypes": []
}
],
"name": "io.nop.dev.core.resource.DevResourceNamespaceHandler",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"fields": [],
"methods": [
{
"name": "buildDelta",
"parameterTypes": [
"io.nop.core.lang.xml.XNode",
"io.nop.xlang.xdef.IXDefNode",
"io.nop.core.resource.IResource"
]
},
{
"name": "getResource",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "loadModel",
"parameterTypes": [
"java.lang.String"
]
},
{
"name": "saveModel",
"parameterTypes": [
"java.lang.String",
"java.util.Map"
]
}
],
"name": "io.nop.dev.core.store.DevModelStoreImpl",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"fields": [],
"methods": [
{
"name": "getModules",
"parameterTypes": []
}
],
"name": "io.nop.dev.service.biz.DevModuleBizModel",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
Expand Down Expand Up @@ -55558,6 +55755,10 @@
"allPublicMethods": true,
"fields": [],
"methods": [
{
"name": "init",
"parameterTypes": []
},
{
"name": "validate",
"parameterTypes": []
Expand All @@ -55581,6 +55782,10 @@
"name": "getTables",
"parameterTypes": []
},
{
"name": "init",
"parameterTypes": []
},
{
"name": "loadObjMeta",
"parameterTypes": []
Expand All @@ -55602,6 +55807,10 @@
"allPublicMethods": true,
"fields": [],
"methods": [
{
"name": "init",
"parameterTypes": []
},
{
"name": "validate",
"parameterTypes": []
Expand All @@ -55621,6 +55830,10 @@
"name": "containsBreakpoint",
"parameterTypes": []
},
{
"name": "init",
"parameterTypes": []
},
{
"name": "loadObjMeta",
"parameterTypes": []
Expand Down Expand Up @@ -59345,6 +59558,16 @@
"name": "java.util.Collection",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"fields": [],
"methods": [],
"name": "java.util.Collections$EmptyList",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
Expand Down Expand Up @@ -60341,6 +60564,16 @@
"name": "java.util.Map",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
"allPublicConstructors": true,
"allPublicMethods": true,
"fields": [],
"methods": [],
"name": "java.util.RandomAccess",
"unsafeAllocated": false
},
{
"allDeclaredConstructors": true,
"allDeclaredMethods": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
component="AMIS"
resourceType="SUBM" url="/nop/demo/pages/Demo/test-validator.page.yaml"/>

<resource id="model-editor-demo" displayName="模型编辑" i18n-en:displayName="Model Editor Demo" orderNo="3"
icon="ant-design:appstore-twotone" routePath="/nop/dev/pages/DevModule/main"
component="AMIS"
resourceType="SUBM" url="/nop/dev/pages/DevModule/main.page.yaml"/>
</children>
</resource>
</site>
Expand Down
Loading

0 comments on commit 762de26

Please sign in to comment.