赛事相关

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`
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
host = 'http://192.168.31.217:9000/'
host = 'http://192.168.31.51:9000/'
} else if (isPro) {
jumpPath = 'https://judgment.huorantech.cn/'
}

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

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

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

@ -1,38 +1,59 @@
<template>
<!-- 课程预览 -->
<div>
<el-card shadow="hover" class="m-b-20">
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="goBack" :content="'课程预览'"></el-page-header>
<el-page-header @back="goBack"
:content="'课程预览'"></el-page-header>
</div>
</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="cover" :class="{'is-word': showMask1}">
<img v-if="coverUrl" :src="coverUrl" alt="" width="100%" height="100%">
<div class="cover"
:class="{'is-word': showMask1}">
<img v-if="coverUrl"
:src="coverUrl"
alt=""
width="100%"
height="100%">
<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">
<div class="mask" style="width: 500px;height: 30px;top: 53px;right: 320px"></div>
<div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
<div class="mask"
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 v-if="showMask1">
<div class="word-mask" style="height: 40px;"></div>
<div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
<div class="word-mask"
style="height: 40px;"></div>
<div class="word-mask2"
style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
</template>
<template v-if="showMask2">
<div class="excel-mask1" style="height: 48px;"></div>
<div class="excel-mask1"
style="height: 48px;"></div>
</template>
</template>
<div class="pdf inner" v-else-if="pdfSrc">
<div class="pdf inner"
v-else-if="pdfSrc">
<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 }}
<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>
<pdf
class="pdf-wrap"
<pdf class="pdf-wrap"
:src="pdfSrc"
:page="currentPage"
@num-pages="pageCount=$event"
@ -40,27 +61,41 @@
@loaded="loadPdfHandler">
</pdf>
</div>
<div class="inner" v-else-if="playAuth">
<div class="video_wid" id="player"></div>
<div class="inner"
v-else-if="playAuth">
<div class="video_wid"
id="player"></div>
</div>
</div>
<div class="catalog flex-1">
<div class="list">
<h4 class="title">{{ courseName }}</h4>
<div class="desc-wrap">
<div class="desc" :class="{active: desShrink}" v-html="description"></div>
<i class="arrow" :class="{active: desShrink}" v-if="description.length > 40">
<div class="desc"
:class="{active: desShrink}"
v-html="description"></div>
<i class="arrow"
:class="{active: desShrink}"
v-if="description.length > 40">
<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>
</div>
<div class="chapters">
<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="section" v-if="item.subsectionList.length">
<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 class="section"
v-if="item.subsectionList.length">
<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>
@ -131,7 +166,7 @@ export default {
this.coverUrl = res.data.coverUrl;
},
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;
},
insertScript () {
@ -252,7 +287,8 @@ export default {
<style lang="scss" scoped>
$height: 700px;
.video_wid, .cover {
.video_wid,
.cover {
position: relative;
width: 76%;
max-width: 1400px;
@ -274,7 +310,8 @@ $height: 700px;
height: $height !important;
}
.video_wid, .inner {
.video_wid,
.inner {
width: 100%;
height: 100% !important;
border: 0;
@ -379,7 +416,7 @@ $height: 700px;
color: rgba(0, 0, 0, 0.65);
cursor: pointer;
&.active {
color: #9278FF;
color: #9278ff;
}
}
}
@ -388,10 +425,10 @@ $height: 700px;
.el-image-viewer__wrapper {
transform: translateY(-10px);
transition: transform .5s;
transition: transform 0.5s;
&.active {
transform: translateY(0)
transform: translateY(0);
}
}

Loading…
Cancel
Save