参会流程上传附件添加下载按钮
This commit is contained in:
+5
-1
@@ -290,7 +290,11 @@ router.beforeEach(function (to, from, next) {
|
||||
next('/Login')
|
||||
}
|
||||
}else {
|
||||
next()
|
||||
if(isMobile()) {
|
||||
next('/blankPage')
|
||||
} else {
|
||||
next('/Login')
|
||||
}
|
||||
}
|
||||
}else {
|
||||
next()
|
||||
|
||||
@@ -100,43 +100,34 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="费用列支:">
|
||||
<el-input v-model="ch_pageData.feeKind" placeholder="请输入费用列支"></el-input>
|
||||
<!-- <el-select
|
||||
v-model="ch_pageData.feeKind"
|
||||
placeholder="请选择费用列支">
|
||||
<el-option
|
||||
v-for="item in feeKindOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"/>
|
||||
</el-select>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||
<el-upload
|
||||
style="width: 70%"
|
||||
class="upload_style"
|
||||
:disabled="acceptShow"
|
||||
multiple
|
||||
ref="uploadFile"
|
||||
:action="uploadPath"
|
||||
name="file"
|
||||
:file-list="ch_pageData.fileTextList"
|
||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:before-remove="handleBeforeRemove"
|
||||
:on-success="handleOnsuccess"
|
||||
>
|
||||
<div v-if="ch_pageData.fileTextList.length>0">
|
||||
<div v-for="(item, index) in ch_pageData.fileTextList" :key="index" style="margin-right: 5px; padding-left: 10px;color: #0c91e5;">
|
||||
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||
</a>
|
||||
<a v-else style="cursor: pointer" @click="fileLook(item)">{{ item.name }}</a>
|
||||
<el-button
|
||||
:disabled="acceptShow"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
size="mini">
|
||||
点击上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
size="mini"
|
||||
@click="filesUpload(item)"
|
||||
icon="el-icon-download"
|
||||
style="height: 25px; margin-left: 5px;"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-button
|
||||
@click="fileUpload"
|
||||
:disabled="acceptShow"
|
||||
type="primary"
|
||||
class="common-button-primary"
|
||||
size="mini">
|
||||
点击上传
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -306,6 +297,28 @@
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog width='400px' :visible.sync="fileMadel" title="上传附件">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:disabled="acceptShow"
|
||||
multiple
|
||||
ref="uploadFile"
|
||||
:action="uploadPath"
|
||||
name="file"
|
||||
drag
|
||||
:file-list="ch_pageData.fileTextList"
|
||||
accept=".ZIP, .zip, .docx, .DOCX, .xls, .xlsx, .pdf, .PDF"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:before-remove="handleBeforeRemove"
|
||||
:on-success="handleOnsuccess"
|
||||
>
|
||||
<div style="padding: 20px 0">
|
||||
<i class="el-icon-upload" style="color: #3399ff"></i>
|
||||
<p>点击或拖拽上传文件</p>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-dialog>
|
||||
<ProcessFooter
|
||||
show-save
|
||||
show-submit
|
||||
@@ -338,7 +351,9 @@ import ProcessTitle from '../../components/ProcessTitle'
|
||||
import {
|
||||
startProcess, queryTaskFirst,
|
||||
saveTaskFirst, completeTask,
|
||||
taskDel, workGroup, processBack} from '@/api/process.js'
|
||||
taskDel, workGroup, processBack,
|
||||
getBusStandFileByAttId
|
||||
} from '@/api/process.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -351,6 +366,7 @@ export default {
|
||||
return {
|
||||
active: '1',
|
||||
|
||||
fileMadel: false,
|
||||
ch_pageData: {
|
||||
meetingName: '',
|
||||
primaryUnit: '',
|
||||
@@ -473,9 +489,9 @@ export default {
|
||||
},
|
||||
|
||||
//上传按钮
|
||||
/* uploadFile(val) {
|
||||
this.fileListData = val
|
||||
},*/
|
||||
fileUpload () {
|
||||
this.fileMadel = true
|
||||
},
|
||||
// 文件上传限制条件
|
||||
handleBeforeUpload(file) {
|
||||
var filename = file.name
|
||||
@@ -534,6 +550,51 @@ export default {
|
||||
this.fileMadel = false
|
||||
}
|
||||
},
|
||||
// 文件预览
|
||||
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('文件不存在,预览失败')
|
||||
})
|
||||
},
|
||||
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 = {
|
||||
|
||||
@@ -56,23 +56,29 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="费用列支:">
|
||||
{{ ch_pageData.feeKind || '-' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
||||
<span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
|
||||
<a v-if="item.name.length > 30">
|
||||
<div v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;">
|
||||
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||
</a>
|
||||
<a v-else>
|
||||
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name }} {{ ';' }}
|
||||
</a>
|
||||
</span>
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="previews(item.id)"
|
||||
icon="el-icon-download"
|
||||
style="height: 25px; margin-left: 5px;"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -56,23 +56,29 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="费用列支:">
|
||||
{{ ch_pageData.feeKind || '-' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
||||
<span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
|
||||
<a v-if="item.name.length > 30">
|
||||
<div v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;">
|
||||
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||
</a>
|
||||
<a v-else>
|
||||
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name }} {{ ';' }}
|
||||
</a>
|
||||
</span>
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="previews(item.id)"
|
||||
icon="el-icon-download"
|
||||
style="height: 25px; margin-left: 5px;"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -56,23 +56,29 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="费用列支:">
|
||||
{{ ch_pageData.feeKind || '-' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
||||
<span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
|
||||
<a v-if="item.name.length > 30">
|
||||
<div v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;">
|
||||
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||
</a>
|
||||
<a v-else>
|
||||
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name }} {{ ';' }}
|
||||
</a>
|
||||
</span>
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="previews(item.id)"
|
||||
icon="el-icon-download"
|
||||
style="height: 25px; margin-left: 5px;"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -56,23 +56,29 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="费用列支:">
|
||||
{{ ch_pageData.feeKind || '-' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
||||
<span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
|
||||
<a v-if="item.name.length > 30">
|
||||
<div v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;">
|
||||
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||
</a>
|
||||
<a v-else>
|
||||
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name }} {{ ';' }}
|
||||
</a>
|
||||
</span>
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="previews(item.id)"
|
||||
icon="el-icon-download"
|
||||
style="height: 25px; margin-left: 5px;"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -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;
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="费用列支:">
|
||||
{{ ch_pageData.feeKind || '-' }}
|
||||
@@ -65,14 +65,14 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
||||
<span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
|
||||
<div v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
|
||||
<a v-if="item.name.length > 30">
|
||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||
</a>
|
||||
<a v-else>
|
||||
{{ item.name }} {{ ';' }}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -381,6 +381,9 @@ export default {
|
||||
/deep/.el-table th {
|
||||
padding: 0px;
|
||||
}
|
||||
/deep/.el-form-item__content {
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="费用列支:">
|
||||
{{ ch_pageData.feeKind || '-' }}
|
||||
@@ -68,14 +68,20 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
||||
<span v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;" @click="previews(item.id)">
|
||||
<a v-if="item.name.length > 30">
|
||||
<div v-for="item in ch_pageData.fileTextList" :key="item.id" style="color: #409EFF;">
|
||||
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||
</a>
|
||||
<a v-else>
|
||||
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||
{{ item.name }} {{ ';' }}
|
||||
</a>
|
||||
</span>
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="previews(item.id)"
|
||||
icon="el-icon-download"
|
||||
style="height: 25px; margin-left: 5px;"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user