<!DOCTYPE html>
|
<html xmlns:th="http://www.thymeleaf.org">
|
<head>
|
<meta http-equiv="Content-Type" content="application/msword; charset=utf-8"/>
|
<title>toWord</title>
|
<style type="text/css">
|
.bg {
|
font-size: 14.5px;
|
font-weight: bold;
|
color: #000;
|
background-color: #D7D7D7;
|
}
|
|
table {
|
border-width: 1px;
|
border-style: solid;
|
border-color: black;
|
table-layout: fixed;
|
}
|
|
tr {
|
height: 32px;
|
font-size: 12px;
|
}
|
|
td {
|
padding-left: 10px;
|
border-width: 1px;
|
border-style: solid;
|
border-color: black;
|
height: 32px;
|
overflow: hidden;
|
word-break: break-all;
|
word-wrap: break-word;
|
font-size: 14.5px;
|
}
|
|
.bg td {
|
font-size: 14.5px;
|
}
|
|
tr td {
|
font-size: 14.5px;
|
}
|
|
.specialHeight {
|
height: 40px;
|
}
|
|
.first_title {
|
height: 60px;
|
line-height: 60px;
|
margin: 0;
|
font-weight: bold;
|
font-size: 21px;
|
}
|
|
.second_title {
|
height: 40px;
|
line-height: 40px;
|
margin: 0;
|
font-size: 18.5px;
|
}
|
|
.doc_title {
|
font-size: 42.5px;
|
text-align: center;
|
}
|
|
body {
|
font-family: 思源黑体 Normal;
|
}
|
|
.flex {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
}
|
|
</style>
|
</head>
|
|
<body>
|
<div style="width:600px; margin: 0 auto">
|
<div>
|
<!-- 台账的名称作为标题,附带台账对应的时间和用户名称-->
|
<p class="doc_title" th:text="${info.title}"></p>
|
<div style="display: flex;align-items: center;justify-content: space-between;">
|
<p>单位名称:</p>
|
<p th:text="${info.userName}"></p>
|
<p>    </p>
|
<p>月份:</p>
|
<p th:text="${info.timeStamp}"></p>
|
</div>
|
<br />
|
</div>
|
|
<!--使用记录-->
|
<table border="1" cellspacing="0" cellpadding="0" width="100%">
|
<tr class="bg">
|
<td width="5%">序号</td>
|
<td width="45%">装置名称</td>
|
<td width="12.5%">日期</td>
|
<th:block th:each="name:${info.stateNames}">
|
<td th:text="${name + '时间'}"></td>
|
</th:block>
|
|
</tr>
|
|
<th:block th:each="record, stat:${table}">
|
<tr>
|
<td align="left" th:text="${stat.count}"></td>
|
<td align="left" th:text="${record.deviceName}"></td>
|
<td align="left" th:text="${record.date}"></td>
|
<th:block th:each="time:${record.stateTimes}">
|
<td th:text="${time}"></td>
|
</th:block>
|
</tr>
|
</th:block>
|
</table>
|
</div>
|
</body>
|
</html>
|