From 152c3565088c7b219afa7a2b62cc456805fd12ab Mon Sep 17 00:00:00 2001 From: zichen1019 <1510748736@qq.com> Date: Sat, 28 Aug 2021 11:30:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=9E=E6=89=A7=E5=8D=95?= =?UTF-8?q?=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/bjdService.js | 29 +++ src/views/bjd/dj_list.vue | 28 +-- src/views/bjd/jj_list.vue | 25 +-- src/views/bjd/qy_list.vue | 25 +-- src/views/bjd/sjse/upload_list.vue | 132 -------------- src/views/bjd/sjse/upload_list_20200721.vue | 188 -------------------- src/views/bjd/sjse/upload_list_param.vue | 134 -------------- src/views/bjd/sjse/upload_list_xingshi.vue | 173 ------------------ 8 files changed, 32 insertions(+), 702 deletions(-) delete mode 100644 src/views/bjd/sjse/upload_list.vue delete mode 100644 src/views/bjd/sjse/upload_list_20200721.vue delete mode 100644 src/views/bjd/sjse/upload_list_param.vue delete mode 100644 src/views/bjd/sjse/upload_list_xingshi.vue diff --git a/src/service/bjdService.js b/src/service/bjdService.js index 139d792..3621007 100644 --- a/src/service/bjdService.js +++ b/src/service/bjdService.js @@ -2,6 +2,9 @@ import XLSX from 'xlsx' import common from '@/utils/common' import qs from 'qs' import preview from '@/utils/preview' +import router from '@/router' +import store from '@/store' +import { Notification } from 'element-ui' export default { /** @@ -137,5 +140,31 @@ export default { }) }) }) + }, + viewHzd(bjdId) { + preview({ + url: '/print/generatePdfHzd', + method: 'get', + params: { + bjdId: bjdId + } + }).then((data) => { + data = data.replace(/\\/g, '/') + if (data) { + router.push({ + path: + '/preview/hzd?src=' + + store.getters.prodName + + '/static/web/viewer.html?file=' + + encodeURIComponent(data) + }) + } else { + Notification({ + message: 'PDF预览错误!', + type: 'error', + duration: 3 * 1000 + }) + } + }) } } diff --git a/src/views/bjd/dj_list.vue b/src/views/bjd/dj_list.vue index cc4971f..4db7014 100644 --- a/src/views/bjd/dj_list.vue +++ b/src/views/bjd/dj_list.vue @@ -279,7 +279,7 @@ circle icon="el-icon-view" title="预览回执单" - @click="viewHzd(scope.row.id)" + @click="bjdService.viewHzd(scope.row.id)" /> @@ -549,32 +549,6 @@ export default { }) }) }, - viewHzd(bjdId) { - this.preview({ - url: '/print/generatePdfHzd', - method: 'get', - params: { - bjdId: bjdId - } - }).then((data) => { - data = data.replace(/\\/g, '/') - if (data) { - this.$router.push({ - path: - '/preview/hzd?src=' + - this.$store.getters.prodName + - '/static/web/viewer.html?file=' + - encodeURIComponent(data) - }) - } else { - this.$message({ - message: 'PDF预览错误!', - type: 'error', - duration: 3 * 1000 - }) - } - }) - }, errorBjd() { // 异常收回 this.$confirm('报检项目将进行异常收回,是否继续?', '提示', { diff --git a/src/views/bjd/jj_list.vue b/src/views/bjd/jj_list.vue index af6a7c0..fa32db9 100644 --- a/src/views/bjd/jj_list.vue +++ b/src/views/bjd/jj_list.vue @@ -166,7 +166,7 @@ @@ -438,29 +438,6 @@ export default { viewInfo(reason) { this.$message({ message: reason, type: 'info' }) }, - viewHzd(bjdid) { - this.apibjd({ - url: '/bjd/printHzd', - method: 'get', - params: { - bjdIds: bjdid - } - }).then(data => { - this.preview({ - url: '/print/generatePdfListing', - method: 'post', - data: { - info: data.bjd, - paramList: data.renwu, - viewType: 'HZD' - } - }).then(data => { - data = data.replace(/\\/g, '/') - // router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() }) - window.open(data) - }) - }) - }, errorBjd() { // 异常收回 this.$confirm('报检项目将进行异常收回,是否继续?', '提示', { diff --git a/src/views/bjd/qy_list.vue b/src/views/bjd/qy_list.vue index 6ff799b..0ee8503 100644 --- a/src/views/bjd/qy_list.vue +++ b/src/views/bjd/qy_list.vue @@ -119,7 +119,7 @@ @@ -342,29 +342,6 @@ export default { viewInfo(reason) { this.$message({ message: reason, type: 'info' }) }, - viewHzd(bjdid) { - this.apibjd({ - url: '/bjd/printHzd', - method: 'get', - params: { - bjdIds: bjdid - } - }).then(data => { - this.preview({ - url: '/print/generatePdfListing', - method: 'post', - data: { - info: data.bjd, - paramList: data.renwu, - viewType: 'HZD' - } - }).then(data => { - data = data.replace(/\\/g, '/') - // router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() }) - window.open(data) - }) - }) - }, errorBjd() { // 异常收回 this.$confirm('报检项目将进行异常收回,是否继续?', '提示', { diff --git a/src/views/bjd/sjse/upload_list.vue b/src/views/bjd/sjse/upload_list.vue deleted file mode 100644 index 429d021..0000000 --- a/src/views/bjd/sjse/upload_list.vue +++ /dev/null @@ -1,132 +0,0 @@ - - - - - diff --git a/src/views/bjd/sjse/upload_list_20200721.vue b/src/views/bjd/sjse/upload_list_20200721.vue deleted file mode 100644 index 9d27fa9..0000000 --- a/src/views/bjd/sjse/upload_list_20200721.vue +++ /dev/null @@ -1,188 +0,0 @@ - - - - - diff --git a/src/views/bjd/sjse/upload_list_param.vue b/src/views/bjd/sjse/upload_list_param.vue deleted file mode 100644 index 7df3072..0000000 --- a/src/views/bjd/sjse/upload_list_param.vue +++ /dev/null @@ -1,134 +0,0 @@ - - - - - diff --git a/src/views/bjd/sjse/upload_list_xingshi.vue b/src/views/bjd/sjse/upload_list_xingshi.vue deleted file mode 100644 index 28b6b98..0000000 --- a/src/views/bjd/sjse/upload_list_xingshi.vue +++ /dev/null @@ -1,173 +0,0 @@ - - - - -