标准入库 第一步 第四步 文件预览
This commit is contained in:
@@ -264,7 +264,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in xgdFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in xgdFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -287,7 +287,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in FBGBJBDFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in FBGBJBDFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -310,7 +310,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in ssgFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in ssgFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -333,7 +333,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in caFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in caFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -356,7 +356,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in zbjbdFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in zbjbdFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -381,7 +381,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in kwjFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in kwjFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -406,7 +406,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in jdwjFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in jdwjFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -429,7 +429,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in bpgFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in bpgFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -452,7 +452,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in zqyjgFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in zqyjgFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -710,7 +710,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in glwjFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in glwjFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -1208,7 +1208,7 @@
|
||||
import ProcessHeader from '../../components/ProcessHeader'
|
||||
import ProcessFooter from '../../components/ProcessFooter'
|
||||
import ProcessTitle from '../../components/ProcessTitle'
|
||||
import {saveTaskFirst, queryTaskFirst} from "api/process";
|
||||
import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId} from "api/process";
|
||||
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
|
||||
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
|
||||
import TreeSelectModule from "@/components/treeSelect/treeSelectModule.vue";
|
||||
@@ -1679,6 +1679,56 @@
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getBusStandFileByAttId(attId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getBusStandFileByAttId({
|
||||
attId
|
||||
}).then(res => {
|
||||
if (res.ok) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
reject()
|
||||
}
|
||||
}).catch(e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 文件预览
|
||||
filePreview(item) {
|
||||
const attId = item.response.data.id
|
||||
this.getBusStandFileByAttId(attId)
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
if(res){
|
||||
const editFileInfo = res
|
||||
console.log(editFileInfo)
|
||||
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
||||
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
||||
}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))
|
||||
}
|
||||
// switch (res.convertState) {
|
||||
// case 'ERROR':
|
||||
// this.$message.warning('文档转换失败')
|
||||
// break
|
||||
// case 'LODING':
|
||||
// this.$message.info('文档转换中,请稍后查看')
|
||||
// break
|
||||
// case 'SUCCESS':
|
||||
// const { convertFileInfo } = res
|
||||
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
|
||||
// break
|
||||
// }
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
this.$message.warning('文件不存在,预览失败')
|
||||
})
|
||||
},
|
||||
// choiceZRRS () {
|
||||
// if (this.userType === 'zrUserId') {
|
||||
// this.roleForm.zrUserId = this.zrUserIds.map(item => item.id).join(",")
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in xgdFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in xgdFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -400,7 +400,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in FBGBJBDFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in FBGBJBDFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -423,7 +423,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in ssgFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in ssgFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -446,7 +446,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in caFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in caFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -469,7 +469,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in zbjbdFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in zbjbdFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -610,7 +610,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in kwjFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in kwjFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -635,7 +635,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in jdwjFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in jdwjFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -658,7 +658,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in bpgFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in bpgFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -681,7 +681,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in zqyjgFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in zqyjgFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -938,7 +938,7 @@
|
||||
></el-input>
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="width: 80%;">
|
||||
<div v-for="(item,index) in glwjFileList" :key="index" class="fileClass">{{ item.name }}</div>
|
||||
<div v-for="(item,index) in glwjFileList" :key="index" @click="filePreview(item)" class="fileClass">{{ item.name }}</div>
|
||||
</div>
|
||||
<div style="width: 20%;">
|
||||
<el-button
|
||||
@@ -1317,7 +1317,7 @@ import {
|
||||
changeAssigneeNew,
|
||||
saveTaskForPub,
|
||||
queryTaskFirst,
|
||||
saveTaskFirst
|
||||
saveTaskFirst, getBusStandFileByAttId
|
||||
} from 'api/process'
|
||||
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
|
||||
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
|
||||
@@ -1580,6 +1580,56 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getBusStandFileByAttId(attId) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getBusStandFileByAttId({
|
||||
attId
|
||||
}).then(res => {
|
||||
if (res.ok) {
|
||||
resolve(res.data)
|
||||
} else {
|
||||
reject()
|
||||
}
|
||||
}).catch(e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 文件预览
|
||||
filePreview(item) {
|
||||
const attId = item.response.data.id
|
||||
this.getBusStandFileByAttId(attId)
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
if(res){
|
||||
const editFileInfo = res
|
||||
console.log(editFileInfo)
|
||||
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
|
||||
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
|
||||
}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))
|
||||
}
|
||||
// switch (res.convertState) {
|
||||
// case 'ERROR':
|
||||
// this.$message.warning('文档转换失败')
|
||||
// break
|
||||
// case 'LODING':
|
||||
// this.$message.info('文档转换中,请稍后查看')
|
||||
// break
|
||||
// case 'SUCCESS':
|
||||
// const { convertFileInfo } = res
|
||||
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
|
||||
// break
|
||||
// }
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
this.$message.warning('文件不存在,预览失败')
|
||||
})
|
||||
},
|
||||
checkedRole (data) {
|
||||
this.assigneeNewLoading = true
|
||||
changeAssigneeNew({
|
||||
|
||||
Reference in New Issue
Block a user