|
|
|
@ -68,12 +68,12 @@ |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="school" |
|
|
|
|
label="学生账号归属" |
|
|
|
|
sortable="custom" |
|
|
|
|
min-width="180" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="realSchool" |
|
|
|
|
label="学生所属院校" |
|
|
|
|
sortable="custom" |
|
|
|
|
min-width="180" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
@ -100,13 +100,10 @@ |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column v-if="info.completeCompetitionSetup.competitionType" |
|
|
|
|
prop="captain" |
|
|
|
|
label="是否为队长" |
|
|
|
|
min-width="80" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.captain ? '否' : '是' }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="teachers" |
|
|
|
|
label="指导老师" |
|
|
|
|
min-width="200" |
|
|
|
@ -162,7 +159,7 @@ |
|
|
|
|
|
|
|
|
|
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" |
|
|
|
|
:visible.sync="addVisible" |
|
|
|
|
width="400px" |
|
|
|
|
width="440px" |
|
|
|
|
class="dialog" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
@close="closeAdd"> |
|
|
|
@ -195,6 +192,7 @@ |
|
|
|
|
:label="item.schoolName" |
|
|
|
|
:value="item.schoolId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<p style="margin-top: 10px;line-height: 1.4;font-size: 12px;">学生所属院校为学生实际院校,若为空,则默认与学生账号归属院校一致</p> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="workNumber" |
|
|
|
|
label="学生学号"> |
|
|
|
@ -243,6 +241,9 @@ |
|
|
|
|
:disabled="isAdd"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<p v-if="!isAdd" |
|
|
|
|
class="tips" |
|
|
|
|
style="margin-left: 13px">当前页面信息修改会同步修改掉学生账号信息</p> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button @click="addVisible = false">取消</el-button> |
|
|
|
@ -280,8 +281,10 @@ |
|
|
|
|
<el-dialog title="批量导入" |
|
|
|
|
:visible.sync="importVisible" |
|
|
|
|
width="24%" |
|
|
|
|
:close-on-click-modal="false"> |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
@close="cancelUpload"> |
|
|
|
|
<div style="text-align: center"> |
|
|
|
|
<template v-if="!uploadFaild"> |
|
|
|
|
<div style="margin-bottom: 10px;"> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> |
|
|
|
@ -298,7 +301,6 @@ |
|
|
|
|
competitionId: id, |
|
|
|
|
platformId: 2 |
|
|
|
|
}" |
|
|
|
|
:auto-upload="false" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
:action="info.completeCompetitionSetup.competitionType ? this.api.batchImportTeamData : this.api.batchImportPersonalData" |
|
|
|
|
:file-list="uploadList" |
|
|
|
@ -306,18 +308,14 @@ |
|
|
|
|
<el-button type="primary" |
|
|
|
|
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
|
</el-upload> |
|
|
|
|
<el-link v-if="uploadFaild" |
|
|
|
|
type="primary" |
|
|
|
|
@click="showFaild">部分数据导入失败,查看失败原因</el-link> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ uploadTips }}</p> |
|
|
|
|
<a type="primary" |
|
|
|
|
style="font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" |
|
|
|
|
@click="showFaild">部分数据导入失败,查看失败原因</a> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button size="small" |
|
|
|
|
@click="importVisible = false">取 消</el-button> |
|
|
|
|
<el-button size="small" |
|
|
|
|
type="primary" |
|
|
|
|
@click="uploadSure">确 定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -409,6 +407,7 @@ export default { |
|
|
|
|
importVisible: false, |
|
|
|
|
uploadList: [], |
|
|
|
|
uploadFaild: false, |
|
|
|
|
uploadTips: '', |
|
|
|
|
exportCode: '', |
|
|
|
|
headers: { |
|
|
|
|
token: sessionStorage.getItem("token") |
|
|
|
@ -523,13 +522,15 @@ export default { |
|
|
|
|
}, |
|
|
|
|
uploadSuccess ({ data, status }) { |
|
|
|
|
this.uploadFaild = false |
|
|
|
|
this.uploadTips = '' |
|
|
|
|
if (status === 200) { |
|
|
|
|
this.init() |
|
|
|
|
if (data.exportCode) { |
|
|
|
|
this.exportCode = data.exportCode |
|
|
|
|
this.uploadFaild = true |
|
|
|
|
util.errorMsg(data.tip, 3000) |
|
|
|
|
this.uploadTips = data.tip |
|
|
|
|
} else { |
|
|
|
|
this.init() |
|
|
|
|
util.successMsg(data.tip, 3000) |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.keyWord = '' |
|
|
|
|
} |
|
|
|
@ -551,8 +552,15 @@ export default { |
|
|
|
|
this.uploadList = fileList |
|
|
|
|
this.uploadFaild = false |
|
|
|
|
}, |
|
|
|
|
cancelUpload () { |
|
|
|
|
this.$refs.upload.abort() |
|
|
|
|
this.init() |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.keyWord = '' |
|
|
|
|
}, |
|
|
|
|
uploadSure () { |
|
|
|
|
this.$refs.upload.submit(); |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.keyWord = '' |
|
|
|
|
}, |
|
|
|
|
// 新增 |
|
|
|
|
add () { |
|
|
|
@ -572,7 +580,7 @@ export default { |
|
|
|
|
this.form = JSON.parse(JSON.stringify(row)) |
|
|
|
|
}, |
|
|
|
|
del (row) { |
|
|
|
|
this.$confirm(row.captain ? '此删除操作不可逆,是否确认删除选中项?' : '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?', "提示", { |
|
|
|
|
this.$confirm(!this.info.completeCompetitionSetup.competitionType || row.captain === '否' ? '此删除操作不可逆,是否确认删除选中项?' : '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?', "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(this.api.batchDeleteApplicants, { registrationVOS: [row] }).then(res => { |
|
|
|
@ -622,12 +630,14 @@ export default { |
|
|
|
|
hrUserInfo: { |
|
|
|
|
userId: form.userId, |
|
|
|
|
schoolId: form.schoolId, |
|
|
|
|
email: form.email |
|
|
|
|
email: form.email, |
|
|
|
|
userName: form.userName |
|
|
|
|
} |
|
|
|
|
}).then(res => { |
|
|
|
|
// 团队有更换,则调加入团队的接口 |
|
|
|
|
if (this.originForm.teamId !== form.teamId) { |
|
|
|
|
this.$post(this.api.joinCompetitionTeam, { |
|
|
|
|
schoolId: form.schoolId, |
|
|
|
|
studentAffiliatedInstitutionId: form.studentAffiliatedInstitutionId, |
|
|
|
|
accountId: form.id, |
|
|
|
|
competitionId: this.id, |
|
|
|
@ -654,6 +664,7 @@ export default { |
|
|
|
|
} else { |
|
|
|
|
// 新增人员后再调加入团队的接口 |
|
|
|
|
this.$post(this.api[this.info.completeCompetitionSetup.competitionType ? 'joinCompetitionTeam' : 'addCompetitionRegistration'], { |
|
|
|
|
schoolId: form.schoolId, |
|
|
|
|
studentAffiliatedInstitutionId: form.studentAffiliatedInstitutionId, |
|
|
|
|
accountId: form.id, |
|
|
|
|
competitionId: this.id, |
|
|
|
@ -785,11 +796,12 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 批量删除 |
|
|
|
|
batchDel () { |
|
|
|
|
if (this.multipleSelection.length) { |
|
|
|
|
this.$confirm("确定要删除吗?", "提示", { |
|
|
|
|
const list = this.multipleSelection |
|
|
|
|
if (list.length) { |
|
|
|
|
this.$confirm(this.info.completeCompetitionSetup.competitionType && list.find(e => e.captain === '是') ? '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?' : '此删除操作不可逆,是否确认删除选中项?', "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$post(this.api.batchDeleteApplicants, { registrationVOS: this.multipleSelection }).then(res => { |
|
|
|
|
this.$post(this.api.batchDeleteApplicants, { registrationVOS: list }).then(res => { |
|
|
|
|
this.getData(); |
|
|
|
|
this.$message.success("删除成功"); |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
@ -816,4 +828,8 @@ export default { |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tips { |
|
|
|
|
font-size: 12px; |
|
|
|
|
color: #e90000; |
|
|
|
|
} |
|
|
|
|
</style> |