Esempio n. 1
0
 def write_second_page(self, summarys, suggestions, sign):
     self.html_obj.write(html_second_page)
     self.html_obj.write(
         Template(html_second_page_xj).render(summarys=summarys))
     self.html_obj.write(
         Template(html_second_page_jy).render(suggestions=suggestions))
     self.html_obj.write(Template2(html_second_page_sign).render(sign=sign))
Esempio n. 2
0
 def __init__(self,filename,file_css,is_single=True):
     '''
     :param filename: HTML文件名称
     :param file_css: 样式表
     :param is_single: 是否单独写入head HTML文件
     '''
     # 如果已存在,则删除
     if os.path.exists(filename):
         try:
             os.remove(filename)
         except Exception as e:
             print(e)
     self.html_obj = open(filename, 'a', encoding="utf8")
     if is_single:
         self.html_obj.write(Template2(pdf_html_head).render(file_css=file_css))
Esempio n. 3
0
 def write_health_care(self, health):
     self.html_obj.write(
         Template2(pdf_html_health_page).render(health=health))
Esempio n. 4
0
 def write_equip(self, equips):
     self.html_obj.write(
         Template2(pdf_html_equip_page).render(equips=equips))
Esempio n. 5
0
 def write_items(self, items):
     from app_reportserver.report_items import write_item_test
     # write_item_test(items)
     self.html_obj.write(Template2(pdf_html_item_page).render(items=items))
Esempio n. 6
0
 def write_cachet(self, cachet):
     self.html_obj.write(
         Template2(pdf_html_cachet_page).render(cachet=cachet))
Esempio n. 7
0
 def write_yspb(self, pbxx: list):
     self.html_obj.write(Template2(pdf_html_yspb_page).render(pbxx=pbxx))
Esempio n. 8
0
 def write_home(self, user):
     self.html_obj.write(Template2(pdf_html_home_page2).render(user=user))
Esempio n. 9
0
def write_home_html(filename, user: dict):
    # 如果已存在,则删除
    if os.path.exists(filename):
        os.remove(filename)
    html_obj = open(filename, 'a', encoding="utf8")
    html_obj.write(Template2(pdf_html_home_page).render(user=user))
Esempio n. 10
0
 def write_cachet(self,cachet):
     if cachet['syys']:
         self.html_obj.write(Template2(pdf_html_cachet_page2).render(cachet=cachet))
     else:
         self.html_obj.write(Template2(pdf_html_cachet_page).render(cachet=cachet))
Esempio n. 11
0
 def write_health_care(self, healths):
     self.html_obj.write(
         Template2(html_tj_health_care).render(healths=healths))
Esempio n. 12
0
 def write_equip_result(self, equips):
     self.html_obj.write(Template2(html_tj_equip).render(equips=equips))
Esempio n. 13
0
 def write_item_result(self, items):
     self.html_obj.write(Template2(html_tj_xmjg).render(items=items))