Explorar el Código

增加预览按钮

shaogen1995 hace 2 años
padre
commit
5838a889f2
Se han modificado 2 ficheros con 24 adiciones y 8 borrados
  1. 8 4
      houtai/src/views/tab2/add.vue
  2. 16 4
      houtai/src/views/tab2/index.vue

+ 8 - 4
houtai/src/views/tab2/add.vue

@@ -33,8 +33,8 @@
         </div>
         <div class="checkBox">
           <!-- 日期 -->
-          <el-form-item label="日期:">
-            <i class="biaoshi biaoshi2"></i>
+          <el-form-item label="录入日期:">
+            <i class="biaoshi biaoshi3"></i>
             <el-date-picker
               format="yyyy-MM-dd"
               value-format="yyyy-MM-dd"
@@ -549,6 +549,10 @@ export default {
       top: -11px;
       left: -64px;
     }
+    .biaoshi3::before {
+      top: -11px;
+      left: -92px;
+    }
 
     /deep/.el-form-item {
       margin-bottom: 12px;
@@ -633,8 +637,8 @@ export default {
       }
     }
   }
-  .sizeInput{
-    /deep/input{
+  .sizeInput {
+    /deep/input {
       padding-right: 70px !important;
     }
   }

+ 16 - 4
houtai/src/views/tab2/index.vue

@@ -174,9 +174,16 @@
                 />
               </template>
             </el-table-column>
-            <el-table-column prop="day" label="日期"> </el-table-column>
+            <el-table-column prop="day" label="录入日期"> </el-table-column>
             <el-table-column label="操作">
               <template #default="{ row }">
+
+                                <el-button
+                  type="text"
+                  @click="openQrCode(row.id)"
+                  >预览</el-button
+                >
+
                 <el-button
                   type="text"
                   @click="lookQrCode(row.qrPath, row.fileName)"
@@ -219,6 +226,7 @@
         class="closeQrCode el-icon-circle-close"
         @click="qrCodeSrc = ''"
       ></div>
+      <!-- 中间盒子 -->
       <img v-if="qrCodeSrc" :src="baseURL + qrCodeSrc" alt="" />
       <!-- 下载二维码 -->
       <a
@@ -308,6 +316,11 @@ export default {
   },
   // 方法集合
   methods: {
+    // 点击预览
+    openQrCode (id) {
+      window.open(`/web/index.html#/Model?m=${id}`)
+    },
+
     // 点击二维码
     lookQrCode (url, name) {
       this.qrCodeSrc = url
@@ -535,16 +548,15 @@ export default {
     height: 100vh;
     background-color: rgba(0, 0, 0, 0.8);
     display: flex;
+    flex-direction: column;
     justify-content: center;
     align-items: center;
     .qrCodeDown {
-      position: absolute;
+      margin-top: 30px;
       width: 120px;
       height: 40px;
       line-height: 36px;
       text-align: center;
-      top: 24px;
-      right: 90px;
       color: #fff;
       border-radius: 20px;
       border: 1px solid #fff;