|
|
|
@ -41,8 +41,7 @@ |
|
|
|
|
v-auth="'/match/list:管理:报名人员:批量导出'">批量导出</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="batchDel" |
|
|
|
|
round |
|
|
|
|
v-auth="'/match:管理:报名人员:导出'">批量删除</el-button> |
|
|
|
|
round>批量删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -68,12 +67,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> |
|
|
|
@ -99,13 +98,11 @@ |
|
|
|
|
min-width="140" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="是否为队长" |
|
|
|
|
<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" |
|
|
|
@ -130,10 +127,13 @@ |
|
|
|
|
align="center" |
|
|
|
|
width="270"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button v-if="scope.row.identification" |
|
|
|
|
<el-button v-if="scope.row.identification && schoolId === scope.row.schoolId" |
|
|
|
|
type="text" |
|
|
|
|
@click="edit(scope.row)" |
|
|
|
|
v-auth="'/match/list:管理:报名人员:编辑'">编辑</el-button> |
|
|
|
|
<el-button v-else |
|
|
|
|
type="text" |
|
|
|
|
@click="edit(scope.row, 1)">查看</el-button> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="del(scope.row)">删除</el-button> |
|
|
|
|
<template v-if="info.releaseType"> |
|
|
|
@ -160,15 +160,16 @@ |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" |
|
|
|
|
<el-dialog :title="(diffSchool ? '查看' : (!isAdd ? '编辑' : '新增')) + '参赛人员'" |
|
|
|
|
:visible.sync="addVisible" |
|
|
|
|
width="400px" |
|
|
|
|
width="440px" |
|
|
|
|
class="dialog" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
@close="closeAdd"> |
|
|
|
|
<el-form ref="form" |
|
|
|
|
:model="form" |
|
|
|
|
:rules="rules" |
|
|
|
|
:disabled="diffSchool" |
|
|
|
|
label-width="110px" |
|
|
|
|
style='margin-right: 10px;'> |
|
|
|
|
<el-form-item v-if="!schoolDisable" |
|
|
|
@ -195,6 +196,8 @@ |
|
|
|
|
:label="item.schoolName" |
|
|
|
|
:value="item.schoolId"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
<p v-if="!diffSchool" |
|
|
|
|
style="margin-top: 10px;line-height: 1.4;font-size: 12px;">学生所属院校为学生实际院校,若为空,则默认与学生账号归属院校一致</p> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="workNumber" |
|
|
|
|
label="学生学号"> |
|
|
|
@ -243,6 +246,9 @@ |
|
|
|
|
:disabled="isAdd"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<p v-if="!isAdd && schoolId === form.schoolId" |
|
|
|
|
class="tips" |
|
|
|
|
style="margin-left: 13px">当前页面信息修改会同步修改掉学生账号信息</p> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button @click="addVisible = false">取消</el-button> |
|
|
|
@ -280,8 +286,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 +306,6 @@ |
|
|
|
|
competitionId: id, |
|
|
|
|
platformId: 1 |
|
|
|
|
}" |
|
|
|
|
:auto-upload="false" |
|
|
|
|
:on-exceed="handleExceed" |
|
|
|
|
:action="info.completeCompetitionSetup.competitionType ? this.api.batchImportTeamData : this.api.batchImportPersonalData" |
|
|
|
|
:file-list="uploadList" |
|
|
|
@ -306,18 +313,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-bottom: 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> |
|
|
|
@ -331,6 +334,7 @@ export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
token: util.local.get(Setting.tokenKey), |
|
|
|
|
schoolId: this.$store.state.user.schoolId, |
|
|
|
|
id: +this.$route.query.id, |
|
|
|
|
info: { |
|
|
|
|
completeCompetitionSetup: {} |
|
|
|
@ -410,10 +414,12 @@ export default { |
|
|
|
|
importVisible: false, |
|
|
|
|
uploadList: [], |
|
|
|
|
uploadFaild: false, |
|
|
|
|
uploadTips: '', |
|
|
|
|
exportCode: '', |
|
|
|
|
headers: { |
|
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
|
}, |
|
|
|
|
diffSchool: false, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -526,13 +532,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 = '' |
|
|
|
|
} |
|
|
|
@ -554,11 +562,19 @@ 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 () { |
|
|
|
|
this.diffSchool = false |
|
|
|
|
this.notExit = 0 |
|
|
|
|
this.isAdd = true |
|
|
|
|
this.addVisible = true |
|
|
|
@ -573,9 +589,10 @@ export default { |
|
|
|
|
row.id = row.accountId |
|
|
|
|
this.originForm = JSON.parse(JSON.stringify(row)) |
|
|
|
|
this.form = JSON.parse(JSON.stringify(row)) |
|
|
|
|
this.diffSchool = row.schoolId !== this.schoolId // 编辑的学生不是跟当前用户同一个学校的话,不予编辑,变为查看 |
|
|
|
|
}, |
|
|
|
|
del (row) { |
|
|
|
|
this.$confirm(row.captain ? '此删除操作不可逆,是否确认删除选中项?' : '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?', "提示", { |
|
|
|
|
this.$confirm(!this.info.completeCompetitionSetup.competitionType || row.captain === '否' ? '此删除操作不可逆,是否确认删除选中项?' : '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?', "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
@ -629,12 +646,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, |
|
|
|
@ -661,6 +680,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, |
|
|
|
@ -792,11 +812,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() |
|
|
|
@ -823,4 +844,8 @@ export default { |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.tips { |
|
|
|
|
font-size: 12px; |
|
|
|
|
color: #e90000; |
|
|
|
|
} |
|
|
|
|
</style> |