dev_202303
yujialong 2 years ago
parent 0da27c54c3
commit 1245651314
  1. 3
      public/index.html
  2. 2
      src/setting.js
  3. 41
      src/utils/api.js
  4. 2
      src/views/course/contentSettings.vue
  5. 2
      src/views/customer/AddCustomer.vue
  6. 3
      src/views/join/index.vue
  7. 2
      src/views/match/add/index.vue
  8. 13
      src/views/match/add/set.vue
  9. 17
      src/views/match/add/step2.vue
  10. 2
      src/views/match/add/step3.vue
  11. 4
      src/views/match/manage/matchArch.vue
  12. 1
      src/views/match/manage/matchArchList.vue
  13. 4
      src/views/match/manage/matchInfo.vue
  14. 30
      src/views/match/manage/matchRank.vue
  15. 5
      src/views/match/manage/matchReport.vue
  16. 29
      src/views/match/manage/matchSignup.vue
  17. 4
      src/views/serve/projectAdd.vue

@ -3,9 +3,10 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords" content="深圳或然科技中台">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css"> <link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css">
<title>中台</title> <title>深圳或然科技中台</title>
</head> </head>
<body> <body>
<noscript> <noscript>

@ -11,7 +11,7 @@ if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/' host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/' // host = 'https://huorantech.cn/'
host = 'http://192.168.31.51:9000/'// 榕 // host = 'http://192.168.31.151:9000/'// 榕
// host = 'http://192.168.31.116:9000/'// 赓 // host = 'http://192.168.31.116:9000/'// 赓
} else if (isPro) { } else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/' jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

