|
|
|
@ -99,6 +99,7 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import util from "@/libs/util"; |
|
|
|
|
import Setting from "@/setting"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: "match", |
|
|
|
@ -186,32 +187,37 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getData() { |
|
|
|
|
getList() { |
|
|
|
|
const { form } = this |
|
|
|
|
// this.timer = setInterval(() => { |
|
|
|
|
this.$post(this.api.contestPageConditionQueryByOccupationlab, { |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
competitionScope: 0, // 大赛范围(0:本校内 1:全平台 2.指定区域、院校) |
|
|
|
|
endTime: form.endTime || null, |
|
|
|
|
keyWord: this.keyword || null, |
|
|
|
|
platformSource: 1, // 大赛来源(0中台,1职站) |
|
|
|
|
startTime: form.startTime || null, |
|
|
|
|
publishStatus: form.publishStatus |
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
const { records } = data |
|
|
|
|
records.map(e => { |
|
|
|
|
if (e.ztOpen) e.isOpen = 1 |
|
|
|
|
}) |
|
|
|
|
this.matchData = records |
|
|
|
|
this.total = data.total |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
if (!this.matchData.length && this.total) { |
|
|
|
|
this.page-- |
|
|
|
|
this.getData() |
|
|
|
|
} |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
// }, 1000) |
|
|
|
|
this.$post(this.api.contestPageConditionQueryByOccupationlab, { |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
competitionScope: 0, // 大赛范围(0:本校内 1:全平台 2.指定区域、院校) |
|
|
|
|
endTime: form.endTime || null, |
|
|
|
|
keyWord: this.keyword || null, |
|
|
|
|
platformSource: 1, // 大赛来源(0中台,1职站) |
|
|
|
|
startTime: form.startTime || null, |
|
|
|
|
publishStatus: form.publishStatus === '' ? null : form.publishStatus |
|
|
|
|
}).then(({ data }) => { |
|
|
|
|
const { records } = data |
|
|
|
|
records.map(e => { |
|
|
|
|
if (e.ztOpen) e.isOpen = 1 |
|
|
|
|
}) |
|
|
|
|
this.matchData = records |
|
|
|
|
this.total = data.total |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
if (!this.matchData.length && this.total) { |
|
|
|
|
this.page-- |
|
|
|
|
this.getData() |
|
|
|
|
} |
|
|
|
|
}).catch(res => {}) |
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
this.getList() |
|
|
|
|
if (!Setting.isDev) { |
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
this.timer = setInterval(this.getList, 1000) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
this.page = 1; |
|
|
|
|