Commit 78a4a8b1 by guibin

更新安灯数据看板

parent be33b028
...@@ -7,10 +7,16 @@ import math ...@@ -7,10 +7,16 @@ import math
from datetime import datetime, time from datetime import datetime, time
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
BASE_DIR = os.path.dirname(os.path.dirname(__file__)) BASE_DIR = os.path.dirname(os.path.dirname(__file__))
templateloader = FileSystemLoader(searchpath=BASE_DIR + "/static/src/view") templateloader = FileSystemLoader(searchpath=BASE_DIR + "/static")
env = Environment(loader=templateloader) env = Environment(loader=templateloader)
class ThtProject(http.Controller): class ThtProject(http.Controller):
@http.route('/roke/abnormal_alarm/census', type='http', auth='public', csrf=False, cors="*")
def roke_index_demo_module(self, **kwargs):
template = env.get_template('html/abnormal_alarm/view/index.html')
html = template.render({})
return html
@http.route('/tht/get/equipment/working_time', type='json', auth="none", csrf=False, cors='*') @http.route('/tht/get/equipment/working_time', type='json', auth="none", csrf=False, cors='*')
def get_equipment_working_time(self, **kwargs): def get_equipment_working_time(self, **kwargs):
"""获取车间工作时间""" """获取车间工作时间"""
...@@ -54,7 +60,7 @@ class RokeMesThreeColourLightExt(RokeMesThreeColourLight): ...@@ -54,7 +60,7 @@ class RokeMesThreeColourLightExt(RokeMesThreeColourLight):
"override": True # 添加额外字段 "override": True # 添加额外字段
} }
} }
template = env.get_template('equipment_status.html') template = env.get_template('src/view/equipment_status.html')
return template.render(data) return template.render(data)
@http.route('/roke/equipment/search', type='json', methods=['POST', 'OPTIONS'], auth="none", csrf=False, @http.route('/roke/equipment/search', type='json', methods=['POST', 'OPTIONS'], auth="none", csrf=False,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment