赛事等修复

dev_2022-06-14
yujialong 2 years ago
parent 12b3c6e314
commit f2439b1e30
  1. 64
      src/components/breadcrumb/index.vue
  2. 6
      src/pages/achievement/list/index.vue
  3. 32
      src/pages/match/add/index.vue
  4. 2
      src/pages/match/list/index.vue
  5. 14
      src/pages/match/manage/matchSignup.vue
  6. 103
      src/pages/match/preview/index.vue
  7. 2
      src/setting.js

@ -0,0 +1,64 @@
<template>
<!-- 面包屑 -->
<div class="breadcrumb">
<el-breadcrumb separator=">">
<template v-for="(item, index) in pages">
<el-breadcrumb-item
v-if="index != pages.length - 1"
:key="index"
:to="{ path: route, query }">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item
v-else
:key="index">
{{item}}
</el-breadcrumb-item>
</template>
</el-breadcrumb>
</div>
</template>
<script>
export default {
props: {
data: {
type: String,
required: true
},
route: {
type: String,
default: 'list'
},
query: {
type: Object
}
},
data() {
return {
pages: this.data.split('/')
};
},
methods: {
update(data){
this.pages = data.split('/')
}
}
};
</script>
<style lang="scss" scoped>
.breadcrumb {
margin: 4px 0 16px;
/deep/.el-breadcrumb__item {
.is-link, .el-breadcrumb__separator {
font-weight: 400;
color: #007EFF;
}
&:last-child {
.is-link {
color: #0B1D30;
}
}
}
}
</style>

@ -184,10 +184,8 @@ export default {
},
getschoolCourse() { //
this.$get(this.api.schoolCourseByAchievement).then(res => {
if (res.data && res.data.length) {
this.curriculumList = res.data;
this.getData();
}
this.curriculumList = res.data;
this.getData();
}).catch(err => {
});
},

