yujialong 8 months ago
parent 7b50f26425
commit 072b5d9fb8
  1. 7
      src/api/index.js
  2. 18
      src/pages/match/list/index.vue
  3. 4
      src/pages/match/manage/index.vue
  4. 17
      src/pages/match/manage/matchArchList.vue
  5. 253
      src/pages/match/manage/matchSignup.vue
  6. 24
      src/pages/project/list/index.vue
  7. 1
      src/pages/station/preview/index.vue
  8. 2
      src/setting.js

@ -169,6 +169,7 @@ export default {
queryCustomer: `nakadai/nakadai/customer/queryCustomer`, queryCustomer: `nakadai/nakadai/customer/queryCustomer`,
getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`, getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`,
getRedisCacheCompetition: `competition/competition/management/getRedisCache`, getRedisCacheCompetition: `competition/competition/management/getRedisCache`,
copyCompetition: `competition/competition/management/copyCompetition`,
// 赛事内容 // 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`, addCompetitionContent: `competition/competition/content/addCompetitionContent`,
@ -216,6 +217,12 @@ export default {
enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`, enquireAboutSchoolStudents: `users/users/userAccount/enquireAboutSchoolStudents`,
cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`, cancelParticipant: `competition/competition/teamParticipant/cancelParticipant`,
schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`, schoolsInCompetitionArea: `competition/competition/range/schoolsInCompetitionArea`,
batchImportPersonalData: `${host}competition/competition/registration/batchImportPersonalData`,
batchImportTeamData: `${host}competition/competition/registration/batchImportTeamData`,
TeamDataExportFailure: `${host}competition/competition/registration/exportFailure`,
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`, // 教师端团队报名人员导入模板
// 赛事公告 // 赛事公告
addAnnouncement: `competition/competition/announcement/addAnnouncement`, addAnnouncement: `competition/competition/announcement/addAnnouncement`,
amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`,

@ -125,9 +125,11 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
align="center" align="center"
width="260"> width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.playingStages && scope.row.playingStages.length" <el-button type="text"
@click="copy(scope.row)">复制</el-button>
<el-button v-if="scope.row.publishStatus && scope.row.playingStages && scope.row.playingStages.length"
type="text" type="text"
@click="editEndTime(scope.row)" @click="editEndTime(scope.row)"
v-auth>修改结束时间</el-button> v-auth>修改结束时间</el-button>
@ -381,6 +383,16 @@ export default {
add () { add () {
this.$router.push("/match/add"); this.$router.push("/match/add");
}, },
//
copy (row) {
this.$confirm('确定要复制吗', "提示", {
type: "warning"
}).then(async () => {
await this.$post(`${this.api.copyCompetition}?competitionId=${row.id}`)
util.successMsg('复制成功')
this.getData()
}).catch(() => { })
},
// //
editEndTime (row) { editEndTime (row) {
this.modifyVisible = true this.modifyVisible = true
@ -406,7 +418,7 @@ export default {
}).catch(err => { }) }).catch(err => { })
}, },
manage (row) { manage (row) {
this.$router.push(`/match/manage?id=${row.id}&name=${row.competitionName}`) this.$router.push(`/match/manage?id=${row.id}&releaseType=${row.releaseType}&name=${row.competitionName}`)
}, },
changeType () { changeType () {

@ -52,6 +52,7 @@ export default {
data () { data () {
return { return {
name: this.$route.query.name, name: this.$route.query.name,
releaseType: +this.$route.query.releaseType,
active: this.$route.query.tab || '', active: this.$route.query.tab || '',
tabs: { tabs: {
tab1: "大赛详情", tab1: "大赛详情",
@ -110,7 +111,8 @@ export default {
const tab5 = btns.includes('/match/list:管理:报名人员') const tab5 = btns.includes('/match/list:管理:报名人员')
tab1 || this.$delete(this.tabs, 'tab1') tab1 || this.$delete(this.tabs, 'tab1')
tab2 || this.$delete(this.tabs, 'tab2') if (!tab2 || !this.releaseType) this.$delete(this.tabs, 'tab2')
console.log("🚀 ~ initTabs ~ this.releaseType:", (!tab2 || !this.releaseType))
tab3 || this.$delete(this.tabs, 'tab3') tab3 || this.$delete(this.tabs, 'tab3')
tab4 || this.$delete(this.tabs, 'tab4') tab4 || this.$delete(this.tabs, 'tab4')
tab5 || this.$delete(this.tabs, 'tab5') tab5 || this.$delete(this.tabs, 'tab5')

@ -15,8 +15,8 @@
<div class="stat"> <div class="stat">
<div class="nums"> <div class="nums">
<div class="item"> <div class="item">
<p class="name">实验总人数</p> <p class="name">已参加/应参加人数</p>
<p class="val">{{ totalNumber }}</p> <p class="val">{{ isNaN(statData.totalNumber) ? '' : statData.attendance + '/' + statData.totalNumber }}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="name">实验平均分</p> <p class="name">实验平均分</p>
@ -109,22 +109,26 @@
width="90" width="90"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.timeSum }}min {{ scope.row.timeSum ? scope.row.timeSum + 'min' : '--' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitTime" <el-table-column prop="submitTime"
label="提交时间" label="提交时间"
min-width="150" min-width="150"
align="center"> align="center">
<template slot-scope="scope">
{{ scope.row.submitTime || '--' }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
align="center" align="center"
width="160"> width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="!scope.row.reportId"
type="text"
@click="show(scope.row)">{{ scope.row.reportId ? '查看成绩报告' : '未参加' }}</el-button>
<el-button v-if="scope.row.reportId" <el-button v-if="scope.row.reportId"
type="text" type="text"
@click="show(scope.row)">查看成绩报告</el-button>
<el-button type="text"
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -286,7 +290,6 @@ export default {
page1: 1, page1: 1,
total1: 0, total1: 0,
totalNumber: 0, //
avgScore: 0, // avgScore: 0, //
importVisible: false, importVisible: false,
uploadList: [], uploadList: [],
@ -356,7 +359,6 @@ export default {
this.list = page.records this.list = page.records
this.statData = data this.statData = data
this.avgScore = (+data.avgScore).toFixed(2) this.avgScore = (+data.avgScore).toFixed(2)
this.totalNumber = data.totalNumber
this.getChart() this.getChart()
}).catch(res => { }) }).catch(res => { })
} }
@ -625,6 +627,7 @@ export default {
.item { .item {
width: 300px; width: 300px;
min-height: 145px;
padding: 30px 30px; padding: 30px 30px;
margin: 0 10px; margin: 0 10px;
box-sizing: border-box; box-sizing: border-box;

@ -1,115 +1,212 @@
<template> <template>
<!-- 报名人员 --> <!-- 报名人员 -->
<div class="page-content" style="padding: 24px"> <div class="page-content"
style="padding: 24px">
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入姓名/手机号/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="mini" style="width: 250px"></el-input> <el-input placeholder="请输入姓名/手机号/学号"
prefix-icon="el-icon-search"
v-model="keyword"
clearable
size="mini"
style="width: 250px"></el-input>
</li> </li>
<li v-if="info.releaseType"> <li v-if="info.releaseType">
<label>参赛人员状态</label> <label>参赛人员状态</label>
<el-select v-model="isDisable" @change="initData"> <el-select v-model="isDisable"
<el-option v-for="(item, i) in statusList" :key="i" :label="item.name" :value="item.id"></el-option> @change="initData">
<el-option v-for="(item, i) in statusList"
:key="i"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="add" v-auth="'/match/list:管理:报名人员:新增'">新增</el-button> <el-button type="primary"
<el-button type="primary" round @click="exportAll" v-auth="'/match/list:管理:报名人员:批量导出'">批量导出</el-button> round
@click="add"
v-auth="'/match/list:管理:报名人员:新增'">新增</el-button>
<el-button type="primary"
round
@click="exportAll"
v-auth="'/match/list:管理:报名人员:批量导出'">批量导出</el-button>
</div> </div>
</div> </div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange"> <el-table ref="table"
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> :data="listData"
<el-table-column type="index" width="60" label="序号" align="center"> class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
@sort-change="sortChange">
<el-table-column type="selection"
width="80"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="school" label="学校" sortable="custom"> <el-table-column prop="school"
label="学校"
sortable="custom">
</el-table-column> </el-table-column>
<el-table-column v-if="info.completeCompetitionSetup.competitionType" prop="teamName" label="团队名称" sortable="custom"> <el-table-column v-if="info.completeCompetitionSetup.competitionType"
prop="teamName"
label="团队名称"
sortable="custom">
</el-table-column> </el-table-column>
<el-table-column prop="username" label="学生姓名"> <el-table-column prop="username"
label="学生姓名">
</el-table-column> </el-table-column>
<el-table-column prop="workNumber" label="学号"> <el-table-column prop="workNumber"
label="学号">
</el-table-column> </el-table-column>
<el-table-column prop="phone" label="手机号"> <el-table-column prop="phone"
label="手机号">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="320"> <el-table-column label="操作"
align="center"
width="320">
<template slot-scope="scope"> <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 v-if="scope.row.identification"
type="text"
@click="edit(scope.row)"
v-auth="'/match/list:管理:报名人员:编辑'">编辑</el-button>
<template v-if="info.releaseType"> <template v-if="info.releaseType">
<el-button type="text" @click="toInfo(scope.row)" v-auth="'/match/list:管理:报名人员:参赛信息与成绩'">参赛信息与成绩</el-button> <el-button type="text"
<el-switch @click="toInfo(scope.row)"
v-auth="'/match/list:管理:报名人员:禁用'" v-auth="'/match/list:管理:报名人员:参赛信息与成绩'">参赛信息与成绩</el-button>
<el-switch v-auth="'/match/list:管理:报名人员:禁用'"
v-model="scope.row.isDisable" v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '关' : '开'" :active-text="scope.row.isDisable ? '关' : '开'"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 5px" style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)" @change="switchOff($event,scope.row,scope.$index)"></el-switch>
></el-switch>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"> <el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination> </el-pagination>
</div> </div>
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'"
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="400px" class="dialog" :close-on-click-modal="false" @close="closeAdd"> :visible.sync="addVisible"
<el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'> width="400px"
<el-form-item v-if="!schoolDisable" prop="schoolId" label="院校"> class="dialog"
<el-select v-model="form.schoolId" filterable style="width: 100%"> :close-on-click-modal="false"
<el-option v-for="(item, i) in clients" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option> @close="closeAdd">
<el-form ref="form"
:model="form"
:rules="rules"
label-width="80px"
style='margin-right: 10px;'>
<el-form-item v-if="!schoolDisable"
prop="schoolId"
label="院校">
<el-select v-model="form.schoolId"
filterable
style="width: 100%">
<el-option v-for="(item, i) in clients"
:key="i"
:label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="workNumber" label="学生学号"> <el-form-item prop="workNumber"
<el-input v-model="form.workNumber" placeholder="请输入学生学号" @change="workNumberChange"></el-input> label="学生学号">
<el-input v-model="form.workNumber"
placeholder="请输入学生学号"
@change="workNumberChange"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userName" label="学生姓名"> <el-form-item prop="userName"
<el-input v-model="form.userName" placeholder="请输入学生姓名" :disabled="isAdd"></el-input> label="学生姓名">
<el-input v-model="form.userName"
placeholder="请输入学生姓名"
:disabled="isAdd"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="账号角色"> <el-form-item label="账号角色">
学生 学生
</el-form-item> </el-form-item>
<el-form-item v-if="info.completeCompetitionSetup.competitionType" prop="teamId" label="所属团队"> <el-form-item v-if="info.completeCompetitionSetup.competitionType"
prop="teamId"
label="所属团队">
<div style="display: flex;align-items: center"> <div style="display: flex;align-items: center">
<el-select v-model="form.teamId" :disabled="formEnable && isAdd" filterable style="width: 240px;margin-right: 10px"> <el-select v-model="form.teamId"
<el-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option> :disabled="formEnable && isAdd"
filterable
style="width: 240px;margin-right: 10px">
<el-option v-for="(item, i) in teams"
:key="i"
:label="item.teamName"
:value="item.teamId"></el-option>
</el-select> </el-select>
<el-button v-if="isAdd && !formEnable" type="text" @click="createTeam">创建团队</el-button> <el-button v-if="isAdd && !formEnable"
type="text"
@click="createTeam">创建团队</el-button>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="phone" label="手机号"> <el-form-item prop="phone"
<el-input v-model="form.phone" maxlength="11" placeholder="请输入手机号" :disabled="isAdd"></el-input> label="手机号">
<el-input v-model="form.phone"
maxlength="11"
placeholder="请输入手机号"
:disabled="isAdd"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="邮箱"> <el-form-item prop="email"
<el-input v-model="form.email" placeholder="请输入邮箱" :disabled="isAdd"></el-input> label="邮箱">
<el-input v-model="form.email"
placeholder="请输入邮箱"
:disabled="isAdd"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="addVisible = false">取消</el-button> <el-button @click="addVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确定</el-button> <el-button type="primary"
@click="submit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="创建团队" :visible.sync="teamVisible" :close-on-click-modal="false" width="300px"> <el-dialog title="创建团队"
:visible.sync="teamVisible"
:close-on-click-modal="false"
width="300px">
<el-form class="dia-form"> <el-form class="dia-form">
<el-form-item> <el-form-item>
<el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input> <el-input placeholder="请输入团队名称"
maxlength="10"
v-model="teamForm.teamName"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-input placeholder="请设置团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input> <el-input placeholder="请设置团队邀请码"
maxlength="6"
v-model="teamForm.invitationCode"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
<el-button size="small" type="primary" @click="teamSubmit">确定并使用</el-button> class="dialog-footer">
<el-button size="small" @click="teamVisible = false">取消</el-button> <el-button size="small"
type="primary"
@click="teamSubmit">确定并使用</el-button>
<el-button size="small"
@click="teamVisible = false">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -121,7 +218,7 @@ import axios from 'axios'
import Setting from "@/setting"; import Setting from "@/setting";
export default { export default {
name: "matchSignup", name: "matchSignup",
data() { data () {
return { return {
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
id: +this.$route.query.id, id: +this.$route.query.id,
@ -201,21 +298,21 @@ export default {
}; };
}, },
watch: { watch: {
keyword: function(val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
} }
}, },
mounted() { mounted () {
console.log(44, this.$store.state.user.schoolId) console.log(44, this.$store.state.user.schoolId)
this.initData() this.initData()
this.getInfo() this.getInfo()
this.getTeam() this.getTeam()
}, },
methods: { methods: {
getData() { getData () {
this.$post(this.api.queryRegistrationByCondition, { this.$post(this.api.queryRegistrationByCondition, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -232,7 +329,7 @@ export default {
}); });
}, },
// //
getInfo() { getInfo () {
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => { this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.info = competition this.info = competition
// //
@ -242,37 +339,37 @@ export default {
this.schoolDisable = true this.schoolDisable = true
this.form.schoolId = this.$store.state.user.schoolId this.form.schoolId = this.$store.state.user.schoolId
} }
}).catch(err => {}) }).catch(err => { })
}, },
initData() { initData () {
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
handleSelectionChange(val) { handleSelectionChange (val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { handleCurrentChange (val) {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
switchOff(val, row, index) { switchOff (val, row, index) {
this.$put(`${this.api.disableRegistration}?competitionRegistrationId=${row.id}&isDisable=${val}`).then(res => {}).catch(err => {}); this.$put(`${this.api.disableRegistration}?competitionRegistrationId=${row.id}&isDisable=${val}`).then(res => { }).catch(err => { });
}, },
// //
sortChange(column) { sortChange (column) {
// 12 // 12
if (column.prop === 'school') this.schoolOrder = column.order ? column.order === 'ascending' ? 2 : 1 : '' if (column.prop === 'school') this.schoolOrder = column.order ? column.order === 'ascending' ? 2 : 1 : ''
if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : '' if (column.prop === 'teamName') this.teamOrder = column.order ? column.order === 'ascending' ? 2 : 1 : ''
this.getData() this.getData()
}, },
// //
add() { add () {
this.notExit = 0 this.notExit = 0
this.isAdd = true this.isAdd = true
this.addVisible = true this.addVisible = true
}, },
// //
edit(row) { edit (row) {
this.isAdd = false this.isAdd = false
this.notExit = 0 this.notExit = 0
this.addVisible = true this.addVisible = true
@ -283,7 +380,7 @@ export default {
this.form = JSON.parse(JSON.stringify(row)) this.form = JSON.parse(JSON.stringify(row))
}, },
// //
workNumberChange() { workNumberChange () {
const { form } = this const { form } = this
if (this.originForm.workNumber !== form.workNumber) { 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 }) => { form.schoolId && form.workNumber && this.$get(`${this.api.enquireAboutSchoolStudents}?schoolId=${form.schoolId}&workNumber=${form.workNumber}${this.isAdd ? '' : '&applyFor=1'}`).then(({ account }) => {
@ -301,7 +398,7 @@ export default {
} }
}, },
// //
submitForm() { submitForm () {
if (this.notExit) { if (this.notExit) {
this.submiting = false this.submiting = false
return util.errorMsg('学生不存在,无法添加!') return util.errorMsg('学生不存在,无法添加!')
@ -367,7 +464,7 @@ export default {
} }
}, },
// //
submit() { submit () {
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (this.submiting) return false if (this.submiting) return false
@ -387,7 +484,7 @@ export default {
}) })
}, },
// //
closeAdd() { closeAdd () {
this.form = { this.form = {
captain: 0, captain: 0,
competitionId: this.id, competitionId: this.id,
@ -404,7 +501,7 @@ export default {
} }
}, },
// //
createTeam() { createTeam () {
this.teamForm = { this.teamForm = {
competitionId: this.id, competitionId: this.id,
registrationInvitationCode: '', registrationInvitationCode: '',
@ -416,28 +513,28 @@ export default {
this.teamVisible = true this.teamVisible = true
}, },
// //
getClient() { getClient () {
if (this.info.competitionScope === 2) { // if (this.info.competitionScope === 2) { //
this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => { this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => {
this.clients = schools this.clients = schools
}).catch(res => {}) }).catch(res => { })
} else { // } else { //
this.$get(this.api.querySchoolData).then(({ list }) => { this.$get(this.api.querySchoolData).then(({ list }) => {
this.clients = list this.clients = list
}).catch(res => {}) }).catch(res => { })
} }
}, },
// //
getTeam() { getTeam () {
this.$get(this.api.searchTeam, { this.$get(this.api.searchTeam, {
teamName: '', teamName: '',
competitionId: this.id competitionId: this.id
}).then(({ teamList }) => { }).then(({ teamList }) => {
this.teams = teamList this.teams = teamList
}).catch(res => {}) }).catch(res => { })
}, },
// //
teamSubmit() { teamSubmit () {
const form = this.teamForm const form = this.teamForm
if (!form.teamName) return util.errorMsg('请输入团队名称') if (!form.teamName) return util.errorMsg('请输入团队名称')
if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码') if (form.invitationCode.length !== 6) return util.errorMsg('请输入6位数团队邀请码')
@ -447,13 +544,13 @@ export default {
this.addVisible = false this.addVisible = false
this.getData() this.getData()
util.successMsg('报名成功!') util.successMsg('报名成功!')
}).catch(res => {}) }).catch(res => { })
}, },
// //
toInfo(row) { toInfo (row) {
this.$router.push(`info?id=${this.id}&accountId=${row.accountId}`) this.$router.push(`info?id=${this.id}&accountId=${row.accountId}`)
}, },
exportAll() { exportAll () {
const data = this.multipleSelection const data = this.multipleSelection
if (data.length) { if (data.length) {
data.map((e, i) => e.id = i + 1) data.map((e, i) => e.id = i + 1)
@ -464,7 +561,7 @@ export default {
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) util.downloadFileDirect(`报名人员.xls`, new Blob([res.data]))
}).catch(res => {}) }).catch(res => { })
} else { } else {
axios.get(`${this.api.excelExport}?competitionId=${this.id}`, { axios.get(`${this.api.excelExport}?competitionId=${this.id}`, {
headers: { headers: {
@ -473,7 +570,7 @@ export default {
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
util.downloadFileDirect(`报名人员.xls`, new Blob([res.data])) util.downloadFileDirect(`报名人员.xls`, new Blob([res.data]))
}).catch(res => {}) }).catch(res => { })
} }
} }
} }

@ -189,7 +189,7 @@
<el-form-item v-if="!curRow.projectManage.founder" <el-form-item v-if="!curRow.projectManage.founder"
label="课程"> label="课程">
<el-cascader v-model="copyMallId" <el-cascader v-model="copyMallId"
:options="curs" :options="copyCurs"
:props="{ checkStrictly: true, value: 'id' }" :props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas" popper-class="course-cas"
@expand-change="copySystemChange" @expand-change="copySystemChange"
@ -200,6 +200,7 @@
class="dialog-footer"> class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button> <el-button @click="copyVisible = false"> </el-button>
<el-button type="primary" <el-button type="primary"
:loading="submiting"
@click="copySubmit"> </el-button> @click="copySubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -214,6 +215,7 @@ export default {
data () { data () {
return { return {
showBack: Boolean(this.$route.query.show), showBack: Boolean(this.$route.query.show),
lc: [11, 12, 19],
cid: [], cid: [],
curs: [], curs: [],
systemId: "", systemId: "",
@ -288,10 +290,12 @@ export default {
page: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
multipleSelection: [], multipleSelection: [],
submiting: false,
copyVisible: false, copyVisible: false,
copyCurs: [],
copyForm: { copyForm: {
projectName: '', projectName: '',
mallId: [] mallId: ''
}, },
copyMallId: [], copyMallId: [],
curRow: { curRow: {
@ -481,8 +485,15 @@ export default {
copyData (projectId) { // id copyData (projectId) { // id
this.copyVisible = true; this.copyVisible = true;
this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => {
const { systemId } = res.projectManage
// 3
this.copyCurs = this.lc.includes(systemId) ? this.curs.filter(e => e.systemId == systemId) : this.curs.filter(e => !this.lc.includes(+e.systemId))
console.log("🚀 ~ this.$get ~ this.curs:", this.copyCurs)
this.copyMallId = [] this.copyMallId = []
this.copyForm.projectName = res.projectManage.projectName; this.copyForm = {
projectName: res.projectManage.projectName,
mallId: ''
}
this.curRow = { this.curRow = {
projectManage: JSON.parse(JSON.stringify(res.projectManage)), projectManage: JSON.parse(JSON.stringify(res.projectManage)),
projectJudgmentList: JSON.parse(JSON.stringify(res.projectJudgmentVos)) projectJudgmentList: JSON.parse(JSON.stringify(res.projectJudgmentVos))
@ -496,8 +507,9 @@ export default {
this.copyForm.mallId = val[0] this.copyForm.mallId = val[0]
}, },
copySubmit () { copySubmit () {
if (this.submiting) return false
const form = this.copyForm const form = this.copyForm
const row = this.curRow const row = JSON.parse(JSON.stringify(this.curRow))
const fromSystem = !row.projectManage.founder const fromSystem = !row.projectManage.founder
if (!form.projectName) { if (!form.projectName) {
util.warningMsg("请输入项目名称"); util.warningMsg("请输入项目名称");
@ -508,6 +520,7 @@ export default {
util.warningMsg("请选择课程"); util.warningMsg("请选择课程");
return; return;
} }
this.submiting = true
row.projectManage.projectName = form.projectName row.projectManage.projectName = form.projectName
if (fromSystem) row.projectManage.mallId = form.mallId if (fromSystem) row.projectManage.mallId = form.mallId
row.projectManage.projectId = ""; row.projectManage.projectId = "";
@ -519,8 +532,9 @@ export default {
this.initData(); this.initData();
util.successMsg("复制实验项目成功"); util.successMsg("复制实验项目成功");
this.copyVisible = false; this.copyVisible = false;
this.submiting = false
}).catch(err => { }).catch(err => {
console.log(err); this.submiting = false
}); });
}, },
goBack () { // goBack () { //

@ -75,6 +75,7 @@
<div class="inner" <div class="inner"
v-else-if="videoSrc"> v-else-if="videoSrc">
<video class="video" <video class="video"
:key="videoSrc"
width="100%" width="100%"
height="100%" height="100%"
autoplay autoplay

@ -32,7 +32,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
// host = "http://192.168.31.217:9000/"; host = "http://192.168.31.217:9000/";
} else if (isSq) { } else if (isSq) {
zcPath = `10.20.100.204:8883` zcPath = `10.20.100.204:8883`
} }

Loading…
Cancel
Save