master
yujialong 10 months ago
parent 908dc4670c
commit 28cb442105
  1. 12
      src/pages/achievement/info/course.vue
  2. 40
      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,
id: +this.$route.query.id,
cid: +this.$route.query.cid,
classId: +this.$route.query.classId,
classId: this.$route.query.classId ? +this.$route.query.classId : '',
classList: [],
keyword: "",
searchTimer: null,
@ -339,8 +339,8 @@ export default {
}
},
mounted () {
this.classId = +this.$route.query.classId || ''
this.getClass()
this.initData()
},
methods: {
//
@ -388,8 +388,10 @@ export default {
},
//
getClass () {
this.$post(this.api.allClassesInOurSchool).then(res => {
this.classList = res.data
this.$post(this.api.allClassesInOurSchool).then(({ data }) => {
if (data.length && !this.classId) this.classId = data[0].id
this.classList = data
this.initData()
}).catch(res => { })
},
//
@ -561,7 +563,7 @@ export default {
toReport (row) {
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 () { // 线
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

@ -363,22 +363,26 @@ export default {
this.loadIns = Loading.service({
background: "rgba(255,255,255,.6)"
})
//
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.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.listData = res.page.records
this.total = res.page.total
this.avgScore = (+res.avgScore).toFixed(2)
this.examCount = res.examCount
this.peopleNum = res.peopleNum
this.maxScore = res.maxScore
this.minScore = res.minScore
this.errorAnalysis = res.errorAnalysis || {}
this.max = res.highestErrorRate || {}
this.min = res.minimumErrorRate || {}
this.getChart()
this.errorChart()
try {
//
const res = this.permissions ?
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=${this.pageSize}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.listData = res.page.records
this.total = res.page.total
this.avgScore = (+res.avgScore).toFixed(2)
this.examCount = res.examCount
this.peopleNum = res.peopleNum
this.maxScore = res.maxScore
this.minScore = res.minScore
this.errorAnalysis = res.errorAnalysis || {}
this.max = res.highestErrorRate || {}
this.min = res.minimumErrorRate || {}
this.getChart()
this.errorChart()
} catch (e) {
this.loadIns.close()
}
},
//
async getActivity () {
@ -429,8 +433,8 @@ export default {
if (!this.multipleSelection.length) {
//
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.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&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=1&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
list = res.page.records
}

@ -261,7 +261,7 @@ export default {
},
//
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) { //
this.page = val

@ -359,7 +359,7 @@ export default {
},
//
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) { //
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {

@ -456,7 +456,7 @@ export default {
this.$router.push(`add?id=${row.id}`);
},
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) {
this.$post(`${this.api.enableAssessment}?id=${row.id}`).then(async res => {

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

@ -336,7 +336,7 @@ export default {
toStation () {
if (this.isCourse) { //
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 => { })
} else if (this.withLink) { //
this.linkVisible = true

@ -97,7 +97,7 @@ export default {
});
},
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
tabChange (item) {

Loading…
Cancel
Save