diff --git a/src/common/index.js b/src/common/index.js
index 54496fe12..0839e9819 100644
--- a/src/common/index.js
+++ b/src/common/index.js
@@ -8,6 +8,7 @@ import hasPermission from './hasPermission'
import preview from './preview'
import onlineEdit from './onlineEdit'
import onlinePreview from './onlinePreview'
+import onlineEditPreview from './onlineEditPreview'
// 表单验证
import verify from './verify'
@@ -46,6 +47,11 @@ const install = function (Vue) {
return onlinePreview
}
},
+ $onlineEditPreview: {
+ get () {
+ return onlineEditPreview
+ }
+ },
$onlineEdit: {
get () {
return onlineEdit
diff --git a/src/common/onlineEditPreview/index.js b/src/common/onlineEditPreview/index.js
new file mode 100644
index 000000000..ce790d2cb
--- /dev/null
+++ b/src/common/onlineEditPreview/index.js
@@ -0,0 +1,29 @@
+/**
+ * 工作流文件在线编辑预览
+ */
+import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
+import { processEditFile } from 'api/process'
+let Base64 = require('js-base64').Base64;
+export default (id,nodeName,userId,userName) => {
+ processEditFile({
+ id
+ }).then(res => {
+ if(res){
+ const editFileInfo = res
+ const showName = nodeName
+ const editFilePath = editFileInfo.editFilePath.split("/")
+ editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
+ editFileInfo.fileName = editFilePath[2]
+ editFileInfo.userId = userId
+ editFileInfo.userName = userName
+ if(editFileInfo.pid){
+ editFileInfo.pId = editFileInfo.pid
+ }
+ editFileInfo.fileSuffix = 'docx'
+ const nowTime = new Date().getTime()
+ window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + showName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
+ }
+ }).catch(e => {
+ })
+}
+
diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue
index 026f7089d..9ef7721a9 100644
--- a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue
+++ b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/component/establish.vue
@@ -502,10 +502,13 @@ export default {
handleFilePreview(file,type) {
let id = ""
let fileName = ""
+ let fileNam2 = ""
if(this.qbfsForm.esName && this.qbfsForm.esName !== ''){
fileName = this.qbfsForm.esName+'-立项单.docx'
+ fileNam2 = this.qbfsForm.esName+'-立项单'
}else {
fileName = '立项单.docx'
+ fileNam2 = '立项单'
}
if(file && file.id){
id = file.id
@@ -519,9 +522,9 @@ export default {
this.$message.warning('文件不存在,下载失败')
}
} else if(type === 'preview'){
- this.$onlinePreview(id)
+ this.$onlineEditPreview(id,fileNam2,this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
}else {
- this.$onlineEdit(id,'立项单',this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
+ this.$onlineEdit(id,fileNam2,this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
}
},
//体系结构单选
diff --git a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step4.vue b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step4.vue
index 46ba82244..472ae88db 100644
--- a/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step4.vue
+++ b/src/pages/processCenter/pages/creatProcess/qbzxdjhgk/step4.vue
@@ -380,7 +380,6 @@ export default {
})
},
methods:{
-
// 文件预览及下载
handleFilePreview(file,type) {
let id = ""
diff --git a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue
index fc90be4d4..c6bfa4991 100644
--- a/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue
+++ b/src/pages/regulatoryRepository/enterpriseStandardPlan/index.vue
@@ -402,6 +402,17 @@
v-model="addForm.esMatingRelations"
>
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
@@ -597,6 +608,7 @@
},
data() {
return {
+ LXDList: [],
CBList: [],
BZList: [],
TXJGList: [],
@@ -1031,6 +1043,34 @@
this.form.pageSize = pageSize
this.getData()
},
+ handleFilePreview(file,type) {
+ let id = ""
+ let fileName = ""
+ let fileNam2 = ""
+ if(this.addForm.esName && this.addForm.esName !== ''){
+ fileName = this.addForm.esName+'-立项单.docx'
+ fileNam2 = this.addForm.esName+'-立项单'
+ }else {
+ fileName = '立项单.docx'
+ fileNam2 = '立项单'
+ }
+ if(file && file.id){
+ id = file.id
+ }else {
+ id = file.response.data.id
+ }
+ if (type === 'down') {
+ if (id) {
+ window.open('/api/lawss/activiti/downloadFileForSar?fileId=' + id +'&oldFileName='+fileName)
+ } else {
+ this.$message.warning('文件不存在,下载失败')
+ }
+ } else if(type === 'preview'){
+ this.$onlineEditPreview(id,fileNam2,this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
+ }else {
+ this.$onlineEdit(id,fileNam2,this.$store.getters.userInfo.userId,this.$store.getters.userInfo.userName)
+ }
+ },
handleCommand (command) {
switch (command[1]) {
case '编辑':
@@ -1064,6 +1104,16 @@
drafterName: command[0].drafterName, // 起草人
drafter: command[0].drafter,
}
+ this.addForm.LXD = command[0].lxd
+ let fileName1 = ""
+ if(this.addForm.esName && this.addForm.esName !== ''){
+ fileName1 = this.addForm.esName+'-立项单'
+ }else {
+ fileName1 = '立项单'
+ }
+ this.addForm.LXDName = fileName1
+ this.LXDList=this.assemble(command[0].lxd,fileName1)
+ console.log(this.LXDList)
if (typeof (this.addForm.area) === 'string') {
this.addForm.area = command[0].area.split(',')
}
@@ -1096,12 +1146,32 @@
this.DrawerType = 'see'
this.addDrawer = true
this.addForm = command[0]
+ this.addForm.LXD = command[0].lxd
+ let fileName = ""
+ if(this.addForm.esName && this.addForm.esName !== ''){
+ fileName = this.addForm.esName+'-立项单'
+ }else {
+ fileName = '立项单'
+ }
+ this.addForm.LXDName = fileName
+ this.LXDList=this.assemble(command[0].lxd,fileName);
+ console.log(this.LXDList)
if (typeof (this.addForm.area) === 'string') {
this.addForm.area = command[0].area.split(',')
}
break
}
},
+ assemble(ids,names){
+ let list= new Array();
+ let idArray=ids.split(',');
+ let nameArray=names.split(',');
+ for(let i=0; i