Browse Source

分页套打

xiongchao 3 years ago
parent
commit
cb28d83554
3 changed files with 106 additions and 25 deletions
  1. 93 0
      public/hitch-screen/point.html
  2. 1 1
      src/views/sb/info/SbInfo.vue
  3. 12 24
      src/views/sb/info/modules/BaseForm.vue

File diff suppressed because it is too large
+ 93 - 0
public/hitch-screen/point.html


+ 1 - 1
src/views/sb/info/SbInfo.vue

@@ -82,7 +82,7 @@
               <a-icon type="upload"/>
               修改导入
             </a-button>
-            <a-button style="margin-left: 8px" type="primary" icon="upload" @click="handlePrintBatch()">批量打印</a-button>
+            <a-button style="margin-left: 8px" type="primary" icon="printer" @click="handlePrintBatch()">批量打印</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('sb-infos-generate-code-all')" :loading="confirmLoading" type="primary" @click="batchGenerate()">重新生成二维码</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
               <a-menu slot="overlay">

+ 12 - 24
src/views/sb/info/modules/BaseForm.vue

@@ -277,9 +277,10 @@
             <a-input-number
               :step="1"
               :min="85"
-              style="width:100%"
+              style="width:70%"
               v-decorator="['zjm']"
               placeholder="请输入离屏幕左上角的右方距离,最低85"/>
+            <a-button style="width: 30%" type="primary" @click="handlePoint">设置预览</a-button>
           </a-form-item>
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
@@ -291,9 +292,10 @@
             <a-input-number
               :step="1"
               :min="340"
-              style="width:100%"
+              style="width:70%"
               v-decorator="['jbdh']"
               placeholder="请输入离屏幕左上角的下方位置,最低340"/>
+            <a-button style="width: 30%" type="primary" @click="handlePoint">设置预览</a-button>
           </a-form-item>
         </a-col>
       </a-row>
@@ -919,6 +921,7 @@ export default {
       sbFileList: [], // 设备图片,
       uploadUrl: uploadUrl,
       qrcodesrc: null,
+      id: null,
       fileList: [],
       type: null,
       headers: {
@@ -959,6 +962,7 @@ export default {
       }
       this.useType = record.useType
       this.modalTitle = '编辑'
+      this.id = record.id
       this.qrcodesrc = record.qrCode
       this.repairFileList = record.repairFileList
       this.useFileList = record.useFileList
@@ -1394,28 +1398,12 @@ export default {
         this.$message.error('上传失败')
         return null
       }
-
-      // return this.BaseTool.UPLOAD.getUploadFileDTO(fileList, type)
-
-      // 1. Limit the number of uploaded files
-      //    Only to show two recent uploaded files, and old ones will be replaced by the new
-      // fileList = fileList.slice(-2)
-
-      // 2. read from response and show file link
-      // fileList = fileList.map(file => {
-      //   if (file.response) {
-      //     // Component will show file.url as link
-      //     const { response: { data } } = file
-      //     file.url = data.url
-      //     file.fileName = data.fileName
-      //     file.fileFormat = data.fileFormat
-      //     file.name = data.name
-      //     file.type = type
-      //   }
-      //   return file
-      // })
-      // console.log(6666, fileList)
-      // return fileList
+    },
+    handlePoint () {
+      const a = document.createElement('a')
+      a.href = '/hitch-screen/point.html?id=' + this.id
+      a.target = '_blank'
+      a.click()
     }
   }
 }

Some files were not shown because too many files changed in this diff