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. 85
      src/views/match/add/set.vue
  7. 84
      src/views/match/manage/matchArch.vue

5
package-lock.json generated

@ -12890,6 +12890,11 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "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": { "vue-uuid": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npm.taobao.org/vue-uuid/download/vue-uuid-2.0.2.tgz", "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-quill-editor": "^3.0.6",
"vue-router": "^3.5.1", "vue-router": "^3.5.1",
"vue-schart": "^2.0.0", "vue-schart": "^2.0.0",
"vue-ueditor-wrap": "^2.5.6",
"vue-uuid": "^2.0.2", "vue-uuid": "^2.0.2",
"vuedraggable": "^2.17.0", "vuedraggable": "^2.17.0",
"vuex": "^3.1.2" "vuex": "^3.1.2"

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

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

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

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

@ -1,21 +1,53 @@
<template> <template>
<!-- 报名人员 --> <!-- 报名人员 -->
<div class="page-content" style="padding: 24px"> <div class="page-content"
<el-collapse v-model="curStep"> style="padding: 24px">
<el-collapse-item v-for="(item, i) in list" :key="i" :title="item.stageName" :name="item.stageId"> <el-table ref="table"
<div class="line"> :data="list"
<span>比赛方式{{ item.methodName }}</span> class="table"
<span>比赛形式{{ item.competitionType ? '团队赛' : '个人赛' }}</span> stripe
<span>赛制{{ item.ruleName }}</span> header-align="center"
<span>状态{{ item.status }}</span> row-key="stageId">
<span>竞赛起止时间{{ item.startTime + ' ~ ' + item.endTime }}</span> <el-table-column type="index"
<div> width="60"
<el-button type="primary" @click="toRank(item, i)">排名</el-button> label="序号"
<el-button @click="toArch(item)">成绩管理</el-button> align="center">
</div> <template slot-scope="scope">
</div> {{ scope.$index + 1 }}
</el-collapse-item> </template>
</el-collapse> </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> </div>
</template> </template>
@ -24,7 +56,7 @@ import util from "@/libs/util";
import Const from '@/const/match' import Const from '@/const/match'
export default { export default {
name: "matchArch", name: "matchArch",
data() { data () {
return { return {
id: +this.$route.query.id, id: +this.$route.query.id,
list: [], list: [],
@ -33,21 +65,21 @@ export default {
curStep: [], curStep: [],
}; };
}, },
mounted() { mounted () {
this.$once('hook:beforeDestroy', function() { this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer) clearInterval(this.timer)
}) })
this.getData() this.getData()
}, },
methods: { methods: {
getData() { getData () {
this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => { this.$post(`${this.api.getCompetition}?competitionId=${this.id}`).then(({ competition }) => {
this.form = competition this.form = competition
this.timer = setInterval(this.handleStatus, 1000) this.timer = setInterval(this.handleStatus, 1000)
this.getArch() this.getArch()
}).catch(err => {}) }).catch(err => { })
}, },
getArch() { getArch () {
this.$post(this.api.detailsOfCompetitionStage, { this.$post(this.api.detailsOfCompetitionStage, {
pageNum: 1, pageNum: 1,
pageSize: 100, pageSize: 100,
@ -60,10 +92,10 @@ export default {
}) })
this.curStep = list.map(e => e.stageId) this.curStep = list.map(e => e.stageId)
this.list = list this.list = list
}).catch(res => {}); }).catch(res => { });
}, },
// //
handleStatus() { handleStatus () {
const now = new Date() const now = new Date()
this.form.competitionStage.map(e => { this.form.competitionStage.map(e => {
const startTime = new Date(e.startTime) const startTime = new Date(e.startTime)
@ -82,11 +114,11 @@ export default {
console.log("🚀 ~ file: matchArch.vue:87 ~ handleStatus ~ this.status", this.list) console.log("🚀 ~ file: matchArch.vue:87 ~ handleStatus ~ this.status", this.list)
}, },
// //
toRank(row, i) { toRank (row, i) {
this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`) this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`)
}, },
// //
toArch(row) { toArch (row) {
this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}`) this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}`)
} }
} }

Loading…
Cancel
Save