综合办公系统
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

safePrint.vue 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <!--
  2. * @Author: ysh
  3. * @Date: 2024-07-30 16:56:08
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2024-08-02 09:26:11
  6. -->
  7. <template>
  8. <div>
  9. <div id="printSafe">
  10. <h2 class="text-center title">环境、职业健康安全、信息安全管理交底记录表</h2>
  11. <table border="1">
  12. <tr>
  13. <td :colspan="1" class="fontbold">项目名称</td>
  14. <td :colspan="4">{{ form.projectName }}</td>
  15. <td :colspan="2" class="fontbold">项目编号</td>
  16. <td :colspan="2">{{ form.projectNumber }}</td>
  17. </tr>
  18. <tr>
  19. <td :colspan="1" class="fontbold">承担部门</td>
  20. <td :colspan="4">{{ getDeptNames(form.undertakingDept) }}</td>
  21. <td :colspan="2" class="fontbold">项目负责人</td>
  22. <td :colspan="2">{{ getUserName(form.projectLeader) }}</td>
  23. </tr>
  24. <tr>
  25. <td :colspan="1" class="fontbold">接受交底人</td>
  26. <td :colspan="8">{{ getUserName(form.disclosureAccepter) }}</td>
  27. </tr>
  28. <tr>
  29. <td :colspan="1" class="fontbold">环境管理要求</td>
  30. <td :colspan="8" style="white-space: pre-wrap;">{{ form.environmentComment }}</td>
  31. </tr>
  32. <tr>
  33. <td :colspan="1" class="fontbold">安全生产与职业健康要求</td>
  34. <td :colspan="8" style="white-space: pre-wrap;">{{ form.outsideComment }}</td>
  35. </tr>
  36. <tr>
  37. <td :colspan="1" class="fontbold">信息安全管理要求</td>
  38. <td :colspan="8" style="white-space: pre-wrap;">{{ form.insideComment }}</td>
  39. </tr>
  40. <tr>
  41. <td :colspan="1" class="fontbold">安全交底意见</td>
  42. <td :colspan="4">{{ form.disclosureComment }}</td>
  43. <td :colspan="2" style="text-align:left;min-width:120px;">签名:<span class="auditor">{{
  44. getUserName(form.disclosurer) }}</span></td>
  45. <td :colspan="2" style="text-align:left;width:240px;">日期:{{ form.disclosureTime }}</td>
  46. </tr>
  47. <tr>
  48. <td :colspan="1" class="fontbold">接受交底意见</td>
  49. <td :colspan="4">{{ form.acceptComment }}</td>
  50. <td :colspan="2" style="text-align:left;min-width:120px;">
  51. 签名:<span class="auditor">{{ getUserName(form.disclosureAccepter) }}</span>
  52. </td>
  53. <td :colspan="2" style="text-align:left;width:240px;">日期:{{ form.acceptTime }}</td>
  54. </tr>
  55. </table>
  56. </div>
  57. <div class="text-center mt20">
  58. <el-button type="primary" v-print="print">确认打印</el-button>
  59. <el-button @click="$emit('cancel')">取消</el-button>
  60. </div>
  61. </div>
  62. </template>
  63. <script>
  64. export default {
  65. props: {
  66. form: {
  67. type: Object
  68. }
  69. },
  70. data() {
  71. return {
  72. settleSum: {},
  73. deptSettleList: [],
  74. deductionsList: [],
  75. actualSumSettle: '',
  76. undertakingDept: [],
  77. print: {
  78. id: 'printSafe',
  79. popTitle: '环境、职业健康安全、信息安全管理交底记录表', // 打印配置页上方标题
  80. extraHead: '', //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
  81. preview: false, // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
  82. previewTitle: '', // 打印预览的标题(开启预览模式后出现),
  83. previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
  84. zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
  85. previewBeforeOpenCallback() { }, //预览窗口打开之前的callback(开启预览模式调用)
  86. previewOpenCallback() { }, // 预览窗口打开之后的callback(开启预览模式调用)
  87. beforeOpenCallback() { }, // 开启打印前的回调事件
  88. openCallback() { }, // 调用打印之后的回调事件
  89. closeCallback() { }, //关闭打印的回调事件(无法确定点击的是确认还是取消)
  90. url: '',
  91. standard: '',
  92. extraCss: ''
  93. }
  94. }
  95. },
  96. }
  97. </script>
  98. <style lang="scss" scoped>
  99. table {
  100. /*边框*/
  101. /* border: 1px solid black; */
  102. width: 90%;
  103. // text-align: center;
  104. border-collapse: collapse;
  105. margin: 0 auto;
  106. /*设置背景颜色*/
  107. /* background-color: #bfa; */
  108. td {
  109. padding: 5px;
  110. // line-height: 30px;
  111. }
  112. }
  113. .header {
  114. font-family: '黑体';
  115. font-size: 16px;
  116. font-weight: bold;
  117. line-height: 30px;
  118. }
  119. .bg {
  120. background-color: #eee;
  121. -webkit-print-color-adjust: exact;
  122. }
  123. .title {
  124. font-family: '黑体';
  125. font-size: 20px;
  126. font-weight: bold;
  127. line-height: 30px;
  128. }
  129. .fontbold {
  130. font-weight: bold;
  131. min-width: 150px;
  132. text-align: center;
  133. }
  134. .conment-width {
  135. // max-width: 200px;
  136. }
  137. @page {
  138. size: auto;
  139. /* 去除页脚 */
  140. margin-bottom: 0;
  141. // 横向A4
  142. // size:A4 landscape;
  143. }
  144. @media print {
  145. #print table {
  146. width: 100%;
  147. }
  148. }
  149. </style>