feiyu02
2024-11-19 752e00503f672ddfe2066afb6c235721a3a912b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!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>&nbsp&nbsp&nbsp&nbsp</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>