'wip(logging):调整日志记录方式'

This commit is contained in:
zhengxinonly
2021-09-10 01:17:26 +08:00
parent db5b4e89ed
commit b9c449ad57
12 changed files with 130 additions and 117 deletions
+7 -4
View File
@@ -1,24 +1,27 @@
from flask import render_template, request
from applications.common.utils.rights import authorize
from applications.common.utils.rights import permission_required, view_logging_required
from applications.models import CompanyDepartment
from applications.view import index_bp
@index_bp.get('/dept')
@authorize("admin:dept:main", log=True)
@view_logging_required
@permission_required("admin:dept:main")
def dept_index():
return render_template('admin/department/dept.html')
@index_bp.get('/dept/add')
@authorize("admin:dept:add", log=True)
@view_logging_required
@permission_required("admin:dept:add")
def add():
return render_template('admin/department/dept_add.html')
@index_bp.get('/dept/edit')
@authorize("admin:dept:edit", log=True)
@view_logging_required
@permission_required("admin:dept:edit")
def edit():
dept_id = request.args.get("deptId", type=int)
dept = CompanyDepartment.query.get(dept_id)