diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 88eac1e..aa66cd4 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -11,6 +11,11 @@
+
+
+
+
+
@@ -26,5 +31,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/client/package.json b/client/package.json
index 01bb36c..684d330 100644
--- a/client/package.json
+++ b/client/package.json
@@ -11,6 +11,7 @@
"dependencies": {
"@ant-design/icons-vue": "^7.0.1",
"ant-design-vue": "4.x",
+ "licia": "^1.48.0",
"vue": "^3.5.13",
"vue-router": "4"
},
diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml
index 2385c0a..1f50203 100644
--- a/client/pnpm-lock.yaml
+++ b/client/pnpm-lock.yaml
@@ -14,6 +14,9 @@ importers:
ant-design-vue:
specifier: 4.x
version: 4.2.6(vue@3.5.13)
+ licia:
+ specifier: ^1.48.0
+ version: 1.48.0
vue:
specifier: ^3.5.13
version: 3.5.13
@@ -681,6 +684,9 @@ packages:
libphonenumber-js@1.12.5:
resolution: {integrity: sha512-DOjiaVjjSmap12ztyb4QgoFmUe/GbgnEXHu+R7iowk0lzDIjScvPAm8cK9RYTEobbRb0OPlwlZUGTTJPJg13Kw==}
+ licia@1.48.0:
+ resolution: {integrity: sha512-bBWiT5CSdEtwuAHiYTJ74yItCjIFdHi4xiFk6BRDfKa+sdCpkUHp69YKb5udNOJlHDzFjNjcMgNZ/+wQIHrB8A==}
+
lodash-es@4.17.21:
resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
@@ -1489,6 +1495,8 @@ snapshots:
libphonenumber-js@1.12.5: {}
+ licia@1.48.0: {}
+
lodash-es@4.17.21: {}
lodash@4.17.21: {}
diff --git a/client/src/utils.js b/client/src/utils.js
index 9120c75..008489f 100644
--- a/client/src/utils.js
+++ b/client/src/utils.js
@@ -1,3 +1,5 @@
+import {isArr} from "licia";
+
const information = {
debug: true,
baseUrl: 'http://localhost:8080',
@@ -17,4 +19,23 @@ export function amisRender(target, amisJson) {
enableAMISDebug: information.debug,
},
)
-}
\ No newline at end of file
+}
+
+function parseEdges (edges) {
+ if (isArr(edges)) {
+
+ }
+}
+
+export function amisElideGraphQLAdaptor(payload, response, api, context) {
+ // console.log(payload, response, api, context)
+ let result = []
+ console.log(payload)
+ if (payload.data) {
+ let items = payload.data[Object.keys(payload.data)[0]]['edges']
+ for(let item of items) {
+ result.push(item.node)
+ }
+ }
+ return result
+}
diff --git a/client/src/views/management/Organization.vue b/client/src/views/management/Organization.vue
index 338c6d0..7b1e6a8 100644
--- a/client/src/views/management/Organization.vue
+++ b/client/src/views/management/Organization.vue
@@ -28,17 +28,23 @@ onMounted(() => {
type: 'form',
api: {
method: 'post',
- url: `${information.baseUrl}/graphql`,
- dataType: 'application/json',
+ url: `${information.baseUrl}/jsonapi`,
data: {
- // language=GraphQL
- query: 'mutation {\n organization(op: UPSERT, data: {\n organizationName: "苹果"\n }) {\n edges {\n node {\n organizationId\n organizationName\n }\n }\n }\n}',
+ data: {
+ type: 'organization',
+ attributes: {
+ name: '${name}'
+ }
+ }
},
+ headers: {
+ 'Content-Type': 'application/vnd.api+json'
+ }
},
body: [
{
type: 'input-text',
- name: 'organizationName',
+ name: 'name',
label: '组织名称',
required: true,
},
@@ -47,6 +53,16 @@ onMounted(() => {
},
},
],
+ api: {
+ method: 'get',
+ url: `${information.baseUrl}/jsonapi/organization`,
+ data: {
+ page: {
+ size: '${perPage|default:undefined}',
+ number: '${page|default:undefined}',
+ }
+ },
+ },
columns: [
{
name: 'organizationId',
diff --git a/pom.xml b/pom.xml
index 1067be4..f61283a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,16 @@
org.springframework.boot
spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-jetty
org.springframework.boot
diff --git a/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisItemResponse.java b/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisItemResponse.java
deleted file mode 100644
index bfbc878..0000000
--- a/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisItemResponse.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.lanyuanxiaoyao.server.configuration.amis;
-
-/**
- * Crud 响应
- *
- * @author lanyuanxiaoyao
- * @date 2023-07-06
- */
-public class AmisItemResponse extends AmisMapResponse {
- public void setDetail(Object detail) {
- getData().put("item", detail);
- }
-}
diff --git a/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisListResponse.java b/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisListResponse.java
deleted file mode 100644
index bdd9fdd..0000000
--- a/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisListResponse.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.lanyuanxiaoyao.server.configuration.amis;
-
-/**
- * Crud 响应
- *
- * @author lanyuanxiaoyao
- * @date 2023-07-06
- */
-public class AmisListResponse extends AmisMapResponse {
- public void setData(Iterable> list) {
- getData().put("items", list);
- }
-
- public void setTotal(Long total) {
- getData().put("total", total);
- }
-
- public void setTotal(Integer total) {
- setTotal(total.longValue());
- }
-
- public void setData(Iterable> list, Long total) {
- setData(list);
- setTotal(total);
- }
-
- public void setData(Iterable> list, Integer total) {
- setData(list, total.longValue());
- }
-}
diff --git a/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisMapResponse.java b/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisMapResponse.java
deleted file mode 100644
index 6b00099..0000000
--- a/src/main/java/com/lanyuanxiaoyao/server/configuration/amis/AmisMapResponse.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.lanyuanxiaoyao.server.configuration.amis;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Map 响应
- *
- * @author lanyuanxiaoyao
- * @date 2023-07-06
- */
-public class AmisMapResponse extends AmisResponse