参会流程上传附件添加下载按钮
This commit is contained in:
+5
-1
@@ -290,7 +290,11 @@ router.beforeEach(function (to, from, next) {
|
|||||||
next('/Login')
|
next('/Login')
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
next()
|
if(isMobile()) {
|
||||||
|
next('/blankPage')
|
||||||
|
} else {
|
||||||
|
next('/Login')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
next()
|
next()
|
||||||
|
|||||||
@@ -100,43 +100,34 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="费用列支:">
|
<el-form-item class="add-form-item" label="费用列支:">
|
||||||
<el-input v-model="ch_pageData.feeKind" placeholder="请输入费用列支"></el-input>
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="24">
|
||||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||||
<el-upload
|
<div v-if="ch_pageData.fileTextList.length>0">
|
||||||
style="width: 70%"
|
<div v-for="(item, index) in ch_pageData.fileTextList" :key="index" style="margin-right: 5px; padding-left: 10px;color: #0c91e5;">
|
||||||
class="upload_style"
|
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||||
:disabled="acceptShow"
|
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||||
multiple
|
</a>
|
||||||
ref="uploadFile"
|
<a v-else style="cursor: pointer" @click="fileLook(item)">{{ item.name }}</a>
|
||||||
: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"
|
|
||||||
>
|
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="acceptShow"
|
size="mini"
|
||||||
type="primary"
|
@click="filesUpload(item)"
|
||||||
class="common-button-primary"
|
icon="el-icon-download"
|
||||||
size="mini">
|
style="height: 25px; margin-left: 5px;"
|
||||||
点击上传
|
></el-button>
|
||||||
</el-button>
|
</div>
|
||||||
</el-upload>
|
</div>
|
||||||
|
<el-button
|
||||||
|
@click="fileUpload"
|
||||||
|
:disabled="acceptShow"
|
||||||
|
type="primary"
|
||||||
|
class="common-button-primary"
|
||||||
|
size="mini">
|
||||||
|
点击上传
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@@ -306,6 +297,28 @@
|
|||||||
</el-timeline>
|
</el-timeline>
|
||||||
</div>
|
</div>
|
||||||
</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
|
<ProcessFooter
|
||||||
show-save
|
show-save
|
||||||
show-submit
|
show-submit
|
||||||
@@ -338,7 +351,9 @@ import ProcessTitle from '../../components/ProcessTitle'
|
|||||||
import {
|
import {
|
||||||
startProcess, queryTaskFirst,
|
startProcess, queryTaskFirst,
|
||||||
saveTaskFirst, completeTask,
|
saveTaskFirst, completeTask,
|
||||||
taskDel, workGroup, processBack} from '@/api/process.js'
|
taskDel, workGroup, processBack,
|
||||||
|
getBusStandFileByAttId
|
||||||
|
} from '@/api/process.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -351,6 +366,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
active: '1',
|
active: '1',
|
||||||
|
|
||||||
|
fileMadel: false,
|
||||||
ch_pageData: {
|
ch_pageData: {
|
||||||
meetingName: '',
|
meetingName: '',
|
||||||
primaryUnit: '',
|
primaryUnit: '',
|
||||||
@@ -473,9 +489,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
//上传按钮
|
//上传按钮
|
||||||
/* uploadFile(val) {
|
fileUpload () {
|
||||||
this.fileListData = val
|
this.fileMadel = true
|
||||||
},*/
|
},
|
||||||
// 文件上传限制条件
|
// 文件上传限制条件
|
||||||
handleBeforeUpload(file) {
|
handleBeforeUpload(file) {
|
||||||
var filename = file.name
|
var filename = file.name
|
||||||
@@ -534,6 +550,51 @@ export default {
|
|||||||
this.fileMadel = false
|
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() {
|
meeting_add() {
|
||||||
var list = {
|
var list = {
|
||||||
|
|||||||
@@ -56,23 +56,29 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="费用列支:">
|
<el-form-item class="add-form-item" label="费用列支:">
|
||||||
{{ ch_pageData.feeKind || '-' }}
|
{{ ch_pageData.feeKind || '-' }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="10">
|
||||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
<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;">
|
||||||
<a v-if="item.name.length > 30">
|
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||||
</a>
|
</a>
|
||||||
<a v-else>
|
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name }} {{ ';' }}
|
{{ item.name }} {{ ';' }}
|
||||||
</a>
|
</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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -210,7 +216,7 @@
|
|||||||
import ProcessHeader from "../../components/ProcessHeader";
|
import ProcessHeader from "../../components/ProcessHeader";
|
||||||
import ProcessFooter from "../../components/ProcessFooter";
|
import ProcessFooter from "../../components/ProcessFooter";
|
||||||
import ProcessTitle from "../../components/ProcessTitle";
|
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 {
|
export default {
|
||||||
components: {
|
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) {
|
previews(val) {
|
||||||
let attId = val
|
let attId = val
|
||||||
@@ -471,6 +513,9 @@ export default {
|
|||||||
/deep/ .el-table th {
|
/deep/ .el-table th {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-form-item__content {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -56,23 +56,29 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="费用列支:">
|
<el-form-item class="add-form-item" label="费用列支:">
|
||||||
{{ ch_pageData.feeKind || '-' }}
|
{{ ch_pageData.feeKind || '-' }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="10">
|
||||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
<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;">
|
||||||
<a v-if="item.name.length > 30">
|
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||||
</a>
|
</a>
|
||||||
<a v-else>
|
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name }} {{ ';' }}
|
{{ item.name }} {{ ';' }}
|
||||||
</a>
|
</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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -271,7 +277,7 @@
|
|||||||
import ProcessHeader from "../../components/ProcessHeader";
|
import ProcessHeader from "../../components/ProcessHeader";
|
||||||
import ProcessFooter from "../../components/ProcessFooter";
|
import ProcessFooter from "../../components/ProcessFooter";
|
||||||
import ProcessTitle from "../../components/ProcessTitle";
|
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 {
|
export default {
|
||||||
components: {
|
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) {
|
previews(val) {
|
||||||
let attId = val
|
let attId = val
|
||||||
@@ -556,6 +599,9 @@ export default {
|
|||||||
/deep/ .el-table th {
|
/deep/ .el-table th {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-form-item__content {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -56,23 +56,29 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="费用列支:">
|
<el-form-item class="add-form-item" label="费用列支:">
|
||||||
{{ ch_pageData.feeKind || '-' }}
|
{{ ch_pageData.feeKind || '-' }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="10">
|
||||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
<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;">
|
||||||
<a v-if="item.name.length > 30">
|
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||||
</a>
|
</a>
|
||||||
<a v-else>
|
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name }} {{ ';' }}
|
{{ item.name }} {{ ';' }}
|
||||||
</a>
|
</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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -215,7 +221,7 @@
|
|||||||
import ProcessHeader from "../../components/ProcessHeader";
|
import ProcessHeader from "../../components/ProcessHeader";
|
||||||
import ProcessFooter from "../../components/ProcessFooter";
|
import ProcessFooter from "../../components/ProcessFooter";
|
||||||
import ProcessTitle from "../../components/ProcessTitle";
|
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 {
|
export default {
|
||||||
components: {
|
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) {
|
previews(val) {
|
||||||
let attId = val
|
let attId = val
|
||||||
@@ -481,6 +524,9 @@ export default {
|
|||||||
/deep/ .el-table th {
|
/deep/ .el-table th {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-form-item__content {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -56,23 +56,29 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="费用列支:">
|
<el-form-item class="add-form-item" label="费用列支:">
|
||||||
{{ ch_pageData.feeKind || '-' }}
|
{{ ch_pageData.feeKind || '-' }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="10">
|
||||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
<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;">
|
||||||
<a v-if="item.name.length > 30">
|
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||||
</a>
|
</a>
|
||||||
<a v-else>
|
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name }} {{ ';' }}
|
{{ item.name }} {{ ';' }}
|
||||||
</a>
|
</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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -233,7 +239,7 @@
|
|||||||
import ProcessHeader from "../../components/ProcessHeader";
|
import ProcessHeader from "../../components/ProcessHeader";
|
||||||
import ProcessFooter from "../../components/ProcessFooter";
|
import ProcessFooter from "../../components/ProcessFooter";
|
||||||
import ProcessTitle from "../../components/ProcessTitle";
|
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 {
|
export default {
|
||||||
components: {
|
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) {
|
previews(val) {
|
||||||
let attId = val
|
let attId = val
|
||||||
@@ -494,6 +537,9 @@ export default {
|
|||||||
/deep/ .el-table th {
|
/deep/ .el-table th {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-form-item__content {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
/deep/ .el-upload {
|
/deep/ .el-upload {
|
||||||
display: unset;
|
display: unset;
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="费用列支:">
|
<el-form-item class="add-form-item" label="费用列支:">
|
||||||
{{ ch_pageData.feeKind || '-' }}
|
{{ ch_pageData.feeKind || '-' }}
|
||||||
@@ -65,14 +65,14 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
<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">
|
<a v-if="item.name.length > 30">
|
||||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||||
</a>
|
</a>
|
||||||
<a v-else>
|
<a v-else>
|
||||||
{{ item.name }} {{ ';' }}
|
{{ item.name }} {{ ';' }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -381,6 +381,9 @@ export default {
|
|||||||
/deep/.el-table th {
|
/deep/.el-table th {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-form-item__content {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24">
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="费用列支:">
|
<el-form-item class="add-form-item" label="费用列支:">
|
||||||
{{ ch_pageData.feeKind || '-' }}
|
{{ ch_pageData.feeKind || '-' }}
|
||||||
@@ -68,14 +68,20 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
<el-form-item class="add-form-item" label="上传附件:" prop="uploadFile">
|
||||||
<span v-if="uploadFileLength < 1">{{ '-' }}</span>
|
<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;">
|
||||||
<a v-if="item.name.length > 30">
|
<a v-if="item.name.length > 30" style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
{{ item.name.slice(0,30) + '...' }} {{ ';' }}
|
||||||
</a>
|
</a>
|
||||||
<a v-else>
|
<a v-else style="cursor: pointer" @click="fileLook(item)">
|
||||||
{{ item.name }} {{ ';' }}
|
{{ item.name }} {{ ';' }}
|
||||||
</a>
|
</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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -224,7 +230,7 @@
|
|||||||
import ProcessHeader from "../../components/ProcessHeader";
|
import ProcessHeader from "../../components/ProcessHeader";
|
||||||
import ProcessFooter from "../../components/ProcessFooter";
|
import ProcessFooter from "../../components/ProcessFooter";
|
||||||
import ProcessTitle from "../../components/ProcessTitle";
|
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 {
|
export default {
|
||||||
components: {
|
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) {
|
previews(val) {
|
||||||
let attId = val
|
let attId = val
|
||||||
@@ -548,6 +591,9 @@ export default {
|
|||||||
/deep/ .el-table th {
|
/deep/ .el-table th {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
/deep/.el-form-item__content {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user