From 3114b2c205820b5382598cdcf83188e811269f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Tue, 8 Mar 2022 00:56:23 +0800 Subject: [PATCH] =?UTF-8?q?mb-list=20mb-form=20mb-xxx=E7=AD=89=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E8=AF=B7=E6=B1=82=E6=96=B9=E6=B3=95=20=E5=88=97?= =?UTF-8?q?=E8=A1=A8(post)=20=E4=BF=9D=E5=AD=98(post)=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?(delete)=20=E8=AF=A6=E6=83=85(get)=20=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/magic-api/api/后台/安全/登录.ms | 2 +- .../api/后台/安全/获取当前用户权限code.ms | 32 +-- data/magic-api/api/后台/安全/退出登录.ms | 4 +- data/magic-api/api/后台/安全/验证token.ms | 4 +- data/magic-api/api/后台/数据字典/列表.ms | 20 +- data/magic-api/api/后台/数据字典/删除.ms | 20 +- .../api/后台/数据字典/字典项/列表.ms | 20 +- .../api/后台/数据字典/字典项/删除.ms | 20 +- data/magic-api/api/后台/文件管理/删除.ms | 6 +- data/magic-api/api/后台/日志管理/操作日志.ms | 6 +- data/magic-api/api/后台/日志管理/登录日志.ms | 4 +- data/magic-api/api/后台/测试数据/列表.ms | 6 +- data/magic-api/api/后台/用户管理/列表.ms | 20 +- data/magic-api/api/后台/用户管理/删除.ms | 4 +- data/magic-api/api/后台/组件/保存.ms | 4 +- data/magic-api/api/后台/组件/列表.ms | 83 ++++++- data/magic-api/api/后台/组件/删除.ms | 6 +- data/magic-api/api/后台/组件/详情.ms | 116 +--------- data/magic-api/api/后台/组织机构/删除.ms | 20 +- data/magic-api/api/后台/菜单管理/保存.ms | 4 +- data/magic-api/api/后台/菜单管理/删除.ms | 20 +- .../api/后台/菜单管理/根据角色获取菜单.ms | 4 +- data/magic-api/api/后台/角色管理/全部.ms | 27 +++ data/magic-api/api/后台/角色管理/列表.ms | 20 +- data/magic-api/api/后台/角色管理/删除.ms | 20 +- data/magic-api/api/后台/配置/获取所有配置.ms | 4 +- magic-boot-ui/src/assets/css/common.css | 6 + magic-boot-ui/src/components/index.js | 4 +- .../src/components/magic/advanced/mb-form.vue | 114 ++++++++++ .../src/components/magic/advanced/mb-list.vue | 56 +++++ .../magic/{ => basic}/mb-button.vue | 51 ++--- .../src/components/magic/basic/mb-date.vue | 45 ++++ .../magic/{ => basic}/mb-dialog.vue | 0 .../magic/{ => basic}/mb-editor-table.vue | 0 .../components/magic/{ => basic}/mb-icon.vue | 0 .../src/components/magic/basic/mb-input.vue | 19 ++ .../magic/{ => basic}/mb-pagination.vue | 0 .../magic/basic/mb-radio-button.vue | 17 ++ .../src/components/magic/basic/mb-radio.vue | 3 + .../src/components/magic/basic/mb-search.vue | 108 +++++++++ .../magic/{ => basic}/mb-select.vue | 0 .../src/components/magic/basic/mb-switch.vue | 22 ++ .../magic/{ => basic}/mb-table-column.vue | 0 .../components/magic/{ => basic}/mb-table.vue | 5 +- .../components/magic/{ => basic}/mb-tree.vue | 0 .../components/magic/basic/mb-treeselect.vue | 30 +++ .../magic/{ => basic}/mb-upload-file.vue | 2 +- .../magic/{ => basic}/mb-upload-image.vue | 2 +- .../src/components/magic/mb-search.vue | 100 -------- magic-boot-ui/src/scripts/common.js | 6 +- magic-boot-ui/src/scripts/dynamicComponent.js | 2 +- magic-boot-ui/src/scripts/global.js | 2 +- magic-boot-ui/src/scripts/globalProperties.js | 4 + .../src/views/examples/test-mb-list.vue | 214 ++++++++++++++++++ .../src/views/lowcode/component-list.vue | 18 +- .../src/views/system/user/user-form.vue | 8 +- .../src/views/system/user/user-list.vue | 30 +-- magic-boot/src/main/resources/application.yml | 4 + 58 files changed, 1017 insertions(+), 351 deletions(-) create mode 100644 data/magic-api/api/后台/角色管理/全部.ms create mode 100644 magic-boot-ui/src/components/magic/advanced/mb-form.vue create mode 100644 magic-boot-ui/src/components/magic/advanced/mb-list.vue rename magic-boot-ui/src/components/magic/{ => basic}/mb-button.vue (73%) create mode 100644 magic-boot-ui/src/components/magic/basic/mb-date.vue rename magic-boot-ui/src/components/magic/{ => basic}/mb-dialog.vue (100%) rename magic-boot-ui/src/components/magic/{ => basic}/mb-editor-table.vue (100%) rename magic-boot-ui/src/components/magic/{ => basic}/mb-icon.vue (100%) create mode 100644 magic-boot-ui/src/components/magic/basic/mb-input.vue rename magic-boot-ui/src/components/magic/{ => basic}/mb-pagination.vue (100%) create mode 100644 magic-boot-ui/src/components/magic/basic/mb-radio-button.vue create mode 100644 magic-boot-ui/src/components/magic/basic/mb-radio.vue create mode 100644 magic-boot-ui/src/components/magic/basic/mb-search.vue rename magic-boot-ui/src/components/magic/{ => basic}/mb-select.vue (100%) create mode 100644 magic-boot-ui/src/components/magic/basic/mb-switch.vue rename magic-boot-ui/src/components/magic/{ => basic}/mb-table-column.vue (100%) rename magic-boot-ui/src/components/magic/{ => basic}/mb-table.vue (98%) rename magic-boot-ui/src/components/magic/{ => basic}/mb-tree.vue (100%) create mode 100644 magic-boot-ui/src/components/magic/basic/mb-treeselect.vue rename magic-boot-ui/src/components/magic/{ => basic}/mb-upload-file.vue (99%) rename magic-boot-ui/src/components/magic/{ => basic}/mb-upload-image.vue (99%) delete mode 100644 magic-boot-ui/src/components/magic/mb-search.vue create mode 100644 magic-boot-ui/src/views/examples/test-mb-list.vue diff --git a/data/magic-api/api/后台/安全/登录.ms b/data/magic-api/api/后台/安全/登录.ms index aa80b03..5ddb4d7 100644 --- a/data/magic-api/api/后台/安全/登录.ms +++ b/data/magic-api/api/后台/安全/登录.ms @@ -5,7 +5,7 @@ "groupId" : "1952f25c81084e24b55b11385767dc38", "name" : "登录", "createTime" : null, - "updateTime" : 1646493566796, + "updateTime" : 1646544815203, "lock" : "0", "createBy" : null, "updateBy" : null, diff --git a/data/magic-api/api/后台/安全/获取当前用户权限code.ms b/data/magic-api/api/后台/安全/获取当前用户权限code.ms index d32dcce..2f9b0e8 100644 --- a/data/magic-api/api/后台/安全/获取当前用户权限code.ms +++ b/data/magic-api/api/后台/安全/获取当前用户权限code.ms @@ -4,33 +4,33 @@ "script" : null, "groupId" : "1952f25c81084e24b55b11385767dc38", "name" : "获取当前用户权限code", - "createTime" : 1646490239409, - "updateTime" : 1645715502500, + "createTime" : null, + "updateTime" : 1646544829355, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/permissions", "method" : "POST", "parameters" : [ ], - "options" : [ { - "name" : "", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : null, - "error" : null, - "expression" : null, - "children" : null - } ], + "options" : [ ], "requestBody" : "{\n\n}", "headers" : [ ], "paths" : [ ], "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [\"menu:view\", \"menu:save\", \"menu:delete\", \"office:save\", \"office:delete\", \"role:save\", \"role:delete\", \"role:permission\", \"user:save\", \"user:delete\", \"dict:save\", \"dict:delete\", \"dict:items:save\", \"dict:items:delete\", \"office:view\", \"role:view\", \"user:view\", \"dict:view\", \"dict:items:view\"],\n \"timestamp\": 1645715342825,\n \"executeTime\": 2\n}", "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : { "name" : "", "value" : "", diff --git a/data/magic-api/api/后台/安全/退出登录.ms b/data/magic-api/api/后台/安全/退出登录.ms index d97a027..9a3581f 100644 --- a/data/magic-api/api/后台/安全/退出登录.ms +++ b/data/magic-api/api/后台/安全/退出登录.ms @@ -4,8 +4,8 @@ "script" : null, "groupId" : "1952f25c81084e24b55b11385767dc38", "name" : "退出登录", - "createTime" : 1646490239413, - "updateTime" : 1634724871162, + "createTime" : null, + "updateTime" : 1646544864959, "lock" : "0", "createBy" : null, "updateBy" : null, diff --git a/data/magic-api/api/后台/安全/验证token.ms b/data/magic-api/api/后台/安全/验证token.ms index 0f999b8..9242cb0 100644 --- a/data/magic-api/api/后台/安全/验证token.ms +++ b/data/magic-api/api/后台/安全/验证token.ms @@ -4,8 +4,8 @@ "script" : null, "groupId" : "1952f25c81084e24b55b11385767dc38", "name" : "验证token", - "createTime" : 1646490239415, - "updateTime" : 1634724871160, + "createTime" : null, + "updateTime" : 1646544867872, "lock" : "0", "createBy" : null, "updateBy" : null, diff --git a/data/magic-api/api/后台/数据字典/列表.ms b/data/magic-api/api/后台/数据字典/列表.ms index 9f66983..950a2df 100644 --- a/data/magic-api/api/后台/数据字典/列表.ms +++ b/data/magic-api/api/后台/数据字典/列表.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "c7ce65f5b3cf4aaa913f6fec7d35d176", "name" : "列表", - "createTime" : 1646490239432, - "updateTime" : 1644121689680, + "createTime" : null, + "updateTime" : 1646552464246, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1634734488837,\n \"executeTime\": null\n}", "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : { "name" : "", "value" : "", diff --git a/data/magic-api/api/后台/数据字典/删除.ms b/data/magic-api/api/后台/数据字典/删除.ms index a8f2b82..91ec915 100644 --- a/data/magic-api/api/后台/数据字典/删除.ms +++ b/data/magic-api/api/后台/数据字典/删除.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "c7ce65f5b3cf4aaa913f6fec7d35d176", "name" : "删除", - "createTime" : 1646490239434, - "updateTime" : 1644121690359, + "createTime" : null, + "updateTime" : 1646553112581, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "POST", + "method" : "DELETE", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : null, "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : null } ================================ diff --git a/data/magic-api/api/后台/数据字典/字典项/列表.ms b/data/magic-api/api/后台/数据字典/字典项/列表.ms index b6d3f28..a99e042 100644 --- a/data/magic-api/api/后台/数据字典/字典项/列表.ms +++ b/data/magic-api/api/后台/数据字典/字典项/列表.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "376f26eb43a44a3daeafd27020a96f48", "name" : "列表", - "createTime" : 1646490239439, - "updateTime" : 1644121692556, + "createTime" : null, + "updateTime" : 1646552463663, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"total\": 17,\n \"list\": [\n {\n \"id\": \"56aee220-cb12-4bb2-8453-84ee49672193\",\n \"value\": \"3\",\n \"label\": \"3\",\n \"dictId\": \"4b9b4a7e-25a1-4efa-ab9a-a004f203f1f4\",\n \"remarks\": \"\",\n \"sort\": 30\n },\n {\n \"id\": \"6a127863-8130-48be-88bf-e5179f5c33e6\",\n \"value\": \"2\",\n \"label\": \"2\",\n \"dictId\": \"4b9b4a7e-25a1-4efa-ab9a-a004f203f1f4\",\n \"remarks\": \"\",\n \"sort\": 20\n },\n {\n \"id\": \"f19152f4-dd72-4509-a350-af70d802dcdf\",\n \"value\": \"1\",\n \"label\": \"1\",\n \"dictId\": \"4b9b4a7e-25a1-4efa-ab9a-a004f203f1f4\",\n \"remarks\": \"\",\n \"sort\": 10\n },\n {\n \"id\": \"ac1ee828-62e1-42fd-9d18-cf37203855b2\",\n \"value\": \"12\",\n \"label\": \"12\",\n \"dictId\": \"3c393981-9ddd-40b2-8c19-85f0a9d9a98f\",\n \"remarks\": \"\",\n \"sort\": 30\n },\n {\n \"id\": \"457517be-5245-4d98-b9fa-8b6753a9cfc6\",\n \"value\": \"2\",\n \"label\": \"公司\",\n \"dictId\": \"3c393981-9ddd-40b2-8c19-85f0a9d9a98f\",\n \"remarks\": \"\",\n \"sort\": 20\n },\n {\n \"id\": \"b928f5b1-07bd-4f09-9142-897c767c5303\",\n \"value\": \"1\",\n \"label\": \"部门\",\n \"dictId\": \"3c393981-9ddd-40b2-8c19-85f0a9d9a98f\",\n \"remarks\": \"\",\n \"sort\": 10\n },\n {\n \"id\": \"0f91de6e8406d59762bebe5d2dfc9d36\",\n \"value\": \"0\",\n \"label\": \"不禁用\",\n \"dictId\": \"ae9a2cd400264ff6bdc2f00b62d6e941\",\n \"remarks\": null,\n \"sort\": 0\n },\n {\n \"id\": \"c5cf8715a74537156ea29c8bbc622b05\",\n \"value\": \"1\",\n \"label\": \"禁用\",\n \"dictId\": \"ae9a2cd400264ff6bdc2f00b62d6e941\",\n \"remarks\": null,\n \"sort\": 0\n },\n {\n \"id\": \"ze9a2cd400264ff6bdc2f00b62d6e911\",\n \"value\": \"0\",\n \"label\": \"系统类\",\n \"dictId\": \"ae9a2cd400264ff6bdc2f00b62d6e911\",\n \"remarks\": null,\n \"sort\": 0\n },\n {\n \"id\": \"ze9a2cd400264ff6bdc2f00b62d6e910\",\n \"value\": \"1\",\n \"label\": \"业务类\",\n \"dictId\": \"ae9a2cd400264ff6bdc2f00b62d6e911\",\n \"remarks\": null,\n \"sort\": 0\n }\n ]\n },\n \"timestamp\": 1634735383948,\n \"executeTime\": 13\n}", "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : { "name" : "", "value" : "", diff --git a/data/magic-api/api/后台/数据字典/字典项/删除.ms b/data/magic-api/api/后台/数据字典/字典项/删除.ms index 63c10b6..b41ecaa 100644 --- a/data/magic-api/api/后台/数据字典/字典项/删除.ms +++ b/data/magic-api/api/后台/数据字典/字典项/删除.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "376f26eb43a44a3daeafd27020a96f48", "name" : "删除", - "createTime" : 1646490239443, - "updateTime" : 1644121693440, + "createTime" : null, + "updateTime" : 1646553109828, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "POST", + "method" : "DELETE", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : null, "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : null } ================================ diff --git a/data/magic-api/api/后台/文件管理/删除.ms b/data/magic-api/api/后台/文件管理/删除.ms index a684929..4d164bb 100644 --- a/data/magic-api/api/后台/文件管理/删除.ms +++ b/data/magic-api/api/后台/文件管理/删除.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "fd3d225a1cf141bf9998c4ec4bf4a6ab", "name" : "删除", - "createTime" : 1646490239453, - "updateTime" : 1643706734133, + "createTime" : null, + "updateTime" : 1646553118780, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "GET", + "method" : "DELETE", "parameters" : [ ], "options" : [ ], "requestBody" : "", diff --git a/data/magic-api/api/后台/日志管理/操作日志.ms b/data/magic-api/api/后台/日志管理/操作日志.ms index dba2680..ed0ca78 100644 --- a/data/magic-api/api/后台/日志管理/操作日志.ms +++ b/data/magic-api/api/后台/日志管理/操作日志.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "9ec6f9ec92d24a369952bb13eddc134f", "name" : "操作日志", - "createTime" : 1646490239460, - "updateTime" : 1646474005369, + "createTime" : null, + "updateTime" : 1646552462421, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/oper/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ ], "requestBody" : "", diff --git a/data/magic-api/api/后台/日志管理/登录日志.ms b/data/magic-api/api/后台/日志管理/登录日志.ms index 5c1b35a..7a8ee50 100644 --- a/data/magic-api/api/后台/日志管理/登录日志.ms +++ b/data/magic-api/api/后台/日志管理/登录日志.ms @@ -5,12 +5,12 @@ "groupId" : "9ec6f9ec92d24a369952bb13eddc134f", "name" : "登录日志", "createTime" : null, - "updateTime" : 1646490406374, + "updateTime" : 1646552463034, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/login/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ ], "requestBody" : "", diff --git a/data/magic-api/api/后台/测试数据/列表.ms b/data/magic-api/api/后台/测试数据/列表.ms index 9386692..0c55288 100644 --- a/data/magic-api/api/后台/测试数据/列表.ms +++ b/data/magic-api/api/后台/测试数据/列表.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "42d241c0bb18476f8dabf92c2e4e2324", "name" : "列表", - "createTime" : 1646490239464, - "updateTime" : 1642327645651, + "createTime" : null, + "updateTime" : 1646552460608, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ ], "requestBody" : "", diff --git a/data/magic-api/api/后台/用户管理/列表.ms b/data/magic-api/api/后台/用户管理/列表.ms index c02dff1..ac1337c 100644 --- a/data/magic-api/api/后台/用户管理/列表.ms +++ b/data/magic-api/api/后台/用户管理/列表.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a", "name" : "列表", - "createTime" : 1646490239471, - "updateTime" : 1644121683184, + "createTime" : null, + "updateTime" : 1646552467748, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1643964929030,\n \"executeTime\": null\n}", "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : { "name" : "", "value" : "", diff --git a/data/magic-api/api/后台/用户管理/删除.ms b/data/magic-api/api/后台/用户管理/删除.ms index aff9aff..70316f1 100644 --- a/data/magic-api/api/后台/用户管理/删除.ms +++ b/data/magic-api/api/后台/用户管理/删除.ms @@ -5,12 +5,12 @@ "groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a", "name" : "删除", "createTime" : null, - "updateTime" : 1646493558181, + "updateTime" : 1646553121622, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "POST", + "method" : "DELETE", "parameters" : [ ], "options" : [ { "name" : "permission", diff --git a/data/magic-api/api/后台/组件/保存.ms b/data/magic-api/api/后台/组件/保存.ms index ae0abee..8aa5ac3 100644 --- a/data/magic-api/api/后台/组件/保存.ms +++ b/data/magic-api/api/后台/组件/保存.ms @@ -4,8 +4,8 @@ "script" : null, "groupId" : "6f106ebdee21489db34b956f7770ff03", "name" : "保存", - "createTime" : 1646490239481, - "updateTime" : 1646401456776, + "createTime" : null, + "updateTime" : 1646552458651, "lock" : "0", "createBy" : null, "updateBy" : null, diff --git a/data/magic-api/api/后台/组件/列表.ms b/data/magic-api/api/后台/组件/列表.ms index e0f01d1..ff0c301 100644 --- a/data/magic-api/api/后台/组件/列表.ms +++ b/data/magic-api/api/后台/组件/列表.ms @@ -4,25 +4,98 @@ "script" : null, "groupId" : "6f106ebdee21489db34b956f7770ff03", "name" : "列表", - "createTime" : 1646490239482, - "updateTime" : 1646401619732, + "createTime" : null, + "updateTime" : 1646552470091, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ ], "requestBody" : "", "headers" : [ ], "paths" : [ ], - "responseBody" : null, + "responseBody" : "{\"code\":402,\"message\":\"凭证已过期\",\"data\":null,\"timestamp\":1646545653430,\"executeTime\":null}", "description" : null, "requestBodyDefinition" : null, - "responseBodyDefinition" : null + "responseBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ { + "name" : "code", + "value" : "402", + "description" : "", + "required" : false, + "dataType" : "Integer", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "message", + "value" : "凭证已过期", + "description" : "", + "required" : false, + "dataType" : "String", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "data", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "timestamp", + "value" : "1646545653430", + "description" : "", + "required" : false, + "dataType" : "Long", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, { + "name" : "executeTime", + "value" : "null", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + } ] + } } ================================ return db.page(""" select * from sys_component where 1=1 ?{name, and name like concat('%',#{name},'%')} + ?{descRibe, and desc_ribe like concat('%',#{descRibe},'%')} """) \ No newline at end of file diff --git a/data/magic-api/api/后台/组件/删除.ms b/data/magic-api/api/后台/组件/删除.ms index 0a65589..612aeec 100644 --- a/data/magic-api/api/后台/组件/删除.ms +++ b/data/magic-api/api/后台/组件/删除.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "6f106ebdee21489db34b956f7770ff03", "name" : "删除", - "createTime" : 1646490239484, - "updateTime" : 1646401575406, + "createTime" : null, + "updateTime" : 1646553123792, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "POST", + "method" : "DELETE", "parameters" : [ ], "options" : [ ], "requestBody" : "", diff --git a/data/magic-api/api/后台/组件/详情.ms b/data/magic-api/api/后台/组件/详情.ms index 61604ef..ded25fd 100644 --- a/data/magic-api/api/后台/组件/详情.ms +++ b/data/magic-api/api/后台/组件/详情.ms @@ -4,8 +4,8 @@ "script" : null, "groupId" : "6f106ebdee21489db34b956f7770ff03", "name" : "详情", - "createTime" : 1646490239485, - "updateTime" : 1646401567689, + "createTime" : null, + "updateTime" : 1646552459844, "lock" : "0", "createBy" : null, "updateBy" : null, @@ -16,7 +16,7 @@ "requestBody" : "", "headers" : [ ], "paths" : [ ], - "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"id\": \"1\",\n \"name\": \"TestCode\",\n \"code\": \"\\r\\n \\r\\n\\r\\n \\r\\n\\r\\n \\r\\n\",\n \"isDel\": 0,\n \"createBy\": null,\n \"createDate\": null,\n \"updateBy\": null,\n \"updateDate\": null\n },\n \"timestamp\": 1646401557066,\n \"executeTime\": 45\n}", + "responseBody" : "{\"code\":402,\"message\":\"凭证已过期\",\"data\":null,\"timestamp\":1646545664781,\"executeTime\":null}", "description" : null, "requestBodyDefinition" : null, "responseBodyDefinition" : { @@ -32,7 +32,7 @@ "expression" : "", "children" : [ { "name" : "code", - "value" : "200", + "value" : "402", "description" : "", "required" : false, "dataType" : "Integer", @@ -44,7 +44,7 @@ "children" : [ ] }, { "name" : "message", - "value" : "success", + "value" : "凭证已过期", "description" : "", "required" : false, "dataType" : "String", @@ -56,7 +56,7 @@ "children" : [ ] }, { "name" : "data", - "value" : "", + "value" : "null", "description" : "", "required" : false, "dataType" : "Object", @@ -65,106 +65,10 @@ "validateType" : "", "error" : "", "expression" : "", - "children" : [ { - "name" : "id", - "value" : "1", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "name", - "value" : "TestCode", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "code", - "value" : "\\r\\n \\r\\n\\r\\n \\r\\n\\r\\n \\r\\n", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "isDel", - "value" : "0", - "description" : "", - "required" : false, - "dataType" : "Integer", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "createBy", - "value" : "null", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "createDate", - "value" : "null", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "updateBy", - "value" : "null", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "updateDate", - "value" : "null", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - } ] + "children" : [ ] }, { "name" : "timestamp", - "value" : "1646401557066", + "value" : "1646545664781", "description" : "", "required" : false, "dataType" : "Long", @@ -176,10 +80,10 @@ "children" : [ ] }, { "name" : "executeTime", - "value" : "45", + "value" : "null", "description" : "", "required" : false, - "dataType" : "Integer", + "dataType" : "Object", "type" : null, "defaultValue" : null, "validateType" : "", diff --git a/data/magic-api/api/后台/组织机构/删除.ms b/data/magic-api/api/后台/组织机构/删除.ms index 208c278..74b6c93 100644 --- a/data/magic-api/api/后台/组织机构/删除.ms +++ b/data/magic-api/api/后台/组织机构/删除.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "8295fc13678d4144bf7363c465247a50", "name" : "删除", - "createTime" : 1646490239496, - "updateTime" : 1644121676877, + "createTime" : null, + "updateTime" : 1646553126039, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "POST", + "method" : "DELETE", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": null,\n \"timestamp\": 1641201245421,\n \"executeTime\": 7\n}", "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : { "name" : "", "value" : "", diff --git a/data/magic-api/api/后台/菜单管理/保存.ms b/data/magic-api/api/后台/菜单管理/保存.ms index f1f1500..ac22c47 100644 --- a/data/magic-api/api/后台/菜单管理/保存.ms +++ b/data/magic-api/api/后台/菜单管理/保存.ms @@ -5,7 +5,7 @@ "groupId" : "67b2ce258e24491194b74992958c74aa", "name" : "保存", "createTime" : null, - "updateTime" : 1646493564406, + "updateTime" : 1646576146705, "lock" : "0", "createBy" : null, "updateBy" : null, @@ -79,4 +79,4 @@ if(data.id){ var menuId = data.id cacheDelete(); } -return db.table("sys_menu").primary("id").saveOrUpdate(data); \ No newline at end of file +return db.table("sys_menu").primary("id").withBlank().saveOrUpdate(data); \ No newline at end of file diff --git a/data/magic-api/api/后台/菜单管理/删除.ms b/data/magic-api/api/后台/菜单管理/删除.ms index 2bf401b..542702f 100644 --- a/data/magic-api/api/后台/菜单管理/删除.ms +++ b/data/magic-api/api/后台/菜单管理/删除.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "67b2ce258e24491194b74992958c74aa", "name" : "删除", - "createTime" : 1646490239510, - "updateTime" : 1644121673352, + "createTime" : null, + "updateTime" : 1646553101301, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "POST", + "method" : "DELETE", "parameters" : [ { "name" : "id", "value" : "b1851d1b13594e71840103c11a37a669", @@ -42,7 +42,19 @@ "paths" : [ ], "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": null,\n \"timestamp\": 1641201245421,\n \"executeTime\": 7\n}", "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : { "name" : "", "value" : "", diff --git a/data/magic-api/api/后台/菜单管理/根据角色获取菜单.ms b/data/magic-api/api/后台/菜单管理/根据角色获取菜单.ms index d30d76d..6eea673 100644 --- a/data/magic-api/api/后台/菜单管理/根据角色获取菜单.ms +++ b/data/magic-api/api/后台/菜单管理/根据角色获取菜单.ms @@ -4,8 +4,8 @@ "script" : null, "groupId" : "67b2ce258e24491194b74992958c74aa", "name" : "根据角色获取菜单", - "createTime" : 1646490239520, - "updateTime" : 1642080927004, + "createTime" : null, + "updateTime" : 1646552458043, "lock" : "0", "createBy" : null, "updateBy" : null, diff --git a/data/magic-api/api/后台/角色管理/全部.ms b/data/magic-api/api/后台/角色管理/全部.ms new file mode 100644 index 0000000..6117789 --- /dev/null +++ b/data/magic-api/api/后台/角色管理/全部.ms @@ -0,0 +1,27 @@ +{ + "properties" : { }, + "id" : "9fe8956f3e79479c825e50dc314bb9bd", + "script" : null, + "groupId" : "89130d496f6f467c88b22ae4a7f688eb", + "name" : "全部", + "createTime" : null, + "updateTime" : 1646555166829, + "lock" : null, + "createBy" : null, + "updateBy" : null, + "path" : "/all", + "method" : "GET", + "parameters" : [ ], + "options" : [ ], + "requestBody" : "", + "headers" : [ ], + "paths" : [ ], + "responseBody" : null, + "description" : null, + "requestBodyDefinition" : null, + "responseBodyDefinition" : null +} +================================ +return db.select(""" + select name label, id value from sys_role where is_del = 0 +""") \ No newline at end of file diff --git a/data/magic-api/api/后台/角色管理/列表.ms b/data/magic-api/api/后台/角色管理/列表.ms index 17c0edc..e217c25 100644 --- a/data/magic-api/api/后台/角色管理/列表.ms +++ b/data/magic-api/api/后台/角色管理/列表.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "89130d496f6f467c88b22ae4a7f688eb", "name" : "列表", - "createTime" : 1646490239527, - "updateTime" : 1644121680976, + "createTime" : null, + "updateTime" : 1646552461206, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/list", - "method" : "GET", + "method" : "POST", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"total\": 1,\n \"list\": [\n {\n \"id\": \"1\",\n \"name\": \"管理员\"\n }\n ]\n },\n \"timestamp\": 1634309991187,\n \"executeTime\": 5\n}", "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : { "name" : "", "value" : "", diff --git a/data/magic-api/api/后台/角色管理/删除.ms b/data/magic-api/api/后台/角色管理/删除.ms index c522ed3..471e1ec 100644 --- a/data/magic-api/api/后台/角色管理/删除.ms +++ b/data/magic-api/api/后台/角色管理/删除.ms @@ -4,13 +4,13 @@ "script" : null, "groupId" : "89130d496f6f467c88b22ae4a7f688eb", "name" : "删除", - "createTime" : 1646490239530, - "updateTime" : 1644121681716, + "createTime" : null, + "updateTime" : 1646553106085, "lock" : "0", "createBy" : null, "updateBy" : null, "path" : "/delete", - "method" : "POST", + "method" : "DELETE", "parameters" : [ ], "options" : [ { "name" : "permission", @@ -30,7 +30,19 @@ "paths" : [ ], "responseBody" : null, "description" : null, - "requestBodyDefinition" : null, + "requestBodyDefinition" : { + "name" : "", + "value" : "", + "description" : "", + "required" : false, + "dataType" : "Object", + "type" : null, + "defaultValue" : null, + "validateType" : "", + "error" : "", + "expression" : "", + "children" : [ ] + }, "responseBodyDefinition" : null } ================================ diff --git a/data/magic-api/api/后台/配置/获取所有配置.ms b/data/magic-api/api/后台/配置/获取所有配置.ms index 1936724..55f58bf 100644 --- a/data/magic-api/api/后台/配置/获取所有配置.ms +++ b/data/magic-api/api/后台/配置/获取所有配置.ms @@ -4,8 +4,8 @@ "script" : null, "groupId" : "5c36bdc1de454d6e9d1a464d87c96091", "name" : "获取所有配置", - "createTime" : 1646490239534, - "updateTime" : 1646391487051, + "createTime" : null, + "updateTime" : 1646552461778, "lock" : "0", "createBy" : null, "updateBy" : null, diff --git a/magic-boot-ui/src/assets/css/common.css b/magic-boot-ui/src/assets/css/common.css index c273240..97effd6 100644 --- a/magic-boot-ui/src/assets/css/common.css +++ b/magic-boot-ui/src/assets/css/common.css @@ -49,6 +49,12 @@ body{ .toolbar-container{ margin-bottom: 10px } +.toolbar-container > div{ + margin-left: 10px; +} +.toolbar-container > div:nth-child(1){ + margin-left: 0px; +} .clear{ clear: both; } diff --git a/magic-boot-ui/src/components/index.js b/magic-boot-ui/src/components/index.js index 9c04426..7f12fa3 100644 --- a/magic-boot-ui/src/components/index.js +++ b/magic-boot-ui/src/components/index.js @@ -1,9 +1,9 @@ import { defineAsyncComponent } from 'vue' -const components = import.meta.glob('./*/*.vue') +const components = import.meta.glob('./**/*.vue') export default function install (app) { for (const [key, value] of Object.entries(components)) { const name = key.substring(key.lastIndexOf('/') + 1, key.lastIndexOf('.')) app.component(name, defineAsyncComponent(value)) } -} \ No newline at end of file +} diff --git a/magic-boot-ui/src/components/magic/advanced/mb-form.vue b/magic-boot-ui/src/components/magic/advanced/mb-form.vue new file mode 100644 index 0000000..9d14b6b --- /dev/null +++ b/magic-boot-ui/src/components/magic/advanced/mb-form.vue @@ -0,0 +1,114 @@ + + + diff --git a/magic-boot-ui/src/components/magic/advanced/mb-list.vue b/magic-boot-ui/src/components/magic/advanced/mb-list.vue new file mode 100644 index 0000000..a28cc72 --- /dev/null +++ b/magic-boot-ui/src/components/magic/advanced/mb-list.vue @@ -0,0 +1,56 @@ + + + diff --git a/magic-boot-ui/src/components/magic/mb-button.vue b/magic-boot-ui/src/components/magic/basic/mb-button.vue similarity index 73% rename from magic-boot-ui/src/components/magic/mb-button.vue rename to magic-boot-ui/src/components/magic/basic/mb-button.vue index 61caefa..9413f12 100644 --- a/magic-boot-ui/src/components/magic/mb-button.vue +++ b/magic-boot-ui/src/components/magic/basic/mb-button.vue @@ -9,6 +9,7 @@ diff --git a/magic-boot-ui/src/components/magic/mb-dialog.vue b/magic-boot-ui/src/components/magic/basic/mb-dialog.vue similarity index 100% rename from magic-boot-ui/src/components/magic/mb-dialog.vue rename to magic-boot-ui/src/components/magic/basic/mb-dialog.vue diff --git a/magic-boot-ui/src/components/magic/mb-editor-table.vue b/magic-boot-ui/src/components/magic/basic/mb-editor-table.vue similarity index 100% rename from magic-boot-ui/src/components/magic/mb-editor-table.vue rename to magic-boot-ui/src/components/magic/basic/mb-editor-table.vue diff --git a/magic-boot-ui/src/components/magic/mb-icon.vue b/magic-boot-ui/src/components/magic/basic/mb-icon.vue similarity index 100% rename from magic-boot-ui/src/components/magic/mb-icon.vue rename to magic-boot-ui/src/components/magic/basic/mb-icon.vue diff --git a/magic-boot-ui/src/components/magic/basic/mb-input.vue b/magic-boot-ui/src/components/magic/basic/mb-input.vue new file mode 100644 index 0000000..f387121 --- /dev/null +++ b/magic-boot-ui/src/components/magic/basic/mb-input.vue @@ -0,0 +1,19 @@ + + + diff --git a/magic-boot-ui/src/components/magic/mb-pagination.vue b/magic-boot-ui/src/components/magic/basic/mb-pagination.vue similarity index 100% rename from magic-boot-ui/src/components/magic/mb-pagination.vue rename to magic-boot-ui/src/components/magic/basic/mb-pagination.vue diff --git a/magic-boot-ui/src/components/magic/basic/mb-radio-button.vue b/magic-boot-ui/src/components/magic/basic/mb-radio-button.vue new file mode 100644 index 0000000..1255bef --- /dev/null +++ b/magic-boot-ui/src/components/magic/basic/mb-radio-button.vue @@ -0,0 +1,17 @@ + + + diff --git a/magic-boot-ui/src/components/magic/basic/mb-radio.vue b/magic-boot-ui/src/components/magic/basic/mb-radio.vue new file mode 100644 index 0000000..00d6860 --- /dev/null +++ b/magic-boot-ui/src/components/magic/basic/mb-radio.vue @@ -0,0 +1,3 @@ + diff --git a/magic-boot-ui/src/components/magic/basic/mb-search.vue b/magic-boot-ui/src/components/magic/basic/mb-search.vue new file mode 100644 index 0000000..dbb0ebd --- /dev/null +++ b/magic-boot-ui/src/components/magic/basic/mb-search.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/magic-boot-ui/src/components/magic/mb-select.vue b/magic-boot-ui/src/components/magic/basic/mb-select.vue similarity index 100% rename from magic-boot-ui/src/components/magic/mb-select.vue rename to magic-boot-ui/src/components/magic/basic/mb-select.vue diff --git a/magic-boot-ui/src/components/magic/basic/mb-switch.vue b/magic-boot-ui/src/components/magic/basic/mb-switch.vue new file mode 100644 index 0000000..312ad96 --- /dev/null +++ b/magic-boot-ui/src/components/magic/basic/mb-switch.vue @@ -0,0 +1,22 @@ + + + diff --git a/magic-boot-ui/src/components/magic/mb-table-column.vue b/magic-boot-ui/src/components/magic/basic/mb-table-column.vue similarity index 100% rename from magic-boot-ui/src/components/magic/mb-table-column.vue rename to magic-boot-ui/src/components/magic/basic/mb-table-column.vue diff --git a/magic-boot-ui/src/components/magic/mb-table.vue b/magic-boot-ui/src/components/magic/basic/mb-table.vue similarity index 98% rename from magic-boot-ui/src/components/magic/mb-table.vue rename to magic-boot-ui/src/components/magic/basic/mb-table.vue index f91b2e7..5be3dec 100644 --- a/magic-boot-ui/src/components/magic/mb-table.vue +++ b/magic-boot-ui/src/components/magic/basic/mb-table.vue @@ -83,7 +83,7 @@ const props = defineProps({ }, method: { type: String, - default: 'get' + default: 'post' }, cols: { type: Array, @@ -121,7 +121,8 @@ function getList() { request({ url: props.url, method: props.method, - params: newWhere + params: newWhere, + data: newWhere }).then(res => { const { data } = res total.value = data.total diff --git a/magic-boot-ui/src/components/magic/mb-tree.vue b/magic-boot-ui/src/components/magic/basic/mb-tree.vue similarity index 100% rename from magic-boot-ui/src/components/magic/mb-tree.vue rename to magic-boot-ui/src/components/magic/basic/mb-tree.vue diff --git a/magic-boot-ui/src/components/magic/basic/mb-treeselect.vue b/magic-boot-ui/src/components/magic/basic/mb-treeselect.vue new file mode 100644 index 0000000..946b88e --- /dev/null +++ b/magic-boot-ui/src/components/magic/basic/mb-treeselect.vue @@ -0,0 +1,30 @@ + + + diff --git a/magic-boot-ui/src/components/magic/mb-upload-file.vue b/magic-boot-ui/src/components/magic/basic/mb-upload-file.vue similarity index 99% rename from magic-boot-ui/src/components/magic/mb-upload-file.vue rename to magic-boot-ui/src/components/magic/basic/mb-upload-file.vue index 3d988f0..ec3623d 100644 --- a/magic-boot-ui/src/components/magic/mb-upload-file.vue +++ b/magic-boot-ui/src/components/magic/basic/mb-upload-file.vue @@ -137,7 +137,7 @@ export default { this.$emit('update:modelValue', '') this.$emit('change', '') } - this.$get('file/delete', { url: encodeURI(url) }) + this.$delete('file/delete', { url: encodeURI(url) }) }, handlePreview(file) { window.open(this.$global.filePrefix + file.response.data.url) diff --git a/magic-boot-ui/src/components/magic/mb-upload-image.vue b/magic-boot-ui/src/components/magic/basic/mb-upload-image.vue similarity index 99% rename from magic-boot-ui/src/components/magic/mb-upload-image.vue rename to magic-boot-ui/src/components/magic/basic/mb-upload-image.vue index 6eea827..57da039 100644 --- a/magic-boot-ui/src/components/magic/mb-upload-image.vue +++ b/magic-boot-ui/src/components/magic/basic/mb-upload-image.vue @@ -179,7 +179,7 @@ export default { this.fileList.splice(i, 1) } }) - this.$get('file/delete', { url: encodeURI(url) }) + this.$delete('file/delete', { url: encodeURI(url) }) if (this.multiple) { this.$emit('update:modelValue', this.urls) this.$emit('change', this.urls) diff --git a/magic-boot-ui/src/components/magic/mb-search.vue b/magic-boot-ui/src/components/magic/mb-search.vue deleted file mode 100644 index f80f396..0000000 --- a/magic-boot-ui/src/components/magic/mb-search.vue +++ /dev/null @@ -1,100 +0,0 @@ - - - - - diff --git a/magic-boot-ui/src/scripts/common.js b/magic-boot-ui/src/scripts/common.js index 2791b9b..58d0267 100644 --- a/magic-boot-ui/src/scripts/common.js +++ b/magic-boot-ui/src/scripts/common.js @@ -38,7 +38,7 @@ common.handleDelete = (options) => { }).then(() => { request({ url: url, - method: 'post', + method: 'delete', params: { id: id } @@ -167,4 +167,8 @@ common.loadConfig = async() => { }) } +common.setDefaultValue = (obj, attr, value) => { + obj[attr] = obj[attr] === undefined ? value : obj[attr] +} + export default common diff --git a/magic-boot-ui/src/scripts/dynamicComponent.js b/magic-boot-ui/src/scripts/dynamicComponent.js index d80f20f..0746a14 100644 --- a/magic-boot-ui/src/scripts/dynamicComponent.js +++ b/magic-boot-ui/src/scripts/dynamicComponent.js @@ -27,7 +27,7 @@ function appComponent(app, item){ } const install = (app) => { - app.config.globalProperties.$get('/component/list', { size: 999999 }).then((res) => { + app.config.globalProperties.$post('/component/list', { size: 999999 }).then((res) => { res.data.list.forEach(it => { appComponent(app, it) }) diff --git a/magic-boot-ui/src/scripts/global.js b/magic-boot-ui/src/scripts/global.js index 277eb44..718588a 100644 --- a/magic-boot-ui/src/scripts/global.js +++ b/magic-boot-ui/src/scripts/global.js @@ -11,4 +11,4 @@ export default { filePrefix: '', visitedViews: reactive([]), tabValue: ref('') -} \ No newline at end of file +} diff --git a/magic-boot-ui/src/scripts/globalProperties.js b/magic-boot-ui/src/scripts/globalProperties.js index 461e1dc..d6155da 100644 --- a/magic-boot-ui/src/scripts/globalProperties.js +++ b/magic-boot-ui/src/scripts/globalProperties.js @@ -1,5 +1,7 @@ import * as PlusIcons from '@element-plus/icons-vue' import VueUeditorWrap from 'vue-ueditor-wrap' +import Treeselect from 'vue3-treeselect' +import 'vue3-treeselect/dist/vue3-treeselect.css' import request from './request' import global from './global' import common from './common' @@ -19,6 +21,7 @@ const install = (app) => { } }) app.config.globalProperties.$get = (url, data) => request({ url, params: data }) + app.config.globalProperties.$delete = (url, data) => request({ url, method: 'delete', params: data }) app.config.globalProperties.$global = global app.config.globalProperties.$common = common app.config.globalProperties.$treeTable = treeTable @@ -26,5 +29,6 @@ const install = (app) => { app.component(`El${key}`, PlusIcons[key]) } app.use(VueUeditorWrap) + app.component('treeselect', Treeselect) } export default install diff --git a/magic-boot-ui/src/views/examples/test-mb-list.vue b/magic-boot-ui/src/views/examples/test-mb-list.vue new file mode 100644 index 0000000..4388fb1 --- /dev/null +++ b/magic-boot-ui/src/views/examples/test-mb-list.vue @@ -0,0 +1,214 @@ + + + diff --git a/magic-boot-ui/src/views/lowcode/component-list.vue b/magic-boot-ui/src/views/lowcode/component-list.vue index fd31831..d13ee82 100644 --- a/magic-boot-ui/src/views/lowcode/component-list.vue +++ b/magic-boot-ui/src/views/lowcode/component-list.vue @@ -4,7 +4,7 @@ - + 添加 @@ -17,6 +17,9 @@ + + + @@ -42,6 +45,11 @@ const tableOptions = reactive({ type: 'input', label: '组件名称', value: '' + }, + descRibe: { + type: 'input', + label: '组件描述', + value: '' } }, cols: [ @@ -49,6 +57,10 @@ const tableOptions = reactive({ field: 'name', title: '组件名称' }, + { + field: 'descRibe', + title: '组件描述' + }, { title: '操作', type: 'btns', @@ -85,6 +97,7 @@ const dialogTitle = ref('') const temp = ref(getTemp()) const rules = reactive({ name: [{ required: true, message: '请输入组件名称', trigger: 'change' }], + descRibe: [{ required: true, message: '请输入组件描述', trigger: 'change' }], code: [{ required: true, message: '请输入组件代码', trigger: 'change' }] }) const downloadLoading = ref(false) @@ -98,6 +111,7 @@ function getTemp(){ id: '', name: '', code: '', + descRibe: '' } } @@ -118,7 +132,7 @@ function save(d) { dataForm.value.validate((valid) => { if (valid) { d.loading() - proxy.$post('role/save', temp.value).then(() => { + proxy.$post('component/save', temp.value).then(() => { d.hideLoading() reloadTable() formDialog.value.hide() diff --git a/magic-boot-ui/src/views/system/user/user-form.vue b/magic-boot-ui/src/views/system/user/user-form.vue index dd85b9e..5f83b95 100644 --- a/magic-boot-ui/src/views/system/user/user-form.vue +++ b/magic-boot-ui/src/views/system/user/user-form.vue @@ -32,12 +32,12 @@ - + - + 有效 锁定 @@ -46,8 +46,6 @@ diff --git a/magic-boot-ui/src/views/system/user/user-list.vue b/magic-boot-ui/src/views/system/user/user-list.vue index 530e673..d5f6882 100644 --- a/magic-boot-ui/src/views/system/user/user-list.vue +++ b/magic-boot-ui/src/views/system/user/user-list.vue @@ -71,14 +71,13 @@ const tableOptions = reactive({ roleId: { type: 'select', label: '角色', - value: '', + value: proxy.$route.query.roleId, properties: { - url: 'role/list?size=999999', - labelField: 'name', - valueField: 'id', + url: 'role/all', el: { multiple: true } } - } + }, + officeId: proxy.$route.query.officeId }, cols: [ { @@ -160,17 +159,20 @@ const userFormDialog = ref() const table = ref() const userForm = ref() -onMounted(() => { +// onMounted(() => { // setTimeout(function(){ - console.log(proxy.$route.query.roleId) - if(proxy.$route.query.roleId){ - tableOptions.where.roleId.value = proxy.$route.query.roleId - } - if(proxy.$route.query.officeId){ - tableOptions.where.officeId = proxy.$route.query.officeId - } + // nextTick(() => { + // console.log(proxy.$route.query.roleId) + // if(proxy.$route.query.roleId){ + // tableOptions.where.roleId.value = proxy.$route.query.roleId + // } + // if(proxy.$route.query.officeId){ + // tableOptions.where.officeId = proxy.$route.query.officeId + // } + // }) + // },1000) -}) +// }) function checkChange(values) { tableOptions.where.officeId = values diff --git a/magic-boot/src/main/resources/application.yml b/magic-boot/src/main/resources/application.yml index c41cf51..ba892db 100644 --- a/magic-boot/src/main/resources/application.yml +++ b/magic-boot/src/main/resources/application.yml @@ -80,6 +80,10 @@ magic-api: sql-column-case: camel resource: location: data/magic-api + backup: #备份相关配置 + enable: true #是否启用 + max-history: -1 #备份保留天数,-1为永久保留 + table-name: magic_backup_record_v2 #使用数据库存储备份时的表名 page: page: current size: size