diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue index 88b0b5f59..cbc6b1261 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1-1.vue @@ -46,20 +46,26 @@ v-model="form.modelNameList" clearable > -
-
- {{ item.name }} +
+
+
+ {{ item.name }} + +
-
- - 点击上传 - -
+ + 点击上传 + -
-
- {{ item.name }} +
+
+
+ {{ item.name }} + +
-
+
{ + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + handlePreview(file) { + const attId = file.attId + 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('文件不存在,预览失败') + }) + }, foldForm() { this.foldFormFlag = !this.foldFormFlag }, diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue index d697549e6..7b3be3269 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue @@ -24,7 +24,7 @@
- + -
-
- {{ item.name }} +
+
+
+ {{ item.name }} + +
-
- - 点击上传 - -
+ + 点击上传 + -
-
- {{ item.name }} +
+
+
+ {{ item.name }} + +
-
+
{ + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + handlePreview(file) { + const attId = file.attId + 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('文件不存在,预览失败') + }) + }, foldForm() { this.foldFormFlag = !this.foldFormFlag }, @@ -375,7 +434,7 @@ export default { var fileSuffix = filename.substring(index1, index2) // const fileSuffix = file.name.split('.')[1] // 后缀名 // 判断上传文件格式 - if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx') { + if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx' || fileSuffix === '.XLS' || fileSuffix === '.XLSX') { return true } else { this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS文件') diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue index c861e3383..5535f6b24 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue @@ -24,7 +24,7 @@
- +
-
+
{{ item.name }} +
@@ -53,8 +59,14 @@
-
+
{{ item.name }} +
@@ -180,7 +192,7 @@ import ProcessHeader from '../../components/ProcessHeader' import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' - import {inboundLiaisonDetail,processCreateStand,saveTaskForPub,changeAssigneeNew} from 'api/process' + import {inboundLiaisonDetail,processCreateStand,saveTaskForPub,changeAssigneeNew,getBusStandFileByAttId} from 'api/process' import axios from "axios"; export default { @@ -224,6 +236,42 @@ ProcessTitle }, methods: { + getBusStandFileByAttId(attId) { + return new Promise((resolve, reject) => { + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + clickButtonToUpload(file) { + const attId = file.attId + 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('文件不存在,预览失败') + }) + }, handleTransfer() { this.drawerModal = true }, diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue index a7d8f887a..c9e2b3e0d 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue @@ -24,7 +24,7 @@
- +
-
+
{{ item.name }} +
@@ -53,8 +59,14 @@
-
+
{{ item.name }} +
@@ -72,7 +84,7 @@
- + -
+
{{ form.fileName }} +
{ + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + clickButtonToUpload2(file) { + const attId = file + 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('文件不存在,预览失败') + }) + }, + clickButtonToUpload(file) { + const attId = file.attId + 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('文件不存在,预览失败') + }) + }, handleTransfer() { this.drawerModal = true }, @@ -323,7 +398,7 @@ }, e => {}) }, updateFile (item) { - window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.id + window.location.href = '/api/att/attFile/downloadFile?fileId=' + item.fileId }, // 导入按钮 上传之前的钩子 beginImportFile (file) { diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue index f5f1840bb..b2e23d503 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue @@ -24,7 +24,7 @@
- +
-
+
{{ item.name }} +
@@ -53,22 +59,28 @@
-
+
{{ item.name }} +
- -
- -
- {{ form.fileName }} -
-
- - - -
-
+ + + + + + + +
@@ -82,8 +94,18 @@ -
- {{ form.fileName }} +
+
+
+ {{ form.fileName }} +
+ +
- - @@ -205,7 +227,7 @@ import ProcessHeader from '../../components/ProcessHeader' import ProcessFooter from '../../components/ProcessFooter' import ProcessTitle from '../../components/ProcessTitle' - import {inboundLiaisonDetail,processCreateStand,saveTaskForPub,changeAssigneeNew} from 'api/process' + import {inboundLiaisonDetail,processCreateStand,saveTaskForPub,changeAssigneeNew,getBusStandFileByAttId} from 'api/process' import axios from "axios"; export default { @@ -249,6 +271,63 @@ ProcessTitle }, methods: { + getBusStandFileByAttId(attId) { + return new Promise((resolve, reject) => { + getBusStandFileByAttId({ + attId + }).then(res => { + if (res.ok) { + resolve(res.data) + } else { + reject() + } + }).catch(e => { + reject(e) + }) + }) + }, + clickButtonToUpload2(file) { + const attId = file + 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('文件不存在,预览失败') + }) + }, + clickButtonToUpload(file) { + const attId = file.attId + 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('文件不存在,预览失败') + }) + }, handleTransfer() { this.drawerModal = true }, @@ -350,6 +429,7 @@ this.json = data || data.form this.form.file = data.fileId || data.form.fileId this.form.fileName = data.fileName || data.form.fileName + this.form.fileId = data.fileId || data.form.fileId this.form.modelList = data.modelList || data.form.modelList this.form.fjList = data.fjList || data.form.fjList }).catch(e => { diff --git a/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue b/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue index 3bc0a8498..69b40fafe 100644 --- a/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue +++ b/src/pages/regulatoryRepository/workingGroup/components/workingGroup1/index.vue @@ -1051,7 +1051,6 @@ this.addForm.wgNetInfos[this.pIndex].phone = data[0].phone this.addForm.wgNetInfos[this.pIndex].email = data[0].email } else if (this.pType === '选择我司人员') { - console.log(data[0]); this.addForm.wgDepts[this.pIndex].name = data[0].name this.addForm.wgDepts[this.pIndex].deptPeopleId = data[0].id this.addForm.wgDepts[this.pIndex].phone = data[0].phone