diff --git a/code/makecode.go b/code/makecode.go index c5c2130..18317c3 100644 --- a/code/makecode.go +++ b/code/makecode.go @@ -928,7 +928,7 @@ func (that *MakeCode) Search(table string, userData Map, data Map, req *http.Req // //} else { - reStr += v.GetString("name") + "," + reStr += "`" + v.GetString("name") + "`," //} //if v["name"] == "parent_id" && v.GetString("link") != "" { diff --git a/example/config/adminDB.json b/example/config/adminDB.json index 6cb1727..55d8925 100644 --- a/example/config/adminDB.json +++ b/example/config/adminDB.json @@ -74,78 +74,8 @@ "show" ], "icon": "Setting", - "label": "关联栏目", + "label": "ebw_annex", "menus": [ - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "关联栏目", - "table": "ctg_article" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "栏目管理", - "table": "ctg" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "栏目管理", - "table": "ctg_copy" - } - ], - "name": "sys:ctg" - }, - { - "auth": [ - "show" - ], - "icon": "Setting", - "label": "ebw_customer", - "menus": [ - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_customer", - "table": "ebw_customer" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_items", - "table": "ebw_items" - }, { "auth": [ "show", @@ -158,90 +88,6 @@ "label": "ebw_annex", "table": "ebw_annex" }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_news", - "table": "ebw_news" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_vote_option", - "table": "ebw_vote_option" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_res", - "table": "ebw_res" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_user", - "table": "ebw_user" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_jobs", - "table": "ebw_jobs" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_vote", - "table": "ebw_vote" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "ebw_vote_user", - "table": "ebw_vote_user" - }, { "auth": [ "show", @@ -254,6 +100,66 @@ "label": "ebw_attachment", "table": "ebw_attachment" }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_jobs", + "table": "ebw_jobs" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_news", + "table": "ebw_news" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_res", + "table": "ebw_res" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_vote_user", + "table": "ebw_vote_user" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_customer", + "table": "ebw_customer" + }, { "auth": [ "show", @@ -265,6 +171,54 @@ ], "label": "ebw_news_addition_res", "table": "ebw_news_addition_res" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_items", + "table": "ebw_items" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_vote_option", + "table": "ebw_vote_option" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_user", + "table": "ebw_user" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "ebw_vote", + "table": "ebw_vote" } ], "name": "sys:ebw" @@ -274,7 +228,7 @@ "show" ], "icon": "Setting", - "label": "纪委信箱", + "label": "飘窗", "menus": [ { "auth": [ @@ -285,8 +239,8 @@ "info", "download" ], - "label": "纪委信箱", - "table": "mail_discipline" + "label": "飘窗", + "table": "swiper_fly" }, { "auth": [ @@ -297,8 +251,8 @@ "info", "download" ], - "label": "党委书记信箱", - "table": "mail_part" + "label": "外部系统", + "table": "swiper_sys" }, { "auth": [ @@ -309,19 +263,9 @@ "info", "download" ], - "label": "总经理信箱", - "table": "mail" - } - ], - "name": "sys:mail" - }, - { - "auth": [ - "show" - ], - "icon": "Setting", - "label": "关联专题", - "menus": [ + "label": "顶部", + "table": "swiper_top" + }, { "auth": [ "show", @@ -346,18 +290,6 @@ "label": "中间", "table": "swiper_center" }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "飘窗", - "table": "swiper_fly" - }, { "auth": [ "show", @@ -369,30 +301,6 @@ ], "label": "底部", "table": "swiper_bottom" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "外部系统", - "table": "swiper_sys" - }, - { - "auth": [ - "show", - "add", - "delete", - "edit", - "info", - "download" - ], - "label": "顶部", - "table": "swiper_top" } ], "name": "sys:swiper" @@ -407,10 +315,14 @@ { "auth": [ "show", + "add", + "delete", + "edit", + "info", "download" ], - "label": "日志管理", - "table": "logs" + "label": "文章管理", + "table": "article" }, { "auth": [ @@ -448,6 +360,24 @@ "label": "角色管理", "table": "role" }, + { + "auth": [ + "show", + "download" + ], + "label": "日志管理", + "table": "logs" + } + ], + "name": "sys" + }, + { + "auth": [ + "show" + ], + "icon": "Setting", + "label": "栏目管理", + "menus": [ { "auth": [ "show", @@ -457,11 +387,81 @@ "info", "download" ], - "label": "文章管理", - "table": "article" + "label": "栏目管理", + "table": "ctg" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "栏目管理", + "table": "ctg_copy" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "关联栏目", + "table": "ctg_article" } ], - "name": "sys" + "name": "sys:ctg" + }, + { + "auth": [ + "show" + ], + "icon": "Setting", + "label": "纪委信箱", + "menus": [ + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "纪委信箱", + "table": "mail_discipline" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "总经理信箱", + "table": "mail" + }, + { + "auth": [ + "show", + "add", + "delete", + "edit", + "info", + "download" + ], + "label": "党委书记信箱", + "table": "mail_part" + } + ], + "name": "sys:mail" } ], "name": "admin", @@ -686,9 +686,8 @@ }, { "label": "作者", - "list": false, "name": "author", - "type": "auth" + "type": "text" }, { "label": "来源", @@ -789,13 +788,21 @@ "value": null }, { - "name": "描述", - "value": "description" + "name": "id", + "value": "id" + }, + { + "name": "作者", + "value": "author" }, { "name": "编号", "value": "sn" }, + { + "name": "描述", + "value": "description" + }, { "name": "标题", "value": "title" @@ -807,10 +814,6 @@ { "name": "正文", "value": "content" - }, - { - "name": "id", - "value": "id" } ], "type": "search", @@ -1015,25 +1018,25 @@ "name": "无", "value": null }, + { + "name": "板块名称", + "value": "name" + }, { "name": "源链接", "value": "url" }, { - "name": "文章", - "value": "article_id" + "name": "ID", + "value": "id" }, { "name": "编码", "value": "sn" }, { - "name": "板块名称", - "value": "name" - }, - { - "name": "ID", - "value": "id" + "name": "文章", + "value": "article_id" } ], "type": "search", @@ -1416,21 +1419,21 @@ "name": "ID", "value": "id" }, - { - "name": "文章", - "value": "article_id" - }, { "name": "板块名称", "value": "name" }, - { - "name": "编码", - "value": "sn" - }, { "name": "源链接", "value": "url" + }, + { + "name": "文章", + "value": "article_id" + }, + { + "name": "编码", + "value": "sn" } ], "type": "search", @@ -2457,28 +2460,32 @@ "value": null }, { - "name": "pass", - "value": "pass" + "name": "tel", + "value": "tel" }, { - "name": "mpass", - "value": "mpass" + "name": "depName", + "value": "depName" + }, + { + "name": "id", + "value": "id" + }, + { + "name": "name", + "value": "name" + }, + { + "name": "pass", + "value": "pass" }, { "name": "adrress", "value": "adrress" }, { - "name": "tel", - "value": "tel" - }, - { - "name": "type", - "value": "type" - }, - { - "name": "name", - "value": "name" + "name": "depNo", + "value": "depNo" }, { "name": "no", @@ -2488,21 +2495,17 @@ "name": "account", "value": "account" }, + { + "name": "mpass", + "value": "mpass" + }, { "name": "mail", "value": "mail" }, { - "name": "depNo", - "value": "depNo" - }, - { - "name": "depName", - "value": "depName" - }, - { - "name": "id", - "value": "id" + "name": "type", + "value": "type" } ], "type": "search", @@ -2947,13 +2950,13 @@ "name": "IP地址", "value": "ip" }, - { - "name": "ID", - "value": "id" - }, { "name": "其他内容", "value": "name" + }, + { + "name": "ID", + "value": "id" } ], "type": "search", @@ -2993,6 +2996,30 @@ "type": "search", "value": null }, + { + "label": "状态", + "name": "state", + "options": [ + { + "name": "已启用", + "value": "0" + }, + { + "name": "未启用", + "value": "1" + }, + { + "name": "异常", + "value": "2" + }, + { + "name": "全部", + "value": null + } + ], + "type": "select", + "value": null + }, { "label": "操作类型", "name": "type", @@ -3021,30 +3048,6 @@ "sortable": true, "type": "select", "value": null - }, - { - "label": "状态", - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "异常", - "value": "2" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null } ], "table": "logs" @@ -3176,6 +3179,10 @@ "name": "无", "value": null }, + { + "name": "id", + "value": "id" + }, { "name": "编号", "value": "sn" @@ -3184,18 +3191,6 @@ "name": "标题", "value": "title" }, - { - "name": "手机号", - "value": "phone" - }, - { - "name": "IP", - "value": "not_show_ip" - }, - { - "name": "id", - "value": "id" - }, { "name": "内容", "value": "content" @@ -3203,6 +3198,14 @@ { "name": "姓名", "value": "name" + }, + { + "name": "手机号", + "value": "phone" + }, + { + "name": "IP", + "value": "not_show_ip" } ], "type": "search", @@ -3216,13 +3219,13 @@ "name": "无", "value": null }, - { - "name": "创建时间", - "value": "create_time" - }, { "name": "变更时间", "value": "modify_time" + }, + { + "name": "创建时间", + "value": "create_time" } ], "type": "search", @@ -3247,15 +3250,15 @@ "value": null }, { - "label": "是否展示", - "name": "show", + "label": "状态", + "name": "state", "options": [ { - "name": "否", + "name": "已启用", "value": "0" }, { - "name": "是", + "name": "未启用", "value": "1" }, { @@ -3263,7 +3266,6 @@ "value": null } ], - "sortable": true, "type": "select", "value": null }, @@ -3292,15 +3294,15 @@ "value": null }, { - "label": "状态", - "name": "state", + "label": "是否展示", + "name": "show", "options": [ { - "name": "已启用", + "name": "否", "value": "0" }, { - "name": "未启用", + "name": "是", "value": "1" }, { @@ -3308,6 +3310,7 @@ "value": null } ], + "sortable": true, "type": "select", "value": null } @@ -3441,6 +3444,14 @@ "name": "无", "value": null }, + { + "name": "编号", + "value": "sn" + }, + { + "name": "内容", + "value": "content" + }, { "name": "姓名", "value": "name" @@ -3453,18 +3464,10 @@ "name": "id", "value": "id" }, - { - "name": "编号", - "value": "sn" - }, { "name": "标题", "value": "title" }, - { - "name": "内容", - "value": "content" - }, { "name": "手机号", "value": "phone" @@ -3481,13 +3484,13 @@ "name": "无", "value": null }, - { - "name": "变更时间", - "value": "modify_time" - }, { "name": "创建时间", "value": "create_time" + }, + { + "name": "变更时间", + "value": "modify_time" } ], "type": "search", @@ -3531,6 +3534,27 @@ "type": "select", "value": null }, + { + "label": "是否展示", + "name": "show", + "options": [ + { + "name": "否", + "value": "0" + }, + { + "name": "是", + "value": "1" + }, + { + "name": "全部", + "value": null + } + ], + "sortable": true, + "type": "select", + "value": null + }, { "label": "进展", "name": "status", @@ -3554,27 +3578,6 @@ ], "type": "select", "value": null - }, - { - "label": "是否展示", - "name": "show", - "options": [ - { - "name": "否", - "value": "0" - }, - { - "name": "是", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "sortable": true, - "type": "select", - "value": null } ], "table": "mail_discipline" @@ -3707,13 +3710,17 @@ "value": null }, { - "name": "编号", - "value": "sn" + "name": "内容", + "value": "content" }, { "name": "姓名", "value": "name" }, + { + "name": "IP", + "value": "not_show_ip" + }, { "name": "id", "value": "id" @@ -3722,17 +3729,13 @@ "name": "标题", "value": "title" }, - { - "name": "内容", - "value": "content" - }, { "name": "手机号", "value": "phone" }, { - "name": "IP", - "value": "not_show_ip" + "name": "编号", + "value": "sn" } ], "type": "search", @@ -3776,26 +3779,6 @@ "type": "search", "value": null }, - { - "label": "状态", - "name": "state", - "options": [ - { - "name": "已启用", - "value": "0" - }, - { - "name": "未启用", - "value": "1" - }, - { - "name": "全部", - "value": null - } - ], - "type": "select", - "value": null - }, { "label": "进展", "name": "status", @@ -3820,6 +3803,26 @@ "type": "select", "value": null }, + { + "label": "状态", + "name": "state", + "options": [ + { + "name": "已启用", + "value": "0" + }, + { + "name": "未启用", + "value": "1" + }, + { + "name": "全部", + "value": null + } + ], + "type": "select", + "value": null + }, { "label": "是否展示", "name": "show", @@ -3956,13 +3959,13 @@ "name": "ID", "value": "id" }, - { - "name": "板块名称", - "value": "name" - }, { "name": "编码", "value": "sn" + }, + { + "name": "板块名称", + "value": "name" } ], "type": "search", @@ -4592,6 +4595,10 @@ "name": "无", "value": null }, + { + "name": "名称", + "value": "name" + }, { "name": "ID", "value": "id" @@ -4599,10 +4606,6 @@ { "name": "链接", "value": "url" - }, - { - "name": "名称", - "value": "name" } ], "type": "search", diff --git a/example/config/rule.json b/example/config/rule.json index ac3cee9..a77d15c 100644 --- a/example/config/rule.json +++ b/example/config/rule.json @@ -396,7 +396,7 @@ "list": false, "must": false, "name": "auth", - "strict": false, + "strict": true, "type": "auth" }, {