附件上传调整
This commit is contained in:
@@ -3,23 +3,11 @@
|
||||
<div class="fl">
|
||||
<el-tabs v-model="detailActiveName">
|
||||
<el-tab-pane label="文件信息" name="first">
|
||||
<el-table :data="docList" style="width: 100%">
|
||||
<el-table-column label="文档名称" prop="docName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="类别" prop="docType" :show-overflow-tooltip="true" width="80" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.doc_class" :value="scope.row.docType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="负责人" prop="docPrincipals" :show-overflow-tooltip="true" width="80" />
|
||||
<el-table-column label="归属单位" align="center" prop="docRespDeptName" :show-overflow-tooltip="true" width="80" />
|
||||
<el-table-column label="来源" prop="docSource" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.doc_source" :value="scope.row.docSource"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table :data="attachmentList" style="width: 100%">
|
||||
<el-table-column label="附件名称" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
<span>{{ parseTime(scope.row.createDate) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="180" v-if="toolDetail.downloadStatus">
|
||||
@@ -54,6 +42,7 @@
|
||||
import editDocument from "../document/editDocument";
|
||||
import { Base64 } from 'js-base64';
|
||||
import iFrame from "@/components/iFrame/index"
|
||||
import { listAttachment } from "@/api/attachment/attachment";
|
||||
|
||||
export default {
|
||||
name: 'toolDetail',
|
||||
@@ -68,7 +57,7 @@
|
||||
data(){
|
||||
return{
|
||||
detailActiveName: 'first',
|
||||
docList: [],
|
||||
attachmentList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
@@ -91,7 +80,7 @@
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getDocList()
|
||||
this.getAttachmentList()
|
||||
this.getDiscussionsList()
|
||||
},
|
||||
watch: {
|
||||
@@ -101,11 +90,12 @@
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
getDocList() {
|
||||
getAttachmentList() {
|
||||
this.loading = true;
|
||||
this.queryParams.toolId = this.toolDetail.toolId
|
||||
listDocument(this.queryParams).then(response => {
|
||||
this.docList = response.rows;
|
||||
this.$set(this.queryParams,'del',"0")
|
||||
this.$set(this.queryParams,'businessId',this.toolDetail.toolId)
|
||||
listAttachment(this.queryParams).then(response => {
|
||||
this.attachmentList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
@@ -116,7 +106,7 @@
|
||||
},
|
||||
editDocumentSubmit(){
|
||||
this.open = false
|
||||
this.getDocList()
|
||||
this.getAttachmentList()
|
||||
},
|
||||
handlePriew(row){
|
||||
this.previewUrl = process.env.VUE_APP_TOOL_TECH_FILE_VIEW_API + '/onlinePreview?url=' + encodeURIComponent(Base64.encode(process.env.VUE_APP_BASE_API + row.docUrl));
|
||||
@@ -139,12 +129,15 @@
|
||||
handleDownload(row){
|
||||
let self = this
|
||||
self.loadingDownload = true
|
||||
this.$download.resource(row.docUrl);
|
||||
this.$download.resource(row.fileUrl);
|
||||
|
||||
//保存下载记录
|
||||
if(this.toolDetail.toolId){
|
||||
if(row.businessId){
|
||||
let formData = {
|
||||
toolId: this.toolDetail.toolId
|
||||
'businessId': row.businessId,
|
||||
'businessType': 'tool',
|
||||
'attId': row.id,
|
||||
'attName': row.fileOldName
|
||||
}
|
||||
addCount(formData).then(res => {
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user