dev_review V2.4.9
yujialong 1 year ago
parent e8672494e4
commit f0e037809e
  1. 5
      package-lock.json
  2. 1
      package.json
  3. 1
      src/components/Sidebar.vue
  4. 2
      src/setting.js
  5. 18
      src/views/course/AddCurriculum.vue
  6. 91
      src/views/match/add/set.vue
  7. 210
      src/views/match/manage/matchArch.vue

5
package-lock.json generated

@ -12890,6 +12890,11 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true
},
"vue-ueditor-wrap": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/vue-ueditor-wrap/-/vue-ueditor-wrap-2.5.6.tgz",
"integrity": "sha512-EJkYLyyzgOJTxGreiZ9wrmXthIMVVRSeFTzV6n0OR9w4aeqW79Prvog4jZ4G0kkmW3TTTBbZtHM9VNHEl6LJDA=="
},
"vue-uuid": {
"version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/vue-uuid/download/vue-uuid-2.0.2.tgz",

@ -32,6 +32,7 @@
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.5.1",
"vue-schart": "^2.0.0",
"vue-ueditor-wrap": "^2.5.6",
"vue-uuid": "^2.0.2",
"vuedraggable": "^2.17.0",
"vuex": "^3.1.2"

@ -141,6 +141,7 @@ export default {
this.$store.commit('setOrderParam', null)
this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '')
this.$store.commit('setCompetitionCache', null)
sessionStorage.setItem('sideBar', index)
},
initMenu () {

@ -11,7 +11,7 @@ if (isDev) {
jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统
host = 'http://121.37.12.51/'
// host = 'https://huorantech.cn/'
host = 'http://192.168.31.217:9000/'// 榕
// host = 'http://192.168.31.217:9000/'// 榕
// host = 'http://192.168.31.51:9000/'// 赓
} else if (isPro) {
jumpPath = 'https://www.huorantech.cn/judgmentPoint/'

@ -143,13 +143,13 @@
</div>
</el-card>
<!-- 练习配置 -->
<!-- 练习项目配置 -->
<el-card shadow="hover"
class="mgb20">
<div class="mgb20 flex-between">
<div class="flex-center ">
<p class="addhr_tag"></p>
<span>练习配置</span>
<span>练习项目配置</span>
</div>
<div>
<el-button @click="handleBatchDelete(0)">批量移除</el-button>
@ -218,13 +218,13 @@
</div>
</el-card>
<!-- 考核配置 -->
<!-- 考核项目配置 -->
<el-card shadow="hover"
class="mgb20">
<div class="mgb20 flex-between">
<div class="flex-center ">
<p class="addhr_tag"></p>
<span>考核配置</span>
<span>考核项目配置</span>
</div>
<div>
<el-button @click="handleBatchDelete(1)">批量移除</el-button>
@ -293,13 +293,13 @@
</div>
</el-card>
<!-- 竞赛配置 -->
<!-- 大赛项目配置 -->
<el-card shadow="hover"
class="mgb20">
<div class="mgb20 flex-between">
<div class="flex-center ">
<p class="addhr_tag"></p>
<span>竞赛配置</span>
<span>大赛项目配置</span>
</div>
<div>
<el-button @click="handleBatchDelete(2)">批量移除</el-button>
@ -981,7 +981,7 @@ export default {
const form = JSON.parse(JSON.stringify(this.form))
form.supplier = form.supplier.join()
if (!this.practiceData.length) {
this.$message.warning("请添加练习配置");
this.$message.warning("请添加练习项目配置");
return;
} else {
form.systemIdByPractice = this.practiceData.map(i => {
@ -996,7 +996,7 @@ export default {
form.systemIdByPractice.sort((a, b) => a.sort - b.sort)
}
if (!this.assessmentData.length) {
this.$message.warning("请添加考核配置");
this.$message.warning("请添加考核项目配置");
return;
} else {
form.systemIdByAssessment = this.assessmentData.map(i => {
@ -1010,7 +1010,7 @@ export default {
});
form.systemIdByAssessment.sort((a, b) => a.sort - b.sort)
}
//
//
form.systemIdByCompetition = this.matches.map(i => {
let obj = {
isShow: i.isShow,

@ -38,14 +38,13 @@
<div>
<p class="m-b-20">课程</p>
<div class="inline-input">
<el-select v-model="form.mallId"
@change="courseChange">
<el-option v-for="(item, i) in curriculumList"
:key="i"
:label="item.productName"
:value="item.mallId">
</el-option>
</el-select>
<el-cascader ref="cur"
v-model="mallIds"
:options="curs"
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@expand-change="curChange"
@change="curChange"></el-cascader>
</div>
</div>
</el-card>
@ -130,7 +129,8 @@ export default {
data () {
return {
loadIns: null,
curriculumList: [],
mallIds: [],
curs: [],
keyword: '',
projects: [],
page: 1,
@ -161,38 +161,62 @@ export default {
},
methods: {
//
getCourse () {
this.loadIns = Loading.service()
this.$post(this.api.listOfGoods, {
async getCourse () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置')
const { serviceList } = await this.$post(this.api.queryServiceConfig, {
pageNum: 1,
pageSize: 1000,
supplierId: sid ? sid.supplierId : ''
})
const { page } = await this.$post(this.api.listOfGoods, {
pageNum: 1,
pageSize: 10000,
hotTag: 1,
sort: 0,
isAssociatedProduct: 1,
}).then(({ page }) => {
const list = page.records
this.curriculumList = page.records
if (list.length) {
const { mallId, cid, systemId } = this.form
const first = list[0]
this.form.mallId = mallId || first.mallId
this.form.cid = cid || +first.associatedProduct
this.sysId = systemId || +first.systemId
}
isShelves: 0,
})
const { records } = page
const { mallId, cid, systemId } = this.form
if (records.length) {
serviceList.records.map(e => {
e.id = +e.systemId
e.label = e.systemName
})
records.map(e => {
e.id = +e.mallId
e.label = e.productName
e.children = serviceList.records.filter(n => e.systemId.split(',').includes(n.systemId)) //
})
this.curs = records
this.courseChange()
}).catch(err => {
this.loadIns.close()
});
//
const first = records[0]
this.mallIds = [mallId || first.mallId, systemId || first.children[0].id]
this.form.mallId = mallId || first.mallId
this.form.cid = cid || +first.associatedProduct
this.form.systemId = systemId || first.systemId
this.sysId = systemId || first.systemId
this.loadIns = Loading.service()
this.getProject()
}
},
//
courseChange (val) {
const { systemId, associatedProduct } = this.curriculumList.find(e => e.mallId == this.form.mallId)
this.sysId = systemId
this.form.cid = associatedProduct
if (val) this.loadIns = Loading.service()
curChange (val) {
const id = val[0]
const item = this.curs.find(e => e.id == id)
if (val.length === 1) {
//
this.mallIds = [id, item.children[0].id]
}
this.form.mallId = id
this.form.cid = +item.associatedProduct
this.form.systemId = this.mallIds[1]
this.sysId = this.mallIds[1]
this.loadIns = Loading.service()
this.getProject()
},
//
getProject () {
this.$post(this.api.getProjectAssessmentByCompetition, {
@ -226,10 +250,7 @@ export default {
form,
curStep
})
const item = this.curriculumList.find(e => e.cid == this.form.cid) || {} // id
let systemId = item.sysId || '1'
systemId = systemId.split(',')[0] // id
this.$router.push(`/projectList?systemId=${systemId}&show=1&name=${item.sysName.split(',')[0]}`)
this.$router.push(`/projectList?systemId=${this.mallIds[1]}&show=1&name=${this.$refs.cur.getCheckedNodes()[0].label}`)
},
//
timeChange (val) {

@ -1,109 +1,141 @@
<template>
<!-- 报名人员 -->
<div class="page-content" style="padding: 24px">
<el-collapse v-model="curStep">
<el-collapse-item v-for="(item, i) in list" :key="i" :title="item.stageName" :name="item.stageId">
<div class="line">
<span>比赛方式{{ item.methodName }}</span>
<span>比赛形式{{ item.competitionType ? '团队赛' : '个人赛' }}</span>
<span>赛制{{ item.ruleName }}</span>
<span>状态{{ item.status }}</span>
<span>竞赛起止时间{{ item.startTime + ' ~ ' + item.endTime }}</span>
<div>
<el-button type="primary" @click="toRank(item, i)">排名</el-button>
<el-button @click="toArch(item)">成绩管理</el-button>
</div>
</div>
</el-collapse-item>
</el-collapse>
</div>
<!-- 报名人员 -->
<div class="page-content"
style="padding: 24px">
<el-table ref="table"
:data="list"
class="table"
stripe
header-align="center"
row-key="stageId">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="methodName"
label="比赛方式"
align="center"></el-table-column>
<el-table-column prop="founderName"
label="比赛形式"
align="center">
<template slot-scope="scope">
{{ scope.row.competitionType ? '团队赛' : '个人赛' }}
</template>
</el-table-column>
<el-table-column prop="ruleName"
label="赛制"
align="center"></el-table-column>
<el-table-column prop="status"
label="状态"
align="center"></el-table-column>
<el-table-column label="竞赛起止时间"
align="center">
<template slot-scope="scope">
{{ scope.row.startTime + ' ~ ' + scope.row.endTime }}
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="260">
<template slot-scope="scope">
<el-button type="primary"
@click="toRank(scope.row, scope.$index)">排名</el-button>
<el-button @click="toArch(scope.row)">成绩管理</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import util from "@/libs/util";
import Const from '@/const/match'
export default {
name: "matchArch",
data() {
return {
id: +this.$route.query.id,
list: [],
form: {},
timer: null,
curStep: [],
};
name: "matchArch",
data () {
return {
id: +this.$route.query.id,
list: [],
form: {},
timer: null,
curStep: [],
};
},
mounted () {
this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer)
})
this.getData()
},
methods: {
getData () {
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.form = competition
this.timer = setInterval(this.handleStatus, 1000)
this.getArch()
}).catch(err => { })
},
mounted() {
this.$once('hook:beforeDestroy', function() {
clearInterval(this.timer)
})
this.getData()
getArch () {
this.$post(this.api.detailsOfCompetitionStage, {
pageNum: 1,
pageSize: 100,
contestId: this.id,
}).then(({ page, applicantSize }) => {
const list = page.records
list.map(e => {
e.methodName = Const.methods.find(n => n.id === e.method).name
e.ruleName = Const.rules.find(n => n.id === e.rule).name
})
this.curStep = list.map(e => e.stageId)
this.list = list
}).catch(res => { });
},
methods: {
getData() {
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.form = competition
this.timer = setInterval(this.handleStatus, 1000)
this.getArch()
}).catch(err => {})
},
getArch() {
this.$post(this.api.detailsOfCompetitionStage, {
pageNum: 1,
pageSize: 100,
contestId: this.id,
}).then(({ page, applicantSize }) => {
const list = page.records
list.map(e => {
e.methodName = Const.methods.find(n => n.id === e.method).name
e.ruleName = Const.rules.find(n => n.id === e.rule).name
})
this.curStep = list.map(e => e.stageId)
this.list = list
}).catch(res => {});
},
//
handleStatus() {
const now = new Date()
this.form.competitionStage.map(e => {
const startTime = new Date(e.startTime)
const endTime = new Date(e.endTime)
const item = this.list.find(n => n.stageId == e.stageId)
if (item) {
if (now < startTime) {
this.$set(item, 'status', '未开始')
} else if (now >= startTime && now <= endTime) {
this.$set(item, 'status', '比赛中')
} else if (now > endTime) {
this.$set(item, 'status', '已完成')
}
//
handleStatus () {
const now = new Date()
this.form.competitionStage.map(e => {
const startTime = new Date(e.startTime)
const endTime = new Date(e.endTime)
const item = this.list.find(n => n.stageId == e.stageId)
if (item) {
if (now < startTime) {
this.$set(item, 'status', '未开始')
} else if (now >= startTime && now <= endTime) {
this.$set(item, 'status', '比赛中')
} else if (now > endTime) {
this.$set(item, 'status', '已完成')
}
})
console.log("🚀 ~ file: matchArch.vue:87 ~ handleStatus ~ this.status", this.list)
},
//
toRank(row, i) {
this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`)
},
//
toArch(row) {
this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}`)
}
}
})
console.log("🚀 ~ file: matchArch.vue:87 ~ handleStatus ~ this.status", this.list)
},
//
toRank (row, i) {
this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`)
},
//
toArch (row) {
this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}`)
}
}
};
</script>
<style lang="scss" scoped>
/deep/.el-collapse-item__header {
font-size: 16px;
color: #333;
font-size: 16px;
color: #333;
}
.line {
display: flex;
justify-content: space-around;
align-items: center;
span {
margin-right: 30px;
}
display: flex;
justify-content: space-around;
align-items: center;
span {
margin-right: 30px;
}
}
</style>
Loading…
Cancel
Save