赛事人员导入等

master
yujialong 8 months ago
parent 108c086f7a
commit 8d3cba7de7
  1. 1
      src/api/index.js
  2. BIN
      src/assets/img/entry.png
  3. 2
      src/layouts/header/index.vue
  4. 278
      src/pages/course/preview/index.vue
  5. 8
      src/pages/match/list/index.vue
  6. 155
      src/pages/match/manage/matchSignup.vue
  7. 3
      src/setting.js

@ -220,6 +220,7 @@ export default {
batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`,
batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`,
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,
batchDeleteApplicants: `competition/competition/registration/batchDeleteApplicants`,
competionPersonTemplate: `https://huoran.oss-cn-shenzhen.aliyuncs.com/%E6%95%99%E5%B8%88%E7%AB%AF%E4%B8%AA%E4%BA%BA%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 教师端个人报名人员模板
competionTeamTemplate: `https://huoran.oss-cn-shenzhen.aliyuncs.com/%E6%95%99%E5%B8%88%E7%AB%AF%E5%9B%A2%E9%98%9F%E8%B5%9B%E6%8A%A5%E5%90%8D%E4%BA%BA%E5%91%98%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 教师端团队报名人员导入模板

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -104,7 +104,7 @@ export default {
this.getSystemDetail();
this.getUserDetail();
this.getNotice()
this.heartbeatDetection()
Setting.isPro && this.heartbeatDetection()
},
methods: {
...mapMutations("user", [

@ -1,6 +1,6 @@
<template>
<!-- 课程预览 -->
<div>
<div class="wrap">
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
@ -9,9 +9,6 @@
</div>
</el-card>
<el-card shadow="hover"
class="m-b-20"
style="background: none;">
<div class="flex">
<div class="cover"
:class="{'is-word': showMask1}">
@ -95,7 +92,27 @@
:key="i"
@click="preview(section, item.name)">
<p class="sectionName"
:class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p>
:class="{active: curLink === `${item.name}${section.name}`}">
<img v-if="section.fileType === 'pptx'"
src="@/assets/img/exts/ppt.png"
alt="">
<img v-else-if="section.fileType === 'mp4'"
src="@/assets/img/exts/video.png"
alt="">
<img v-else-if="section.fileType === 'doc' || section.fileType === 'docx'"
src="@/assets/img/exts/word.png"
alt="">
<img v-else-if="section.fileType === 'txt'"
src="@/assets/img/exts/txt.png"
alt="">
<img v-else-if="section.fileType === 'pdf'"
src="@/assets/img/exts/pdf.png"
alt="">
<img v-else
src="@/assets/img/exts/pic.png"
alt="">
{{ section.name }}
</p>
</div>
</div>
</div>
@ -104,7 +121,6 @@
</div>
</div>
</div>
</el-card>
</div>
</template>
@ -285,30 +301,42 @@ export default {
</script>
<style lang="scss" scoped>
.wrap {
padding: 0 200px;
}
$height: 700px;
.video_wid,
.cover {
position: relative;
width: 76%;
max-width: 1400px;
height: $height !important;
border: 0;
}
.page {
/deep/.des {
overflow: auto;
div,
p,
span {
font-family: PingFangSC-Regular !important;
}
}
}
.l-title {
font-size: 17px;
}
.cover {
background-color: #252528;
img {
border-radius: 8px;
}
&.is-word {
overflow: hidden;
}
}
.fileIframe {
height: $height !important;
}
.video_wid,
.inner {
width: 100%;
@ -316,49 +344,100 @@ $height: 700px;
border: 0;
overflow: auto;
}
.cover.is-word {
.inner {
height: calc(100% + 38px) !important;
margin-top: -38px;
}
}
.video_wid:focus {
outline: none;
}
.catalog {
margin-left: 40px;
width: 296px;
padding: 16px;
margin-left: 12px;
background-color: #252528;
.renew {
width: 100%;
margin-bottom: 16px;
font-size: 17px;
}
.entry {
display: block;
width: 100%;
height: 34px;
margin-bottom: 16px;
font-size: 17px;
color: #fff;
text-align: center;
line-height: 34px;
background: url(../../../assets/img/entry.png) 0 0/100% 100% no-repeat;
cursor: pointer;
&:hover {
opacity: 0.9;
}
}
.types {
display: flex;
margin: 15px 0;
.item {
display: inline-flex;
justify-content: center;
align-items: center;
width: 120px;
height: 40px;
color: #fff;
background-color: #4e4e4e;
border-radius: 4px;
cursor: pointer;
&:first-child {
margin-right: 10px;
}
&:hover {
background-color: #377be3;
}
&.active {
background-color: $main-color;
}
}
.icon {
margin-right: 5px;
font-size: 18px;
}
}
}
.list {
height: $height;
height: calc(700px - 82px);
overflow-y: auto;
padding: 24px 16px;
background: #fff;
.title {
margin-bottom: 8px;
color: rgba(0, 0, 0, 0.85);
font-size: 20px;
margin-bottom: 11px;
color: #fff;
font-size: 16px;
}
.pro-title {
margin-bottom: 5px;
color: #fff;
font-size: 12px;
}
/deep/.el-progress-bar {
width: 92%;
}
/deep/.el-progress__text {
color: #fff;
}
.desc-wrap {
position: relative;
.desc {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
font-size: 12px;
color: #fff;
line-height: 22px;
@include mul-ellipsis(2);
&.active {
display: block;
overflow: visible;
}
}
.arrow {
position: absolute;
bottom: 2px;
@ -367,62 +446,79 @@ $height: 700px;
justify-content: space-between;
width: 46px;
background-color: #fff;
span {
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
}
img {
width: 16px;
cursor: pointer;
}
&.active {
span {
opacity: 0;
}
img {
transform: rotate(180deg);
}
}
}
}
.chapters {
margin-top: 16px;
max-height: calc(100% - 53px);
overflow: auto;
}
.chapter {
margin-bottom: 20px;
}
.chapterName {
color: rgba(0, 0, 0, 0.85);
font-size: 16px;
color: #fff;
font-size: 14px;
}
.section {
padding: 5px 15px;
margin-top: 8px;
background: rgba(0, 0, 0, 0.02);
margin-top: 12px;
background-color: #121214;
}
.sectionName {
margin: 10px 0;
font-size: 14px;
color: rgba(0, 0, 0, 0.65);
position: relative;
padding-right: 15px;
margin: 12px 0;
font-size: 12px;
color: #999;
cursor: pointer;
@include ellipsis;
img {
margin-right: 8px;
}
.icon {
position: absolute;
right: 0;
font-size: 14px;
color: #00c935;
}
.circle {
width: 14px;
height: 14px;
border-radius: 50%;
border: 1px solid #ccc;
}
&.active {
color: #9278ff;
color: #fff;
}
}
}
.buy {
text-align: center;
.tips {
margin-bottom: 10px;
font-size: 14px;
}
img {
width: 85%;
}
}
.el-image-viewer__wrapper {
transform: translateY(-10px);
transition: transform 0.5s;
@ -431,23 +527,19 @@ $height: 700px;
transform: translateY(0);
}
}
.el-image-viewer__close {
z-index: 2000;
top: 15px;
right: 15px;
&.doc-close {
i {
// color: #000 !important;
color: #000 !important;
}
}
}
.list::-webkit-scrollbar {
width: 4px;
}
.list::-webkit-scrollbar-thumb {
border-radius: 10px;
background: rgba(0, 0, 0, 0.06);
@ -458,7 +550,6 @@ $height: 700px;
position: absolute;
background-color: rgb(57, 58, 61);
}
.word-mask {
z-index: 9;
position: absolute;
@ -467,7 +558,6 @@ $height: 700px;
width: 100%;
background-color: rgb(243, 242, 241);
}
.word-mask1 {
z-index: 9;
position: absolute;
@ -476,13 +566,11 @@ $height: 700px;
width: 100%;
background-color: #185abd;
}
.word-mask2 {
z-index: 9;
position: absolute;
background-color: transparent;
}
.excel-mask1 {
z-index: 9;
position: absolute;
@ -491,29 +579,30 @@ $height: 700px;
width: 60%;
background-color: #107c41;
}
/deep/.pdf-dia {
border-radius: 0 !important;
.el-dialog__header {
display: none;
}
.el-dialog__body {
padding: 0;
}
.el-dialog__headerbtn {
top: 10px;
.el-dialog__close {
color: #fff;
font-size: 16px;
}
}
}
.pdf {
position: relative;
.full {
position: absolute;
top: 7px;
right: 10px;
cursor: pointer;
}
.arrow {
padding: 10px 0;
display: flex;
@ -522,17 +611,78 @@ $height: 700px;
font-size: 16px;
color: #fff;
background-color: #333;
.turn {
margin: 0 10px;
font-size: 18px;
cursor: pointer;
}
}
.pdf-wrap {
width: 80%;
margin: 0 auto;
}
}
/deep/.project-dia {
.el-dialog__body {
padding: 28px 32px;
}
}
.projects {
display: flex;
flex-wrap: wrap;
max-height: 400px;
overflow: auto;
li {
display: inline-flex;
align-items: center;
width: 238px;
padding: 16px;
margin: 0 20px 20px 0;
background-color: #f6f8fa;
border-radius: 16px;
cursor: pointer;
&:hover {
span {
color: #007eff;
}
}
&:nth-child(3n) {
margin-right: 0;
}
&.active {
background-color: #f2f7ff;
span {
color: #3988ff;
}
}
}
span {
max-width: 140px;
margin-left: 14px;
font-size: 14px;
color: #333;
}
}
.tabs {
display: flex;
align-items: center;
margin: 10px 0;
.item {
padding: 0 10px;
margin-right: 16px;
font-size: 16px;
text-align: center;
color: #333;
line-height: 50px;
border-bottom: 3px solid transparent;
cursor: pointer;
&.active {
color: #007eff;
border-color: #007eff;
}
}
}
.tab-content {
width: calc(100% - 308px);
}
</style>

@ -91,6 +91,14 @@
<el-table-column prop="competitionName"
label="竞赛名称"
align="center"></el-table-column>
<el-table-column prop="name"
label="竞赛类型"
width="90"
align="center">
<template slot-scope="scope">
{{ scope.row.setup ? (scope.row.setup.competitionType ? '团队赛' : '个人赛') : '' }}
</template>
</el-table-column>
<el-table-column prop="applicantNum"
label="报名人数"
align="center"

@ -6,12 +6,12 @@
<ul class="filter">
<li>
<label>搜索</label>
<el-input placeholder="请输入姓名/手机号/学号"
<el-input :placeholder="'请输入姓名、手机号、' + (info.completeCompetitionSetup.competitionType ? '团队名称、' : '') + '学号、学校'"
prefix-icon="el-icon-search"
v-model="keyword"
clearable
size="mini"
style="width: 250px"></el-input>
style="width: 350px"></el-input>
</li>
<li v-if="info.releaseType">
<label>参赛人员状态</label>
@ -25,6 +25,9 @@
</li>
</ul>
<div>
<el-button type="primary"
round
@click="autoAllocation">自动分配阶段成员</el-button>
<el-button type="primary"
round
@click="batchImport">导入</el-button>
@ -36,6 +39,10 @@
round
@click="exportAll"
v-auth="'/match/list:管理:报名人员:批量导出'">批量导出</el-button>
<el-button type="primary"
@click="batchDel"
round
v-auth="'/match:管理:报名人员:导出'">批量删除</el-button>
</div>
</div>
@ -60,31 +67,75 @@
</template>
</el-table-column>
<el-table-column prop="school"
label="学校"
sortable="custom">
label="学生账号归属"
min-width="180"
align="center">
</el-table-column>
<el-table-column prop="realSchool"
label="学生所属院校"
sortable="custom"
min-width="180"
align="center">
</el-table-column>
<el-table-column v-if="info.completeCompetitionSetup.competitionType"
prop="teamName"
label="团队名称"
sortable="custom">
sortable="custom"
min-width="140"
align="center">
</el-table-column>
<el-table-column prop="username"
label="学生姓名">
label="队长/成员"
min-width="140"
align="center">
</el-table-column>
<el-table-column prop="workNumber"
label="学号">
label="队长/成员学号"
min-width="140"
align="center">
</el-table-column>
<el-table-column prop="phone"
label="手机号">
label="队长/成员手机号"
min-width="140"
align="center">
</el-table-column>
<el-table-column label="是否为队长"
min-width="80"
align="center">
<template slot-scope="scope">
{{ scope.row.captain ? '否' : '是' }}
</template>
</el-table-column>
<el-table-column prop="teachers"
label="指导老师"
min-width="200"
align="center"
show-overflow-tooltip>
<template slot-scope="scope">
<template v-if="scope.row.teachers">
<el-tooltip placement="top">
<div slot="content"
style="line-height: 1.8">
<div v-for="(item, i) in scope.row.teachers"
:key="i">
{{ item.name }}{{ item.phone ? ',' + item.phone : '' }}{{ item.position ? ',' + item.position : '' }}
</div>
</div>
<p>{{ scope.row.teachers[0].name }}{{ scope.row.teachers[0].phone ? ',' + scope.row.teachers[0].phone : '' }}{{ scope.row.teachers[0].position ? ',' + scope.row.teachers[0].position : '' }}</p>
</el-tooltip>
</template>
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="320">
width="270">
<template slot-scope="scope">
<el-button v-if="scope.row.identification"
type="text"
@click="edit(scope.row)"
v-auth="'/match/list:管理:报名人员:编辑'">编辑</el-button>
<el-button type="text"
@click="del(scope.row)">删除</el-button>
<template v-if="info.releaseType">
<el-button type="text"
@click="toInfo(scope.row)"
@ -118,12 +169,25 @@
<el-form ref="form"
:model="form"
:rules="rules"
label-width="80px"
label-width="110px"
style='margin-right: 10px;'>
<el-form-item v-if="!schoolDisable"
prop="schoolId"
label="院校">
label="学生账号归属">
<el-select v-model="form.schoolId"
filterable
:disabled="!isAdd"
style="width: 100%">
<el-option v-for="(item, i) in clients"
:key="i"
:label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
</el-form-item>
<el-form-item v-if="!schoolDisable"
prop="studentAffiliatedInstitutionId"
label="学生所属院校">
<el-select v-model="form.studentAffiliatedInstitutionId"
filterable
style="width: 100%">
<el-option v-for="(item, i) in clients"
@ -303,6 +367,7 @@ export default {
userName: '',
workNumber: '',
schoolId: '',
studentAffiliatedInstitutionId: '',
teamId: '',
whetherSignUp: 0,
phone: '',
@ -359,12 +424,16 @@ export default {
}
},
mounted () {
console.log(44, this.$store.state.user.schoolId)
this.initData()
this.getInfo()
this.getTeam()
},
methods: {
init () {
this.initData()
this.getTeam()
this.getClient()
},
getData () {
this.$post(this.api.queryRegistrationByCondition, {
pageNum: this.page,
@ -375,7 +444,13 @@ export default {
schoolOrder: this.schoolOrder,
teamOrder: this.teamOrder,
}).then(({ data }) => {
this.listData = data.records;
const list = data.records;
list.map(e => {
if (e.teacherDetails) {
e.teachers = JSON.parse(e.teacherDetails)
}
})
this.listData = list
this.total = data.total;
this.$refs.table.clearSelection();
}).catch(res => {
@ -415,6 +490,10 @@ export default {
if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : ''
this.getData()
},
//
autoAllocation () {
},
//
@ -440,7 +519,8 @@ export default {
responseType: 'blob'
}).then((res) => {
console.log("🚀 ~ showFaild ~ res:", res)
util.downloadFileDirect(decodeURI(res.headers['content-disposition']), new Blob([res.data]))
const name = res.headers['content-disposition']
util.downloadFileDirect(name ? decodeURI(name) : '批量导入报名人员失败数据导出.xlsx', new Blob([res.data]))
}).catch(res => { })
},
uploadSuccess ({ data, status }) {
@ -470,6 +550,7 @@ export default {
this.uploadFaild = false
},
uploadSure () {
this.init()
this.importVisible = false
this.keyWord = ''
},
@ -490,13 +571,30 @@ export default {
this.originForm = JSON.parse(JSON.stringify(row))
this.form = JSON.parse(JSON.stringify(row))
},
del (row) {
this.$confirm(row.captain ? '此删除操作不可逆,是否确认删除选中项?' : '删除队长后,该团队下所有成员都会同步移除报名,是否确认删除?', "提示", {
type: "warning"
})
.then(() => {
this.$post(this.api.batchDeleteApplicants, { registrationVOS: [row] }).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {
});
},
//
workNumberChange () {
const { form } = this
if (this.originForm.workNumber !== form.workNumber) {
form.schoolId && form.workNumber && this.$get(`${this.api.enquireAboutSchoolStudents}?schoolId=${form.schoolId}&workNumber=${form.workNumber}${this.isAdd ? '' : '&applyFor=1'}`).then(({ account }) => {
this.notExit = 0
this.exitMember = 0
if (account) {
const { studentAffiliatedInstitutionId } = form
account.studentAffiliatedInstitutionId = studentAffiliatedInstitutionId
this.form = account
}
this.formEnable = !account
@ -534,6 +632,7 @@ export default {
//
if (this.originForm.teamId !== form.teamId) {
this.$post(this.api.joinCompetitionTeam, {
studentAffiliatedInstitutionId: form.studentAffiliatedInstitutionId,
accountId: form.id,
competitionId: this.id,
teamId: form.teamId,
@ -541,7 +640,7 @@ export default {
whetherSignUp: 1
}).then(res => {
this.addVisible = false
this.getData()
this.init()
this.submiting = false
util.successMsg('编辑成功!')
}).catch(res => {
@ -549,7 +648,7 @@ export default {
})
} else {
this.addVisible = false
this.getData()
this.init()
this.submiting = false
util.successMsg('编辑成功!')
}
@ -559,6 +658,7 @@ export default {
} else {
//
this.$post(this.api[this.info.completeCompetitionSetup.competitionType ? 'joinCompetitionTeam' : 'addCompetitionRegistration'], {
studentAffiliatedInstitutionId: form.studentAffiliatedInstitutionId,
accountId: form.id,
competitionId: this.id,
teamId: this.form.teamId,
@ -566,7 +666,7 @@ export default {
whetherSignUp: 1
}).then(res => {
this.addVisible = false
this.getData()
this.init()
this.submiting = false
util.successMsg('报名成功!')
}).catch(res => {
@ -650,10 +750,11 @@ export default {
if (!form.teamName) return util.errorMsg('请输入团队名称')
if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码')
form.accountId = this.form.id
form.studentAffiliatedInstitutionId = this.form.studentAffiliatedInstitutionId
this.$post(this.api.addCompetitionTeam, form).then(res => {
this.teamVisible = false
this.addVisible = false
this.getData()
this.init()
util.successMsg('报名成功!')
}).catch(res => { })
},
@ -683,7 +784,25 @@ export default {
util.downloadFileDirect(`报名人员.xls`, new Blob([res.data]))
}).catch(res => { })
}
},
//
batchDel () {
if (this.multipleSelection.length) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(this.api.batchDeleteApplicants, { registrationVOS: this.multipleSelection }).then(res => {
this.getData();
this.$message.success("删除成功");
this.$refs.table.clearSelection()
}).catch(err => {
});
}).catch(() => {
});
} else {
this.$message.warning("请先选择数据 !");
}
},
}
};
</script>

@ -5,8 +5,7 @@ const url = location.host;
const isDev = process.env.NODE_ENV === "development"; // 开发环境
const isHh = url.includes("10.196.131.73"); //河海版本
const isCH = url.includes("124.71.12.62"); //巢湖版本
const isPro = url.includes("occupationlab.com"); //职站生产
const isZxy = url.includes("izhixinyun.com"); //智信云
const isPro = url.includes("occupationlab.com") || url.includes("izhixinyun.com"); //生产
const isTest = url.includes('121.37.12.51'); //中台测试服
const isSq = url.includes('10.20.100.204'); // 商丘

Loading…
Cancel
Save