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 @@ - - - - -