|
@@ -12,12 +12,12 @@
|
|
|
:on-change="changes"
|
|
|
:on-progress="uploadVideoProcess"
|
|
|
:file-list="fileList">
|
|
|
-<!-- <template v-if="auth==='view'&&uploadFlag===false" #tip>-->
|
|
|
-<!-- <el-button :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- <template v-else #trigger>-->
|
|
|
-<!-- <el-button :loading="loading" type="primary" size="default"> 点击上传 </el-button> <span style="margin-left: 20px;font-size:14px;font-weight:normal;color:red;" type="primary"> 上传报销的数电发票xml文件</span>-->
|
|
|
-<!-- </template>-->
|
|
|
+ <template v-if="auth==='view'&&uploadFlag===false" #tip>
|
|
|
+ <el-button :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
|
|
|
+ </template>
|
|
|
+ <template v-else #trigger>
|
|
|
+ <el-button :loading="loading" type="primary" size="default"> 点击上传 </el-button> <span style="margin-left: 20px;font-size:14px;font-weight:normal;color:red;" type="primary"> 上传报销的数电发票xml文件</span>
|
|
|
+ </template>
|
|
|
</el-upload>
|
|
|
<div style="height: calc(100% - 80px);margin-top: 10px">
|
|
|
<!-- 进度条 -->
|
|
@@ -50,13 +50,13 @@
|
|
|
{{getSize(scope.row.size)}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column label="操作" width="200px" fixed="right" align="center">-->
|
|
|
-<!-- <template #default="scope">-->
|
|
|
-<!-- <el-button text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>-->
|
|
|
-<!-- <el-button text type="primary" key="02" icon="el-icon-delete" size="small" @click="deleteById(scope.row, scope.$index,fileList)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>-->
|
|
|
-<!-- <el-button v-if="createBy===scope.row.createBy.name" type="text" icon="el-icon-delete" size="small" @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </el-table-column>-->
|
|
|
+ <el-table-column label="操作" width="200px" fixed="right" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button text type="primary" key="01" icon="el-icon-download" size="small" @click="toHref(scope.row)" >下载</el-button>
|
|
|
+ <el-button text type="primary" key="02" icon="el-icon-delete" size="small" @click="deleteById(scope.row, scope.$index,fileList)" :disabled="auth==='view'&&delFlag === false&&createBy!==scope.row.createBy.name">删除</el-button>
|
|
|
+ <el-button v-if="createBy===scope.row.createBy.name" type="text" icon="el-icon-delete" size="small" @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>-->
|
|
@@ -368,83 +368,6 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- async changeFiles (file, fileList) {
|
|
|
- // if (file.status !== 'ready') {
|
|
|
- // return
|
|
|
- // }
|
|
|
- if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
|
|
|
- this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
|
|
|
- return
|
|
|
- }
|
|
|
- if (!exnameFix(file, '1', 'xml')) {
|
|
|
- for (let i = 0; i <this.dataListNew.length ; i++) {
|
|
|
- this.deleteById(this.dataListNew[i],i,this.dataListNew)
|
|
|
- }
|
|
|
- this.fileList = []
|
|
|
- this.dataListNew = []
|
|
|
- // this.$message.error('文件仅支持 xml 格式!')
|
|
|
- return
|
|
|
- }
|
|
|
- // this.dataListNew = []
|
|
|
- this.dataList.forEach((item) => {
|
|
|
- this.dataListNew.push(item)
|
|
|
- })
|
|
|
- var fileListNames = []
|
|
|
- for (let fileItem of this.fileList) {
|
|
|
- fileListNames.push(fileItem.name)
|
|
|
- }
|
|
|
- for (let item of fileList) {
|
|
|
- if(fileListNames.length === 0 || fileListNames.indexOf(item.name) === -1){
|
|
|
- this.fileList.push(item)
|
|
|
- }
|
|
|
-
|
|
|
- item.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
|
- item.createBy = {
|
|
|
- id: '',
|
|
|
- name: ''
|
|
|
- }
|
|
|
- item.createBy.id = this.$store.state.user.id
|
|
|
- item.createBy.name = this.$store.state.user.name
|
|
|
- var count = 0;
|
|
|
- for (let fileDataItem of this.dataListNew) {
|
|
|
- if(fileDataItem.name === item.name){
|
|
|
- count ++;
|
|
|
- }
|
|
|
- }
|
|
|
- if(count === 0){
|
|
|
- this.dataListNew.push(item)
|
|
|
- }
|
|
|
- }
|
|
|
- /*var fileListNewNames = []
|
|
|
- for (let fileItem of this.fileList) {
|
|
|
- fileListNewNames.push(fileItem.name)
|
|
|
- }
|
|
|
- for(let i = 0; i < fileList.length; i++) {
|
|
|
- let item = fileList[i]
|
|
|
-
|
|
|
- if (fileListNewNames.indexOf(item.name) > -1) {
|
|
|
- var count=0;
|
|
|
- for (let itemName of fileListNewNames) {
|
|
|
- if(itemName === item.name){
|
|
|
- count ++;
|
|
|
- }
|
|
|
- }
|
|
|
- if(count>0 && file.name === item.name){
|
|
|
- this.deleteFileinfo(file,i,fileList)
|
|
|
- }
|
|
|
- }
|
|
|
- }*/
|
|
|
- for (let item of this.dataListNew) {
|
|
|
- if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
|
|
|
- item.url = item.raw.url
|
|
|
- if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
|
|
|
- this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
|
|
|
- item.lsUrl = data
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
showFile (row) {
|
|
|
openWindowOnUrl(row)
|
|
|
},
|