From 4b42ec4cf0fd085752b563b146aed696098b3d3a Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 03 七月 2023 19:13:17 +0800 Subject: [PATCH] 修改referDataGrid方法 --- Source/UBCS-WEB/src/components/BatchImport/index.vue | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue index b517e50..1d9c488 100644 --- a/Source/UBCS-WEB/src/components/BatchImport/index.vue +++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue @@ -84,7 +84,7 @@ import { downloadHistoryImportTemplate, downloadErrorFile, - getHistoryLeftTree, + importDataShow, downloadBatchImportApplyTemplate, downloadBatchApplyCodeTemplate, } from "../../api/batchImport/index"; @@ -208,6 +208,7 @@ }, methods: { async beforeUpload(file) { + console.log(file, 'file'); const fileType = file.name.split(".").pop(); if (fileType !== "xlsx" && fileType !== "xls") { // 涓婁紶鏍煎紡涓嶇鍚堣姹傦紝鎻愮ず閿欒淇℃伅骞跺彇娑堜笂浼� @@ -243,6 +244,11 @@ }); }, onSuccess(res) { + if (Object.keys(res.data).length === 0) { + this.$message.success(this.title + '瀵煎叆鎴愬姛锛�') + this.dialogVisible = false + return + } let fileName = res.data.filePath.split("/").pop(); if (res.data.fileOid) { this.$message.error("璇蜂笅杞介敊璇俊鎭枃浠惰繘琛屾煡鐪嬶紒"); @@ -252,7 +258,7 @@ } if (res.data.redisUuid) { this.redisOid = res.data.redisUuid; - getHistoryLeftTree(res.data.redisUuid).then((res) => { + importDataShow(res.data.redisUuid).then((res) => { this.leftTree = res.obj.map((item) => { return { ...item.codeClassifyTemplateVO, @@ -264,6 +270,7 @@ } }, uploadChange(file) { + console.log(file, 'file', file.status === "success"); if (file.status === "success" || file.status === "error") { this.pageLoading.close(); } -- Gitblit v1.9.3