bdgldrill.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. <template>
  2. <div>
  3. <el-button class="box1" @click="daochu">导出</el-button>
  4. <div class="word" id="contents">
  5. <!-- <div class="fTitle">大队连务会记录本</div> -->
  6. <p
  7. style="
  8. font-size: 16pt;
  9. font-weight: 600;
  10. margin-botttom: 30px;
  11. color: black;
  12. font-family: '宋体';
  13. text-align: center;
  14. "
  15. >
  16. {{ message[0].unitname
  17. }}军事训练登记表
  18. </p>
  19. <table
  20. class="b1"
  21. border="1"
  22. style="
  23. border-collapse: collapse;
  24. border: none;
  25. mso-border-left-alt: 0.5pt solid windowtext;
  26. mso-border-top-alt: 0.5pt solid windowtext;
  27. mso-border-right-alt: 0.5pt solid windowtext;
  28. mso-border-bottom-alt: 0.5pt solid windowtext;
  29. mso-border-insideh: 0.5pt solid windowtext;
  30. mso-border-insidev: 0.5pt solid windowtext;
  31. mso-padding-alt: 0pt 0pt 0pt 0pt;
  32. "
  33. width="900"
  34. bordercolor="black"
  35. >
  36. <tbody style="font-size: 16px">
  37. <tr class="JR_tr">
  38. <th
  39. width="99"
  40. rowspan="2"
  41. class="JR_left"
  42. height="50"
  43. style="font-family: '黑体'; text-align: center; font-weight: 400"
  44. >
  45. <span align="center" style="display: block; text-align: center">
  46. 训练类型
  47. </span>
  48. </th>
  49. <th
  50. width="150"
  51. rowspan="2"
  52. class="JR_left"
  53. style="font-family: '黑体'; text-align: center; font-weight: 400"
  54. >
  55. <span align="center" style="display: block; text-align: center">
  56. 训练内容
  57. </span>
  58. </th>
  59. <th
  60. width="98"
  61. rowspan="2"
  62. class="JR_left"
  63. style="font-family: '黑体'; text-align: center; font-weight: 400"
  64. >
  65. <span align="center" style="display: block; text-align: center">
  66. 训练时间
  67. </span>
  68. </th>
  69. <th
  70. width="98"
  71. rowspan="2"
  72. class="JR_left"
  73. style="font-family: '黑体'; text-align: center; font-weight: 400"
  74. >
  75. <span align="center" style="display: block; text-align: center">
  76. 训练地点
  77. </span>
  78. </th>
  79. <th
  80. width="100"
  81. height="25"
  82. colspan="2"
  83. class="JR_left"
  84. style="font-family: '黑体'; text-align: center; font-weight: 400"
  85. >
  86. <span align="center" style="display: block; text-align: center">
  87. 参训兵力
  88. </span>
  89. </th>
  90. <th
  91. width="99"
  92. rowspan="2"
  93. class="JR_left"
  94. style="font-family: '黑体'; text-align: center; font-weight: 400"
  95. >
  96. <span align="center" style="display: block; text-align: center">
  97. 参训率
  98. </span>
  99. </th>
  100. <th
  101. width="101"
  102. rowspan="2"
  103. class="JR_left"
  104. style="font-family: '黑体'; text-align: center; font-weight: 400"
  105. >
  106. <span align="center" style="display: block; text-align: center">
  107. 效果(成绩)
  108. </span>
  109. </th>
  110. <th
  111. width="50"
  112. rowspan="2"
  113. class="JR_left"
  114. style="font-family: '黑体'; text-align: center; font-weight: 400"
  115. >
  116. <span align="center" style="display: block; text-align: center">
  117. 消耗
  118. </span>
  119. </th>
  120. <th
  121. width="120"
  122. rowspan="2"
  123. class="JR_left"
  124. style="font-family: '黑体'; text-align: center; font-weight: 400"
  125. >
  126. <span align="center" style="display: block; text-align: center">
  127. 训练装备台套
  128. </span>
  129. </th>
  130. <th
  131. width="50"
  132. nowrap=""
  133. rowspan="2"
  134. class="JR_left"
  135. style="font-family: '黑体'; text-align: center; font-weight: 400"
  136. >
  137. <span align="center" style="display: block; text-align: center">
  138. 备注
  139. </span>
  140. </th>
  141. </tr>
  142. <tr class="JR_tr">
  143. <th
  144. width="50"
  145. height="25"
  146. nowrap=""
  147. class="JR_left"
  148. style="font-family: '黑体'; text-align: center; font-weight: 400"
  149. >
  150. <span align="center" style="display: block; text-align: center"
  151. >应训</span
  152. >
  153. </th>
  154. <th
  155. width="50"
  156. class="JR_left"
  157. style="font-family: '黑体'; text-align: center; font-weight: 400"
  158. >
  159. <span align="center" style="display: block; text-align: center"
  160. >实训</span
  161. >
  162. </th>
  163. </tr>
  164. <tr class="JR_tr" v-for="(message, i) in message" :key="i + ''">
  165. <td
  166. valign="center"
  167. class="JR_right"
  168. style="
  169. font-family: '仿宋_GB2312';
  170. text-align: center;
  171. font-size: 16px;
  172. "
  173. height="44"
  174. width="99"
  175. >
  176. <span align="center">
  177. {{ message.name }}
  178. </span>
  179. </td>
  180. <td
  181. width="150"
  182. class="JR_right"
  183. valign="center"
  184. style="
  185. font-family: '仿宋_GB2312';
  186. text-align: center;
  187. font-size: 16px;
  188. "
  189. >
  190. <span align="center">
  191. {{ message.trainingContent }}
  192. </span>
  193. </td>
  194. <td
  195. width="98"
  196. class="JR_right"
  197. style="
  198. font-family: '仿宋_GB2312';
  199. text-align: center;
  200. font-size: 16px;
  201. "
  202. >
  203. <span align="center">
  204. {{ message.drillTime }}
  205. </span>
  206. </td>
  207. <td
  208. width="98"
  209. class="JR_right"
  210. style="
  211. font-family: '仿宋_GB2312';
  212. text-align: center;
  213. font-size: 16px;
  214. "
  215. >
  216. <span align="center">
  217. {{ message.address }}
  218. </span>
  219. </td>
  220. <td
  221. width="50"
  222. class="JR_right"
  223. style="
  224. font-family: '仿宋_GB2312';
  225. text-align: center;
  226. font-size: 16px;
  227. "
  228. >
  229. <span align="center"> {{ message.yingxun }}</span>
  230. </td>
  231. <td
  232. width="50"
  233. class="JR_right"
  234. style="
  235. font-family: '仿宋_GB2312';
  236. text-align: center;
  237. font-size: 16px;
  238. "
  239. >
  240. <span align="center"> {{ message.shixun }}</span>
  241. </td>
  242. <td
  243. width="99"
  244. nowrap=""
  245. class="JR_right"
  246. style="
  247. font-family: '仿宋_GB2312';
  248. text-align: center;
  249. font-size: 16px;
  250. "
  251. >
  252. <span align="center">
  253. {{ message.participationRate }}
  254. </span>
  255. </td>
  256. <td
  257. width="101"
  258. nowrap=""
  259. class="JR_right"
  260. style="
  261. font-family: '仿宋_GB2312';
  262. text-align: center;
  263. font-size: 16px;
  264. "
  265. >
  266. <span align="center">
  267. {{ message.pass }}
  268. </span>
  269. </td>
  270. <td
  271. width="50"
  272. nowrap=""
  273. class="JR_right"
  274. style="
  275. font-family: '仿宋_GB2312';
  276. text-align: center;
  277. font-size: 16px;
  278. "
  279. >
  280. <span align="center">
  281. {{ message.excellent }}
  282. </span>
  283. </td>
  284. <td
  285. width="120"
  286. nowrap=""
  287. class="JR_right"
  288. style="
  289. font-family: '仿宋_GB2312';
  290. text-align: center;
  291. font-size: 16px;
  292. "
  293. >
  294. <span align="center">
  295. {{ message.equipment }}
  296. </span>
  297. </td>
  298. <td
  299. width="50"
  300. nowrap=""
  301. class="JR_right"
  302. style="
  303. font-family: '仿宋_GB2312';
  304. text-align: center;
  305. font-size: 16px;
  306. "
  307. >
  308. <span align="center">
  309. {{ message.fail }}
  310. </span>
  311. </td>
  312. </tr>
  313. <tr class="JR_tr" v-for="(item1, i1) in num" :key="i1 + ' '">
  314. <td height="44" width="99" class="JR_right">
  315. <span align="center"> </span>
  316. </td>
  317. <td width="150" class="JR_right">
  318. <span align="center"></span>
  319. </td>
  320. <td width="98" class="JR_right">
  321. <span align="center"></span>
  322. </td>
  323. <td width="98" class="JR_right">
  324. <span align="center"></span>
  325. </td>
  326. <td width="50" class="JR_right">
  327. <span align="center"></span>
  328. </td>
  329. <td width="50" class="JR_right">
  330. <span align="center"></span>
  331. </td>
  332. <td width="99" nowrap="" class="JR_right">
  333. <span align="center"></span>
  334. </td>
  335. <td width="101" nowrap="" class="JR_right">
  336. <span align="center"></span>
  337. </td>
  338. <td width="50" nowrap="" class="JR_right">
  339. <span align="center"></span>
  340. </td>
  341. <td width="120" nowrap="" class="JR_right">
  342. <span align="center"></span>
  343. </td>
  344. <td width="50" nowrap="" class="JR_right">
  345. <span align="center"></span>
  346. </td>
  347. </tr>
  348. </tbody>
  349. </table>
  350. <div
  351. style="
  352. font-size: 14pt;
  353. font-weight: 900;
  354. margin: 10px 50px 20px 700px;
  355. color: black;
  356. font-family: '黑体';
  357. "
  358. >
  359. 军事主管:{{ message.peopleId }}
  360. </div>
  361. </div>
  362. </div>
  363. </template>
  364. <script>
  365. import "@/utils/lodJs.js";
  366. import exportWord from "@/utils/exportWord.js";
  367. export default {
  368. name: "bdgleven",
  369. props: ["message"],
  370. data() {
  371. return {
  372. title: "军事训练登记簿",
  373. num: 0,
  374. faith: {
  375. fileName: "军事训练登记簿", //文档名
  376. fileType: ".doc", //文档类型  经测试  可以doc xls html 其他的自己去试
  377. // header: "测试页眉", //页眉标题
  378. // footer: "测试页脚", //页脚标题
  379. direction: "Horizontal", //默认或不填写为纵向,Horizontal 为横向
  380. dom: "#contents", // dom节点
  381. },
  382. };
  383. },
  384. created() {
  385. if (this.message.length >= 6) {
  386. this.num = 0;
  387. } else {
  388. this.num = 6 - this.message.length;
  389. }
  390. },
  391. methods: {
  392. daochu() {
  393. exportWord(this.faith);
  394. },
  395. },
  396. };
  397. </script>
  398. <style scoped>
  399. tbody {
  400. color: #fff;
  401. text-align: center;
  402. }
  403. tr:last-child {
  404. border-bottom: 1px solid;
  405. }
  406. .a1 {
  407. margin-right: 30px;
  408. }
  409. .box1 {
  410. position: absolute;
  411. right: 30px;
  412. top: 80px;
  413. border: 1px solid rgb(129, 130, 131);
  414. border-radius: 5px;
  415. }
  416. </style>