2021-10-24 20:09:53 +08:00
|
|
|
|
{
|
|
|
|
|
"properties" : { },
|
|
|
|
|
"id" : "f608811b430f4a3cb82feed4067cde71",
|
|
|
|
|
"script" : null,
|
|
|
|
|
"groupId" : "67b2ce258e24491194b74992958c74aa",
|
|
|
|
|
"name" : "当前用户菜单",
|
2022-03-23 20:57:43 +08:00
|
|
|
|
"createTime" : null,
|
2023-06-07 16:24:29 +08:00
|
|
|
|
"updateTime" : 1685784587489,
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"lock" : "0",
|
2022-03-05 22:30:18 +08:00
|
|
|
|
"createBy" : null,
|
|
|
|
|
"updateBy" : null,
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"path" : "/current/menus",
|
2022-03-05 22:30:18 +08:00
|
|
|
|
"method" : "POST",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"parameters" : [ ],
|
2022-03-05 22:30:18 +08:00
|
|
|
|
"options" : [ ],
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"requestBody" : "{\n\n}",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"headers" : [ ],
|
|
|
|
|
"paths" : [ ],
|
2023-06-07 16:24:29 +08:00
|
|
|
|
"responseBody" : "{\n \"code\": 200,\n \"message\": \"success\",\n \"data\": {\n \"notLayoutMenus\": [\n {\n \"openMode\": \"2\",\n \"componentName\": \"\",\n \"name\": \"操作日志\",\n \"path\": \"/system/monitor/oper-log\",\n \"subCount\": 0,\n \"keepAlive\": 1\n },\n {\n \"openMode\": \"0\",\n \"componentName\": \"\",\n \"name\": \"区域管理\",\n \"path\": \"/system/area\",\n \"subCount\": 0,\n \"keepAlive\": 0\n },\n {\n \"openMode\": \"1\",\n \"componentName\": \"\",\n \"name\": \"接口管理\",\n \"path\": \"/lowcode/magic-editor\",\n \"subCount\": 0,\n \"keepAlive\": 1\n },\n {\n \"openMode\": \"2\",\n \"componentName\": \"\",\n \"name\": \"登录日志\",\n \"path\": \"/system/monitor/login-log\",\n \"subCount\": 0,\n \"keepAlive\": 0\n }\n ],\n \"layoutMenus\": [\n {\n \"id\": \"b1851d1b13594e71840103c11a37a669\",\n \"title\": \"系统设置\",\n \"pid\": \"0\",\n \"isShow\": 1,\n \"url\": \"/system\",\n \"sort\": 10,\n \"icon\": \"settings\",\n \"keepAlive\": 0,\n \"componentName\": \"\",\n \"openMode\": \"0\",\n \"component\": \"Layout\",\n \"path\": \"/system\",\n \"meta\": {\n \"title\": \"系统设置\",\n \"icon\": \"settings\",\n \"keepAlive\": false\n },\n \"redirect\": \"noRedirect\",\n \"alwaysShow\": true,\n \"children\": [\n {\n \"id\": \"39be13ef6f0745568c80bf35202ddb2b\",\n \"title\": \"菜单管理\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/menu/menu-list\",\n \"sort\": 10,\n \"icon\": \"menu\",\n \"keepAlive\": 1,\n \"componentName\": \"\",\n \"openMode\": \"0\",\n \"component\": \"/system/menu/menu-list\",\n \"path\": \"/system/menu/menu-list\",\n \"meta\": {\n \"title\": \"菜单管理\",\n \"icon\": \"menu\",\n \"keepAlive\": true\n }\n },\n {\n \"id\": \"6f3594d0-5445-41e1-a13c-890a57485036\",\n \"title\": \"组织机构\",\n \"pid\": \"b1851d1b13594e71840103c11a37a669\",\n \"isShow\": 1,\n \"url\": \"/system/office/office-list\",\n \"sort\": 20,\n \"icon\": \"office\",\n \"keepAlive\": 1,\n \"componentName\": \"\",\n \"openMode\": \"0\",\n \"component\": \"/system/office/office-list\",\n \"path\": \"/system/office/office-list\",\n \"meta\": {\n \"title\": \"组织机构\",\n \"icon\": \"office\",\n \"keepAlive\": true\n }\n },\n {\n \"id\": \"8e9455740091486c914495cfb0c7faa5\",\n \"title\": \"角色管理\",\n
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"description" : null,
|
2022-03-23 20:57:43 +08:00
|
|
|
|
"requestBodyDefinition" : {
|
|
|
|
|
"name" : "",
|
|
|
|
|
"value" : "",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Object",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
},
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"responseBodyDefinition" : {
|
|
|
|
|
"name" : "",
|
|
|
|
|
"value" : "",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Object",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ {
|
|
|
|
|
"name" : "code",
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"value" : "200",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Integer",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "message",
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"value" : "success",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "data",
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"value" : "",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"dataType" : "Array",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"children" : [ {
|
|
|
|
|
"name" : "",
|
|
|
|
|
"value" : "",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Object",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ {
|
|
|
|
|
"name" : "id",
|
|
|
|
|
"value" : "b1851d1b13594e71840103c11a37a669",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"name" : "title",
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"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" : "isShow",
|
|
|
|
|
"value" : "1",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Integer",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "url",
|
|
|
|
|
"value" : "/system",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "sort",
|
|
|
|
|
"value" : "10",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Integer",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "icon",
|
|
|
|
|
"value" : "settings",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-03-05 10:31:35 +08:00
|
|
|
|
}, {
|
|
|
|
|
"name" : "keepAlive",
|
|
|
|
|
"value" : "0",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Integer",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"name" : "componentName",
|
2022-03-05 10:31:35 +08:00
|
|
|
|
"value" : "null",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Object",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"name" : "openMode",
|
|
|
|
|
"value" : "0",
|
2022-03-05 10:31:35 +08:00
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"dataType" : "String",
|
2022-03-05 10:31:35 +08:00
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-01-04 14:56:52 +08:00
|
|
|
|
}, {
|
|
|
|
|
"name" : "component",
|
|
|
|
|
"value" : "Layout",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "path",
|
|
|
|
|
"value" : "/system",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "meta",
|
|
|
|
|
"value" : "",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Object",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ {
|
|
|
|
|
"name" : "title",
|
|
|
|
|
"value" : "系统设置",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "icon",
|
|
|
|
|
"value" : "settings",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-03-05 10:31:35 +08:00
|
|
|
|
}, {
|
|
|
|
|
"name" : "keepAlive",
|
|
|
|
|
"value" : "false",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Boolean",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-01-04 14:56:52 +08:00
|
|
|
|
} ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "redirect",
|
|
|
|
|
"value" : "noRedirect",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "alwaysShow",
|
|
|
|
|
"value" : "true",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Boolean",
|
|
|
|
|
"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" : "39be13ef6f0745568c80bf35202ddb2b",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"name" : "title",
|
2022-01-04 14:56:52 +08:00
|
|
|
|
"value" : "菜单管理",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "pid",
|
|
|
|
|
"value" : "b1851d1b13594e71840103c11a37a669",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "isShow",
|
|
|
|
|
"value" : "1",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Integer",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "url",
|
|
|
|
|
"value" : "/system/menu/menu-list",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "sort",
|
|
|
|
|
"value" : "10",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Integer",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "icon",
|
|
|
|
|
"value" : "menu",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-03-05 10:31:35 +08:00
|
|
|
|
}, {
|
|
|
|
|
"name" : "keepAlive",
|
|
|
|
|
"value" : "1",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Integer",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"name" : "componentName",
|
2022-03-05 10:31:35 +08:00
|
|
|
|
"value" : "null",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Object",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"name" : "openMode",
|
|
|
|
|
"value" : "0",
|
2022-03-05 10:31:35 +08:00
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"dataType" : "String",
|
2022-03-05 10:31:35 +08:00
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-01-04 14:56:52 +08:00
|
|
|
|
}, {
|
|
|
|
|
"name" : "component",
|
|
|
|
|
"value" : "/system/menu/menu-list",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "path",
|
|
|
|
|
"value" : "/system/menu/menu-list",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "meta",
|
|
|
|
|
"value" : "",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Object",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ {
|
|
|
|
|
"name" : "title",
|
|
|
|
|
"value" : "菜单管理",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "icon",
|
|
|
|
|
"value" : "menu",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "String",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-03-05 10:31:35 +08:00
|
|
|
|
}, {
|
|
|
|
|
"name" : "keepAlive",
|
|
|
|
|
"value" : "true",
|
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Boolean",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
2022-01-04 14:56:52 +08:00
|
|
|
|
} ]
|
|
|
|
|
} ]
|
|
|
|
|
} ]
|
|
|
|
|
} ]
|
|
|
|
|
} ]
|
2021-10-24 20:09:53 +08:00
|
|
|
|
}, {
|
|
|
|
|
"name" : "timestamp",
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"value" : "1657368503505",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
|
|
|
|
"dataType" : "Long",
|
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
}, {
|
|
|
|
|
"name" : "executeTime",
|
2022-07-09 20:37:31 +08:00
|
|
|
|
"value" : "18",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"description" : "",
|
|
|
|
|
"required" : false,
|
2022-01-01 14:28:03 +08:00
|
|
|
|
"dataType" : "Object",
|
2021-10-24 20:09:53 +08:00
|
|
|
|
"type" : null,
|
|
|
|
|
"defaultValue" : null,
|
|
|
|
|
"validateType" : "",
|
|
|
|
|
"error" : "",
|
|
|
|
|
"expression" : "",
|
|
|
|
|
"children" : [ ]
|
|
|
|
|
} ]
|
2022-03-05 22:30:18 +08:00
|
|
|
|
}
|
2023-06-07 16:24:29 +08:00
|
|
|
|
}
|
|
|
|
|
================================
|
2021-10-24 20:09:53 +08:00
|
|
|
|
import 'cn.dev33.satoken.stp.StpUtil';
|
|
|
|
|
|
|
|
|
|
var userId = StpUtil.getLoginId()
|
2022-01-04 14:56:52 +08:00
|
|
|
|
|
2023-06-07 16:24:29 +08:00
|
|
|
|
// 查出所有隐藏或者打开方式为“页签”和“iframe”的菜单(排除http地址和静态页面)
|
|
|
|
|
var notLayoutMenus = db.select("""
|
|
|
|
|
select * from (
|
|
|
|
|
select
|
|
|
|
|
open_mode,
|
|
|
|
|
component_name,
|
|
|
|
|
name,
|
|
|
|
|
url as path,
|
|
|
|
|
-- 查询下级是否还有菜单(不包含按钮权限)
|
|
|
|
|
(
|
|
|
|
|
select count(1) from sys_menu where is_del = 0 and pid = sm.id and
|
|
|
|
|
((component_name is not null and component_name != '') or (url is not null and url != ''))
|
|
|
|
|
) sub_count,
|
|
|
|
|
sm.keep_alive
|
|
|
|
|
from sys_menu sm
|
|
|
|
|
where is_del = 0 and ((component_name is not null and component_name != '') or (
|
|
|
|
|
url is not null and url != ''
|
|
|
|
|
-- 排除不需要加载路由的菜单
|
|
|
|
|
and url not like 'http%'
|
|
|
|
|
and url not like '%.htm'
|
|
|
|
|
and url not like '%.html'
|
|
|
|
|
))
|
|
|
|
|
and
|
|
|
|
|
(
|
|
|
|
|
-- 查出来隐藏的需要加载的路由
|
|
|
|
|
is_show = 0
|
|
|
|
|
or
|
|
|
|
|
-- 新标签页和iframe
|
|
|
|
|
open_mode in ('1', '2')
|
|
|
|
|
)
|
|
|
|
|
?{userId != '1',
|
|
|
|
|
and sm.id in (
|
|
|
|
|
select menu_id from sys_role_menu where role_id in (
|
|
|
|
|
select role_id from sys_user_role where user_id = #{userId}
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
) sm where sub_count = 0
|
|
|
|
|
""")
|
|
|
|
|
|
|
|
|
|
// 查出所有显示的菜单
|
2021-10-24 20:09:53 +08:00
|
|
|
|
var menus = db.select("""
|
2022-01-04 14:56:52 +08:00
|
|
|
|
select
|
2021-10-24 20:09:53 +08:00
|
|
|
|
sm.id,
|
2022-06-27 22:43:27 +08:00
|
|
|
|
sm.name title,
|
2021-10-24 20:09:53 +08:00
|
|
|
|
sm.pid,
|
|
|
|
|
sm.is_show,
|
|
|
|
|
sm.url,
|
2022-01-01 14:28:03 +08:00
|
|
|
|
sm.sort,
|
2022-01-07 01:08:42 +08:00
|
|
|
|
sm.icon,
|
2022-03-05 10:31:35 +08:00
|
|
|
|
sm.keep_alive,
|
2022-06-28 12:48:06 +08:00
|
|
|
|
sm.component_name,
|
|
|
|
|
sm.open_mode
|
2022-03-23 20:57:43 +08:00
|
|
|
|
from sys_menu sm where 1=1
|
2022-01-04 14:56:52 +08:00
|
|
|
|
?{userId != '1',
|
|
|
|
|
and sm.id in (
|
|
|
|
|
select menu_id from sys_role_menu where role_id in (
|
|
|
|
|
select role_id from sys_user_role where user_id = #{userId}
|
|
|
|
|
)
|
|
|
|
|
)
|
2022-08-13 17:26:47 +08:00
|
|
|
|
} and sm.is_del = '0' and sm.is_show = 1 order by sm.sort
|
2021-10-24 20:09:53 +08:00
|
|
|
|
""")
|
|
|
|
|
|
|
|
|
|
for(menu in menus){
|
|
|
|
|
menu.component = (menu.url || "Layout");
|
|
|
|
|
menu.path = (menu.component == 'Layout' ? "/" : menu.component);
|
|
|
|
|
menu.meta = {}
|
2022-06-27 22:43:27 +08:00
|
|
|
|
menu.meta.title = menu.title
|
2022-01-01 14:28:03 +08:00
|
|
|
|
menu.meta.icon = menu.icon
|
2022-01-07 01:08:42 +08:00
|
|
|
|
menu.meta.keepAlive = (menu.keepAlive == '1' ? true : false)
|
2023-06-07 16:24:29 +08:00
|
|
|
|
menu.meta.openMode = menu.openMode
|
|
|
|
|
menu.meta.path = menu.path
|
2021-10-24 20:09:53 +08:00
|
|
|
|
}
|
|
|
|
|
var nodes = menus.toMap(it => it.id)
|
|
|
|
|
nodes.each((key, node) => {
|
|
|
|
|
if (nodes.containsKey(node.pid)) {
|
|
|
|
|
nodes[node.pid].redirect = "noRedirect";
|
|
|
|
|
nodes[node.pid].component = "Layout";
|
|
|
|
|
nodes[node.pid].alwaysShow = true;
|
|
|
|
|
if(!nodes[node.pid].children){
|
|
|
|
|
nodes[node.pid].children = []
|
|
|
|
|
}
|
|
|
|
|
nodes[node.pid].children.push(node)
|
|
|
|
|
}
|
|
|
|
|
})
|
2023-06-07 16:24:29 +08:00
|
|
|
|
var layoutMenus = []
|
2021-10-24 20:09:53 +08:00
|
|
|
|
nodes.each((key, node) => {
|
|
|
|
|
if(node.pid == '0'){
|
2022-04-10 10:48:49 +08:00
|
|
|
|
if(node.component != 'Layout'){
|
|
|
|
|
node = {
|
|
|
|
|
isShow: 1,
|
|
|
|
|
component: 'Layout',
|
|
|
|
|
redirect: node.path,
|
|
|
|
|
children: [node]
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-06-07 16:24:29 +08:00
|
|
|
|
layoutMenus.push(node)
|
2021-10-24 20:09:53 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
2023-06-07 16:24:29 +08:00
|
|
|
|
return {
|
|
|
|
|
notLayoutMenus,
|
|
|
|
|
layoutMenus
|
|
|
|
|
}
|