赛事相关

dev_review
yujialong 8 months ago
parent 6ba5f44a33
commit 2419a97063
  1. 2
      src/setting.js
  2. 5
      src/views/match/add/step1.vue
  3. 3
      src/views/match/add/step2.vue
  4. 58
      src/views/match/manage/matchSignup.vue
  5. 99
      src/views/theoreticalCourse/preview/index.vue

@ -14,7 +14,7 @@ if (isDev) {
sandPath = `http://${location.hostname}:9520` sandPath = `http://${location.hostname}:9520`
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.217:9000/' host = 'http://192.168.31.51:9000/'
} else if (isPro) { } else if (isPro) {
jumpPath = 'https://judgment.huorantech.cn/' jumpPath = 'https://judgment.huorantech.cn/'
} }

@ -677,8 +677,9 @@ export default {
if (form.competitionScope == 2 && (!form.competitionRangeList || !form.competitionRangeList.length)) form.competitionScope = 1 if (form.competitionScope == 2 && (!form.competitionRangeList || !form.competitionRangeList.length)) form.competitionScope = 1
} }
this.$parent.showLoad() this.$parent.showLoad()
delete form.publishStatus // delete form.publishStatus
if (status === 1) form.publishStatus = 1 // if (status === 1) form.publishStatus = 1
form.publishStatus = status
form.ztOpen = form.id ? form.ztOpen : (status ? 0 : 1) // form.ztOpen = form.id ? form.ztOpen : (status ? 0 : 1) //
form.releaseType = releaseType form.releaseType = releaseType
form.id = this.$route.query.id form.id = this.$route.query.id

@ -464,9 +464,6 @@ export default {
} else { // 稿 } else { // 稿
form.competitionStageList = form.competitionStageList.filter(e => e.stageName) form.competitionStageList = form.competitionStageList.filter(e => e.stageName)
} }
for (const e of form.competitionStageList) {
if (!e.teamNumLimit) e.customNumber = 0
}
this.$parent.showLoad() this.$parent.showLoad()
if (form.ruleId) { if (form.ruleId) {
this.$post(this.api.editCompetitionRule, form).then(res => { this.$post(this.api.editCompetitionRule, form).then(res => {

@ -30,7 +30,11 @@
@click="autoAllocation">自动分配阶段成员</el-button> @click="autoAllocation">自动分配阶段成员</el-button>
<el-button type="primary" <el-button type="primary"
round round
@click="batchImport">导入</el-button> @click="batchImport">
<i v-if="uploading"
class="el-icon-loading"></i>
{{ uploading ? '正在' : '' }}导入
</el-button>
<el-button type="primary" <el-button type="primary"
round round
@click="add" @click="add"
@ -174,6 +178,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"
@ -282,6 +287,7 @@
:visible.sync="importVisible" :visible.sync="importVisible"
width="24%" width="24%"
:close-on-click-modal="false" :close-on-click-modal="false"
:modal-append-to-body="false"
@close="cancelUpload"> @close="cancelUpload">
<div style="text-align: center"> <div style="text-align: center">
<template v-if="!uploadFaild"> <template v-if="!uploadFaild">
@ -292,6 +298,8 @@
<el-upload name="file" <el-upload name="file"
accept=".xls,.xlsx" accept=".xls,.xlsx"
ref="upload" ref="upload"
class="import-file"
:before-upload="beforeUpload"
:on-remove="handleRemove" :on-remove="handleRemove"
:on-error="uploadError" :on-error="uploadError"
:on-success="uploadSuccess" :on-success="uploadSuccess"
@ -301,21 +309,32 @@
competitionId: id, competitionId: id,
platformId: 2 platformId: 2
}" }"
:disabled="uploading"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:action="info.completeCompetitionSetup.competitionType ? this.api.batchImportTeamData : this.api.batchImportPersonalData" :action="info.completeCompetitionSetup.competitionType ? this.api.batchImportTeamData : this.api.batchImportPersonalData"
:file-list="uploadList" :file-list="uploadList"
:headers="headers"> :headers="headers">
<el-button type="primary" <el-button type="primary"
:loading="uploading"
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>
</el-upload> </el-upload>
</template> </template>
<template v-else> <template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ uploadTips }}</p> <p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ uploadTips }}</p>
<a type="primary" <p type="primary"
style="font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</a> @click="showFaild">部分数据导入失败查看失败原因</p>
<el-button type="primary"
@click="uploadFaild = false">重新上传</el-button>
</template> </template>
</div> </div>
<span v-if="uploading"
slot="footer"
class="dialog-footer">
<el-button @click="cancelUpload">取消上传</el-button>
<el-button type="primary"
@click="backstageUpload">后台上传</el-button>
</span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -412,6 +431,8 @@ export default {
headers: { headers: {
token: sessionStorage.getItem("token") token: sessionStorage.getItem("token")
}, },
uploading: false,
isBackstage: 0,
}; };
}, },
watch: { watch: {
@ -496,9 +517,8 @@ export default {
// //
batchImport () { batchImport () {
this.isBackstage = 0
this.importVisible = true this.importVisible = true
this.uploadList = []
this.uploadFaild = false
}, },
// //
download () { download () {
@ -521,6 +541,7 @@ 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) {
@ -539,12 +560,17 @@ export default {
} }
}, },
uploadError (err, file, fileList) { uploadError (err, file, fileList) {
console.log("🚀 ~ uploadError ~ err:", err)
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}`)
}, },
@ -553,14 +579,19 @@ export default {
this.uploadFaild = false this.uploadFaild = false
}, },
cancelUpload () { cancelUpload () {
if (!this.isBackstage) {
this.uploadList = []
this.$refs.upload.abort() this.$refs.upload.abort()
this.uploading = false
this.init() this.init()
this.importVisible = false this.importVisible = false
this.keyWord = '' this.keyWord = ''
}
}, },
uploadSure () { //
backstageUpload () {
this.isBackstage = 1
this.importVisible = false this.importVisible = false
this.keyWord = ''
}, },
// //
add () { add () {
@ -589,6 +620,10 @@ export default {
}).catch(res => { }); }).catch(res => { });
}).catch(() => { }); }).catch(() => { });
}, },
//
schoolChange () {
if (!this.form.studentAffiliatedInstitutionId) this.form.studentAffiliatedInstitutionId = this.form.schoolId
},
// //
workNumberChange () { workNumberChange () {
const { form } = this const { form } = this
@ -833,4 +868,11 @@ export default {
font-size: 12px; font-size: 12px;
color: #e90000; color: #e90000;
} }
/deep/.import-file {
.el-progress__text,
.el-progress,
.el-upload-list__item-status-label {
display: none !important;
}
}
</style> </style>

@ -1,38 +1,59 @@
<template> <template>
<!-- 课程预览 --> <!-- 课程预览 -->
<div> <div>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover"
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" :content="'课程预览'"></el-page-header> <el-page-header @back="goBack"
:content="'课程预览'"></el-page-header>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="m-b-20" style="background: none;"> <el-card shadow="hover"
class="m-b-20"
style="background: none;">
<div class="flex"> <div class="flex">
<div class="cover" :class="{'is-word': showMask1}"> <div class="cover"
<img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%"> :class="{'is-word': showMask1}">
<img v-if="coverUrl"
:src="coverUrl"
alt=""
width="100%"
height="100%">
<template v-else-if="iframeSrc"> <template v-else-if="iframeSrc">
<iframe class="inner fileIframe" id="fileIframe" :src="iframeSrc" frameborder="0"></iframe> <iframe class="inner fileIframe"
id="fileIframe"
:src="iframeSrc"
frameborder="0"></iframe>
<template v-if="showMask"> <template v-if="showMask">
<div class="mask" style="width: 500px;height: 30px;top: 53px;right: 320px"></div> <div class="mask"
<div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div> style="width: 500px;height: 30px;top: 53px;right: 320px"></div>
<div class="mask"
style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
</template> </template>
<template v-if="showMask1"> <template v-if="showMask1">
<div class="word-mask" style="height: 40px;"></div> <div class="word-mask"
<div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div> style="height: 40px;"></div>
<div class="word-mask2"
style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
</template> </template>
<template v-if="showMask2"> <template v-if="showMask2">
<div class="excel-mask1" style="height: 48px;"></div> <div class="excel-mask1"
style="height: 48px;"></div>
</template> </template>
</template> </template>
<div class="pdf inner" v-else-if="pdfSrc"> <div class="pdf inner"
v-else-if="pdfSrc">
<p class="arrow"> <p class="arrow">
<span @click="changePdfPage(0)" class="turn el-icon-arrow-left" :class="{grey: currentPage==1}"></span> <span @click="changePdfPage(0)"
class="turn el-icon-arrow-left"
:class="{grey: currentPage==1}"></span>
{{ currentPage }} / {{ pageCount }} {{ currentPage }} / {{ pageCount }}
<span @click="changePdfPage(1)" class="turn el-icon-arrow-right" :class="{grey: currentPage==pageCount}"></span> <span @click="changePdfPage(1)"
class="turn el-icon-arrow-right"
:class="{grey: currentPage==pageCount}"></span>
</p> </p>
<pdf <pdf class="pdf-wrap"
class="pdf-wrap"
:src="pdfSrc" :src="pdfSrc"
:page="currentPage" :page="currentPage"
@num-pages="pageCount=$event" @num-pages="pageCount=$event"
@ -40,27 +61,41 @@
@loaded="loadPdfHandler"> @loaded="loadPdfHandler">
</pdf> </pdf>
</div> </div>
<div class="inner" v-else-if="playAuth"> <div class="inner"
<div class="video_wid" id="player"></div> v-else-if="playAuth">
<div class="video_wid"
id="player"></div>
</div> </div>
</div> </div>
<div class="catalog flex-1"> <div class="catalog flex-1">
<div class="list"> <div class="list">
<h4 class="title">{{ courseName }}</h4> <h4 class="title">{{ courseName }}</h4>
<div class="desc-wrap"> <div class="desc-wrap">
<div class="desc" :class="{active: desShrink}" v-html="description"></div> <div class="desc"
<i class="arrow" :class="{active: desShrink}" v-if="description.length > 40"> :class="{active: desShrink}"
v-html="description"></div>
<i class="arrow"
:class="{active: desShrink}"
v-if="description.length > 40">
<span>...</span> <span>...</span>
<img src="@/assets/img/arrow-down.png" alt="" @click="desShrink = !desShrink"> <img src="@/assets/img/arrow-down.png"
alt=""
@click="desShrink = !desShrink">
</i> </i>
</div> </div>
<div class="chapters"> <div class="chapters">
<template v-if="videoList.length"> <template v-if="videoList.length">
<div class="chapter" v-for="(item,index) in videoList" :key="index"> <div class="chapter"
v-for="(item,index) in videoList"
:key="index">
<div class="chapterName">{{ item.name }}</div> <div class="chapterName">{{ item.name }}</div>
<div class="section" v-if="item.subsectionList.length"> <div class="section"
<div v-for="(section,i) in item.subsectionList" :key="i" @click="preview(section, item.name)"> v-if="item.subsectionList.length">
<p class="sectionName" :class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p> <div v-for="(section,i) in item.subsectionList"
:key="i"
@click="preview(section, item.name)">
<p class="sectionName"
:class="{active: curLink === `${item.name}${section.name}`}">{{ section.name }}</p>
</div> </div>
</div> </div>
</div> </div>
@ -131,7 +166,7 @@ export default {
this.coverUrl = res.data.coverUrl; this.coverUrl = res.data.coverUrl;
}, },
async getChapter () { async getChapter () {
let res = await this.$get(`${this.api.queryChapters}?courseId=${this.id}`); let res = await this.$get(`${this.api.queryChaptersTheoretical}?courseId=${this.id}`);
this.videoList = res.chapterList; this.videoList = res.chapterList;
}, },
insertScript () { insertScript () {
@ -252,7 +287,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
$height: 700px; $height: 700px;
.video_wid, .cover { .video_wid,
.cover {
position: relative; position: relative;
width: 76%; width: 76%;
max-width: 1400px; max-width: 1400px;
@ -274,7 +310,8 @@ $height: 700px;
height: $height !important; height: $height !important;
} }
.video_wid, .inner { .video_wid,
.inner {
width: 100%; width: 100%;
height: 100% !important; height: 100% !important;
border: 0; border: 0;
@ -379,7 +416,7 @@ $height: 700px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
cursor: pointer; cursor: pointer;
&.active { &.active {
color: #9278FF; color: #9278ff;
} }
} }
} }
@ -388,10 +425,10 @@ $height: 700px;
.el-image-viewer__wrapper { .el-image-viewer__wrapper {
transform: translateY(-10px); transform: translateY(-10px);
transition: transform .5s; transition: transform 0.5s;
&.active { &.active {
transform: translateY(0) transform: translateY(0);
} }
} }

Loading…
Cancel
Save