From 21a1e163de0d8de114667a4ab40176d00eb3ac9d Mon Sep 17 00:00:00 2001 From: zhangli <2235006734@qq.com> Date: Thu, 12 Oct 2023 09:50:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ImportForm/src/ImportForm.vue | 21 +++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/ImportForm/src/ImportForm.vue b/src/components/ImportForm/src/ImportForm.vue index 3ee56dedb..c85a619c5 100644 --- a/src/components/ImportForm/src/ImportForm.vue +++ b/src/components/ImportForm/src/ImportForm.vue @@ -167,17 +167,20 @@ const submitFormSuccess = (response: any) => { } // 拼接提示语 const data = response.data - let text = '上传成功数量:' + data.createUsernames.length + ';' - for (let username of data.createUsernames) { - text += '< ' + username + ' >' + const create = response.data.importResult[0] + const update = response.data.importResult[1] + const failure = response.data.importResult[2] + let text = '上传成功数量:' + data[create].length + ';' + for (let name of data[create]) { + text += '< ' + name + ' >' } - text += '更新成功数量:' + data.updateUsernames.length + ';' - for (const username of data.updateUsernames) { - text += '< ' + username + ' >' + text += '更新成功数量:' + data[update].length + ';' + for (const name of data[update]) { + text += '< ' + name + ' >' } - text += '更新失败数量:' + Object.keys(data.failureUsernames).length + ';' - for (const username in data.failureUsernames) { - text += '< ' + username + ': ' + data.failureUsernames[username] + ' >' + text += '更新失败数量:' + Object.keys(data[failure]).length + ';' + for (const name in data[failure]) { + text += '< ' + name + ': ' + data[failure][name] + ' >' } message.alert(text)