@ -11,6 +11,7 @@ export default {
bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机 bindPhoneOrEmail: `users/users/userAccount/bindPhoneOrEmail`,// 绑定手机
sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码 sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,// 手机验证码
getUserRolesPermissionMenu: `users/users/user-role/getUserRolesPermissionMenu`, getUserRolesPermissionMenu: `users/users/user-role/getUserRolesPermissionMenu`,
deleteProfile : `users/users/userInfo/deleteProfile`,
staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板 staffTemplate: `http://www.huorantech.cn/template/%E6%89%B9%E9%87%8F%E5%AF%BC%E5%85%A5%E5%91%98%E5%B7%A5%E6%A8%A1%E6%9D%BF.xlsx`, // 后台账号模板
@ -353,6 +354,7 @@ export default {
updateUser: `users/users/userInfo/updateUser`, updateUser: `users/users/userInfo/updateUser`,
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`,
// 赛事公告 // 赛事公告
addAnnouncement: `competition/competition/announcement/addAnnouncement`, addAnnouncement: `competition/competition/announcement/addAnnouncement`,
amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`, amendmentAnnouncement: `competition/competition/announcement/amendmentAnnouncement`,
@ -367,26 +369,27 @@ export default {
exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`, exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`,
performanceExportFailure: `${host}competition/competition/performance/exportFailure`, performanceExportFailure: `${host}competition/competition/performance/exportFailure`,
rankExportFailure: `${host}competition/competition/rank/exportFailure`, rankExportFailure: `${host}competition/competition/rank/exportFailure`,
stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`,
stageRaceRanking: `competition/competition/rank/stageRaceRanking`,
overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`,
batchImportRanking: `${host}competition/competition/rank/batchImportRanking`, batchImportRanking: `${host}competition/competition/rank/batchImportRanking`,
publishRanking: `competition/competition/rank/publishRanking`, stageGradeManagementList: `${host1}competition/competition/performance/stageGradeManagementList`,
stageTeamScoreDetails: `competition/competition/rank/stageTeamScoreDetails`, stageRaceRanking: `${host1}competition/competition/rank/stageRaceRanking`,
multipleStageTeamScoreDetails: `competition/competition/rank/multipleStageTeamScoreDetails`, overallStandingsInThePointsRace: `${host1}competition/competition/rank/overallStandingsInThePointsRace`,
detailsOfTotalTeamScores: `competition/competition/rank/detailsOfTotalTeamScores`, publishRanking: `${host1}competition/competition/rank/publishRanking`,
cancelRanking: `competition/competition/rank/cancelRanking`, stageTeamScoreDetails: `${host1}competition/competition/rank/stageTeamScoreDetails`,
reportDetail: `occupationlab/occupationlab/achievement/reportDetail`, multipleStageTeamScoreDetails: `${host1}competition/competition/rank/multipleStageTeamScoreDetails`,
deleteLastPublication: `competition/competition/rank/deleteLastPublication`, detailsOfTotalTeamScores: `${host1}competition/competition/rank/detailsOfTotalTeamScores`,
whetherToPublish: `competition/competition/rank/whetherToPublish`, cancelRanking: `${host1}competition/competition/rank/cancelRanking`,
manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`, reportDetail: `${host1}occupationlab/occupationlab/achievement/reportDetail`,
queryPublicationSource: `competition/competition/rank/queryPublicationSource`, deleteLastPublication: `${host1}competition/competition/rank/deleteLastPublication`,
releaseVerification: `competition/competition/rank/releaseVerification`, whetherToPublish: `${host1}competition/competition/rank/whetherToPublish`,
totalRankingScoreDetails: `competition/competition/rank/totalRankingScoreDetails`, manuallyRankTheUploadList: `${host1}competition/competition/rank/manuallyRankTheUploadList`,
batchRelease: `competition/competition/rank/batchRelease`, queryPublicationSource: `${host1}competition/competition/rank/queryPublicationSource`,
manuallyUploadedRankings: `competition/competition/rank/manuallyUploadedRankings`, releaseVerification: `${host1}competition/competition/rank/releaseVerification`,
toggleTheSortingMode: `competition/competition/rank/toggleTheSortingMode`, totalRankingScoreDetails: `${host1}competition/competition/rank/totalRankingScoreDetails`,
selectTheLastSortStatus: `competition/competition/rank/selectTheLastSortStatus`, batchRelease: `${host1}competition/competition/rank/batchRelease`,
manuallyUploadedRankings: `${host1}competition/competition/rank/manuallyUploadedRankings`,
toggleTheSortingMode: `${host1}competition/competition/rank/toggleTheSortingMode`,
selectTheLastSortStatus: `${host1}competition/competition/rank/selectTheLastSortStatus`,
cancelImport: `${host1}competition/competition/rank/cancelImport`,
gradeImport: `http://121.37.12.51/template/赛事成绩导入模板.xlsx`, gradeImport: `http://121.37.12.51/template/赛事成绩导入模板.xlsx`,
rankImportTeam: `http://121.37.12.51/template/赛事排名导入模板(团队赛).xlsx`, rankImportTeam: `http://121.37.12.51/template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `http://121.37.12.51/template/赛事排名导入模板(个人赛).xlsx`, rankImportPerson: `http://121.37.12.51/template/赛事排名导入模板(个人赛).xlsx`,

@ -654,6 +654,8 @@ export default {
this.downloadFile(row.name, player._urls[0].Url) this.downloadFile(row.name, player._urls[0].Url)
}) })
}).catch(res => {}) }).catch(res => {})
} else {
this.downloadFile(row.name + '.' + row.fileType, row.fileUrl)
} }
}, },
preview(row) { preview(row) {

@ -23,7 +23,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="schoolId" label="客户名称"> <el-form-item prop="schoolId" label="客户名称">
<el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" @change="SchoolChange" @clear="clearSchool"> <el-select v-model="form.schoolId" filterable clearable placeholder="请选择学校" :disabled="customerId" @change="SchoolChange" @clear="clearSchool">
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option> <el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>

@ -7,7 +7,7 @@
<img src="@/assets/img/house.png" alt=""> <img src="@/assets/img/house.png" alt="">
</div> </div>
<p class="text" style="font-size: 16px">城市合伙人计划</p> <p class="text" style="font-size: 16px">城市合伙人计划</p>
<p class="text">加入并自动为你创建一个团队群组</p> <p class="text">{{ teamName ? ('加入' + teamName) : '加入并自动为你创建一个团队群组' }}</p>
</div> </div>
<div class="inner"> <div class="inner">
<el-form class="form" ref="form" :model="form" :rules="rules"> <el-form class="form" ref="form" :model="form" :rules="rules">
@ -41,6 +41,7 @@ export default {
return { return {
isMobile: util.isMobile(), isMobile: util.isMobile(),
userName: this.$route.query.userName, userName: this.$route.query.userName,
teamName: this.$route.query.teamName,
admin: this.$route.query.admin, // admin: this.$route.query.admin, //
form: { form: {
id: this.$route.query.accountId, id: this.$route.query.accountId,

@ -75,7 +75,7 @@ export default {
id: this.$route.query.id || '', id: this.$route.query.id || '',
cache: this.$store.state.competitionCache, cache: this.$store.state.competitionCache,
publishStatus: 0, publishStatus: 0,
competitionId: '', competitionId: this.$route.query.id || '',
step: 1, step: 1,
submiting: false, submiting: false,
updateTime: 0, updateTime: 0,

@ -71,10 +71,9 @@
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="createUser" label="创建人" align="center"></el-table-column> -->
<el-table-column prop="founder" label="创建人" align="center"> <el-table-column prop="founder" label="创建人" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createUser }} {{ scope.row.founder ? '老师创建' : '系统内置' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
@ -160,9 +159,8 @@ export default {
}, },
// //
courseChange(val) { courseChange(val) {
const { sysId, sysName } = this.curriculumList.find(e => e.cid == this.form.cid) const { systemId } = this.curriculumList.find(e => e.cid == this.form.cid)
this.form.sysName = sysName this.sysId = systemId
this.sysId = sysId
if (val) this.loadIns = Loading.service() if (val) this.loadIns = Loading.service()
this.getProject() this.getProject()
}, },
@ -235,11 +233,10 @@ export default {
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。') if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
if (!form.cid) return util.warningMsg('请选择课程') if (!form.cid) return util.warningMsg('请选择课程')
if (!form.projectId) return util.warningMsg('请选择项目') if (!form.projectId) return util.warningMsg('请选择项目')
const cur = this.curriculumList.find(e => e.cid == form.cid) const { systemId, systemName, projectName } = this.projects.find(e => e.projectId == form.projectId)
if (cur) form.systemName = cur.sysName
const { systemId, projectName } = this.projects.find(e => e.projectId == form.projectId)
if (systemId) form.systemId = systemId if (systemId) form.systemId = systemId
if (projectName) form.projectName = projectName if (projectName) form.projectName = projectName
if (systemName) form.systemName = systemName
form.startTime = form.time[0] form.startTime = form.time[0]
form.endTime = form.time[1] form.endTime = form.time[1]
this.$emit('hideSet', this.form) this.$emit('hideSet', this.form)

@ -28,7 +28,7 @@
) )
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="resultCalculationMethod" label="总成绩计算方式"> <el-form-item v-if="!form.rule" prop="resultCalculationMethod" label="总成绩计算方式">
<el-radio v-model="form.resultCalculationMethod" :label="0">各阶段成绩加权求和</el-radio> <el-radio v-model="form.resultCalculationMethod" :label="0">各阶段成绩加权求和</el-radio>
<el-radio v-model="form.resultCalculationMethod" :label="1">各阶段成绩直接求和</el-radio> <el-radio v-model="form.resultCalculationMethod" :label="1">各阶段成绩直接求和</el-radio>
<el-radio v-model="form.resultCalculationMethod" :label="2">各阶段成绩取平均值</el-radio> <el-radio v-model="form.resultCalculationMethod" :label="2">各阶段成绩取平均值</el-radio>
@ -285,13 +285,19 @@ export default {
}, },
// //
stageChange(val) { stageChange(val) {
const stages = this.form.competitionStageList
const { ruleId } = this.form
if (stages.length < val) {
const list = [] const list = []
for (let i = 1; i <= val; i++) { for (let i = 1; i <= val - stages.length; i++) {
const form = JSON.parse(JSON.stringify(this.ruleForm)) const form = JSON.parse(JSON.stringify(this.ruleForm))
form.number = i form.number = stages.length + i
list.push(form) if (ruleId) form.ruleId = ruleId
this.form.competitionStageList.push(form)
}
} else {
this.form.competitionStageList = stages.slice(0, val)
} }
this.form.competitionStageList = list
}, },
// //
save(status, next = 0) { save(status, next = 0) {
@ -305,6 +311,7 @@ export default {
let stages = form.competitionStageList let stages = form.competitionStageList
if (form.rule === 2) { // if (form.rule === 2) { //
const e = stages[0] const e = stages[0]
e.stageName = step1.name
if (!e.resultsDetails) { if (!e.resultsDetails) {
if (e.resultAnnouncementTime === '') { if (e.resultAnnouncementTime === '') {
return util.errorMsg('请填写成绩公布时间') return util.errorMsg('请填写成绩公布时间')

@ -278,7 +278,7 @@ export default {
}).then(res => { }).then(res => {
this.$parent.hideLoad() this.$parent.hideLoad()
// //
!form[0].contentId && status && this.publish(status) status && this.publish(status)
util.successMsg((status ? '发布' : '保存') + '成功') util.successMsg((status ? '发布' : '保存') + '成功')
this.$emit('next', next) this.$emit('next', next)
}).catch(err => { }).catch(err => {

@ -30,7 +30,7 @@ export default {
list: [], list: [],
form: {}, form: {},
timer: null, timer: null,
curStep: [] curStep: [],
}; };
}, },
mounted() { mounted() {
@ -52,7 +52,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 100, pageSize: 100,
contestId: this.id, contestId: this.id,
}).then(({ page }) => { }).then(({ page, applicantSize }) => {
const list = page.records const list = page.records
list.map(e => { list.map(e => {
e.methodName = Const.methods.find(n => n.id === e.method).name e.methodName = Const.methods.find(n => n.id === e.method).name

@ -184,6 +184,7 @@ export default {
url += `&ids=${ids.toString()}` url += `&ids=${ids.toString()}`
} }
axios.post(this.api.exportExperimentalResultsInBatch, this.list, { axios.post(this.api.exportExperimentalResultsInBatch, this.list, {
headers: this.headers,
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
util.downloadFileDirect(`赛事成绩.xls`,new Blob([res.data])) util.downloadFileDirect(`赛事成绩.xls`,new Blob([res.data]))

@ -25,6 +25,7 @@
</div> </div>
</div> </div>
<table class="table"> <table class="table">
<template v-if="form.completeCompetitionSetup.competitionType === 0">
<tr> <tr>
<th width="150">姓名</th> <th width="150">姓名</th>
<td>{{ info.person.userName }}</td> <td>{{ info.person.userName }}</td>
@ -37,6 +38,7 @@
<th>学校</th> <th>学校</th>
<td>{{ info.person.schoolName }}</td> <td>{{ info.person.schoolName }}</td>
</tr> </tr>
</template>
<template v-if="form.completeCompetitionSetup.competitionType"> <template v-if="form.completeCompetitionSetup.competitionType">
<template> <template>
<tr> <tr>
@ -543,7 +545,7 @@ export default {
if (this.form.completeCompetitionSetup.competitionType) { // if (this.form.completeCompetitionSetup.competitionType) { //
this.curRow = row this.curRow = row
this.memberVisible = true this.memberVisible = true
const teamId = this.form.competitionRegistration.teamId const teamId = this.info.teamId
if (teamId) { if (teamId) {
this.$post(this.api.stageGradeManagementList, { this.$post(this.api.stageGradeManagementList, {
pageNum: 1, pageNum: 1,

@ -39,13 +39,13 @@
<el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column> <el-table-column prop="schoolName" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="timeSum" label="用时" width="90" align="center"> <el-table-column prop="timeSum" label="用时" width="90" 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="score" label="分数" width="90" align="center"></el-table-column> <el-table-column prop="score" label="分数" width="90" align="center"></el-table-column>
<el-table-column label="得分详情" align="center" width="160"> <el-table-column label="得分详情" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row, scope.$index)">查看</el-button> <el-button v-if="(!competitionType && scope.row.reportId) || competitionType" type="text" @click="show(scope.row, scope.$index)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -114,7 +114,7 @@
<el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button> <el-button type="primary" @click="download">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
</div> </div>
<el-upload <el-upload
ref="importStaff" ref="upload"
name="file" name="file"
accept=".xls,.xlsx" accept=".xls,.xlsx"
:on-remove="handleRemove" :on-remove="handleRemove"
@ -129,8 +129,10 @@
:data="{ :data="{
competitionId: this.id, competitionId: this.id,
stageId: this.stageId, stageId: this.stageId,
isOverallRanking: active ? 0 : 1 isOverallRanking: active ? 0 : 1,
schoolId: ''
}" }"
:auto-upload="false"
> >
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button> <el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload> </el-upload>
@ -265,6 +267,7 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
competitionId: this.id, competitionId: this.id,
publicationType: this.type, publicationType: this.type,
locationStageId: this.stageId,
stageIds: ids.splice(0, ids.length - 1) stageIds: ids.splice(0, ids.length - 1)
}).then(({ page, publishStatus }) => { }).then(({ page, publishStatus }) => {
this.published = publishStatus this.published = publishStatus
@ -407,6 +410,8 @@ export default {
}, },
// //
publishSubmit() { publishSubmit() {
const { startTime, endTime } = this.grades[this.index]
if (Date.now() <= new Date(endTime)) return util.errorMsg('当前阶段还在进行中,请在本阶段结束后再发布!')
if (this.type) { // if (this.type) { //
this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => { this.$post(this.api.batchRelease, this.list.map(e => e.id)).then(res => {
this.getData() this.getData()
@ -423,6 +428,7 @@ export default {
list.map(e => { list.map(e => {
e.competitionId = id e.competitionId = id
e.isOverallRanking = isOverall e.isOverallRanking = isOverall
e.stageId = this.stageId
// if (isOverall) delete e.stageId // if (isOverall) delete e.stageId
if (isPerson) e.teamId = null // teamIdnull if (isPerson) e.teamId = null // teamIdnull
}) })
@ -532,10 +538,13 @@ export default {
this.exportCode = exportCode this.exportCode = exportCode
this.uploadFaild = true this.uploadFaild = true
util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`) util.errorMsg(`本次上传有${res.data.failureNum}个错误信息录入`)
} else {
this.importVisible = false
this.getRank()
util.successMsg('请检查数据后,点击发布排名以发布数据!')
} }
this.uploadData = res.data.data
} else { } else {
res.message ? util.errorMsg(res.message) : util.errorMsg("上传失败,请检查数据") util.errorMsg(res.message || "上传失败,请检查数据")
} }
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
@ -553,10 +562,11 @@ export default {
this.uploadFaild = false this.uploadFaild = false
}, },
uploadSure() { uploadSure() {
this.importVisible = false this.list.length ?
// this.list = this.uploadData this.$post(this.api.cancelImport, this.list.map(e => e.id)).then(res => {
this.getRank() this.$refs.upload.submit()
this.uploadData.length && util.successMsg('请检查数据后,点击发布排名以发布数据!') }).catch(res => {}) :
this.$refs.upload.submit()
} }
} }
}; };

@ -207,6 +207,11 @@ export default {
e.answer += `${i + 1}.${n.userAnswer}` e.answer += `${i + 1}.${n.userAnswer}`
}) })
}) })
} else { // pythonuserScores
list.forEach(e => {
const item = this.userScores.find(n => n.judgmentId == e.judgmentId)
if (item && item.runThePictureList) e.runThePictureList = item.runThePictureList
})
} }
this.expData = list this.expData = list
}, },

@ -5,7 +5,7 @@
<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>
@ -62,7 +62,7 @@
<el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="400px" class="dialog" :close-on-click-modal="false" @close="closeAdd"> <el-dialog :title="(!isAdd ? '编辑' : '新增') + '参赛人员'" :visible.sync="addVisible" width="400px" class="dialog" :close-on-click-modal="false" @close="closeAdd">
<el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'> <el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'>
<el-form-item prop="schoolId" label="院校"> <el-form-item v-if="!schoolDisable" prop="schoolId" label="院校">
<el-select v-model="form.schoolId" filterable style="width: 100%"> <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-option v-for="(item, i) in clients" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select> </el-select>
@ -76,7 +76,7 @@
<el-form-item label="账号角色"> <el-form-item label="账号角色">
学生 学生
</el-form-item> </el-form-item>
<el-form-item 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" :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-option v-for="(item, i) in teams" :key="i" :label="item.teamName" :value="item.teamId"></el-option>
@ -193,7 +193,8 @@ export default {
identification: 1 identification: 1
}, },
originForm: {}, originForm: {},
exitMember: 0 exitMember: 0,
schoolDisable: false
}; };
}, },
watch: { watch: {
@ -207,7 +208,6 @@ export default {
mounted() { mounted() {
this.initData() this.initData()
this.getInfo() this.getInfo()
this.getClient()
this.getTeam() this.getTeam()
}, },
methods: { methods: {
@ -231,6 +231,13 @@ 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
//
if (competition.competitionScope) {
this.getClient()
} else {
this.schoolDisable = true
this.form.schoolId = competition.schoolId
}
}).catch(err => {}) }).catch(err => {})
}, },
initData() { initData() {
@ -288,12 +295,12 @@ export default {
}, },
// //
submitForm() { submitForm() {
const { form } = this
if (!this.isAdd) { //
if (this.exitMember) { if (this.exitMember) {
this.submiting = false this.submiting = false
return util.errorMsg('学生已存在') return util.errorMsg('学生已存在')
} }
const { form } = this
if (!this.isAdd) { //
this.$post(this.api.updateUser, { this.$post(this.api.updateUser, {
hrUserAccount: { hrUserAccount: {
...form, ...form,
@ -332,7 +339,7 @@ export default {
}) })
} else { } else {
// //
this.$post(this.api.joinCompetitionTeam, { this.$post(this.api[this.info.completeCompetitionSetup.competitionType ? 'joinCompetitionTeam' : 'addCompetitionRegistration'], {
accountId: form.id, accountId: form.id,
competitionId: this.id, competitionId: this.id,
teamId: this.form.teamId, teamId: this.form.teamId,
@ -399,9 +406,15 @@ export default {
}, },
// //
getClient() { getClient() {
if (this.info.competitionScope === 2) { //
this.$get(`${this.api.schoolsInCompetitionArea}?competitionId=${this.id}`).then(({ schools }) => {
this.clients = schools
}).catch(res => {})
} 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() {

@ -342,6 +342,7 @@ export default {
if (!this.isToPoint) { if (!this.isToPoint) {
this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => {
let { projectManage, projectJudgmentVos } = res; let { projectManage, projectJudgmentVos } = res;
if (!projectManage.remark) projectManage.remark = projectManage.projectName //
this.projectManage = projectManage; this.projectManage = projectManage;
this.projectJudgmentData = projectJudgmentVos; this.projectJudgmentData = projectJudgmentVos;
this.oriPer = projectManage.permissions this.oriPer = projectManage.permissions
@ -349,6 +350,7 @@ export default {
e.sort = i + 1; e.sort = i + 1;
}); });
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 0
this.$refs.main.scrollTop = 0; this.$refs.main.scrollTop = 0;
}); });
}).catch(err => { }).catch(err => {
@ -757,7 +759,7 @@ export default {
// //
back() { back() {
// //
if(this.updateTime > 1){ if(this.updateTime){
this.$confirm('编辑的内容未保存,是否保存?', "提示", { this.$confirm('编辑的内容未保存,是否保存?', "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {

Loading…
Cancel
Save