|
|
@ -70,11 +70,21 @@ |
|
|
|
sortable="custom" |
|
|
|
sortable="custom" |
|
|
|
min-width="180" |
|
|
|
min-width="180" |
|
|
|
align="center"> |
|
|
|
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> |
|
|
|
<el-table-column prop="realSchool" |
|
|
|
<el-table-column prop="realSchool" |
|
|
|
label="学生所属院校" |
|
|
|
label="学生所属院校" |
|
|
|
min-width="180" |
|
|
|
min-width="180" |
|
|
|
align="center"> |
|
|
|
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> |
|
|
|
<el-table-column v-if="info.completeCompetitionSetup.competitionType" |
|
|
|
<el-table-column v-if="info.completeCompetitionSetup.competitionType" |
|
|
|
prop="teamName" |
|
|
|
prop="teamName" |
|
|
@ -174,6 +184,7 @@ |
|
|
|
<el-select v-model="form.schoolId" |
|
|
|
<el-select v-model="form.schoolId" |
|
|
|
filterable |
|
|
|
filterable |
|
|
|
:disabled="!isAdd" |
|
|
|
:disabled="!isAdd" |
|
|
|
|
|
|
|
@change="schoolChange" |
|
|
|
style="width: 100%"> |
|
|
|
style="width: 100%"> |
|
|
|
<el-option v-for="(item, i) in clients" |
|
|
|
<el-option v-for="(item, i) in clients" |
|
|
|
:key="i" |
|
|
|
:key="i" |
|
|
@ -181,8 +192,7 @@ |
|
|
|
:value="item.schoolId"></el-option> |
|
|
|
:value="item.schoolId"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-if="!schoolDisable" |
|
|
|
<el-form-item prop="studentAffiliatedInstitutionId" |
|
|
|
prop="studentAffiliatedInstitutionId" |
|
|
|
|
|
|
|
label="学生所属院校"> |
|
|
|
label="学生所属院校"> |
|
|
|
<el-select v-model="form.studentAffiliatedInstitutionId" |
|
|
|
<el-select v-model="form.studentAffiliatedInstitutionId" |
|
|
|
filterable |
|
|
|
filterable |
|
|
@ -293,6 +303,7 @@ |
|
|
|
<el-upload ref="upload" |
|
|
|
<el-upload ref="upload" |
|
|
|
name="file" |
|
|
|
name="file" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
accept=".xls,.xlsx" |
|
|
|
|
|
|
|
:before-upload="beforeUpload" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:on-remove="handleRemove" |
|
|
|
:on-error="uploadError" |
|
|
|
:on-error="uploadError" |
|
|
|
:on-success="uploadSuccess" |
|
|
|
:on-success="uploadSuccess" |
|
|
@ -308,6 +319,8 @@ |
|
|
|
:headers="headers"> |
|
|
|
:headers="headers"> |
|
|
|
<el-button type="primary" |
|
|
|
<el-button type="primary" |
|
|
|
class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> |
|
|
|
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> |
|
|
|
</el-upload> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-else> |
|
|
|
<template v-else> |
|
|
@ -317,6 +330,11 @@ |
|
|
|
@click="showFaild">部分数据导入失败,查看失败原因</a> |
|
|
|
@click="showFaild">部分数据导入失败,查看失败原因</a> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<span v-if="uploading" |
|
|
|
|
|
|
|
slot="footer" |
|
|
|
|
|
|
|
class="dialog-footer"> |
|
|
|
|
|
|
|
<el-button @click="cancelUpload">停止导入</el-button> |
|
|
|
|
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -416,6 +434,7 @@ export default { |
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
token: util.local.get(Setting.tokenKey) |
|
|
|
}, |
|
|
|
}, |
|
|
|
diffSchool: false, |
|
|
|
diffSchool: false, |
|
|
|
|
|
|
|
uploading: false, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
@ -527,16 +546,18 @@ export default { |
|
|
|
}).catch(res => { }) |
|
|
|
}).catch(res => { }) |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadSuccess ({ data, status }) { |
|
|
|
uploadSuccess ({ data, status }) { |
|
|
|
|
|
|
|
this.uploading = false |
|
|
|
this.uploadFaild = false |
|
|
|
this.uploadFaild = false |
|
|
|
this.uploadTips = '' |
|
|
|
this.uploadTips = '' |
|
|
|
if (status === 200) { |
|
|
|
if (status === 200) { |
|
|
|
this.init() |
|
|
|
this.init() |
|
|
|
|
|
|
|
const { tip } = data |
|
|
|
if (data.exportCode) { |
|
|
|
if (data.exportCode) { |
|
|
|
this.exportCode = data.exportCode |
|
|
|
this.exportCode = data.exportCode |
|
|
|
this.uploadFaild = true |
|
|
|
this.uploadFaild = true |
|
|
|
this.uploadTips = data.tip |
|
|
|
this.uploadTips = tip |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
util.successMsg(data.tip, 3000) |
|
|
|
util[tip.includes('5000') ? 'errorMsg' : 'successMsg'](tip, 3000) |
|
|
|
this.importVisible = false |
|
|
|
this.importVisible = false |
|
|
|
this.keyWord = '' |
|
|
|
this.keyWord = '' |
|
|
|
} |
|
|
|
} |
|
|
@ -545,12 +566,16 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadError (err, file, fileList) { |
|
|
|
uploadError (err, file, fileList) { |
|
|
|
|
|
|
|
this.uploading = false |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
message: "上传出错,请重试!", |
|
|
|
message: "上传出错,请重试!", |
|
|
|
type: "error", |
|
|
|
type: "error", |
|
|
|
center: true |
|
|
|
center: true |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
beforeUpload (file) { |
|
|
|
|
|
|
|
this.uploading = true |
|
|
|
|
|
|
|
}, |
|
|
|
beforeRemove (file, fileList) { |
|
|
|
beforeRemove (file, fileList) { |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`) |
|
|
|
return this.$confirm(`确定移除 ${file.name}?`) |
|
|
|
}, |
|
|
|
}, |
|
|
@ -559,15 +584,12 @@ export default { |
|
|
|
this.uploadFaild = false |
|
|
|
this.uploadFaild = false |
|
|
|
}, |
|
|
|
}, |
|
|
|
cancelUpload () { |
|
|
|
cancelUpload () { |
|
|
|
|
|
|
|
this.uploading = false |
|
|
|
this.$refs.upload.abort() |
|
|
|
this.$refs.upload.abort() |
|
|
|
this.init() |
|
|
|
this.init() |
|
|
|
this.importVisible = false |
|
|
|
this.importVisible = false |
|
|
|
this.keyWord = '' |
|
|
|
this.keyWord = '' |
|
|
|
}, |
|
|
|
}, |
|
|
|
uploadSure () { |
|
|
|
|
|
|
|
this.importVisible = false |
|
|
|
|
|
|
|
this.keyWord = '' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 新增 |
|
|
|
// 新增 |
|
|
|
add () { |
|
|
|
add () { |
|
|
|
this.diffSchool = false |
|
|
|
this.diffSchool = false |
|
|
@ -601,6 +623,10 @@ export default { |
|
|
|
.catch(() => { |
|
|
|
.catch(() => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 学校选择回调 |
|
|
|
|
|
|
|
schoolChange () { |
|
|
|
|
|
|
|
if (!this.form.studentAffiliatedInstitutionId) this.form.studentAffiliatedInstitutionId = this.form.schoolId |
|
|
|
|
|
|
|
}, |
|
|
|
// 学号输入完回调。学校和学号都输入完后,调这个接口查询是否有存在的学生,如果有,才能继续输入,如果不能,不让添加 |
|
|
|
// 学号输入完回调。学校和学号都输入完后,调这个接口查询是否有存在的学生,如果有,才能继续输入,如果不能,不让添加 |
|
|
|
workNumberChange () { |
|
|
|
workNumberChange () { |
|
|
|
const { form } = this |
|
|
|
const { form } = this |
|
|
@ -638,6 +664,7 @@ export default { |
|
|
|
hrUserAccount: { |
|
|
|
hrUserAccount: { |
|
|
|
...form, |
|
|
|
...form, |
|
|
|
id: form.id, |
|
|
|
id: form.id, |
|
|
|
|
|
|
|
lastTimeInstitutionId: this.originForm.studentAffiliatedInstitutionId |
|
|
|
}, |
|
|
|
}, |
|
|
|
hrUserInfo: { |
|
|
|
hrUserInfo: { |
|
|
|
userId: form.userId, |
|
|
|
userId: form.userId, |
|
|
|