|
@@ -55,7 +55,7 @@
|
|
|
<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>
|
|
|
+<!-- <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>
|
|
@@ -357,15 +357,20 @@
|
|
|
async changes (file, fileList) {
|
|
|
this.uploadKey = Math.random()
|
|
|
console.log(fileList)
|
|
|
- /*for (let i = 0; i < fileList.length; i++) {
|
|
|
- if (fileList[i].lsUrl) {
|
|
|
+ for (let i = 0; i < fileList.length; i++) {
|
|
|
+ var fileItem = fileList[i];
|
|
|
+ if(fileList[i].raw !== undefined && fileList[i].raw !== null && fileList[i].raw !== {}){
|
|
|
+ fileItem = fileList[i].raw;
|
|
|
+ }
|
|
|
+ const isXml = fileItem.type === 'text/xml'; // 假设只接受 XML 文件
|
|
|
+ if (!isXml) {
|
|
|
console.log("删除该文件")
|
|
|
//fileList[i].remove()
|
|
|
fileList.splice(i, 1);
|
|
|
// Since the element is removed, decrease the index by 1 to adjust for the removed element
|
|
|
i--;
|
|
|
}
|
|
|
- }*/
|
|
|
+ }
|
|
|
this.uploadDelFlag = false;
|
|
|
// if (file.status !== 'ready') {
|
|
|
// return
|