Commit 4faf9666 authored by xioln's avatar xioln

班组定义bug

parent 79fb0d91
......@@ -82,36 +82,36 @@ export default {
}
}
try {
const post = await this.$api.searchApi('DxPostMemberLink', params)
if (post.items.content.length) {
const postList = post.items.content[0]
tableDataList.push({
dxPost: postList.source,
dxUserInfo: user,
dxUserInfoId: user.id,
isSkillLeader: form.isSkillLeader,
postValidity: form.postValidity,
remark: form.remark,
sealNo: form.sealNo
})
} else {
tableDataList.push({
dxUserInfo: user,
dxUserInfoId: user.id,
isSkillLeader: form.isSkillLeader,
postValidity: form.postValidity,
remark: form.remark,
sealNo: form.sealNo
})
}
// 判断是否是最后一个用户
if (i === users.length - 1) {
this.$emit('submitEvent', { formData: tableDataList })
}
await this.$api.searchApi('DxPostMemberLink', params).then(post => {
if (post.items.content.length) {
const postList = post.items.content[0]
tableDataList.push({
dxPost: postList.source,
dxUserInfo: user,
dxUserInfoId: user.id,
isSkillLeader: form.isSkillLeader,
postValidity: form.postValidity,
remark: form.remark,
sealNo: form.sealNo
})
} else {
tableDataList.push({
dxUserInfo: user,
dxUserInfoId: user.id,
isSkillLeader: form.isSkillLeader,
postValidity: form.postValidity,
remark: form.remark,
sealNo: form.sealNo
})
}
})
} catch (error) {
console.error('Error fetching data for user:', user.id, error)
}
}))
this.$nextTick(() => {
this.$emit('submitEvent', { formData: tableDataList })
})
}
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment