diff --git a/src/views/modules/base/residentManagement/veteran/veteran.vue b/src/views/modules/base/residentManagement/veteran/veteran.vue index 89b50e0cb..ecbfb1431 100644 --- a/src/views/modules/base/residentManagement/veteran/veteran.vue +++ b/src/views/modules/base/residentManagement/veteran/veteran.vue @@ -822,33 +822,33 @@ export default { async uploadHttpRequest(file) { this.$message({ - showClose: true, - dangerouslyUseHTMLString: true, - message: - "导入中,请到系统管理-导入记录中查看进度", - duration: 3000, - }); - let than = this; - document.getElementById("clickA").addEventListener("click", function () { - than.$router.replace("/main/importRecord-index"); - }); - const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 - formData.append("file", file.file); //添加文件对象 - await this.$http - .post("/actual/base/resiCategorized/veteran/import", formData) - .then((res) => { - console.log("res-up", res); - if (res.data.code == 0 && res.data.msg == "success") { - this.$message.success("导入成功"); - this.getTableData(); - this.$refs.upload.clearFiles(); - } else this.$message.error(res.data.msg); - }) - .catch((err) => { - console.log("失败", err); - file.onError(); //上传失败的文件会从文件列表中删除 - // this.$message.error('导入失败') + showClose: true, + dangerouslyUseHTMLString: true, + message: + "导入中,请到系统管理-导入记录中查看进度", + duration: 3000, + }); + let than = this; + document.getElementById("clickA").addEventListener("click", function () { + than.$router.replace("/main/importRecord-index"); }); + const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 + formData.append("file", file.file); //添加文件对象 + formData.append("fileMode",'VETERAN'); + await this.$http + .post("/actual/base/importExcelData/extractExcelHead", formData) + .then((res) => { + const { metaListData, fileCode, msg } = res.data.data; + this.dataList = metaListData; + // 相等于在for循环中写filter过滤,这样写能够以 O(1) 的时间复杂度获取 itemGroupId 匹配的元素。 + this.importCode = fileCode; + this.handleComfirmUpload() + }) + .catch((err) => { + console.log("失败", err); + file.onError(); //上传失败的文件会从文件列表中删除 + // this.$message.error('导入失败') + });// }, // 导出 async handleExport() { diff --git a/src/views/modules/base/residentManagement/volunteer/volunteer.vue b/src/views/modules/base/residentManagement/volunteer/volunteer.vue index 03a6a33fe..1a6a9a542 100644 --- a/src/views/modules/base/residentManagement/volunteer/volunteer.vue +++ b/src/views/modules/base/residentManagement/volunteer/volunteer.vue @@ -612,33 +612,33 @@ export default { async uploadHttpRequest(file) { this.$message({ - showClose: true, - dangerouslyUseHTMLString: true, - message: - "导入中,请到系统管理-导入记录中查看进度", - duration: 3000, - }); - let than = this; - document.getElementById("clickA").addEventListener("click", function () { - than.$router.replace("/main/importRecord-index"); - }); - const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 - formData.append("file", file.file); //添加文件对象 - await this.$http - .post("/actual/base/resiCategorized/volunteer/import", formData) - .then((res) => { - console.log("res-up", res); - if (res.data.code == 0 && res.data.msg == "success") { - this.$message.success("导入成功"); - this.getTableData(); - this.$refs.upload.clearFiles(); - } else this.$message.error(res.data.msg); - }) - .catch((err) => { - console.log("失败", err); - file.onError(); //上传失败的文件会从文件列表中删除 - // this.$message.error('导入失败') + showClose: true, + dangerouslyUseHTMLString: true, + message: + "导入中,请到系统管理-导入记录中查看进度", + duration: 3000, + }); + let than = this; + document.getElementById("clickA").addEventListener("click", function () { + than.$router.replace("/main/importRecord-index"); }); + const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 + formData.append("file", file.file); //添加文件对象 + formData.append("fileMode",'VOLUNTEER'); + await this.$http + .post("/actual/base/importExcelData/extractExcelHead", formData) + .then((res) => { + const { metaListData, fileCode, msg } = res.data.data; + this.dataList = metaListData; + // 相等于在for循环中写filter过滤,这样写能够以 O(1) 的时间复杂度获取 itemGroupId 匹配的元素。 + this.importCode = fileCode; + this.handleComfirmUpload() + }) + .catch((err) => { + console.log("失败", err); + file.onError(); //上传失败的文件会从文件列表中删除 + // this.$message.error('导入失败') + });// }, // 搜索事件 handleSearch(val) { diff --git a/src/views/modules/communityParty/partyOrg/orgTree.vue b/src/views/modules/communityParty/partyOrg/orgTree.vue index acf30db19..a523a0c34 100644 --- a/src/views/modules/communityParty/partyOrg/orgTree.vue +++ b/src/views/modules/communityParty/partyOrg/orgTree.vue @@ -198,9 +198,7 @@ export default { }); }, rowClassName(row, rowIndex) { - console.log(row); if (row.row.childrenQty == 0) { - console.log(row); return 'no-expand'; } return '';