diff --git a/data/magic-api/api/系统管理/用户管理/所有机构.ms b/data/magic-api/api/系统管理/用户管理/所有机构.ms index 5c9e1d6..d07a237 100644 --- a/data/magic-api/api/系统管理/用户管理/所有机构.ms +++ b/data/magic-api/api/系统管理/用户管理/所有机构.ms @@ -4,8 +4,8 @@ "script" : null, "groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a", "name" : "所有机构", - "createTime" : 1646490239474, - "updateTime" : 1642134606249, + "createTime" : null, + "updateTime" : 1651892081106, "lock" : "0", "createBy" : null, "updateBy" : null, @@ -16,7 +16,7 @@ "requestBody" : "", "headers" : [ ], "paths" : [ ], - "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"list\": [{\n \"id\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"label\": \"马小东公司\",\n \"pid\": \"0\",\n \"children\": [{\n \"id\": \"81b5493cdb31477f9ceea85b2cd08f15\",\n \"label\": \"马小东子公司\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"children\": []\n }, {\n \"id\": \"31b365008f994e93850186126fce87cb\",\n \"label\": \"马小东子公司2\",\n \"pid\": \"4c37a80226134bce8bc91c8fc04a7d2f\",\n \"children\": []\n }]\n }, {\n \"id\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"label\": \"吕金泽公司\",\n \"pid\": \"0\",\n \"children\": [{\n \"id\": \"1ae0299fc79b43c6b0ae2e14756ec41a\",\n \"label\": \"吕金泽子公司\",\n \"pid\": \"935126327e2a4f90b3f485f818f61ea5\",\n \"children\": []\n }]\n }],\n \"total\": 2\n },\n \"timestamp\": 1642134574553,\n \"executeTime\": 5\n}", + "responseBody" : "{\n \"code\": 402,\n \"message\": \"凭证已过期\",\n \"data\": null,\n \"timestamp\": 1651892073882,\n \"executeTime\": null\n}", "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,154 +65,10 @@ "validateType" : "", "error" : "", "expression" : "", - "children" : [ { - "name" : "list", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Array", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "id", - "value" : "4c37a80226134bce8bc91c8fc04a7d2f", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "label", - "value" : "马小东公司", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "pid", - "value" : "0", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "children", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Array", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Object", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ { - "name" : "id", - "value" : "81b5493cdb31477f9ceea85b2cd08f15", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "label", - "value" : "马小东子公司", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "pid", - "value" : "4c37a80226134bce8bc91c8fc04a7d2f", - "description" : "", - "required" : false, - "dataType" : "String", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - }, { - "name" : "children", - "value" : "", - "description" : "", - "required" : false, - "dataType" : "Array", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - } ] - } ] - } ] - } ] - }, { - "name" : "total", - "value" : "2", - "description" : "", - "required" : false, - "dataType" : "Integer", - "type" : null, - "defaultValue" : null, - "validateType" : "", - "error" : "", - "expression" : "", - "children" : [ ] - } ] + "children" : [ ] }, { "name" : "timestamp", - "value" : "1642134574553", + "value" : "1651892073882", "description" : "", "required" : false, "dataType" : "Long", @@ -224,7 +80,7 @@ "children" : [ ] }, { "name" : "executeTime", - "value" : "5", + "value" : "null", "description" : "", "required" : false, "dataType" : "Integer", @@ -238,8 +94,8 @@ } } ================================ -var toTree = (list,pid) => select t.*,toTree(list,t.id) children from list t where t.pid = pid -var list = toTree(db.select('select id,name label,pid from sys_office where is_del = 0 order by sort'),'0') +var toTree = (list,pid) => select t.*,toTree(list,t.value) children from list t where t.pid = pid +var list = toTree(db.select('select id value,name label,pid from sys_office where is_del = 0 order by sort'),'0') return { list: list, diff --git a/data/magic-api/api/系统管理/组件/选择组件.ms b/data/magic-api/api/系统管理/组件/选择组件.ms index 92ae86f..c7dd042 100644 --- a/data/magic-api/api/系统管理/组件/选择组件.ms +++ b/data/magic-api/api/系统管理/组件/选择组件.ms @@ -5,7 +5,7 @@ "groupId" : "6f106ebdee21489db34b956f7770ff03", "name" : "选择组件", "createTime" : null, - "updateTime" : 1648647253717, + "updateTime" : 1651902325727, "lock" : "0", "createBy" : null, "updateBy" : null, @@ -16,7 +16,7 @@ "requestBody" : "", "headers" : [ ], "paths" : [ ], - "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [{\n \"id\": \"9bf92d503f4242d39a0f271c577aa3ac\",\n \"label\": \"系统管理\",\n \"children\": [{\n \"id\": \"6bee7576eea04963a573b21bb657784d\",\n \"label\": \"字典管理\",\n \"children\": [{\n \"id\": \"sys-dict-list\",\n \"label\": \"列表(sys-dict-list)\"\n }]\n }]\n }],\n \"timestamp\": 1648025200208,\n \"executeTime\": 14\n}", + "responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": [{\n \"value\": \"55ff62aa20144b7bb5c6dfb5d76c8139\",\n \"label\": \"数据管理(/data)\",\n \"children\": [{\n \"value\": \"eb5dbed949de4f50ba4bf59f483252a5\",\n \"label\": \"测试生成(/test)\",\n \"children\": [{\n \"id\": \"data-test-list\",\n \"label\": \"列表(/list)\"\n }]\n }]\n }],\n \"timestamp\": 1651902176780,\n \"executeTime\": 9\n}", "description" : null, "requestBodyDefinition" : null, "responseBodyDefinition" : { @@ -77,8 +77,8 @@ "error" : "", "expression" : "", "children" : [ { - "name" : "id", - "value" : "9bf92d503f4242d39a0f271c577aa3ac", + "name" : "value", + "value" : "55ff62aa20144b7bb5c6dfb5d76c8139", "description" : "", "required" : false, "dataType" : "String", @@ -90,7 +90,7 @@ "children" : [ ] }, { "name" : "label", - "value" : "系统管理", + "value" : "数据管理(/data)", "description" : "", "required" : false, "dataType" : "String", @@ -123,8 +123,8 @@ "error" : "", "expression" : "", "children" : [ { - "name" : "id", - "value" : "6bee7576eea04963a573b21bb657784d", + "name" : "value", + "value" : "eb5dbed949de4f50ba4bf59f483252a5", "description" : "", "required" : false, "dataType" : "String", @@ -136,7 +136,7 @@ "children" : [ ] }, { "name" : "label", - "value" : "字典管理", + "value" : "测试生成(/test)", "description" : "", "required" : false, "dataType" : "String", @@ -170,7 +170,7 @@ "expression" : "", "children" : [ { "name" : "id", - "value" : "sys-dict-list", + "value" : "data-test-list", "description" : "", "required" : false, "dataType" : "String", @@ -182,7 +182,7 @@ "children" : [ ] }, { "name" : "label", - "value" : "列表(sys-dict-list)", + "value" : "列表(/list)", "description" : "", "required" : false, "dataType" : "String", @@ -200,7 +200,7 @@ } ] }, { "name" : "timestamp", - "value" : "1648025200208", + "value" : "1651902176780", "description" : "", "required" : false, "dataType" : "Long", @@ -212,7 +212,7 @@ "children" : [ ] }, { "name" : "executeTime", - "value" : "14", + "value" : "9", "description" : "", "required" : false, "dataType" : "Integer", @@ -230,7 +230,7 @@ import org.ssssssss.magicapi.utils.PathUtils import org.ssssssss.magicapi.core.service.MagicResourceService var getFiles = (groupId) => { return MagicResourceService.listFiles(groupId).map(file => { - id: PathUtils.replaceSlash(String.format("%s/%s", MagicResourceService.getGroupPath(file.groupId), file.path)).replace(/^\//,'').replace(/\/\//, '/').replace('/', '-'), + value: PathUtils.replaceSlash(String.format("%s/%s", MagicResourceService.getGroupPath(file.groupId), file.path)).replace(/^\//,'').replace(/\/\//, '/').replace('/', '-'), label: `${file.name}(${file.path})` }) } @@ -238,7 +238,7 @@ var toTree = (children) => { var treeData = [] children.forEach(it => { var chi = {} - chi.id = it.node.id + chi.value = it.node.id chi.label = `${it.node.name}(${it.node.path})` if(it.children.length > 0){ chi.children = toTree(it.children) diff --git a/magic-boot-ui/package.json b/magic-boot-ui/package.json index dcefae2..1efcbd9 100644 --- a/magic-boot-ui/package.json +++ b/magic-boot-ui/package.json @@ -10,13 +10,12 @@ }, "dependencies": { "axios": "^0.24.0", - "element-plus": "^2.1.7", + "element-plus": "^2.1.8", "nprogress": "0.2.0", "path-browserify": "^1.0.1", "vue": "^3.2.25", "vue-cropper": "^1.0.2", "vue-router": "^4.0.0-0", - "vue3-treeselect": "^0.1.10", "vuedraggable": "^4.1.0", "xlsx": "^0.18.3" }, diff --git a/magic-boot-ui/src/components/magic/basic/mb-pagination.vue b/magic-boot-ui/src/components/magic/data/mb-pagination.vue similarity index 100% rename from magic-boot-ui/src/components/magic/basic/mb-pagination.vue rename to magic-boot-ui/src/components/magic/data/mb-pagination.vue diff --git a/magic-boot-ui/src/components/magic/basic/mb-search.vue b/magic-boot-ui/src/components/magic/data/mb-search.vue similarity index 100% rename from magic-boot-ui/src/components/magic/basic/mb-search.vue rename to magic-boot-ui/src/components/magic/data/mb-search.vue diff --git a/magic-boot-ui/src/components/magic/basic/mb-table-column.vue b/magic-boot-ui/src/components/magic/data/mb-table-column.vue similarity index 100% rename from magic-boot-ui/src/components/magic/basic/mb-table-column.vue rename to magic-boot-ui/src/components/magic/data/mb-table-column.vue diff --git a/magic-boot-ui/src/components/magic/basic/mb-table.vue b/magic-boot-ui/src/components/magic/data/mb-table.vue similarity index 100% rename from magic-boot-ui/src/components/magic/basic/mb-table.vue rename to magic-boot-ui/src/components/magic/data/mb-table.vue diff --git a/magic-boot-ui/src/components/magic/form/mb-tree.vue b/magic-boot-ui/src/components/magic/data/mb-tree.vue similarity index 100% rename from magic-boot-ui/src/components/magic/form/mb-tree.vue rename to magic-boot-ui/src/components/magic/data/mb-tree.vue diff --git a/magic-boot-ui/src/components/magic/form/mb-treeselect.vue b/magic-boot-ui/src/components/magic/data/mb-treeselect.vue similarity index 81% rename from magic-boot-ui/src/components/magic/form/mb-treeselect.vue rename to magic-boot-ui/src/components/magic/data/mb-treeselect.vue index c5f5020..7e73d7b 100644 --- a/magic-boot-ui/src/components/magic/form/mb-treeselect.vue +++ b/magic-boot-ui/src/components/magic/data/mb-treeselect.vue @@ -1,5 +1,5 @@