()
return jsonify({'data': d, 'status': 1})
报告下载
报告下载
报告下载
def download_report():
    """ 报告下载 """
    data = request.json
    report_id = data.get('reportId')
    _address = REPORT_ADDRESS + str(report_id) + '.txt'
    with open(_address, 'r') as f:
        res = json.loads(f.read())
    d = render_html_report(res)
    return jsonify({'data': d, 'status': 1})
def download_report ( ) : data = request . json report_id = data . get ( 'reportId' ) _address = REPORT_ADDRESS + str ( report_id ) + '.txt' with open ( _address , 'r' ) as f : res = json . loads ( f . read ( ) ) d = render_html_report ( res ) return jsonify ( { 'data' : d , 'status' : 1 } )