master
yujialong 10 months ago
parent 908dc4670c
commit 28cb442105
  1. 12
      src/pages/achievement/info/course.vue
  2. 12
      src/pages/achievement/info/project.vue
  3. 2
      src/pages/achievement/list/course.vue
  4. 2
      src/pages/achievement/list/project.vue
  5. 2
      src/pages/assessment/list/index.vue
  6. 39
      src/pages/match/add/step2.vue
  7. 2
      src/pages/product/show/index.vue
  8. 2
      src/pages/station/list/index.vue

@ -301,7 +301,7 @@ export default {
accountId: this.$route.query.accountId, accountId: this.$route.query.accountId,
id: +this.$route.query.id, id: +this.$route.query.id,
cid: +this.$route.query.cid, cid: +this.$route.query.cid,
classId: +this.$route.query.classId, classId: this.$route.query.classId ? +this.$route.query.classId : '',
classList: [], classList: [],
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
@ -339,8 +339,8 @@ export default {
} }
}, },
mounted () { mounted () {
this.classId = +this.$route.query.classId || ''
this.getClass() this.getClass()
this.initData()
}, },
methods: { methods: {
// //
@ -388,8 +388,10 @@ export default {
}, },
// //
getClass () { getClass () {
this.$post(this.api.allClassesInOurSchool).then(res => { this.$post(this.api.allClassesInOurSchool).then(({ data }) => {
this.classList = res.data if (data.length && !this.classId) this.classId = data[0].id
this.classList = data
this.initData()
}).catch(res => { }) }).catch(res => { })
}, },
// //
@ -561,7 +563,7 @@ export default {
toReport (row) { toReport (row) {
this.$store.commit('achievement/setRow', this.curRow) this.$store.commit('achievement/setRow', this.curRow)
// //
this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.goodsName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}&mallId=${this.id}`) this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.projectName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}&mallId=${this.id}`)
}, },
getChart () { // 线 getChart () { // 线
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

@ -363,10 +363,11 @@ export default {
this.loadIns = Loading.service({ this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)" background: "rgba(255,255,255,.6)"
}) })
try {
// //
const res = this.permissions ? const res = this.permissions ?
await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) : await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) :
await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.listData = res.page.records this.listData = res.page.records
this.total = res.page.total this.total = res.page.total
this.avgScore = (+res.avgScore).toFixed(2) this.avgScore = (+res.avgScore).toFixed(2)
@ -379,6 +380,9 @@ export default {
this.min = res.minimumErrorRate || {} this.min = res.minimumErrorRate || {}
this.getChart() this.getChart()
this.errorChart() this.errorChart()
} catch (e) {
this.loadIns.close()
}
}, },
// //
async getActivity () { async getActivity () {
@ -429,8 +433,8 @@ export default {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
// //
const res = this.permissions ? const res = this.permissions ?
await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) : await this.$post(`${this.api.getAssessmentDetail}?pageNum=1&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) :
await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) await this.$post(`${this.api.getPracticeDetail}?pageNum=1&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
list = res.page.records list = res.page.records
} }

@ -261,7 +261,7 @@ export default {
}, },
// //
entry (row) { entry (row) {
this.$router.push(`course?id=${row.mallId}&curriculumName=${row.curriculumName}&cid=${row.cid}&classId=${row.classId}`) this.$router.push(`course?id=${row.mallId}&curriculumName=${row.curriculumName}&cid=${row.cid}`)
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.page = val this.page = val

@ -359,7 +359,7 @@ export default {
}, },
// //
entry (row) { entry (row) {
this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.mallId}&classId=${row.classId}`) this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.mallId}&classId=${row.classId || ''}`)
}, },
handleDelete (row) { // handleDelete (row) { //
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {

@ -456,7 +456,7 @@ export default {
this.$router.push(`add?id=${row.id}`); this.$router.push(`add?id=${row.id}`);
}, },
show (row) { show (row) {
this.$router.push(`/achievement/project?id=${row.id}&projectName=${row.projectName}&permissions=1`) this.$router.push(`/achievement/project?id=${row.id}&projectName=${row.projectName}&permissions=1&classId=${row.classId}`)
}, },
start (row) { start (row) {
this.$post(`${this.api.enableAssessment}?id=${row.id}`).then(async res => { this.$post(`${this.api.enableAssessment}?id=${row.id}`).then(async res => {

@ -39,9 +39,11 @@
class="tips"> class="tips">
(团队赛是否限制队内每个成员只能参加一个阶段赛项 (团队赛是否限制队内每个成员只能参加一个阶段赛项
<el-radio v-model="form.teamLimit" <el-radio v-model="form.teamLimit"
:label="1"></el-radio> :label="1"
@change="teamLimitChange"></el-radio>
<el-radio v-model="form.teamLimit" <el-radio v-model="form.teamLimit"
:label="0"></el-radio> :label="0"
@change="teamLimitChange"></el-radio>
) )
</div> </div>
</el-form-item> </el-form-item>
@ -80,13 +82,14 @@
<span class="req">*</span> <span class="req">*</span>
团队参赛人数限制 团队参赛人数限制
<el-radio v-model="item.teamNumLimitOpt" <el-radio v-model="item.teamNumLimitOpt"
:label="0">不限制</el-radio> :label="0"
@change="item.teamNumLimit = 0">不限制</el-radio>
<el-radio v-model="item.teamNumLimitOpt" <el-radio v-model="item.teamNumLimitOpt"
:label="1">自定义</el-radio> :label="1">自定义</el-radio>
<el-input v-model.number="item.teamNumLimit" <el-input v-model.number="item.teamNumLimit"
type="number" type="number"
style="width: 150px;" style="width: 150px;"
:disabled="item.teamNumLimitOpt === 0"></el-input> :disabled="item.teamNumLimitOpt === 0 || form.teamLimit === 1"></el-input>
<span class="tips">可限制本阶段单个团队的出战人数</span> <span class="tips">可限制本阶段单个团队的出战人数</span>
</div> </div>
<div v-if="step1.completeCompetitionSetup.competitionType" <div v-if="step1.completeCompetitionSetup.competitionType"
@ -243,8 +246,8 @@ export default {
scoreLimit: '', scoreLimit: '',
operator: '>', operator: '>',
score: '', score: '',
teamNumLimit: '', teamNumLimit: 1,
teamNumLimitOpt: 0, teamNumLimitOpt: 1,
resultAnnouncementTime: '', resultAnnouncementTime: '',
resultsDetails: '', resultsDetails: '',
}, },
@ -259,8 +262,8 @@ export default {
scoreLimit: '', scoreLimit: '',
operator: '>', operator: '>',
score: '', score: '',
teamNumLimit: '', teamNumLimit: 1,
teamNumLimitOpt: 0, teamNumLimitOpt: 1,
resultAnnouncementTime: '', resultAnnouncementTime: '',
resultsDetails: '', resultsDetails: '',
}, },
@ -275,8 +278,8 @@ export default {
scoreLimit: '', scoreLimit: '',
operator: '>', operator: '>',
score: '', score: '',
teamNumLimit: '', teamNumLimit: 1,
teamNumLimitOpt: 0, teamNumLimitOpt: 1,
resultAnnouncementTime: '', resultAnnouncementTime: '',
resultsDetails: '', resultsDetails: '',
} }
@ -368,6 +371,14 @@ export default {
this.form.competitionStageList = stages.slice(0, val) this.form.competitionStageList = stages.slice(0, val)
} }
}, },
teamLimitChange (e) {
if (e === 1) {
this.form.competitionStageList.forEach(e => {
e.teamNumLimitOpt = 1
e.teamNumLimit = 1
})
}
},
// //
save (status, next = 0, releaseType, cb) { save (status, next = 0, releaseType, cb) {
let { form } = this let { form } = this
@ -392,6 +403,8 @@ export default {
} }
form.competitionStageList = stages.slice(0, 1) // form.competitionStageList = stages.slice(0, 1) //
} else { // } else { //
let teamNumLimit = 0
const { competitionType, minTeamSize, maxTeamSize } = step1.completeCompetitionSetup // 01
for (const i in stages) { for (const i in stages) {
const e = stages[i] const e = stages[i]
if (rule !== 2 && !e.stageName) { if (rule !== 2 && !e.stageName) {
@ -399,7 +412,6 @@ export default {
util.errorMsg('请输入阶段名称') util.errorMsg('请输入阶段名称')
break break
} }
const { competitionType, maxTeamSize } = step1.completeCompetitionSetup // 01
// rule: 012 // rule: 012
// //
if (!rule) { if (!rule) {
@ -447,8 +459,13 @@ export default {
} }
e.resultAnnouncementTime = +e.resultAnnouncementTime e.resultAnnouncementTime = +e.resultAnnouncementTime
} }
if (e.teamNumLimit) teamNumLimit += e.teamNumLimit //
} }
if (invalid) return if (invalid) return
if (form.teamLimit) {
if (stages.length > minTeamSize) return util.errorMsg('阶段数不得大于团队人数下限')
if (teamNumLimit > minTeamSize) return util.errorMsg('各阶段自定义的参赛人数之和不得大于团队人数下限')
}
if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入') if (form.resultCalculationMethod == 0 && !rule && pointWeight > 0 && pointWeight !== 100) return util.errorMsg('权重须等于100,请重新输入')
} }
} else { // 稿 } else { // 稿

@ -336,7 +336,7 @@ export default {
toStation () { toStation () {
if (this.isCourse) { // if (this.isCourse) { //
this.$post(`${this.api.addLearningRecord}?mallId=${this.id}`).then(res => { this.$post(`${this.api.addLearningRecord}?mallId=${this.id}`).then(res => {
this.$router.push('/station/preview?courseId=' + this.form.mall.associatedProduct + '&curriculumName=' + this.form.mall.productName + '&mallId=' + this.id) this.$router.push('/station/preview?courseId=' + this.form.mall.associatedProduct + '&curriculumName=' + this.form.mall.productName + '&mallId=' + this.id + '&admin=1')
}).catch(res => { }) }).catch(res => { })
} else if (this.withLink) { // } else if (this.withLink) { //
this.linkVisible = true this.linkVisible = true

@ -97,7 +97,7 @@ export default {
}); });
}, },
goPreview (item) { goPreview (item) {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&admin=1`); this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}`);
}, },
// tab // tab
tabChange (item) { tabChange (item) {

Loading…
Cancel
Save