duizhaopin
apan 3 years ago
parent c8d7bacb2e
commit c48024156f

@ -40,11 +40,13 @@ def get_user_power_list():
@token_auth.login_required
def add_user_power_list():
user_id = request.values.get("user_id")
client_module = request.values.get("client_module_id")
drug_module = request.values.get("drug_module_id")
standard_module = request.values.get("standard_module_id")
consumables_module = request.values.get("consumables_module_id")
instrument_modulet = request.values.get("instrument_module_id")
inster_dic = {
"1": eval(client_module) if client_module else [],
"2": eval(drug_module) if drug_module else [],
"3": eval(standard_module) if standard_module else [],
"4": eval(consumables_module) if consumables_module else [],
@ -74,6 +76,7 @@ def add_user_power_list():
return jsonify(Utils.true_return())
# 获取登录用户权限
@power_router.route("/user_power", methods=["GET", "POST"])
@token_auth.login_required
def get_login_user_power_list():

@ -45,13 +45,16 @@ class BllModuleRelation(Repository):
sql_data = self.execute(sql_all).fetchall()
data = Utils.msyql_table_model(sql_data)
data_dict = {
"client_manage": [],
"drug_manage":[],
"standard_manage":[],
"consumables_manage": [],
"instrument_manage":[]
}
for i in data:
if i["module_type"] == "2":
if i["module_type"] == "1":
data_dict["client_manage"].append(i)
elif i["module_type"] == "2":
data_dict["drug_manage"].append(i)
elif i["module_type"] == "3":
data_dict["standard_manage"].append(i)

Loading…
Cancel
Save