dev_2022-06-14
yujialong 2 years ago
parent 55a9ea2897
commit 67a25d77ce
  1. 1
      src/api/index.js
  2. 10
      src/pages/match/add/index.vue
  3. 56
      src/pages/match/list/index.vue
  4. 3
      src/pages/match/manage/index.vue
  5. 13
      src/pages/match/manage/matchDetail.vue
  6. 2
      src/pages/match/manage/notice.vue
  7. 1
      src/pages/student/list/index.vue
  8. 4
      src/setting.js

@ -131,6 +131,7 @@ export default {
addAnnouncement: `occupationlab/contest/announcement/addAnnouncement`, addAnnouncement: `occupationlab/contest/announcement/addAnnouncement`,
amendmentAnnouncement: `occupationlab/contest/announcement/amendmentAnnouncement`, amendmentAnnouncement: `occupationlab/contest/announcement/amendmentAnnouncement`,
deleteAnnouncement: `occupationlab/contest/announcement/deleteAnnouncement`, deleteAnnouncement: `occupationlab/contest/announcement/deleteAnnouncement`,
disableAnnouncement: `occupationlab/contest/announcement/disableAnnouncement`,
queryAnnouncementByContestId: `occupationlab/contest/announcement/queryAnnouncementByContestId`, queryAnnouncementByContestId: `occupationlab/contest/announcement/queryAnnouncementByContestId`,
queryAnnouncementDetails: `occupationlab/contest/announcement/queryAnnouncementDetails`, queryAnnouncementDetails: `occupationlab/contest/announcement/queryAnnouncementDetails`,
deleteAnnouncementAnnex: `occupationlab/contestAnnouncementAnnex/delete`, deleteAnnouncementAnnex: `occupationlab/contestAnnouncementAnnex/delete`,

@ -119,7 +119,6 @@
:on-error="uploadError" :on-error="uploadError"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-success="uploadAnnexSuccess" :on-success="uploadAnnexSuccess"
:before-remove="beforeRemove"
:limit="5" :limit="5"
:on-exceed="handleExceedAnnex" :on-exceed="handleExceedAnnex"
:action="this.api.fileupload" :action="this.api.fileupload"
@ -375,7 +374,14 @@ export default {
}, },
// //
beforeUpload(file) { beforeUpload(file) {
this.fileName = file.name const isLt2M = file.size / 1024 / 1024 < 10
if (!isLt2M) util.warningMsg('请上传小于10MB的附件!')
if (isLt2M) {
this.fileName = file.name
return true
} else {
return false
}
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.$message({ this.$message({

@ -99,6 +99,7 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting";
export default { export default {
name: "match", name: "match",
@ -186,32 +187,37 @@ export default {
}) })
}, },
methods: { methods: {
getData() { getList() {
const { form } = this const { form } = this
// this.timer = setInterval(() => { this.$post(this.api.contestPageConditionQueryByOccupationlab, {
this.$post(this.api.contestPageConditionQueryByOccupationlab, { pageNum: this.page,
pageNum: this.page, pageSize: this.pageSize,
pageSize: this.pageSize, competitionScope: 0, // (0: 1: 2.)
competitionScope: 0, // (0: 1: 2.) endTime: form.endTime || null,
endTime: form.endTime || null, keyWord: this.keyword || null,
keyWord: this.keyword || null, platformSource: 1, // (01)
platformSource: 1, // (01) startTime: form.startTime || null,
startTime: form.startTime || null, publishStatus: form.publishStatus === '' ? null : form.publishStatus
publishStatus: form.publishStatus }).then(({ data }) => {
}).then(({ data }) => { const { records } = data
const { records } = data records.map(e => {
records.map(e => { if (e.ztOpen) e.isOpen = 1
if (e.ztOpen) e.isOpen = 1 })
}) this.matchData = records
this.matchData = records this.total = data.total
this.total = data.total this.$refs.table.clearSelection()
this.$refs.table.clearSelection() if (!this.matchData.length && this.total) {
if (!this.matchData.length && this.total) { this.page--
this.page-- this.getData()
this.getData() }
} }).catch(res => {})
}).catch(res => {}) },
// }, 1000) getData() {
this.getList()
if (!Setting.isDev) {
clearInterval(this.timer)
this.timer = setInterval(this.getList, 1000)
}
}, },
initData() { initData() {
this.page = 1; this.page = 1;

@ -3,7 +3,7 @@
<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="back" :content="'赛事管理'"></el-page-header> <el-page-header @back="back" :content="name + '/管理'"></el-page-header>
</div> </div>
</el-card> </el-card>
<div class="page" style="margin-bottom: 24px"> <div class="page" style="margin-bottom: 24px">
@ -32,6 +32,7 @@ export default {
name: "matchManage", name: "matchManage",
data() { data() {
return { return {
name: '',
active: this.$route.query.tab || "first", active: this.$route.query.tab || "first",
tabs: { tabs: {
first: "大赛详情", first: "大赛详情",

@ -112,7 +112,6 @@
:on-error="uploadError" :on-error="uploadError"
:before-upload="beforeUpload" :before-upload="beforeUpload"
:on-success="uploadAnnexSuccess" :on-success="uploadAnnexSuccess"
:before-remove="beforeRemove"
:limit="5" :limit="5"
:on-exceed="handleExceedAnnex" :on-exceed="handleExceedAnnex"
:action="this.api.fileupload" :action="this.api.fileupload"
@ -296,6 +295,7 @@ export default {
methods: { methods: {
getData() { getData() {
this.$post(`${this.api.getContest}?contestId=${this.form.id}`).then(({ contest }) => { this.$post(`${this.api.getContest}?contestId=${this.form.id}`).then(({ contest }) => {
this.$parent.name = contest.name
this.signupTime = [contest.signUpStartTime, contest.signUpEndTime] this.signupTime = [contest.signUpStartTime, contest.signUpEndTime]
this.playTime = [contest.playStartTime, contest.playEndTime] this.playTime = [contest.playStartTime, contest.playEndTime]
this.sponsorList = contest.sponsor.split(",") this.sponsorList = contest.sponsor.split(",")
@ -333,7 +333,7 @@ export default {
if (rangeName) { if (rangeName) {
const range = [] const range = []
rangeName.map(e => { rangeName.map(e => {
range.push(e.type ? (e.provinceName || e.cityName) : e.schoolName) range.push(e.type ? (e.cityName || e.provinceName) : e.schoolName)
}) })
this.rangeName = range.join(',') this.rangeName = range.join(',')
} }
@ -413,7 +413,14 @@ export default {
}, },
// //
beforeUpload(file) { beforeUpload(file) {
this.fileName = file.name const isLt2M = file.size / 1024 / 1024 < 10
if (!isLt2M) util.warningMsg('请上传小于10MB的附件!')
if (isLt2M) {
this.fileName = file.name
return true
} else {
return false
}
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
this.$message({ this.$message({

@ -102,7 +102,7 @@ export default {
}); });
}, },
switchOff(val, row, index) { switchOff(val, row, index) {
this.$put(`${this.api.disableApplicant}/${row.id}/${val}`) this.$put(`${this.api.disableAnnouncement}?id=${row.id}&isDisable=${val}`)
.then(res => { .then(res => {
}) })
.catch(err => { .catch(err => {

@ -274,6 +274,7 @@ export default {
value: "id", value: "id",
lazy: true, lazy: true,
lazyLoad(node, resolve) { lazyLoad(node, resolve) {
console.log(55, that.cascaderValue)
let level = 1; let level = 1;
let parentId = ""; let parentId = "";
if (node.data && node.data.level && node.data.id) { if (node.data && node.data.level && node.data.id) {

@ -32,8 +32,8 @@ if (isHh) {
} else if (isDev) { } else if (isDev) {
jumpPath = "http://192.168.31.125:8087/"; jumpPath = "http://192.168.31.125:8087/";
bankPath = `http://192.168.31.125:8093` bankPath = `http://192.168.31.125:8093`
// host = "http://121.37.12.51:9000/"; // 中台测试服 host = "http://121.37.12.51:9000/"; // 中台测试服
host = "http://192.168.31.151:9000/"; // 榕 // host = "http://192.168.31.151:9000/"; // 榕
// host = 'http://192.168.31.137:9000/'; // 赓 // host = 'http://192.168.31.137:9000/'; // 赓
} }

Loading…
Cancel
Save