|
|
|
@ -30,11 +30,7 @@ |
|
|
|
|
@click="autoAllocation">自动分配阶段成员</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
round |
|
|
|
|
@click="batchImport"> |
|
|
|
|
<i v-if="uploading" |
|
|
|
|
class="el-icon-loading"></i> |
|
|
|
|
{{ uploading ? '正在' : '' }}导入 |
|
|
|
|
</el-button> |
|
|
|
|
@click="batchImport">导入</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
round |
|
|
|
|
@click="add" |
|
|
|
@ -75,11 +71,21 @@ |
|
|
|
|
sortable="custom" |
|
|
|
|
min-width="180" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.school }} |
|
|
|
|
<span v-if="scope.row.schoolStatus" |
|
|
|
|
style="color: #f00">(已删除)</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="realSchool" |
|
|
|
|
label="学生所属院校" |
|
|
|
|
min-width="180" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.realSchool }} |
|
|
|
|
<span v-if="scope.row.realSchoolStatus" |
|
|
|
|
style="color: #f00">(已删除)</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column v-if="info.completeCompetitionSetup.competitionType" |
|
|
|
|
prop="teamName" |
|
|
|
@ -317,6 +323,8 @@ |
|
|
|
|
<el-button type="primary" |
|
|
|
|
:loading="uploading" |
|
|
|
|
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
|
<div slot="tip" |
|
|
|
|
class="el-upload__tip">建议文件数据在5000条以内,导入5000名学生大致需要10分钟</div> |
|
|
|
|
</el-upload> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
@ -324,16 +332,12 @@ |
|
|
|
|
<p type="primary" |
|
|
|
|
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" |
|
|
|
|
@click="showFaild">部分数据导入失败,查看失败原因</p> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="uploadFaild = false">重新上传</el-button> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
<span v-if="uploading" |
|
|
|
|
slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button @click="cancelUpload">取消上传</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="backstageUpload">后台上传</el-button> |
|
|
|
|
<el-button @click="cancelUpload">停止导入</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
</div> |
|
|
|
@ -517,8 +521,9 @@ export default { |
|
|
|
|
|
|
|
|
|
// 批量导入 |
|
|
|
|
batchImport () { |
|
|
|
|
this.isBackstage = 0 |
|
|
|
|
this.importVisible = true |
|
|
|
|
this.uploadList = [] |
|
|
|
|
this.uploadFaild = false |
|
|
|
|
}, |
|
|
|
|
// 模板下载 |
|
|
|
|
download () { |
|
|
|
@ -546,12 +551,13 @@ export default { |
|
|
|
|
this.uploadTips = '' |
|
|
|
|
if (status === 200) { |
|
|
|
|
this.init() |
|
|
|
|
const { tip } = data |
|
|
|
|
if (data.exportCode) { |
|
|
|
|
this.exportCode = data.exportCode |
|
|
|
|
this.uploadFaild = true |
|
|
|
|
this.uploadTips = data.tip |
|
|
|
|
this.uploadTips = tip |
|
|
|
|
} else { |
|
|
|
|
util.successMsg(data.tip, 3000) |
|
|
|
|
util[tip.includes('5000') ? 'errorMsg' : 'successMsg'](tip, 3000) |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.keyWord = '' |
|
|
|
|
} |
|
|
|
@ -560,7 +566,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
uploadError (err, file, fileList) { |
|
|
|
|
console.log("🚀 ~ uploadError ~ err:", err) |
|
|
|
|
this.uploading = false |
|
|
|
|
this.$message({ |
|
|
|
|
message: "上传出错,请重试!", |
|
|
|
@ -579,14 +584,11 @@ export default { |
|
|
|
|
this.uploadFaild = false |
|
|
|
|
}, |
|
|
|
|
cancelUpload () { |
|
|
|
|
if (!this.isBackstage) { |
|
|
|
|
this.uploadList = [] |
|
|
|
|
this.$refs.upload.abort() |
|
|
|
|
this.uploading = false |
|
|
|
|
this.$refs.upload.abort() |
|
|
|
|
this.keyWord = '' |
|
|
|
|
this.init() |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.keyWord = '' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 后台上传 |
|
|
|
|
backstageUpload () { |
|
|
|
@ -661,6 +663,7 @@ export default { |
|
|
|
|
hrUserAccount: { |
|
|
|
|
...form, |
|
|
|
|
id: form.id, |
|
|
|
|
lastTimeInstitutionId: this.originForm.studentAffiliatedInstitutionId |
|
|
|
|
}, |
|
|
|
|
hrUserInfo: { |
|
|
|
|
userId: form.userId, |
|
|
|
|