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 @@ - - - - 通用材料清单(支持上传PDF以及Jpeg\Png图片格式) - - 默认图片大小不超过2M,PDF文件不超过8M。超过大小请访问https://docsmall.com/压缩后在上传。 - - 图片上传前如存在颠倒方向请纠正后在上传!!!PDF压缩后请保证文件内容清晰度(建议强力压缩)。 - - - {{ list.title }} - - - - - - - - - - - - - - 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 @@ - - - - {{ uploadType }}(支持上传PDF以及Jpeg\Png图片格式) - - 默认图片大小不超过2M,PDF文件不超过8M。超过大小请访问https://docsmall.com/压缩后在上传。 - - 图片上传前如存在颠倒方向请纠正后在上传!!!PDF压缩后请保证文件内容清晰度(建议强力压缩)。 - - - {{ list.title }} - - - - - - - - - - - - 曳引驱动乘客电梯 - - - 曳引驱动载货电梯 - - - 既有住宅增设电梯 - - - 自动扶梯与自动人行道 - - - 液压电梯 - - - 杂物电梯 - - - 消防员电梯 - - - 防爆电梯 - - - 改造和重大修理 - - - - - - - - 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 @@ - - - - 一对一逐台资料清单(支持上传PDF以及Jpeg\Png图片格式) - - 默认图片大小不超过2M,PDF文件不超过8M。超过大小请访问https://docsmall.com/压缩后在上传。 - - 图片上传前如存在颠倒方向请纠正后在上传!!!PDF压缩后请保证文件内容清晰度(建议强力压缩)。 - - - {{ list.title }} - - - - - - - - - - - - - - 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 @@ - - - - 型式试验材料清单(按项目及电梯型号分类上传)(支持上传PDF以及Jpeg\Png图片格式) - - 默认图片大小不超过2M,PDF文件不超过8M。超过大小请访问https://docsmall.com/压缩后在上传。 - - 图片上传前如存在颠倒方向请纠正后在上传!!!PDF压缩后请保证文件内容清晰度(建议强力压缩)。 - - - - - - {{ list.title }} - - - - - - - - - - - - - - 曳引与强制驱动电梯 - - - 液压驱动电梯 - - - 自动扶梯与自动人行道 - - - 杂物电梯 - - - 消防员电梯 - - - 防爆电梯 - - - - - - - -