shi'sen'yuan 3 anos atrás
pai
commit
a43784bf66

+ 1 - 1
master/src/main/resources/application.yml

@@ -9,7 +9,7 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /data/cpmsfile/uploadPath)
-  profile: /data/cpmsfile/uploadPath
+  profile: D:/ruoyi/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/#,服务器:http://47.114.101.16:8080/cpms/index.html#)
   requestJumpPath: http://47.114.101.16:8080/cpms/index.html#
   # 获取ip地址开关

+ 5 - 26
ui/src/views/components/PlantProgList/index.vue

@@ -413,7 +413,7 @@
         <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
       </div>
     </el-dialog>
-    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
       <div style="margin-top: -30px">
@@ -920,33 +920,12 @@
     },
     //pdf预览
     openPdf(){
-        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-      },
-      handleSee (row){
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee (row){
       this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
       this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
     },
   }
 }

+ 1 - 1
ui/src/views/components/Reliability/safetyvalve.vue

@@ -382,7 +382,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 65 - 86
ui/src/views/document/publicdoc/index.vue

@@ -253,7 +253,7 @@
               </template>
             </el-table-column>
           </el-table>
-          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
             <div style="margin-top: -30px">
@@ -426,12 +426,12 @@
         this.loading = false;
       });
     },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-        treeselect().then(response => {
-            this.deptOptions = response.data;
-        });
-     },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
     /** 查询目录菜单 */
     getMenuList() {
       listMenu(this.queryMenu).then(response => {
@@ -483,7 +483,7 @@
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
+      this.single = selection.length !== 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
@@ -530,60 +530,60 @@
     handleDelete(row) {
       const ids = row.id || this.ids;
       this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          return delPublicdoc(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('删除成功'));
-        })
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return delPublicdoc(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess(this.$t('删除成功'));
+      })
     },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;
       this.$confirm(this.$t('是否确认导出所有公共盘文档数据项?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          return exportPublicdoc(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return exportPublicdoc(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = this.$t('用户导入');
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.$refs['downloadFileForm'].submit()
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      if (response.data[0] != null) {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败') + "。", this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      } else {
+        this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      }
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm(val) {
+      if (val == 1) {
+        this.$refs.upload.submit();
+      }
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = this.$t('用户导入');
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-        this.$refs['downloadFileForm'].submit()
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-        this.upload.open = false;
-        this.upload.isUploading = false;
-        this.$refs.upload.clearFiles();
-        if (response.data[0] != null) {
-          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-        }else {
-          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-        }
-        this.getList();
-      },
-      // 提交上传文件
-      submitFileForm(val) {
-        if(val == 1) {
-          this.$refs.upload.submit();
-        }
-      },
     /** 报告附件按钮操作 */
     handleDoc(row) {
       this.doc.id = row.id;
@@ -596,7 +596,7 @@
         this.$refs.doc.clearFiles()
       })
     },
-    getFileList (){
+    getFileList() {
       allFileList(this.doc.queryParams).then(response => {
         this.doc.commonfileList = response;
       });
@@ -609,38 +609,17 @@
     //附件上传成功处理
     handleFileDocSuccess(response, file, fileList) {
       this.doc.isUploading = false;
-      this.$alert(response.msg, this.$t('导入结果') , { dangerouslyUseHTMLString: true });
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
       this.getFileList()
     },
     //pdf预览
-    openPdf(){
-        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-      },
-      handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
     },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
+    handleSee(row) {
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
     },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
@@ -649,7 +628,7 @@
         confirmButtonText: this.$t('确定'),
         cancelButtonText: this.$t('取消'),
         type: "warning"
-      }).then(function() {
+      }).then(function () {
         return delCommonfile(ids);
       }).then(() => {
         this.getFileList()

+ 1 - 1
ui/src/views/ehs/danger/index.vue

@@ -273,7 +273,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 6 - 26
ui/src/views/ehs/environapproval/index.vue

@@ -521,7 +521,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1107,19 +1107,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
     handleWaterAvatarSuccess (res, file, fileList) {
       this.picWaterUrl =  URL.createObjectURL(file.raw);
       this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
@@ -1136,18 +1127,7 @@ export default {
       this.conExhaustUrl =  URL.createObjectURL(file.raw);
       this.$alert(res.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
     },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+
   }
 };
 </script>

+ 6 - 26
ui/src/views/ehs/fireapproval/index.vue

@@ -412,7 +412,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -914,31 +914,11 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
+
   }
 };
 </script>

+ 6 - 26
ui/src/views/ehs/healthapproval/index.vue

@@ -407,7 +407,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -837,31 +837,11 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
+
   }
 };
 </script>

+ 3 - 23
ui/src/views/ehs/msds/index.vue

@@ -552,7 +552,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1238,30 +1238,10 @@
       },
       handleSee (row){
         this.pdf.open =true
-        this.pdf.pageNum = 1
-        this.pdf.loadedRatio = 0
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
         this.pdf.title = row.fileName
-        let loadingTask = null
-        loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-        loadingTask.promise.then(pdf => {
-          this.pdf.numPages = pdf.numPages
-        }).catch(err => {
-          this.msgError(this.$t('pdf加载失败'))
-        })
-      },
-      // pdf上一页
-      prePage() {
-        let page = this.pdf.pageNum
-        page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-        this.pdf.pageNum = page
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
       },
