Browse Source

导入

master
zhangli 1 year ago
parent
commit
21a1e163de
  1. 25
      src/components/ImportForm/src/ImportForm.vue

25
src/components/ImportForm/src/ImportForm.vue

@ -167,17 +167,20 @@ const submitFormSuccess = (response: any) => {
} }
// //
const data = response.data const data = response.data
let text = '上传成功数量:' + data.createUsernames.length + ';' const create = response.data.importResult[0]
for (let username of data.createUsernames) { const update = response.data.importResult[1]
text += '< ' + username + ' >' const failure = response.data.importResult[2]
} let text = '上传成功数量:' + data[create].length + ';'
text += '更新成功数量:' + data.updateUsernames.length + ';' for (let name of data[create]) {
for (const username of data.updateUsernames) { text += '< ' + name + ' >'
text += '< ' + username + ' >' }
} text += '更新成功数量:' + data[update].length + ';'
text += '更新失败数量:' + Object.keys(data.failureUsernames).length + ';' for (const name of data[update]) {
for (const username in data.failureUsernames) { text += '< ' + name + ' >'
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) message.alert(text)

Loading…
Cancel
Save