Branch_d40a2540
yujialong 2 years ago
parent 23f779cfa0
commit d0c11c180c
  1. 24
      src/api/index.js
  2. 2
      src/pages/achievement/list/index.vue
  3. 23
      src/pages/match/add/index.vue
  4. 36
      src/pages/match/add/set.vue
  5. 13
      src/pages/match/add/step1.vue
  6. 123
      src/pages/match/add/step2.vue
  7. 30
      src/pages/match/add/step3.vue
  8. 11
      src/pages/match/list/index.vue
  9. 11
      src/pages/match/manage/matchInfo.vue
  10. 4
      src/pages/match/manage/matchProgress.vue
  11. 168
      src/pages/match/manage/matchRank.vue
  12. 51
      src/pages/match/manage/matchSignup.vue
  13. 8
      src/pages/match/manage/notice.vue
  14. 4
      src/pages/match/manage/noticeDetail.vue
  15. 2
      src/pages/project/add/index.vue
  16. 8
      src/pages/screen/index.vue
  17. 2
      src/setting.js
  18. 8
      src/store/modules/match.js

@ -1,7 +1,6 @@
import Setting from "@/setting"; import Setting from "@/setting";
const host = Setting.apiBaseURL const host = Setting.apiBaseURL
const uploadURL = Setting.upload.apiURL; const uploadURL = Setting.upload.apiURL;
const host1 = "https://www.occupationlab.com:8080/"
const host2 = 'http://192.168.31.51:9000/' const host2 = 'http://192.168.31.51:9000/'
export default { export default {
@ -76,7 +75,7 @@ export default {
// 成绩管理 // 成绩管理
deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告 deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告
exportAssessmentInfo: `${host}occupationlab/occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩 exportAssessmentInfo: `${host}occupationlab/occupationlab/achievement/exportAssessmentInfo`, // 批量导出考核成绩
exportPracticeInfo: `${host2}occupationlab/occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩 exportPracticeInfo: `occupationlab/occupationlab/achievement/exportPracticeInfo`, // 批量导出练习成绩
getAchievementInfo: `occupationlab/occupationlab/achievement/getAchievementInfo`, // 管理端成绩管理 getAchievementInfo: `occupationlab/occupationlab/achievement/getAchievementInfo`, // 管理端成绩管理
getAssessmentDetail: `occupationlab/occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情 getAssessmentDetail: `occupationlab/occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情
getPracticeDetail: `occupationlab/occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情 getPracticeDetail: `occupationlab/occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情
@ -127,6 +126,7 @@ export default {
getCustomerOrder: `nakadai/nakadai/valueModuleManagement/getCustomerOrder`, getCustomerOrder: `nakadai/nakadai/valueModuleManagement/getCustomerOrder`,
curriculumList: `nakadai/nakadai/curriculum/schoolCourse`, curriculumList: `nakadai/nakadai/curriculum/schoolCourse`,
queryCustomer: `nakadai/nakadai/customer/queryCustomer`, queryCustomer: `nakadai/nakadai/customer/queryCustomer`,
getSchoolsByProvince: `nakadai/nakadai/school/getSchoolsByProvince`,
// 赛事内容 // 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`, addCompetitionContent: `competition/competition/content/addCompetitionContent`,
@ -156,8 +156,8 @@ export default {
cancelRegistration: `competition/competition/registration/cancelRegistration`, cancelRegistration: `competition/competition/registration/cancelRegistration`,
disableContests: `competition/competition/registration/disableContests`, disableContests: `competition/competition/registration/disableContests`,
disableRegistration: `competition/competition/registration/disableRegistration`, disableRegistration: `competition/competition/registration/disableRegistration`,
excelExport: `competition/competition/registration/excelExport`, excelExport: `${host}competition/competition/registration/excelExport`,
exportDataInBatches: `competition/competition/registration/exportDataInBatches`, exportDataInBatches: `${host}competition/competition/registration/exportDataInBatches`,
queryRegistrationByCondition: `competition/competition/registration/queryRegistrationByCondition`, queryRegistrationByCondition: `competition/competition/registration/queryRegistrationByCondition`,
searchTeam: `competition/competition/team/searchTeam`, searchTeam: `competition/competition/team/searchTeam`,
joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`, joinCompetitionTeam: `competition/competition/team/joinCompetitionTeam`,
@ -183,14 +183,14 @@ export default {
saveAnnouncementAnnex: `competition/competition/announcementAnnex/save`, saveAnnouncementAnnex: `competition/competition/announcementAnnex/save`,
// 赛事成绩 // 赛事成绩
batchDeleteContestGrade: `competition/competition/performance/batchDeleteContestGrade`, batchDeleteContestGrade: `competition/competition/performance/batchDeleteContestGrade`,
batchImportGrades: `competition/competition/performance/batchImportGrades`, batchImportGrades: `${host}competition/competition/performance/batchImportGrades`,
exportExperimentalResultsInBatch: `competition/competition/performance/exportExperimentalResultsInBatch`, exportExperimentalResultsInBatch: `${host}competition/competition/performance/exportExperimentalResultsInBatch`,
performanceExportFailure: `competition/competition/performance/exportFailure`, performanceExportFailure: `${host}competition/competition/performance/exportFailure`,
rankExportFailure: `competition/competition/rank/exportFailure`, rankExportFailure: `${host}competition/competition/rank/exportFailure`,
stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`, stageGradeManagementList: `competition/competition/performance/stageGradeManagementList`,
stageRaceRanking: `competition/competition/rank/stageRaceRanking`, stageRaceRanking: `competition/competition/rank/stageRaceRanking`,
overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`, overallStandingsInThePointsRace: `competition/competition/rank/overallStandingsInThePointsRace`,
batchImportRanking: `competition/competition/rank/batchImportRanking`, batchImportRanking: `${host}competition/competition/rank/batchImportRanking`,
publishRanking: `competition/competition/rank/publishRanking`, publishRanking: `competition/competition/rank/publishRanking`,
stageTeamScoreDetails: `competition/competition/rank/stageTeamScoreDetails`, stageTeamScoreDetails: `competition/competition/rank/stageTeamScoreDetails`,
multipleStageTeamScoreDetails: `competition/competition/rank/multipleStageTeamScoreDetails`, multipleStageTeamScoreDetails: `competition/competition/rank/multipleStageTeamScoreDetails`,
@ -202,9 +202,9 @@ export default {
manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`, manuallyRankTheUploadList: `competition/competition/rank/manuallyRankTheUploadList`,
queryPublicationSource: `competition/competition/rank/queryPublicationSource`, queryPublicationSource: `competition/competition/rank/queryPublicationSource`,
releaseVerification: `competition/competition/rank/releaseVerification`, releaseVerification: `competition/competition/rank/releaseVerification`,
gradeImport: `${host2}template/赛事成绩导入模板.xlsx`, gradeImport: `${host}template/赛事成绩导入模板.xlsx`,
rankImportTeam: `${host2}template/赛事排名导入模板(团队赛).xlsx`, rankImportTeam: `${host}template/赛事排名导入模板(团队赛).xlsx`,
rankImportPerson: `${host2}template/赛事排名导入模板(个人赛).xlsx`, rankImportPerson: `${host}template/赛事排名导入模板(个人赛).xlsx`,
// 栏目管理 // 栏目管理
addColumn: `occupationlab/occupationlab/information/column/addColumn`, addColumn: `occupationlab/occupationlab/information/column/addColumn`,
deleteColumn: `occupationlab/occupationlab/information/column/deleteColumn`, deleteColumn: `occupationlab/occupationlab/information/column/deleteColumn`,

@ -3,7 +3,7 @@
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
<li> <li v-if="projectPermissions">
<label>时间</label> <label>时间</label>
<el-radio-group v-model="month" @change="initData"> <el-radio-group v-model="month" @change="initData">
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio> <el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio>

@ -75,6 +75,7 @@ export default {
data() { data() {
return { return {
id: this.$route.query.id || '', id: this.$route.query.id || '',
cache: this.$store.state.match.cache,
hasPer: false, hasPer: false,
releaseTypes: [ releaseTypes: [
{ {
@ -109,16 +110,20 @@ export default {
this.getPer() this.getPer()
}, },
methods: { methods: {
//
resumeData() {
if (this.cache) {
this.step = 3
this.editing = true
this.showBtns = false
}
},
// true // true
getPer() { getPer() {
this.$get(this.api.isClient).then(({ customerId }) => { this.$get(this.api.getCustomerOrder).then(({ show }) => {
customerId && this.$get(this.api.getCustomerOrder, { this.hasPer = show
customerId show || this.$parent.hideArch()
}).then(({ show }) => { }).catch(err => {})
this.hasPer = show
show || this.$parent.hideArch()
}).catch(err => {})
}).catch(res => {})
}, },
// loading // loading
showLoad() { showLoad() {
@ -171,7 +176,7 @@ export default {
// //
preview() { preview() {
util.local.set('match', this.$refs.step1.form) util.local.set('match', this.$refs.step1.form)
window.open(this.$router.resolve('/matchPreview').href) window.open(this.$router.resolve('/match/preview').href)
}, },
// //
cancel() { cancel() {

@ -55,7 +55,7 @@
<div> <div>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</div> </div>
<el-button style="margin-left: 5px" type="primary" round>自定义实验项目</el-button> <el-button style="margin-left: 5px" type="primary" round @click="toProject">自定义实验项目</el-button>
</div> </div>
</div> </div>
<!-- 实训项目表格 --> <!-- 实训项目表格 -->
@ -104,10 +104,12 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import { Loading } from 'element-ui'
export default { export default {
props: ['form', 'step1'], props: ['form', 'step1'],
data() { data() {
return { return {
loadIns: null,
curriculumList: [], curriculumList: [],
keyword: '', keyword: '',
projects: [], projects: [],
@ -140,18 +142,22 @@ export default {
methods: { methods: {
// //
getCourse() { getCourse() {
this.loadIns = Loading.service()
this.$get(this.api.curriculumList).then(({ data }) => { this.$get(this.api.curriculumList).then(({ data }) => {
const list = data const list = data
this.curriculumList = data this.curriculumList = data
if (list.length) this.form.cid = list[0].cid if (!this.form.cid && list.length) this.form.cid = list[0].cid
this.courseChange() this.courseChange()
}).catch(err => {}); }).catch(err => {
this.loadIns.close()
});
}, },
// //
courseChange() { courseChange(val) {
const { sysId, sysName } = this.curriculumList.find(e => e.cid == this.form.cid) const { sysId, sysName } = this.curriculumList.find(e => e.cid == this.form.cid)
this.form.sysName = sysName this.form.sysName = sysName
this.sysId = sysId this.sysId = sysId
if (val) this.loadIns = Loading.service()
this.getProject() this.getProject()
}, },
// //
@ -166,7 +172,10 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
this.projects = data.records this.projects = data.records
this.total = data.total this.total = data.total
}).catch(err => {}); this.loadIns.close()
}).catch(err => {
this.loadIns.close()
});
}, },
initData() { initData() {
this.page = 1; this.page = 1;
@ -176,6 +185,14 @@ export default {
this.page = val; this.page = val;
this.getProject(); this.getProject();
}, },
//
toProject() {
this.$store.commit('match/setCache', {
form: this.form,
curStep: this.$parent.curStep
})
this.$router.push(`/project/list?show=1`)
},
// //
timeChange(val) { timeChange(val) {
if (val.length) { if (val.length) {
@ -205,12 +222,15 @@ export default {
save() { save() {
const { form } = this const { form } = this
if (!form.time.length) return util.warningMsg('请选择比赛时间') if (!form.time.length) return util.warningMsg('请选择比赛时间')
if (this.timeInvalid) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。') const { playStartTime, playEndTime } = this.step1
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
if (!form.cid) return util.warningMsg('请选择课程') if (!form.cid) return util.warningMsg('请选择课程')
if (!form.projectId) return util.warningMsg('请选择项目') if (!form.projectId) return util.warningMsg('请选择项目')
const cur = this.curriculumList.find(e => e.cid == form.cid)
if (cur) form.systemName = cur.sysName
const { systemId, projectName } = this.projects.find(e => e.projectId == form.projectId) const { systemId, projectName } = this.projects.find(e => e.projectId == form.projectId)
form.systemId = systemId if (systemId) form.systemId = systemId
form.projectName = projectName if (projectName) form.projectName = projectName
form.startTime = form.time[0] form.startTime = form.time[0]
form.endTime = form.time[1] form.endTime = form.time[1]
this.$emit('hideSet', this.form) this.$emit('hideSet', this.form)

@ -138,7 +138,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item class="req" label="竞赛详情"> <el-form-item class="req" label="竞赛详情">
<quill :border="true" v-model="form.description" :height="400" /> <quill v-if="quillShow" ref="quill" :border="true" v-model="form.description" :height="400" :readonly="!editing && form.id !== ''" />
</el-form-item> </el-form-item>
<el-form-item label="附件"> <el-form-item label="附件">
<el-upload <el-upload
@ -246,7 +246,7 @@ export default {
fileList: [], fileList: [],
pickerOptions: { pickerOptions: {
disabledDate: time => { disabledDate: time => {
return time.getTime() < new Date().getTime() - 86400000; return this.$route.query.id ? false : time.getTime() < new Date().getTime() - 86400000;
} }
}, },
rangeVisible: false, rangeVisible: false,
@ -325,12 +325,19 @@ export default {
}, },
submiting: false, submiting: false,
updateTime: 0, updateTime: 0,
quillShow: true
}; };
}, },
components: { components: {
quill quill
}, },
watch: { watch: {
editing: function(val) {
this.quillShow = false
this.$nextTick(() => {
this.quillShow = true
})
},
// , // ,
form: { form: {
handler(){ handler(){
@ -369,7 +376,6 @@ export default {
id && this.$post(`${this.api.getCompetition}?competitionId=${id}`).then(({ competition }) => { id && this.$post(`${this.api.getCompetition}?competitionId=${id}`).then(({ competition }) => {
this.$parent.publishStatus = competition.publishStatus this.$parent.publishStatus = competition.publishStatus
this.$parent.releaseType = competition.releaseType this.$parent.releaseType = competition.releaseType
if (!competition.releaseType) this.$parent.editing = 1 //
this.$parent.setupId = competition.completeCompetitionSetup.setupId this.$parent.setupId = competition.completeCompetitionSetup.setupId
if (competition.signUpStartTime) this.signupTime = [competition.signUpStartTime, competition.signUpEndTime] if (competition.signUpStartTime) this.signupTime = [competition.signUpStartTime, competition.signUpEndTime]
if (competition.playStartTime) this.playTime = [competition.playStartTime, competition.playEndTime] if (competition.playStartTime) this.playTime = [competition.playStartTime, competition.playEndTime]
@ -413,6 +419,7 @@ export default {
this.rangeName = range.join(',') this.rangeName = range.join(',')
} }
this.form = competition this.form = competition
this.$parent.resumeData()
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 0 this.updateTime = 0
}) })

@ -122,7 +122,7 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item prop="resultAnnouncementTime" label="成绩公布时间"> <el-form-item prop="rule" label="成绩公布时间">
阶段比赛结束后 阶段比赛结束后
<el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime" type="number" style="width: 120px"></el-input> <el-input v-model.number="form.competitionStageList[0].resultAnnouncementTime" type="number" style="width: 120px"></el-input>
小时公布阶段比赛成绩 小时公布阶段比赛成绩
@ -298,69 +298,86 @@ export default {
// //
if (next === 2) { if (next === 2) {
const stages = form.competitionStageList const stages = form.competitionStageList
for (const i in stages) { if (form.rule === 2) { //
const e = stages[i] const e = stages[0]
if (rule !== 2 && !e.stageName) {
invalid = 1
util.errorMsg('请输入阶段名称')
break
}
const { competitionType, maxTeamSize } = step1.completeCompetitionSetup // 01
// rule: 012
//
if (!rule) {
//
if (form.resultCalculationMethod == 0 && e.pointWeight === '') {
invalid = 1
util.errorMsg('请输入权重')
break
}
pointWeight += e.pointWeight //
} else if (rule === 1) { //
// ()
if (i != stages.length - 1 && e.peopleLimit === '' && e.percentageLimit === '' && e.score === '') {
invalid = 1
util.errorMsg('请至少填写一条晋级规则')
break
}
if (e.score !== '') e.scoreLimit = e.operator + e.score
}
if (rule !== 2 && competitionType && e.teamNumLimitOpt) {
if (e.teamNumLimit === '') {
invalid = 1
util.errorMsg('请输入团队参数人数限制')
break
} else if (e.teamNumLimit < 0) {
invalid = 1
util.errorMsg('团队参数人数不得小于0')
break
} else if (maxTeamSize !== '' && e.teamNumLimit > maxTeamSize) {
invalid = 1
util.errorMsg('团队参数人数不得大于团队人数上限')
break
}
}
if (!e.resultsDetails) { if (!e.resultsDetails) {
if (e.resultAnnouncementTime === '') { if (e.resultAnnouncementTime === '') {
invalid = 1 return util.errorMsg('请填写成绩公布时间')
util.errorMsg('请填写成绩公布时间')
break
} }
if (e.resultAnnouncementTime < 0) { if (e.resultAnnouncementTime < 0) {
invalid = 1 return util.errorMsg('成绩公布时间不得小于0')
util.errorMsg('成绩公布时间不得小于0')
break
} }
if (e.resultAnnouncementTime % 1) { if (e.resultAnnouncementTime % 1) {
return util.errorMsg('成绩公布时间须为整数')
}
e.resultAnnouncementTime = +e.resultAnnouncementTime
}
form.competitionStageList = stages.slice(0, 1) //
} else { //
for (const i in stages) {
const e = stages[i]
if (rule !== 2 && !e.stageName) {
invalid = 1 invalid = 1
util.errorMsg('成绩公布时间须为整数') util.errorMsg('请输入阶段名称')
break break
} }
e.resultAnnouncementTime = +e.resultAnnouncementTime const { competitionType, maxTeamSize } = step1.completeCompetitionSetup // 01
// rule: 012
//
if (!rule) {
//
if (form.resultCalculationMethod == 0 && e.pointWeight === '') {
invalid = 1
util.errorMsg('请输入权重')
break
}
pointWeight += e.pointWeight //
} else if (rule === 1) { //
// ()
if (i != stages.length - 1 && e.peopleLimit === '' && e.percentageLimit === '' && e.score === '') {
invalid = 1
util.errorMsg('请至少填写一条晋级规则')
break
}
if (e.score !== '') e.scoreLimit = e.operator + e.score
}
if (rule !== 2 && competitionType && e.teamNumLimitOpt) {
if (e.teamNumLimit === '') {
invalid = 1
util.errorMsg('请输入团队参数人数限制')
break
} else if (e.teamNumLimit < 0) {
invalid = 1
util.errorMsg('团队参数人数不得小于0')
break
} else if (maxTeamSize !== '' && e.teamNumLimit > maxTeamSize) {
invalid = 1
util.errorMsg('团队参数人数不得大于团队人数上限')
break
}
}
if (!e.resultsDetails) {
if (e.resultAnnouncementTime === '') {
invalid = 1
util.errorMsg('请填写成绩公布时间')
break
}
if (e.resultAnnouncementTime < 0) {
invalid = 1
util.errorMsg('成绩公布时间不得小于0')
break
}
if (e.resultAnnouncementTime % 1) {
invalid = 1
util.errorMsg('成绩公布时间须为整数')
break
}
e.resultAnnouncementTime = +e.resultAnnouncementTime
}
} }
if (invalid) return
if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入')
} }
if (invalid) return
if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入')
} else { // 稿 } else { // 稿
form.competitionStageList = form.competitionStageList.filter(e => e.stageName) form.competitionStageList = form.competitionStageList.filter(e => e.stageName)
} }

@ -79,6 +79,7 @@ export default {
id: this.$route.query.id, id: this.$route.query.id,
updateTime: 0, updateTime: 0,
step1: this.$parent.$refs.step1.form, step1: this.$parent.$refs.step1.form,
cache: this.$store.state.match.cache,
nums: ['一', '二', '三'], nums: ['一', '二', '三'],
methods: [ methods: [
{ {
@ -111,7 +112,6 @@ export default {
form: [], form: [],
setVisible: false, setVisible: false,
curStep: 0, curStep: 0,
timeInvalid: false
}; };
}, },
components: { components: {
@ -130,6 +130,15 @@ export default {
this.handleForm() this.handleForm()
}, },
methods: { methods: {
//
resumeData() {
if (this.cache) {
this.curStep = this.cache.curStep
if (this.cache.form) this.form[this.curStep] = this.cache.form
this.setVisible = true
this.$store.commit('match/setCache', null)
}
},
// form // form
handleForm() { handleForm() {
// id // id
@ -148,6 +157,7 @@ export default {
form.stageName = e.stageName form.stageName = e.stageName
this.form.push(form) this.form.push(form)
}) })
this.resumeData()
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 0 this.updateTime = 0
}) })
@ -171,11 +181,7 @@ export default {
const startTime = new Date(val[0]) const startTime = new Date(val[0])
const endTime = new Date(val[1]) const endTime = new Date(val[1])
const { playStartTime, playEndTime } = this.step1 const { playStartTime, playEndTime } = this.step1
if (startTime < new Date(playStartTime) || endTime > new Date(playEndTime)) { if (startTime < new Date(playStartTime) || endTime > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
this.timeInvalid = true
return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
}
this.timeInvalid = false
const { form, curStep } = this const { form, curStep } = this
for (const i in form) { for (const i in form) {
// //
@ -206,13 +212,18 @@ export default {
// //
if (status) { if (status) {
let invalid = 0 let invalid = 0
if (this.timeInvalid) return util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。') const { playStartTime, playEndTime } = this.step1
for (const e of form) { for (const e of form) {
if (!e.time.length) { if (!e.time.length) {
invalid = 1 invalid = 1
util.errorMsg('请选择比赛时间') util.errorMsg('请选择比赛时间')
break break
} }
if (new Date(e.time[0]) < new Date(playStartTime) || new Date(e.time[1]) > new Date(playEndTime)) {
invalid = 1
util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
break
}
e.startTime = e.time[0] e.startTime = e.time[0]
e.endTime = e.time[1] e.endTime = e.time[1]
if (e.method !== 2 && !e.cid) { if (e.method !== 2 && !e.cid) {
@ -247,6 +258,11 @@ export default {
util.errorMsg('请输入线下地点') util.errorMsg('请输入线下地点')
break break
} }
if (!e.onlineAddress && !e.offlineAddress) {
invalid = 1
util.errorMsg('请输入比赛地点')
break
}
} }
} }
if (invalid) return if (invalid) return

@ -126,6 +126,7 @@
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting"; import Setting from "@/setting";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import { Loading } from 'element-ui'
export default { export default {
name: "match", name: "match",
@ -227,9 +228,10 @@ export default {
}, },
methods: { methods: {
...mapMutations('match', [ ...mapMutations('match', [
'SET_PAGE' 'setPage'
]), ]),
getList() { getList() {
const load = Loading.service()
const { form } = this const { form } = this
this.$post(this.api.competitionPageConditionQueryByOccupationlab, { this.$post(this.api.competitionPageConditionQueryByOccupationlab, {
pageNum: this.page, pageNum: this.page,
@ -241,6 +243,7 @@ export default {
startTime: form.startTime || null, startTime: form.startTime || null,
publishStatus: form.publishStatus === '' ? null : form.publishStatus publishStatus: form.publishStatus === '' ? null : form.publishStatus
}).then(({ data }) => { }).then(({ data }) => {
load.close()
const list = data.records const list = data.records
// //
this.timer = setInterval(() => { this.timer = setInterval(() => {
@ -275,7 +278,9 @@ export default {
this.page-- this.page--
this.getData() this.getData()
} }
}).catch(res => {}) }).catch(res => {
load.close()
})
}, },
getData() { getData() {
this.getList() this.getList()
@ -358,7 +363,7 @@ export default {
this.page = val; this.page = val;
this.$router.push(`list?page=${val}`) this.$router.push(`list?page=${val}`)
this.getData() this.getData()
this.SET_PAGE(val) this.setPage(val)
}, },
transferTime(date, type) { transferTime(date, type) {
if (date == "0000-00-00 00:00:00") return "---"; if (date == "0000-00-00 00:00:00") return "---";

@ -54,7 +54,7 @@
<tr> <tr>
<th width="130">指导老师</th> <th width="130">指导老师</th>
<td> <td>
<div class="plus"> <div v-if="status < 5" class="plus">
<i class="el-icon-circle-plus-outline icon" @click="addAdvisor"></i> <i class="el-icon-circle-plus-outline icon" @click="addAdvisor"></i>
</div> </div>
<div v-for="(item, i) in info.teamInstructors" :key="i" class="line"> <div v-for="(item, i) in info.teamInstructors" :key="i" class="line">
@ -331,10 +331,10 @@ export default {
let status let status
const n = this.form const n = this.form
let now = new Date().getTime(); let now = new Date().getTime();
let signUpStartTime = new Date(this.dateCompatible(n.signUpStartTime)).getTime(); // let signUpStartTime = new Date(util.dateCompatible(n.signUpStartTime)).getTime(); //
let signUpEndTime = new Date(this.dateCompatible(n.signUpEndTime)).getTime(); // let signUpEndTime = new Date(util.dateCompatible(n.signUpEndTime)).getTime(); //
let playStartTime = new Date(this.dateCompatible(n.playStartTime)).getTime(); // let playStartTime = new Date(util.dateCompatible(n.playStartTime)).getTime(); //
let playEndTime = new Date(this.dateCompatible(n.playEndTime)).getTime(); // let playEndTime = new Date(util.dateCompatible(n.playEndTime)).getTime(); //
if (now < signUpStartTime) { // if (now < signUpStartTime) { //
status = 0; status = 0;
} else if (now > signUpStartTime && now < signUpEndTime) { // } else if (now > signUpStartTime && now < signUpEndTime) { //
@ -347,6 +347,7 @@ export default {
status = 5; status = 5;
} }
this.status = status this.status = status
console.log("🚀 ~ file: matchInfo.vue:350 ~ handleStatus ~ status", status)
}, },
// //
edit(showMsg) { edit(showMsg) {

@ -28,11 +28,11 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)" v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button> <el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)" v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button>
<el-button v-else type="text" @click="saveData(scope.row)">保存</el-button> <el-button v-else type="text" @click="saveData(scope.row)">保存</el-button>
<el-button type="text" @click="handleDelete(scope.row, scope.$index)" v-auth="'/match:管理:竞赛进展:删除'">删除</el-button> <el-button type="text" @click="handleDelete(scope.row, scope.$index)" v-auth="'/match/list:管理:竞赛进展:删除'">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="plus" @click="addData" v-auth="'/match:管理:竞赛进展:新增'"> <div class="plus" @click="addData" v-auth="'/match/list:管理:竞赛进展:新增'">
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
</div> </div>
</div> </div>

@ -69,23 +69,36 @@
<th width="100">分数</th> <th width="100">分数</th>
<th width="100">得分详情</th> <th width="100">得分详情</th>
</tr> </tr>
<tr v-for="(item, i) in teams" :key="i"> <template v-if="teams.length">
<template v-if="!active && item.rowspan"> <tr v-for="(item, i) in teams" :key="i">
<td :rowspan="item.rowspan">{{ item.stageName }}</td> <template v-if="!active && item.rowspan">
<td :rowspan="item.rowspan">{{ item.teamScore }}</td> <td :rowspan="item.rowspan">{{ item.stageName }}</td>
</template> <td class="scores" :rowspan="item.rowspan">
<td>{{ i + 1 }}</td> <p class="score">{{ item.teamScore }}</p>
<td>{{ item.userName }}</td> <p>{{ item.teamCalculationMethodName }}</p>
<td>{{ item.schoolName }}</td> <p>权重</p>
<td>{{ item.timeSum }}min</td> <p>{{ item.pointWeight }}%</p>
<td>{{ item.score }}</td> </td>
<td> </template>
<el-button type="text" @click="toReport(item)">查看</el-button> <template v-if="item.accountId">
</td> <td>{{ i + 1 }}</td>
<td>{{ item.userName }}</td>
<td>{{ item.schoolName }}</td>
<td>{{ item.timeSum }}min</td>
<td>{{ item.score }}</td>
<td>
<el-button v-if="item.reportId" type="text" @click="toReport(item)">查看</el-button>
</td>
</template>
<td v-else colspan="6"></td>
</tr>
</template>
<tr v-else>
<td colspan="99">暂无数据</td>
</tr> </tr>
<tr v-if="!active"> <tr v-if="!active && teams.length">
<td>综合得分</td> <td>综合得分</td>
<td>{{ totalScore }}</td> <td>{{ curRow.score }}</td>
<td colspan="6">总排名{{ curRow.index }}</td> <td colspan="6">总排名{{ curRow.index }}</td>
</tr> </tr>
</table> </table>
@ -144,6 +157,20 @@ export default {
method: this.$route.query.method, method: this.$route.query.method,
competitionType: +this.$route.query.competitionType, competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule, rule: +this.$route.query.rule,
teamCalculationMethods: [
{
id: 0,
name: '最高分'
},
{
id: 1,
name: '平均分'
},
{
id: 2,
name: '求和'
}
],
headers: { headers: {
token: util.local.get(Setting.tokenKey) token: util.local.get(Setting.tokenKey)
}, },
@ -177,9 +204,11 @@ export default {
// //
getData() { getData() {
// //
this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || ''}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => { this.$post(`${this.api.whetherToPublish}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ whetherToPublish }) => {
const ids = this.grades.map(e => e.stageId)
ids.pop()
// >(:(1,0)) // >(:(1,0))
whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || ''}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => { whetherToPublish && this.$post(`${this.api.queryPublicationSource}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}`).then(({ source }) => {
this.sourceType = source this.sourceType = source
this.type = source == 1 ? 1 : 0 this.type = source == 1 ? 1 : 0
}).catch(res => {}) }).catch(res => {})
@ -191,7 +220,6 @@ export default {
getRank(whetherToPublish) { getRank(whetherToPublish) {
// //
if (whetherToPublish) { if (whetherToPublish) {
console.log(44, this.active)
this.$post(this.api.manuallyRankTheUploadList, { this.$post(this.api.manuallyRankTheUploadList, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -250,11 +278,13 @@ export default {
}, },
// tab // tab
tabChange(i) { tabChange(i) {
this.type = 0
this.active = i this.active = i
this.initData() this.initData()
}, },
// //
show(row, i) { show(row, i) {
this.teams = []
// //
if (this.competitionType == 1) { if (this.competitionType == 1) {
row.index = i + 1 row.index = i + 1
@ -275,46 +305,57 @@ export default {
}).catch(res => {}) }).catch(res => {})
} else { } else {
const ids = this.grades.map(e => e.stageId) const ids = this.grades.map(e => e.stageId)
data.stageIds = ids.splice(0, ids.length - 1) ids.pop()
this.$post(this.api.detailsOfTotalTeamScores, data).then(({ data, resultCalculationMethod }) => { data.stageIds = ids.splice(0, this.index + 1)
const result = [] //
let totalScore = 0 // if (this.published) {
// this.$post(this.api.totalRankingScoreDetails, data).then(({ data }) => {
data.map(e => { if (data.length) {
const team = e.stageTeamInformation const result = []
if (team.length) { //
// data.map(e => {
const method = e.teamCalculationMethod const team = e.stageTeamInformation
const scores = team.map(n => +n.score) if (team.length) {
let score const teamCItem = this.teamCalculationMethods.find(n => n.id == e.teamCalculationMethod)
// if (teamCItem) team[0].teamCalculationMethodName = teamCItem.name
if (method == 0) { // team[0].rowspan = team.length
score = Math.max(scores) team.map(n => {
} else if (method == 1) { // n = Object.assign(n, e)
score = scores.reduce((prev, next) => prev + next) / scores.length })
} else { // result.push(...team)
score = scores.reduce((prev, next) => prev + next) } else {
} e.rowspan = 1
team[0].teamScore = score result.push(e)
team[0].rowspan = team.length }
team.map(n => {
n = Object.assign(n, e)
}) })
// 0 */100 this.teams = result
if (e.pointWeight && !resultCalculationMethod) totalScore += score * e.pointWeight / 100
result.push(...team)
} }
}) }).catch(res => {})
// // } else { //
const teamScores = data.map(e => e.teamScore) // this.$post(this.api.totalRankingScoreDetails, data).then(({ page }) => {
if (resultCalculationMethod === 1) { // // const list = page.records
totalScore = teamScores.reduce((prev, next) => prev + next) // page.records.map((e, i) => {
} else if (resultCalculationMethod === 2) { // // if (!list.find(n => n.stageId == e.stageId && n.rowspan)) {
totalScore = teamScores.reduce((prev, next) => prev + next) / teamScores.length // e.rowspan = list.filter(n => n.stageId == e.stageId).length
} // this.$post(this.api.stageTeamScoreDetails, {
this.totalScore = totalScore // pageNum: 1,
this.teams = result // pageSize: 100,
}).catch(res => {}) // competitionId: this.id,
// teamId: row.teamId,
// stageId: e.stageId
// }).then(({ page }) => {
// }).catch(res => {})
// }
// })
// let totalScore = 0
// this.totalScore = totalScore
// this.teams = list
// console.log("🚀 ~ file: matchRank.vue:346 ~ this.$post ~ list", list)
// }).catch(res => {})
// }
} }
} else { } else {
this.toReport(row) this.toReport(row)
@ -340,14 +381,16 @@ export default {
list.map(e => { list.map(e => {
e.competitionId = id e.competitionId = id
e.isOverallRanking = isOverall e.isOverallRanking = isOverall
if (isOverall) delete e.stageId // if (isOverall) delete e.stageId
if (isPerson) e.teamId = null // teamIdnull if (isPerson) e.teamId = null // teamIdnull
}) })
data = list data = list
} }
} }
const ids = this.grades.map(e => e.stageId)
ids.pop()
// //
this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || ''}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => { this.$post(`${this.api.releaseVerification}?competitionId=${this.id}&stageId=${this.active || this.stageId}&isOverallRanking=${this.active ? 0 : 1}&whetherToManuallyPublish=${this.type}`).then(res => {
this.$post(this.api.publishRanking, data).then(res => { this.$post(this.api.publishRanking, data).then(res => {
this.uploadData = [] this.uploadData = []
this.getData() this.getData()
@ -391,6 +434,7 @@ export default {
} else { } else {
this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`).then(res => { this.$post(`${this.api.cancelRanking}?competitionId=${this.id}&isOverallRanking=${this.active ? 0 : 1}&${this.active ? 'stageIds=' + this.active : query.join('&')}`).then(res => {
this.sourceType = '' this.sourceType = ''
this.type = 0
this.getData() this.getData()
util.successMsg('取消发布成功!') util.successMsg('取消发布成功!')
}).catch(res => {}) }).catch(res => {})
@ -473,5 +517,13 @@ export default {
text-align: center; text-align: center;
background-color: #f8faff; background-color: #f8faff;
} }
.scores {
line-height: 1.6;
}
.score {
font-size: 16px;
font-weight: 600;
color: #9076FF;
}
} }
</style> </style>

@ -7,7 +7,7 @@
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入姓名/手机号/团队名称/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="mini" style="width: 250px"></el-input> <el-input placeholder="请输入姓名/手机号/团队名称/学号" prefix-icon="el-icon-search" v-model="keyword" clearable size="mini" style="width: 250px"></el-input>
</li> </li>
<li> <li v-if="info.releaseType">
<label>参赛人员状态</label> <label>参赛人员状态</label>
<el-select v-model="isDisable" @change="initData"> <el-select v-model="isDisable" @change="initData">
<el-option v-for="(item, i) in statusList" :key="i" :label="item.name" :value="item.id"></el-option> <el-option v-for="(item, i) in statusList" :key="i" :label="item.name" :value="item.id"></el-option>
@ -16,7 +16,7 @@
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="add">新增</el-button> <el-button type="primary" round @click="add">新增</el-button>
<el-button type="primary" round @click="exportAll" v-auth="'/match:管理:报名人员:导出'">批量导出</el-button> <el-button type="primary" round @click="exportAll" v-auth="'/match/list:管理:报名人员:批量导出'">批量导出</el-button>
</div> </div>
</div> </div>
@ -29,7 +29,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="school" label="学校" sortable="custom"> <el-table-column prop="school" label="学校" sortable="custom">
</el-table-column> </el-table-column>
<el-table-column prop="teamName" label="团队名称" sortable="custom"> <el-table-column v-if="info.completeCompetitionSetup.competitionType" prop="teamName" label="团队名称" sortable="custom">
</el-table-column> </el-table-column>
<el-table-column prop="username" label="学生姓名"> <el-table-column prop="username" label="学生姓名">
</el-table-column> </el-table-column>
@ -40,15 +40,17 @@
<el-table-column label="操作" align="center" width="320"> <el-table-column label="操作" align="center" width="320">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.identification" type="text" @click="edit(scope.row)">编辑</el-button> <el-button v-if="scope.row.identification" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="info(scope.row)">参赛信息与成绩</el-button> <template v-if="info.releaseType">
<el-switch <el-button type="text" @click="toInfo(scope.row)">参赛信息与成绩</el-button>
v-model="scope.row.isDisable" <el-switch
:active-text="scope.row.isDisable ? '关' : '开'" v-model="scope.row.isDisable"
:active-value="0" :active-text="scope.row.isDisable ? '关' : '开'"
:inactive-value="1" :active-value="0"
style="margin: 0 10px 0 5px" :inactive-value="1"
@change="switchOff($event,scope.row,scope.$index)" style="margin: 0 10px 0 5px"
></el-switch> @change="switchOff($event,scope.row,scope.$index)"
></el-switch>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -62,7 +64,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'> <el-form ref="form" :model="form" :rules="rules" label-width="80px" style='margin-right: 10px;'>
<el-form-item prop="schoolId" label="院校"> <el-form-item prop="schoolId" label="院校">
<el-select v-model="form.schoolId" filterable style="width: 100%"> <el-select v-model="form.schoolId" filterable style="width: 100%">
<el-option v-for="(item, i) in clients" :key="i" :label="item.customerName" :value="item.schoolId"></el-option> <el-option v-for="(item, i) in clients" :key="i" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item prop="workNumber" label="学生学号"> <el-form-item prop="workNumber" label="学生学号">
@ -122,6 +124,9 @@ export default {
return { return {
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
id: +this.$route.query.id, id: +this.$route.query.id,
info: {
completeCompetitionSetup: {}
},
isDisable: '', isDisable: '',
statusList: [ statusList: [
{ {
@ -202,6 +207,7 @@ export default {
}, },
mounted() { mounted() {
this.initData() this.initData()
this.getInfo()
this.getClient() this.getClient()
this.getTeam() this.getTeam()
}, },
@ -222,6 +228,12 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
//
getInfo() {
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.info = competition
}).catch(err => {})
},
initData() { initData() {
this.page = 1 this.page = 1
this.getData() this.getData()
@ -388,14 +400,9 @@ export default {
}, },
// //
getClient() { getClient() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理') this.$get(this.api.querySchoolData).then(({ list }) => {
this.$post(this.api.queryCustomer,{ this.clients = list
page: 1, }).catch(res => {})
size: 1000,
supplierId: (sid && !sid.all) ? sid.supplierId : ''
}).then(res => {
this.clients = res.message.list
}).catch(res => {})
}, },
// //
getTeam() { getTeam() {
@ -420,7 +427,7 @@ export default {
}).catch(res => {}) }).catch(res => {})
}, },
// //
info(row) { toInfo(row) {
this.$router.push(`info?id=${this.id}&accountId=${row.accountId}`) this.$router.push(`info?id=${this.id}&accountId=${row.accountId}`)
}, },
exportAll() { exportAll() {

@ -2,7 +2,7 @@
<!-- 报名人员 --> <!-- 报名人员 -->
<div class="page-content" style="padding: 24px"> <div class="page-content" style="padding: 24px">
<div class="tool" style="justify-content: flex-end"> <div class="tool" style="justify-content: flex-end">
<el-button type="primary" round @click="add" v-auth="'/match:管理:公告通知:新增'">新增</el-button> <el-button type="primary" round @click="add" v-auth="'/match/list:管理:公告通知:新增'">新增</el-button>
</div> </div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
@ -24,10 +24,10 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)" v-auth="'/match:管理:公告通知:编辑'">编辑</el-button> <el-button type="text" @click="edit(scope.row)" v-auth="'/match/list:管理:公告通知:编辑'">编辑</el-button>
<el-button type="text" @click="del(scope.row)" v-auth="'/match:管理:公告通知:删除'">删除</el-button> <el-button type="text" @click="del(scope.row)" v-auth="'/match/list:管理:公告通知:删除'">删除</el-button>
<el-switch <el-switch
v-auth="'/match:管理:公告通知:启用'" v-auth="'/match/list:管理:公告通知:启用'"
v-model="scope.row.isOpen" v-model="scope.row.isOpen"
:active-text="scope.row.isOpen ? '关' : '开'" :active-text="scope.row.isOpen ? '关' : '开'"
:active-value="0" :active-value="0"

@ -38,8 +38,8 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button v-if="!form.id" @click="save(0)" v-auth="'/match:管理:公告通知:草稿'">草稿</el-button> <el-button v-if="!form.id" @click="save(0)" v-auth="'/match/list:管理:公告通知:草稿'">草稿</el-button>
<el-button type="primary" @click="save(1)" v-auth="'/match:管理:公告通知:发布'">发布</el-button> <el-button type="primary" @click="save(1)" v-auth="'/match/list:管理:公告通知:发布'">发布</el-button>
<el-button @click="back">取消</el-button> <el-button @click="back">取消</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

@ -617,7 +617,7 @@ export default {
location.href = href; location.href = href;
}, },
permissionChange(){ permissionChange(){
if (this.projectManage.permissions == 1){ if (this.projectManage.permissions){
this.projectManage.hintOpen = 1 this.projectManage.hintOpen = 1
}else{ }else{
this.projectManage.hintOpen = 0 this.projectManage.hintOpen = 0

@ -281,7 +281,7 @@
</thead> </thead>
</table> </table>
</div> </div>
<div class="main_table" style="margin-top: 0;overflow: auto"> <div class="main_table" ref="ach" style="max-height: 520px;margin-top: 0;overflow: hidden">
<table> <table>
<tbody> <tbody>
<tr v-for="(item, i) in achs" :key="i"> <tr v-for="(item, i) in achs" :key="i">
@ -1017,13 +1017,13 @@ export default {
// //
scrollTable() { scrollTable() {
const dom = this.$refs.popularCourses const dom = this.$refs.popularCourses
// const dom1 = this.$refs.gdpList const dom1 = this.$refs.ach
setInterval(() => { setInterval(() => {
dom.scrollTop += 1 dom.scrollTop += 1
if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0 if (dom.clientHeight + dom.scrollTop === dom.scrollHeight) dom.scrollTop = 0
// dom1.scrollTop += 1 dom1.scrollTop += 1
// if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0 if (dom1.clientHeight + dom1.scrollTop === dom1.scrollHeight) dom1.scrollTop = 0
}, 30) }, 30)
} }
} }

@ -26,7 +26,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/` uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 中台测试服 host = "http://121.37.12.51/"; // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服 // host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.51:9000/"; // 榕 // host = "http://192.168.31.51:9000/"; // 榕
host = 'http://192.168.31.116:9000/'; // 赓 host = 'http://192.168.31.116:9000/'; // 赓
} }

@ -4,11 +4,15 @@
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
page: 1 page: 1,
cache: null
}, },
mutations: { mutations: {
SET_PAGE: (state, page) => { setPage: (state, page) => {
state.page = page state.page = page
},
setCache: (state, cache) => {
state.cache = cache
} }
}, },
actions: { actions: {

Loading…
Cancel
Save