1216105a3ad3c92e9f58e88e4d55f354a049c199.svn-base 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <a-card :bordered="false" :class="{'abcdefg':true}">
  3. <div class="no-print" style="text-align: right">
  4. <a-button v-print="'#printContent'" ghost type="primary">打印</a-button>
  5. </div>
  6. <section ref="print" id="printContent" class="abcdefg">
  7. <div style="text-align: center">
  8. <p style="font-size: 24px;font-weight: 800">打印测试表单</p>
  9. </div>
  10. <!--签字-->
  11. <a-col :md="24" :sm="24">
  12. <div class="sign" style="text-align: left;height: inherit">
  13. <a-col :span="24">
  14. <span>
  15. 打印人员:
  16. </span>
  17. <a-input style="width: 30%" v-model="printer"/>
  18. <span style="margin-left: 12.5%">打印日期:</span>
  19. <a-input style="width: 30%" v-model="printTime"/>
  20. </a-col>
  21. <a-col :span="24">
  22. </a-col>
  23. <a-col :span="24" style="margin-top: 20px">
  24. <span>打印内容:</span>
  25. <a-input style="width: 80%" v-model="printContent"/>
  26. </a-col>
  27. <a-col :span="24" style="margin-top: 20px">
  28. <span>打印目的:</span>
  29. <a-input style="width: 80%" v-model="printReason"/>
  30. </a-col>
  31. <a-col style="margin-top: 20px" :span="24">
  32. <span>打印图片:</span>
  33. <br/>
  34. <a-upload
  35. action="/jsonplaceholder.typicode.com/posts/"
  36. listType="picture-card"
  37. :fileList="fileList"
  38. @preview="handlePreview"
  39. @change="handleChange">
  40. <div v-if="fileList.length < 3">
  41. <a-icon type="plus" />
  42. <div class="ant-upload-text">Upload</div>
  43. </div>
  44. </a-upload>
  45. <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">
  46. <img alt="example" style="width: 100%" :src="previewImage" />
  47. </a-modal>
  48. </a-col>
  49. </div>
  50. </a-col>
  51. </section>
  52. </a-card>
  53. <!--</page-layout>-->
  54. </template>
  55. <script>
  56. import ACol from "ant-design-vue/es/grid/Col";
  57. import ARow from "ant-design-vue/es/grid/Row";
  58. import ATextarea from 'ant-design-vue/es/input/TextArea'
  59. export default {
  60. components: {
  61. ATextarea,
  62. ARow,
  63. ACol,
  64. },
  65. name: 'Printgzsld',
  66. props:{
  67. reBizCode:{
  68. type: String,
  69. default: ''
  70. }
  71. },
  72. data(){
  73. return {
  74. columns: [{
  75. }
  76. ],
  77. labelCol: {
  78. xs: { span: 24 },
  79. sm: { span: 2 },
  80. },
  81. wrapperCol: {
  82. xs: { span: 24 },
  83. sm: { span: 8 },
  84. },
  85. printer:'张三',
  86. printTime:'2019-02-01 12:00:00',
  87. printContent:'打印内容就是,做一个打印测试',
  88. printReason:'做一个打印测试',
  89. previewVisible: false,
  90. previewImage: '',
  91. fileList: [{
  92. uid: '-1',
  93. name: 'xxx.png',
  94. status: 'done',
  95. url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png',
  96. },
  97. {
  98. uid:'-2',
  99. name:'pic1.png',
  100. status:'done',
  101. url:'https://www.gizbot.com/img/2016/11/whatsapp-error-lead-image-08-1478607387.jpg',
  102. }
  103. ],
  104. url:{
  105. loadApplicant:"/sps/register/loadApplicants",
  106. loadRegisterFiles:"/sps/register/getRegisterFilesConfig",
  107. }
  108. }
  109. },
  110. created() {
  111. this.getDate();
  112. },
  113. methods: {
  114. loadData(){
  115. },
  116. getDate(){
  117. // 当前时间
  118. },
  119. handleCancel () {
  120. this.previewVisible = false
  121. },
  122. handlePreview (file) {
  123. this.previewImage = file.url || file.thumbUrl
  124. this.previewVisible = true
  125. },
  126. handleChange ({ fileList }) {
  127. this.fileList = fileList
  128. }
  129. }
  130. }
  131. </script>
  132. <style scoped>
  133. /*update_begin author:scott date:20191203 for:打印机打印的字体模糊问题 */
  134. * {
  135. color: #000000!important;
  136. -webkit-tap-highlight-color: #000000!important;
  137. }
  138. /*update_end author:scott date:20191203 for:打印机打印的字体模糊问题 */
  139. .abcdefg .ant-card-body{
  140. margin-left: 0%;
  141. margin-right: 0%;
  142. margin-bottom: 1%;
  143. border:0px solid black;
  144. min-width: 800px;
  145. color:#000000!important;
  146. }
  147. .explain{
  148. text-align: left;
  149. margin-left: 50px;
  150. color:#000000!important;
  151. }
  152. .explain .ant-input,.sign .ant-input{
  153. font-weight:bolder;
  154. text-align:center;
  155. border-left-width:0px!important;
  156. border-top-width:0px!important;
  157. border-right-width:0px!important;
  158. }
  159. .explain div{
  160. margin-bottom: 10px;
  161. }
  162. /* you can make up upload button and sample style by using stylesheets */
  163. .ant-upload-select-picture-card i {
  164. font-size: 32px;
  165. color: #999;
  166. }
  167. .ant-upload-select-picture-card .ant-upload-text {
  168. margin-top: 8px;
  169. color: #666;
  170. }
  171. </style>