From 077aebcb8f3ef9cfab95a0382fef9620815e57a3 Mon Sep 17 00:00:00 2001 From: shenyanpei Date: Mon, 20 Dec 2021 13:41:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E4=BC=9A=E6=B5=81=E7=A8=8B=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=99=84=E4=BB=B6=E6=B7=BB=E5=8A=A0=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 6 +- .../pages/creatProcess/bzhHy-ch/step1.vue | 133 +++++++++++++----- .../pages/creatProcess/bzhHy-ch/step2.vue | 59 +++++++- .../pages/creatProcess/bzhHy-ch/step3.vue | 60 +++++++- .../pages/creatProcess/bzhHy-ch/step4.vue | 60 +++++++- .../pages/creatProcess/bzhHy-ch/step5.vue | 60 +++++++- .../pages/creatProcess/bzhHy-ch/step6-1.vue | 9 +- .../pages/creatProcess/bzhHy-ch/step6.vue | 58 +++++++- 8 files changed, 371 insertions(+), 74 deletions(-) diff --git a/src/main.js b/src/main.js index e42289e04..add9eb6ed 100644 --- a/src/main.js +++ b/src/main.js @@ -290,7 +290,11 @@ router.beforeEach(function (to, from, next) { next('/Login') } }else { - next() + if(isMobile()) { + next('/blankPage') + } else { + next('/Login') + } } }else { next() diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue index 939f0d879..1de4e6d10 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue @@ -100,43 +100,34 @@ - - - + + - +
+
+ + {{ item.name.slice(0,30) + '...' }} {{ ';' }} + + {{ item.name }} - 点击上传 - - + size="mini" + @click="filesUpload(item)" + icon="el-icon-download" + style="height: 25px; margin-left: 5px;" + > +
+
+ + 点击上传 +
@@ -306,6 +297,28 @@ + + + +
+ +

点击或拖拽上传文件

+
+
+
{ + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + fileLook(file) { // 预览 + const attId = file.id + this.getBusStandFileByAttId(attId) + .then(res => { + if(res){ + const editFileInfo = res + if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ + window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) + }else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){ + window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + }else { + const nowTime = new Date().getTime() + // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + } + // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + } + }).catch(e => { + this.$message.warning('文件不存在,预览失败') + }) + }, + filesUpload (file) { // 下载 + const attId = file.id + if (attId) { + window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId + } else { + this.$message.warning('文件不存在,下载失败') + } + }, meeting_add() { var list = { diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue index 8721d1575..00c3c0ff3 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue @@ -56,23 +56,29 @@
- + {{ ch_pageData.feeKind || '-' }} - + {{ '-' }} - - + @@ -210,7 +216,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; -import {startProcess, saveTaskFirst, completeTask, inboundLiaisonDetail} from '@/api/process.js' +import {startProcess, saveTaskFirst, completeTask, inboundLiaisonDetail,getBusStandFileByAttId} from '@/api/process.js' export default { components: { @@ -349,6 +355,42 @@ export default { }) }, + getBusStandFileByAttId(attId) { // 预览 + return new Promise((resolve, reject) => { + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + fileLook(file) { // 预览 + const attId = file.id + this.getBusStandFileByAttId(attId) + .then(res => { + if(res){ + const editFileInfo = res + if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ + window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) + }else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){ + window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + }else { + const nowTime = new Date().getTime() + // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + } + // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + } + }).catch(e => { + this.$message.warning('文件不存在,预览失败') + }) + }, /** 点击对应附件进行下载*/ previews(val) { let attId = val @@ -471,6 +513,9 @@ export default { /deep/ .el-table th { padding: 0px; } + /deep/.el-form-item__content { + margin-top: 4px; + } } } diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue index d3faaeb51..b8094a74b 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue @@ -56,23 +56,29 @@
- + {{ ch_pageData.feeKind || '-' }} - + {{ '-' }} - - + @@ -271,7 +277,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; -import {startProcess, saveTaskFirst, saveTaskForPub, completeTask, inboundLiaisonDetail} from '@/api/process.js' +import {startProcess, saveTaskFirst, saveTaskForPub, completeTask, inboundLiaisonDetail,getBusStandFileByAttId} from '@/api/process.js' export default { components: { @@ -434,6 +440,43 @@ export default { }) }, + // 预览 + getBusStandFileByAttId(attId) { // 预览 + return new Promise((resolve, reject) => { + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + fileLook(file) { // 预览 + const attId = file.id + this.getBusStandFileByAttId(attId) + .then(res => { + if(res){ + const editFileInfo = res + if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ + window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) + }else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){ + window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + }else { + const nowTime = new Date().getTime() + // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + } + // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + } + }).catch(e => { + this.$message.warning('文件不存在,预览失败') + }) + }, /** 点击对应附件进行下载*/ previews(val) { let attId = val @@ -556,6 +599,9 @@ export default { /deep/ .el-table th { padding: 0px; } + /deep/.el-form-item__content { + margin-top: 4px; + } } } diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue index 51204ed33..886b65585 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue @@ -56,23 +56,29 @@ - + {{ ch_pageData.feeKind || '-' }} - + {{ '-' }} - - + @@ -215,7 +221,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; -import {startProcess, saveTaskFirst, completeTask, inboundLiaisonDetail} from '@/api/process.js' +import {startProcess, saveTaskFirst, completeTask, inboundLiaisonDetail,getBusStandFileByAttId} from '@/api/process.js' export default { components: { @@ -363,6 +369,43 @@ export default { } }) }, + // 预览 + getBusStandFileByAttId(attId) { // 预览 + return new Promise((resolve, reject) => { + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + fileLook(file) { // 预览 + const attId = file.id + this.getBusStandFileByAttId(attId) + .then(res => { + if(res){ + const editFileInfo = res + if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ + window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) + }else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){ + window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + }else { + const nowTime = new Date().getTime() + // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + } + // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + } + }).catch(e => { + this.$message.warning('文件不存在,预览失败') + }) + }, /** 点击对应附件进行下载*/ previews(val) { let attId = val @@ -481,6 +524,9 @@ export default { /deep/ .el-table th { padding: 0px; } + /deep/.el-form-item__content { + margin-top: 4px; + } } } diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue index 3185448cc..ae37361e7 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue @@ -56,23 +56,29 @@ - + {{ ch_pageData.feeKind || '-' }} - + {{ '-' }} - - + @@ -233,7 +239,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; -import {startProcess, saveTaskForPub, completeTask, inboundLiaisonDetail} from '@/api/process.js' +import {startProcess, saveTaskForPub, completeTask, inboundLiaisonDetail,getBusStandFileByAttId} from '@/api/process.js' export default { components: { @@ -388,6 +394,43 @@ export default { }) }, + // 预览 + getBusStandFileByAttId(attId) { // 预览 + return new Promise((resolve, reject) => { + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + fileLook(file) { // 预览 + const attId = file.id + this.getBusStandFileByAttId(attId) + .then(res => { + if(res){ + const editFileInfo = res + if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ + window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) + }else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){ + window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + }else { + const nowTime = new Date().getTime() + // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + } + // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + } + }).catch(e => { + this.$message.warning('文件不存在,预览失败') + }) + }, /** 点击对应附件进行下载*/ previews(val) { let attId = val @@ -494,6 +537,9 @@ export default { /deep/ .el-table th { padding: 0px; } + /deep/.el-form-item__content { + margin-top: 4px; + } /deep/ .el-upload { display: unset; diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6-1.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6-1.vue index 6ec9bfd3f..0aaf6bc93 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6-1.vue @@ -56,7 +56,7 @@ - + {{ ch_pageData.feeKind || '-' }} @@ -65,14 +65,14 @@ {{ '-' }} - + @@ -381,6 +381,9 @@ export default { /deep/.el-table th { padding: 0px; } + /deep/.el-form-item__content { + margin-top: 4px; + } } } diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue index 635705c8a..b4307e159 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue @@ -59,7 +59,7 @@ - + {{ ch_pageData.feeKind || '-' }} @@ -68,14 +68,20 @@ {{ '-' }} - - + @@ -224,7 +230,7 @@ import ProcessHeader from "../../components/ProcessHeader"; import ProcessFooter from "../../components/ProcessFooter"; import ProcessTitle from "../../components/ProcessTitle"; -import {startProcess, saveTaskFirst, completeTask, inboundLiaisonDetail} from '@/api/process.js' +import {startProcess, saveTaskFirst, completeTask, inboundLiaisonDetail,getBusStandFileByAttId} from '@/api/process.js' export default { components: { @@ -430,6 +436,43 @@ export default { }) }, + // 预览 + getBusStandFileByAttId(attId) { // 预览 + return new Promise((resolve, reject) => { + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + fileLook(file) { // 预览 + const attId = file.id + this.getBusStandFileByAttId(attId) + .then(res => { + if(res){ + const editFileInfo = res + if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){ + window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) + }else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){ + window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + }else { + const nowTime = new Date().getTime() + // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); + window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) + } + // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) + } + }).catch(e => { + this.$message.warning('文件不存在,预览失败') + }) + }, /** 点击对应附件进行下载*/ previews(val) { let attId = val @@ -548,6 +591,9 @@ export default { /deep/ .el-table th { padding: 0px; } + /deep/.el-form-item__content { + margin-top: 4px; + } } }