duizhaopin
13507605001 2 years ago
parent 1b7e15e4b7
commit 77b2bbe722

@ -44,13 +44,13 @@ def add_user_power_list():
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")
# 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 [],
"5": eval(instrument_modulet) if instrument_modulet else [],
# "5": eval(instrument_modulet) if instrument_modulet else [],
}
# 删除除去柜子权限外的所有权限
BllModuleRelation().delete(
@ -138,14 +138,19 @@ def add_role():
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")
dangerous_module = request.values.get("dangerous_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 [],
"5": eval(instrument_modulet) if instrument_modulet else [],
"4": eval(dangerous_module) if dangerous_module else [],
# "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 [],
# "5": eval(instrument_modulet) if instrument_modulet else [],
}
description = request.values.get("description")
# 获取角色代码或者角色名的角色信息

@ -19,28 +19,46 @@ class BllModule(Repository):
sql_all = """
select module_id, module_type, module_name, sort_index, description from rms_module where is_enabled=1
"""
data = {
# data = {
# "client_list":[]
# # "client_list":[]
# "client_manage": [],
# "sys_manage": [],
# "standard_manage": [],
# "consumables_manage": [],
# "instrument_manage": []
# }
# sql_data = Utils.msyql_table_model(self.execute(sql_all).fetchall())
# for i in sql_data:
# if i["module_type"] == "1":
# data["client_manage"].append(i)
# elif i["module_type"] == "2":
# data["sys_manage"].append(i)
# elif i["module_type"] == "3":
# data["standard_manage"].append(i)
# elif i["module_type"] == "4":
# data["consumables_manage"].append(i)
# elif i["module_type"] == "5":
# data["instrument_manage"].append(i)
# return data
sql_data = Utils.msyql_table_model(self.execute(sql_all).fetchall())
data_dict = {
"client_manage":[],
"sys_manage": [],
"drug_manage": [],
"standard_manage": [],
"consumables_manage": [],
"instrument_manage": []
"dangerous_manage": [],
}
sql_data = Utils.msyql_table_model(self.execute(sql_all).fetchall())
for i in sql_data:
if i["module_type"] == "1":
data["client_manage"].append(i)
data_dict["client_manage"].append(i)
elif i["module_type"] == "2":
data["sys_manage"].append(i)
data_dict["drug_manage"].append(i)
elif i["module_type"] == "3":
data["standard_manage"].append(i)
data_dict["standard_manage"].append(i)
elif i["module_type"] == "4":
data["consumables_manage"].append(i)
elif i["module_type"] == "5":
data["instrument_manage"].append(i)
return data
data_dict["dangerous_manage"].append(i)
return data_dict
def inster_info_list(self):
obj_list = []

Loading…
Cancel
Save