@ -149,7 +149,10 @@
:props="props"
:show-all-levels="false"
clearable
filterable></el-cascader>
filterable
:before-filter="beforeFilter"
:options="rangeList"
@input.native="rangeSearch"></el-cascader>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="rangeVisible = false"> </el-button>
<el-button size="small" type="primary" @click="rangeSubmit"> </el-button>
@ -212,6 +215,9 @@ export default {
checkStrictly: true,
lazy: true,
lazyLoad (node, resolve) {
//
const input = document.querySelector('.el-cascader__search-input')
if (input && input.value) return false
const { level, value } = node
//
console.log('lazy', node, that.range)
@ -265,6 +271,9 @@ export default {
},
submiting: false,
updateTime: 0,
rangeTimer: null,
schools: [],
rangeList: []
};
},
components: {
@ -301,6 +310,7 @@ export default {
},
mounted() {
this.getData()
this.getSchool()
},
methods: {
getData() {
@ -355,6 +365,26 @@ export default {
showRange() {
this.rangeVisible = true
},
//
getSchool() {
this.$get(this.api.querySchoolData).then(({ list }) => {
list.map(e => e.label = e.schoolName)
this.schools = list
}).catch(res => {})
},
//
beforeFilter() {
return false
},
//
rangeSearch(el) {
clearTimeout(this.rangeTimer)
this.rangeTimer = setTimeout(() => {
const val = el.target.value
let result = this.schools.filter(e => e.schoolName.includes(val)) //
this.rangeList = val ? result : []
}, 500)
},
//
rangeSubmit() {
// id

@ -239,7 +239,7 @@ export default {
type: "warning"
})
.then(() => {
this.$del(`${this.api.deleteContest}/${row.id}`).then(res => {
this.$post(`${this.api.deleteContest}?contestId=${row.id}`).then(res => {
util.successMsg("删除成功");
this.getData();
}).catch(res => {

@ -9,13 +9,12 @@
</li>
</ul>
<div>
<el-button type="primary" round @click="exportAll">全部导出</el-button>
<el-button type="primary" round @click="exportBatch">批量导出</el-button>
<el-button type="primary" round @click="exportAll">导出</el-button>
</div>
</div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" :selectable="row => row.isDisable!=0" width="80" align="center" :reserve-selection="true"></el-table-column>
<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">
{{ scope.$index + (page - 1) * pageSize + 1 }}
@ -29,7 +28,7 @@
</el-table-column>
<el-table-column prop="phone" label="手机号">
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<!-- <el-table-column label="操作" align="center" width="170">
<template slot-scope="scope">
<el-switch
v-model="scope.row.isDisable"
@ -40,7 +39,7 @@
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="page">
@ -136,9 +135,6 @@ export default {
}
},
exportAll() {
location.href = `${this.api.excelExport}?contestId=${this.id}`;
},
exportBatch() {
const data = this.multipleSelection
if (data.length) {
data.map((e, i) => e.id = i + 1)
@ -151,7 +147,7 @@ export default {
util.downloadFileDirect(`报名人员.xls`, new Blob([res.data]))
}).catch(res => {})
} else {
util.errorMsg("请先选择数据 !");
location.href = `${this.api.excelExport}?contestId=${this.id}`
}
}
}

@ -1,37 +1,65 @@
<template>
<div class="match">
<div class="banner" :style="{backgroundImage: 'url(' + (form.carouselUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220613/png/1536269450851409920.png') + ')'}"></div>
<div class="match-inner">
<div class="info">
<h6 class="title">{{ form.name }}</h6>
<div class="meta">最近编辑时间{{ form.updateTime }}</div>
</div>
<div class="center">
<breadcrumb ref="breadcrumb" :data="'全部赛事/' + form.name" route="matchPreview"></breadcrumb>
<div class="match-inner">
<div class="flex-between">
<el-tabs v-model="curType">
<el-tab-pane v-for="(item, index) in typeList" :key="index" :label="item.name" :name="item.id"></el-tab-pane>
</el-tabs>
<div class="status wait">等待报名</div>
</div>
<div class="info">
<h6 class="title">{{ form.name }}</h6>
<div class="meta">最近编辑时间{{ form.updateTime }}</div>
</div>
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 竞赛信息</div>
<div v-if="form.description" class="texts ql-editor" v-html="form.description"></div>
<template v-if="form.contestAnnexList">
<h6 class="p-title">附件下载</h6>
<ul class="files">
<li v-for="(item, i) in form.contestAnnexList" :key="i">
<el-link v-if="item.canPreview" class="m-r-10" type="primary" @click="previewFile(item)">{{ item.fileName }}</el-link>
<span v-else class="file-name">{{ item.fileName }}</span>
<el-link type="primary" :underline="false" @click="download(item)">下载</el-link>
</li>
</ul>
</template>
<div class="l-title" id="part1"><img src="@/assets/img/label.png" alt=""> 竞赛信息</div>
<div v-if="form.description" class="texts ql-editor" v-html="form.description"></div>
<template v-if="form.contestAnnexList && form.contestAnnexList.length">
<h6 class="p-title">附件下载</h6>
<ul class="files">
<li v-for="(item, i) in form.contestAnnexList" :key="i">
<el-link v-if="item.canPreview" class="m-r-10" type="primary" @click="previewFile(item)">{{ item.fileName }}</el-link>
<span v-else class="file-name">{{ item.fileName }}</span>
<el-link type="primary" :underline="false" @click="download(item)">下载</el-link>
</li>
</ul>
</template>
</div>
</div>
</div>
</template>
<script>
import util from "@/libs/util";
import breadcrumb from '@/components/breadcrumb'
export default {
name: "match",
data() {
return {
curType: '1',
typeList: [
{
id: '1',
name: '竞赛信息'
},
{
id: '2',
name: '竞赛进展'
},
{
id: '3',
name: '通知公告'
}
],
form: util.local.get('match')
};
},
components: {
breadcrumb
},
mounted() {
this.handleAnnex()
},
@ -63,6 +91,8 @@ export default {
<style lang="scss" scoped>
.match {
min-height: 100%;
background-color: #F3F6FA;
.banner{
width: 100%;
height: 350px;
@ -71,14 +101,27 @@ export default {
background-repeat: no-repeat;
box-sizing: border-box;
}
.match-inner {
.center {
width: 1000px;
margin: 40px auto 0;
}
.match-inner {
min-height: calc(100vh - 465px);
padding: 30px 40px 20px;
margin: 40px auto 0;
background-color: #fff;
box-sizing: border-box;
}
/deep/.el-tabs {
.el-tabs__item.is-active, .el-tabs__item:hover {
color: #007EFF;
}
.el-tabs__active-bar {
background-color: #007EFF;
}
}
.p-title {
border-left-color: #007EFF;
}
.l-title{
display: flex;
align-items: center;
@ -89,6 +132,28 @@ export default {
margin-right: 5px;
}
}
.status {
padding: 0 16px;
margin-left: 20px;
line-height: 34px;
font-size: 14px;
color: #fff;
background-color: #52C41A;
border-radius: 4px;
cursor: pointer;
&.wait {
background-color: #FAAD14;
}
&.signing {
background-color: #007EFF;
}
&.signed {
background-color: #52C41A;
}
&.finish {
background-color: #ccc;
}
}
.title{
width: 67%;
margin: 0 auto;

@ -11,7 +11,7 @@ const isTest = url.includes('121.37.12.51'); //是否中台测试服
let bankPath = `${location.origin}/banksystem` // 银行系统地址
let jumpPath = `${location.origin}/judgmentPoint`
let host = `${location.origin}/`
let uploadURL = `https://121.37.12.51/`
let uploadURL = `http://121.37.12.51/`
let title = (isHh || isCH) ? '教师管理端' : '职站服务端管理系统'
if (isPro) {

Loading…
Cancel
Save