diff --git a/src/views/material/archives/index.vue b/src/views/material/archives/index.vue index 5b06b64f..0451c94e 100644 --- a/src/views/material/archives/index.vue +++ b/src/views/material/archives/index.vue @@ -77,26 +77,26 @@ - + 上传 - + 下载 重命名 - + 删除 @@ -105,15 +105,15 @@
-
+
-
+ 新建文件夹 - + @@ -150,7 +150,7 @@ - @@ -264,8 +264,8 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import { getArchivesTypeListApi,getAddArchivesTypeApi,updateArchivesTypeApi,delArchivesTypeApi, getArchivesDetailsLstApi, addArchivesDetailsApi, updateArchivesDetailsApi, delArchivesDetailsApi,downloadFileApi -} from "@/api/archives/archives"; -import { imgUpLoad, fileUpLoad } from "@/api/system/upload"; +} from "@/api/archives/archives"; +import { imgUpLoad, fileUpLoad } from "@/api/system/upload"; import { downloadFile } from "@/utils/download"; import { getToken } from '@/utils/auth' export default { @@ -371,7 +371,7 @@ export default { // 是否显示弹出层(上传导入) open: false, // 弹出层标题(上传导入) - title: '上传文件', + title: '上传文件', // 设置上传的请求头部 headers: { Authorization: 'Bearer ' + getToken() }, // 上传的地址 @@ -594,7 +594,7 @@ export default { window.open(file.docUrl, windowName) } else { this.dialogVisible = true - } + } }, beforeUpload(file) { @@ -776,7 +776,7 @@ export default { openUpLoadDialog(){ this.uploadList=[] this.fileList=[] - this.upload.open=true; + this.upload.open=true; }, //文件上传-成功 handleSuccess(response, file, fileList) { @@ -793,12 +793,12 @@ export default { level:this.queryParams.level } this.uploadList.push(param) - } + } // let size = (file.size / 1024 / 1024).toFixed(2) // console.log(size) }, //文件上传删除 - handleFileRemove(file, fileList){ + handleFileRemove(file, fileList){ console.log(file) console.log(fileList) let index = this.uploadList.findIndex(item=>item.docName==file.name) @@ -810,37 +810,37 @@ export default { }, // 文件上传成功处理 handleFileSuccess(response, file, fileList) { - // this.upload.open = false + // this.upload.open = false }, // 提交上传文件 - async submitFileForm() { + async submitFileForm() { console.log(this.uploadList) - if(this.uploadList.length==0){ + if(this.uploadList.length==0){ this.$modal.msgError("请先选择上传文件"); }else{ let param = { archivesDetailsList:this.uploadList } const res = await addArchivesDetailsApi(param); - if (res.code === 200) { + if (res.code === 200) { this.$modal.msgSuccess("上传成功!"); - this.upload.open = false + this.upload.open = false this.getList() } } - - // this.$refs.upload.submit() + + // this.$refs.upload.submit() }, //取消 cancelUpload() { this.getList() this.upload.open=false - }, + }, /** 导出按钮作 */ handleExport() { let arr=[] let errorList = [] - this.ids.forEach(item=>{ + this.ids.forEach(item=>{ console.log(item) if(item.docType=='文件夹'){ errorList.push(item.detailsId) @@ -849,21 +849,21 @@ export default { }) console.log(errorList.length) if(errorList.length==0){ - downloadFileApi({'ids':arr.join(',')}).then((res) => { + downloadFileApi({'ids':arr.join(',')}).then((res) => { downloadFile({ fileName: "文件档案下载.zip", fileData: res, fileType: "text/html;charset=UTF-8", - }); + }); }) }else{ this.$modal.msgError("所选文件中包含文件夹,文件夹不能下载"); - } + } }, - + //切换展示模式 changeShowType(val){ - this.showType=val; + this.showType=val; } }, }; @@ -996,13 +996,13 @@ export default { color: #c0c4cc; } } -} +} ::v-deep .el-upload{ - width: 100%; + width: 100%; } ::v-deep .el-upload-dragger{ - width: 100%; + width: 100%; }