2022-01-13 23:31:04 +08:00
|
|
|
{
|
|
|
|
"properties" : { },
|
|
|
|
"id" : "55ddadf56dfe433baae1b5c26580cf00",
|
|
|
|
"script" : null,
|
|
|
|
"groupId" : "4f0230049d7e4f39b1e0897cc0f46f9a",
|
|
|
|
"name" : "所有机构",
|
2022-05-07 13:51:54 +08:00
|
|
|
"createTime" : null,
|
2023-04-01 23:20:47 +08:00
|
|
|
"updateTime" : 1680361919209,
|
2022-01-13 23:31:04 +08:00
|
|
|
"lock" : "0",
|
2022-03-05 22:30:18 +08:00
|
|
|
"createBy" : null,
|
|
|
|
"updateBy" : null,
|
2022-01-13 23:31:04 +08:00
|
|
|
"path" : "/offices",
|
2022-03-05 22:30:18 +08:00
|
|
|
"method" : "GET",
|
2022-01-13 23:31:04 +08:00
|
|
|
"parameters" : [ ],
|
2022-03-05 22:30:18 +08:00
|
|
|
"options" : [ ],
|
2022-01-13 23:31:04 +08:00
|
|
|
"requestBody" : "",
|
|
|
|
"headers" : [ ],
|
|
|
|
"paths" : [ ],
|
2023-04-01 23:20:47 +08:00
|
|
|
"responseBody" : "{\n \"code\": 500,\n \"message\": \"系统内部出现错误\",\n \"data\": null,\n \"timestamp\": 1680361909126,\n \"executeTime\": 175\n}",
|
2022-01-13 23:31:04 +08:00
|
|
|
"description" : null,
|
|
|
|
"requestBodyDefinition" : null,
|
|
|
|
"responseBodyDefinition" : {
|
|
|
|
"name" : "",
|
|
|
|
"value" : "",
|
|
|
|
"description" : "",
|
|
|
|
"required" : false,
|
|
|
|
"dataType" : "Object",
|
|
|
|
"type" : null,
|
|
|
|
"defaultValue" : null,
|
|
|
|
"validateType" : "",
|
|
|
|
"error" : "",
|
|
|
|
"expression" : "",
|
|
|
|
"children" : [ {
|
|
|
|
"name" : "code",
|
2023-04-01 23:20:47 +08:00
|
|
|
"value" : "500",
|
2022-01-13 23:31:04 +08:00
|
|
|
"description" : "",
|
|
|
|
"required" : false,
|
|
|
|
"dataType" : "Integer",
|
|
|
|
"type" : null,
|
|
|
|
"defaultValue" : null,
|
|
|
|
"validateType" : "",
|
|
|
|
"error" : "",
|
|
|
|
"expression" : "",
|
|
|
|
"children" : [ ]
|
|
|
|
}, {
|
|
|
|
"name" : "message",
|
2023-04-01 23:20:47 +08:00
|
|
|
"value" : "系统内部出现错误",
|
2022-01-13 23:31:04 +08:00
|
|
|
"description" : "",
|
|
|
|
"required" : false,
|
|
|
|
"dataType" : "String",
|
|
|
|
"type" : null,
|
|
|
|
"defaultValue" : null,
|
|
|
|
"validateType" : "",
|
|
|
|
"error" : "",
|
|
|
|
"expression" : "",
|
|
|
|
"children" : [ ]
|
|
|
|
}, {
|
|
|
|
"name" : "data",
|
2022-05-07 13:51:54 +08:00
|
|
|
"value" : "null",
|
2022-01-13 23:31:04 +08:00
|
|
|
"description" : "",
|
|
|
|
"required" : false,
|
|
|
|
"dataType" : "Object",
|
|
|
|
"type" : null,
|
|
|
|
"defaultValue" : null,
|
|
|
|
"validateType" : "",
|
|
|
|
"error" : "",
|
|
|
|
"expression" : "",
|
2022-05-07 13:51:54 +08:00
|
|
|
"children" : [ ]
|
2022-01-13 23:31:04 +08:00
|
|
|
}, {
|
|
|
|
"name" : "timestamp",
|
2023-04-01 23:20:47 +08:00
|
|
|
"value" : "1680361909126",
|
2022-01-13 23:31:04 +08:00
|
|
|
"description" : "",
|
|
|
|
"required" : false,
|
|
|
|
"dataType" : "Long",
|
|
|
|
"type" : null,
|
|
|
|
"defaultValue" : null,
|
|
|
|
"validateType" : "",
|
|
|
|
"error" : "",
|
|
|
|
"expression" : "",
|
|
|
|
"children" : [ ]
|
|
|
|
}, {
|
|
|
|
"name" : "executeTime",
|
2023-04-01 23:20:47 +08:00
|
|
|
"value" : "175",
|
2022-01-13 23:31:04 +08:00
|
|
|
"description" : "",
|
|
|
|
"required" : false,
|
|
|
|
"dataType" : "Integer",
|
|
|
|
"type" : null,
|
|
|
|
"defaultValue" : null,
|
|
|
|
"validateType" : "",
|
|
|
|
"error" : "",
|
|
|
|
"expression" : "",
|
|
|
|
"children" : [ ]
|
|
|
|
} ]
|
2022-03-05 22:30:18 +08:00
|
|
|
}
|
2022-01-13 23:31:04 +08:00
|
|
|
}
|
|
|
|
================================
|
2023-04-01 23:20:47 +08:00
|
|
|
var toTree = (list,pid) => select t.*,toTree(list,t.key) children from list t where t.pid = pid
|
|
|
|
var list = toTree(db.select('select id "key",name label,pid from sys_office where is_del = 0 order by sort'),'0')
|
2022-01-13 23:31:04 +08:00
|
|
|
|
|
|
|
return {
|
|
|
|
list: list,
|
|
|
|
total: list.getLength()
|
|
|
|
}
|