Browse Source

屏蔽打印按钮

刘湘琪 2 years ago
parent
commit
7b4a30b7ee

+ 23 - 0
src/views/enclosurePreview/index.vue

@@ -0,0 +1,23 @@
+<template>
+  <div class="app-container">
+    <div class="container" style="margin-top: 20px;">
+      <div v-show="loading" class="well loading">正在加载中,请耐心等待...</div>
+      <div v-show="!loading" class="well" ref="output"></div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import { getExtend, readBuffer, render } from '@/utils/util';
+  import { parse } from 'qs';
+  export default {
+    data() {
+      return {
+        loading: false,
+      }
+    }
+  }
+</script>
+
+<style>
+</style>

+ 5 - 21
src/views/enterprise/declare/components/EnclosureInfo.vue

@@ -3,8 +3,8 @@
     <h3 class="toolbar">
       <div class="tool">
         <el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleDownloadBatch">批量下载</el-button>
-        <el-button type="primary" plain icon="el-icon-download" size="mini" v-print="'print'">一键打印</el-button>
-        <!-- <button v-print="'#printArea'"></button> -->
+        <!-- <el-button type="primary" plain icon="el-icon-download" size="mini" v-print="'print'">一键打印</el-button> -->
+        <!-- <button v-print="'#printsArea'"></button> -->
       </div>
     </h3>
     <div id="printArea">
@@ -16,7 +16,7 @@
           <template slot-scope="scope">
             <el-button type="text" @click="loadFromUrl(scope.row)">查看</el-button>
             <el-button type="text" @click="handleDownload(scope.row)">下载</el-button>
-            <el-button type="text" @click="handlePrint(scope.row)">打印</el-button>
+            <!-- <el-button type="text" @click="handlePrint(scope.row)">打印</el-button> -->
           </template>
         </el-table-column>
       </el-table>
@@ -27,21 +27,6 @@
         :limit.sync="queryParams.pageSize"
         @pagination="getList"/>
     </div>
-    <!-- <iframe style="width: 100%;height: 500px;" :src="pdfSrc"></iframe> -->
-    <div class="docWrap">
-      <div ref="file"></div>
-    </div>
-    <!-- <div style="width: 100%;overflow-x: auto;overflow-y: hidden;" v-html="docxContent"></div> -->
-    <!-- <el-dialog
-      :visible.sync="dialogVisible"
-      title="预览"
-      width="100%"
-      append-to-body>
-      <div class="container">
-        <div v-show="loading" class="well loading">正在加载中,请耐心等待...</div>
-        <div v-show="!loading" class="well" ref="output"></div>
-      </div>
-    </el-dialog> -->
     <div class="container" style="margin-top: 20px;">
       <div v-show="loading" class="well loading">正在加载中,请耐心等待...</div>
       <div v-show="!loading" class="well" ref="output"></div>
@@ -84,7 +69,7 @@
           pageSize: 10
         },
         print: {
-          // id: 'printArea',
+          id: 'printArea',
           popTitle: '', // 打印配置页上方的标题
           extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>,<style> #printMe { height: auto !important; } <style>', // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
           preview: true, // 是否启动预览模式,默认是false
@@ -97,7 +82,7 @@
           // openCallback () { console.log('执行打印了!') }, // 调用打印时的callback
           // closeCallback () { console.log('关闭了打印工具!') }, // 关闭打印的callback(无法区分确认or取消)
           // clickMounted () { console.log('点击v-print绑定的按钮了!') },
-          url: 'http://124.232.146.72:7015/api/profile/upload/88a09dbc8e2f4a6096e6ea3dc934ba77.xls', // 打印指定的URL,确保同源策略相同
+          // url: 'http://124.232.146.72:7015/api/profile/upload/88a09dbc8e2f4a6096e6ea3dc934ba77.xls', // 打印指定的URL,确保同源策略相同
           // asyncUrl (reslove) {
           //   setTimeout(() => {
           //     reslove('http://124.232.146.72:7015/api/profile/upload/88a09dbc8e2f4a6096e6ea3dc934ba77.xls')
@@ -322,4 +307,3 @@
 <style scoped>
 
 </style>
-