lrf402788946 4 tahun lalu
induk
melakukan
9f21e7cfe3
1 mengubah file dengan 38 tambahan dan 3 penghapusan
  1. 38 3
      parts/print/print-sign.vue

+ 38 - 3
parts/print/print-sign.vue

@@ -5,11 +5,32 @@
         <el-button type="primary" size="mini" @click="toPrint()">打印报到表</el-button>
       </el-col>
     </el-row>
-    <el-row type="flex" align="middle" justify="center" style="text-align:center">
+    <el-row type="flex" align="middle" justify="center" style="text-align:center" id="printArea">
+      <!-- <table class="table" ref="print">
+        <tr>
+          <th style="width:150px">姓名</th>
+          <th style="width:250px">学校</th>
+          <th style="width:50px">性别</th>
+          <th style="width:100px">民族</th>
+          <th style="width:50px">班级</th>
+          <th>手机号</th>
+          <th style="width:100px">签名</th>
+        </tr>
+        <tr v-for="(i, index) in list" :key="index">
+          <td>{{ i.name }}</td>
+          <td>{{ i.school_name }}</td>
+          <td>{{ i.gender }}</td>
+          <td>{{ i.nation }}</td>
+          <td>{{ i.classname }}</td>
+          <td>{{ i.phone }}</td>
+          <td></td>
+        </tr>
+      </table> -->
+
       <el-col :span="24" style="width:1060px;border: solid #cecece;">
         <el-table border stripe :data="list" ref="print" size="small" style="border: solid #cecece;">
           <el-table-column align="center" label="姓名" prop="name" width="170"></el-table-column>
-          <el-table-column align="center" label="学校" prop="school_name" width="150"></el-table-column>
+          <el-table-column align="center" label="学校" prop="school_name" width="200"></el-table-column>
           <el-table-column align="center" label="性别" prop="gender" width="80"></el-table-column>
           <el-table-column align="center" label="民族" prop="nation" width="150"></el-table-column>
           <el-table-column align="center" label="班级" prop="classname" width="80"></el-table-column>
@@ -35,6 +56,7 @@ export default {
   created() {},
   methods: {
     toPrint() {
+      // window.Print('#printArea');
       this.$print(this.$refs.print);
     },
   },
@@ -50,4 +72,17 @@ export default {
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.table {
+  border: 0.5px solid #ccc;
+  th {
+    // padding: 0 5px;
+    border: 0.25px solid #ccc;
+  }
+  td {
+    text-align: center;
+    // padding: 0 5px;
+    border: 0.25px solid #ccc;
+  }
+}
+</style>