-      // pdf下一页
-      nextPage() {
-        let page = this.pdf.pageNum
-        page = page < this.pdf.pageTotalNum ? page + 1 : 1
-        this.pdf.pageNum = page
-      }
+
     }
   };
 </script>

+ 2 - 23
ui/src/views/ehs/rcaudit/index.vue

@@ -286,7 +286,7 @@
               </template>
             </el-table-column>
           </el-table>
-          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+          <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
             <div style="margin-top: -30px">
@@ -808,29 +808,8 @@
       },
       handleSee (row){
         this.pdf.open =true
-        this.pdf.pageNum = 1
-        this.pdf.loadedRatio = 0
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
         this.pdf.title = row.fileName
-        let loadingTask = null
-        loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-        loadingTask.promise.then(pdf => {
-          this.pdf.numPages = pdf.numPages
-        }).catch(err => {
-          this.msgError(this.$t('pdf加载失败'))
-        })
-      },
-      // pdf上一页
-      prePage() {
-        let page = this.pdf.pageNum
-        page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-        this.pdf.pageNum = page
-      },
-      // pdf下一页
-      nextPage() {
-        let page = this.pdf.pageNum
-        page = page < this.pdf.pageTotalNum ? page + 1 : 1
-        this.pdf.pageNum = page
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
       },
     }
   };

+ 5 - 26
ui/src/views/ehs/records/index.vue

@@ -461,7 +461,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1065,31 +1065,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
       const ids = row.id || this.ids;

+ 6 - 26
ui/src/views/ehs/safetyapproval/index.vue

@@ -416,7 +416,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -923,31 +923,11 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    }
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
+
   }
 };
 </script>

+ 1 - 1
ui/src/views/plant/manageactivity/index.vue

@@ -305,7 +305,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 1 - 1
ui/src/views/plant/staffmgr/index.vue

@@ -504,7 +504,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 5 - 26
ui/src/views/plant/targetagreement/index.vue

@@ -371,7 +371,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -937,31 +937,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
       const ids = row.id || this.ids;

+ 1 - 1
ui/src/views/plant/targetlist/index.vue

@@ -214,7 +214,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 2 - 23
ui/src/views/plant/targetmeasures/index.vue

@@ -506,7 +506,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1387,29 +1387,8 @@
       },
       handleSee (row){
         this.pdf.open =true
-        this.pdf.pageNum = 1
-        this.pdf.loadedRatio = 0
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
         this.pdf.title = row.fileName
-        let loadingTask = null
-        loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-        loadingTask.promise.then(pdf => {
-          this.pdf.numPages = pdf.numPages
-        }).catch(err => {
-          this.msgError(this.$t('pdf加载失败'))
-        })
-      },
-      // pdf上一页
-      prePage() {
-        let page = this.pdf.pageNum
-        page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-        this.pdf.pageNum = page
-      },
-      // pdf下一页
-      nextPage() {
-        let page = this.pdf.pageNum
-        page = page < this.pdf.pageTotalNum ? page + 1 : 1
-        this.pdf.pageNum = page
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
       },
     }
   };

+ 1 - 1
ui/src/views/process/alarmmodify/index.vue

@@ -283,7 +283,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 5 - 26
ui/src/views/process/moc/index.vue

@@ -511,7 +511,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1230,31 +1230,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
     // 取消
     cancelFile(row, index) {
       // 如果是新增的数据

+ 1 - 1
ui/src/views/production/blind/index.vue

@@ -336,7 +336,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 1 - 1
ui/src/views/reliability/abnormalreport/index.vue

@@ -305,7 +305,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 1 - 1
ui/src/views/sems/specfile/index.vue

@@ -112,7 +112,7 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+    <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
       <div style="margin-top: -30px">

+ 1 - 1
ui/src/views/training/newemployee/index.vue

@@ -270,7 +270,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">

+ 4 - 25
ui/src/views/training/training/index.vue

@@ -492,7 +492,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1265,32 +1265,11 @@ export default {
     //pdf预览
     openPdf(){
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-      },
-      handleSee (row){
+    },
+    handleSee (row){
       this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
       this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
     },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {

+ 5 - 26
ui/src/views/training/trainingrecords/index.vue

@@ -617,7 +617,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">
@@ -1400,31 +1400,10 @@ export default {
         window.open(this.pdf.pdfUrl);//path是文件的全路径地址
       },
       handleSee (row){
-      this.pdf.open =true
-      this.pdf.pageNum = 1
-      this.pdf.loadedRatio = 0
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + row.fileUrl
-      this.pdf.title = row.fileName
-      let loadingTask = null
-      loadingTask = pdf.createLoadingTask(this.pdf.pdfUrl)
-      loadingTask.promise.then(pdf => {
-        this.pdf.numPages = pdf.numPages
-      }).catch(err => {
-        this.msgError(this.$t('pdf加载失败'))
-      })
-    },
-    // pdf上一页
-    prePage() {
-      let page = this.pdf.pageNum
-      page = page > 1 ? page - 1 : this.pdf.pageTotalNum
-      this.pdf.pageNum = page
-    },
-    // pdf下一页
-    nextPage() {
-      let page = this.pdf.pageNum
-      page = page < this.pdf.pageTotalNum ? page + 1 : 1
-      this.pdf.pageNum = page
-    },
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
     /** 打开上岗证复证列表 */
     openWorklicense(row) {
       this.worklicenseOpen = true;

+ 1 - 1
ui/src/views/training/worklicense/index.vue

@@ -371,7 +371,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1700px" append-to-body>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
           <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
         <div style="margin-top: -30px">