diff --git a/apps/power/views.py b/apps/power/views.py index 2711497..81d509f 100644 --- a/apps/power/views.py +++ b/apps/power/views.py @@ -85,6 +85,13 @@ def get_login_user_power_list(): module_list = Utils.msyql_table_model(module_list) return jsonify(Utils.true_return(data=module_list)) +# 获取角色标签列表 +@power_router.route("/get_role_name_list", methods=["GET", "POST"]) +@token_auth.login_required +def get_role_name_list(): + data_list = BllModuleRelation().get_role_name_list() + return jsonify(Utils.true_return(data=Utils.msyql_table_model(data_list))) + # 获取角色列表 @power_router.route("/get_list", methods=["GET", "POST"]) @token_auth.login_required diff --git a/db_logic/module_relation.py b/db_logic/module_relation.py index a968306..6d94767 100644 --- a/db_logic/module_relation.py +++ b/db_logic/module_relation.py @@ -71,6 +71,9 @@ class BllModuleRelation(Repository): """ return self.execute(sql_all).fetchall() + def get_role_name_list(self): + return self.execute("select role_id, role_name from rms_role").fetchall() + def get_role_module(self, page_param): sql_all = """ select