Commit 1b0cfeb8 by 赵增煜

页面调整

parent d7cf88b1
...@@ -49,7 +49,14 @@ def detail(id): ...@@ -49,7 +49,14 @@ def detail(id):
if path_parts[0].endswith(':') and not path_parts[0].endswith(os.sep): if path_parts[0].endswith(':') and not path_parts[0].endswith(os.sep):
path_parts[0] += os.sep path_parts[0] += os.sep
data.file_path = os.path.join(*path_parts) data.file_path = os.path.join(*path_parts)
return render_template('system/parser/detail.html',data=data) with open('./tmp/pdf/4.pdf', 'rb') as file:
pdf_data = file.read()
# 将二进制数据编码为Base64字符串
base64_pdf = base64.b64encode(pdf_data).decode('utf-8')
full_base64_string = f'data:application/pdf;base64,{base64_pdf}'
return render_template('system/parser/detail.html',data=data,pdf_base64=full_base64_string)
......
...@@ -21,23 +21,22 @@ ...@@ -21,23 +21,22 @@
<td> <td>
<div class="layui-form-item"> <div class="layui-form-item">
<object data="{{data.file_path}}" type="application/pdf" width="100%" height="100%"> <embed src="{{pdf_base64}}" width="100%" height="1000" type="application/pdf">
<p><b>返回内容</b>: 该浏览器不支持PDFs
</object>
</div>
</td>
<td>
<div class="layui-form-item">
{{data.kimi_ai_parser}}
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td>
<div class="layui-form-item">
{{data.kimi_ai_parser}}
</div>
</td>
</tr>
</tbody> </tbody>
</table> </table>
</div > </div >
{% include 'system/common/footer.html' %}
{% include 'system/common/footer.html' %}
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 sign in to comment