Commit a7d6a238 authored by youjie's avatar youjie

no message

parent 442333ca
<template> <template>
<div> <div>
<el-dialog title="批量上传附件" :visible.sync="isUploadAttachment" width="765px" <el-dialog :title="saveUploadMsg.length>0?'批量上传附件/已传'+saveUploadMsg.length:'批量上传附件'"
:visible.sync="isUploadAttachment" width="780px"
:close-on-click-modal="false" :close-on-click-modal="false"
:show-close="true" @close="cancel"> :show-close="true" @close="cancel">
...@@ -50,7 +51,8 @@ export default { ...@@ -50,7 +51,8 @@ export default {
return { return {
saveUploadMsg: [], saveUploadMsg: [],
loading: false, loading: false,
isUploadAttachment: false isUploadAttachment: false,
imgLength: 0
} }
}, },
mounted() { mounted() {
...@@ -80,6 +82,7 @@ export default { ...@@ -80,6 +82,7 @@ export default {
}, err => {}) }, err => {})
}, },
cancel() { cancel() {
this.imgLength = 0
this.saveUploadMsg = [] this.saveUploadMsg = []
this.isUploadAttachment = false this.isUploadAttachment = false
this.$emit('cancel') this.$emit('cancel')
...@@ -90,6 +93,7 @@ export default { ...@@ -90,6 +93,7 @@ export default {
// return // return
// } // }
// 1 文档 2 数据 3 图片 // 1 文档 2 数据 3 图片
if(file) this.imgLength++
let typeArr=[ let typeArr=[
{stringArr:'GIF|JPG|JPEG|PNG|BMP',type:3}, {stringArr:'GIF|JPG|JPEG|PNG|BMP',type:3},
{stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',type:1}, {stringArr:'DOCX|DOC|XLSX|XLS|PPT|PPTX|PDF',type:1},
...@@ -108,7 +112,7 @@ export default { ...@@ -108,7 +112,7 @@ export default {
let newArr = []; let newArr = [];
newArr.push(file.file) newArr.push(file.file)
let path = "/Upload/RegimentAttachment/" let path = "/Upload/RegimentAttachment/"
// this.$message.info(this.$t('tips.shangchuanzhong')) if(this.imgLength==1) this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => { this.UploadSelfFileT(path, newArr, x => {
let fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0); let fileSize = file.file.size<1024? file.file.size:(file.file.size / 1024).toFixed(0);
let SourceFileName = x.data.SourceFileName.split('.') let SourceFileName = x.data.SourceFileName.split('.')
...@@ -116,7 +120,8 @@ export default { ...@@ -116,7 +120,8 @@ export default {
DMCOPCredentials: this.domainManager().ViittoFileUrl + x.data.FilePath, DMCOPCredentials: this.domainManager().ViittoFileUrl + x.data.FilePath,
TCID: SourceFileName[0] TCID: SourceFileName[0]
}) })
this.$message.success(this.$t('tips.scchenggong')) if(this.imgLength>0) this.imgLength--
if(!this.imgLength) this.$message.success(this.$t('tips.scchenggong'))
}); });
}, },
handleRemove(index) { handleRemove(index) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment