From f58e39192bdd9e69d42f05e0300ba9e384ab4512 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Fri, 3 Jan 2025 17:25:53 +0800
Subject: [PATCH] fix
---
src/api/index.js | 1 +
src/pages/achievement/list/course.vue | 1 +
src/pages/achievement/list/index.vue | 5 ++-
src/pages/achievement/list/project.vue | 49 ++++++++++++--------------
src/pages/lesson/detail/index.vue | 3 +-
src/pages/match/add/set.vue | 4 +--
src/pages/project/list/index.vue | 4 +--
src/pages/station/preview/index.vue | 2 +-
8 files changed, 36 insertions(+), 33 deletions(-)
diff --git a/src/api/index.js b/src/api/index.js
index dc87af0..c5f5a51 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -110,6 +110,7 @@ export default {
schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
selfBuildCourse: `nakadai/nakadai/curriculum/selfBuildCourse`,
getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`,
+ getchoolBuiltCoursesList: `nakadai/nakadai/curriculum/getchoolBuiltCoursesList`,
projectListByCourseId: `occupationlab/occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表
getProjectOrExamPaperByAssessment: `occupationlab/occupationlab/projectManage/getProjectOrExamPaperByAssessment`,
diff --git a/src/pages/achievement/list/course.vue b/src/pages/achievement/list/course.vue
index 2b41d64..02cc964 100644
--- a/src/pages/achievement/list/course.vue
+++ b/src/pages/achievement/list/course.vue
@@ -15,6 +15,7 @@
+
{{ form.permissions ? '考核' : '练习' }}
@@ -96,7 +96,7 @@ export default {
return {
form: {
classId: +this.$route.query.classId || '',
- mallId: +this.$route.query.mallId || '',
+ curriculumId: +this.$route.query.curriculumId || '',
permissions: this.$route.query.permissions ? +this.$route.query.permissions : 0,
month: +this.$route.query.month || '',
startTime: +this.$route.query.startTime || '',
@@ -183,21 +183,18 @@ export default {
// 获取课程
async getCourse () {
- const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
- this.curs = data
- this.form.mallId = this.form.mallId || data[0].mallId
- this.getData();
- },
- // 课程选择回调
- curChange (id) {
- this.$router.push({
- path: 'list',
- query: {
- ...this.$route.query,
- mallId: id
- }
- })
- this.initData()
+ if (this.$parent.active === 'tab2') {
+ const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
+ this.curs = data
+ this.form.curriculumId = this.form.curriculumId || data[0].cid
+ } else {
+ const res = await this.$get(this.api.getchoolBuiltCoursesList)
+ const data = res.schoolCourse
+ this.curs = data
+ this.form.curriculumId = this.form.curriculumId || data[0].cid
+ }
+
+ this.getData()
},
getClassData () { // 获取班级下拉框数据
@@ -207,12 +204,12 @@ export default {
},
getData () {
this.loading = true
- const { mallId, permissions } = this.form
- const cur = this.curs.find(e => e.mallId == mallId) || {}
+ const { curriculumId, permissions } = this.form
+ const cur = this.curs.find(e => e.cid == curriculumId) || {}
let data = {
...this.form,
- curriculumId: cur.cid,
- systemId: cur.systemId,
+ mallId: cur.mallId || '',
+ systemId: cur.systemId || '',
pageNum: this.page,
pageSize: this.pageSize,
};
@@ -250,10 +247,10 @@ export default {
},
// 进入实验记录
entry (row) {
- const { mallId } = this.form
- const cur = this.curs.find(e => e.mallId == mallId) || {}
+ const { curriculumId } = this.form
+ const cur = this.curs.find(e => e.cid == curriculumId) || {}
this.$store.commit('achievement/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
- this.$router.push(`project?id=${row.assessmentId || row.projectId || ''}&paperId=${row.paperId || ''}&cid=${cur.cid}&projectName=${row.projectName || ''}&permissions=${this.form.permissions}&mallId=${this.form.mallId}&classId=${row.classId || ''}`)
+ this.$router.push(`project?id=${row.assessmentId || row.projectId || ''}&paperId=${row.paperId || ''}&cid=${curriculumId}&projectName=${row.projectName || ''}&permissions=${this.form.permissions}&mallId=${cur.mallId || ''}&classId=${row.classId || ''}`)
},
handleDelete (row) { // 删除
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
diff --git a/src/pages/lesson/detail/index.vue b/src/pages/lesson/detail/index.vue
index 41b9aa6..9634b7b 100644
--- a/src/pages/lesson/detail/index.vue
+++ b/src/pages/lesson/detail/index.vue
@@ -800,8 +800,9 @@ export default {
if (step === 1) {
this.$refs.form.validate(async (valid) => {
if (valid) {
- const form = JSON.parse(JSON.stringify(this.form))
+ const form = _.cloneDeep(this.form)
form.platformId = Setting.platformId
+ form.cid = cid
this.submiting = true
const load = this.$loading({
lock: true,
diff --git a/src/pages/match/add/set.vue b/src/pages/match/add/set.vue
index 2679895..1456b65 100644
--- a/src/pages/match/add/set.vue
+++ b/src/pages/match/add/set.vue
@@ -133,7 +133,7 @@
- {{ scope.row.founder ? '老师创建' : '系统内置' }}
+ {{ scope.row.founder ? '老师创建' : '系统' }}
@@ -222,7 +222,7 @@ export default {
res.data.map(e => {
e.id = e.mallId
e.label = e.curriculumName
- e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) // 筛选出该课程下的系统
+ if (e.systemId) e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) // 筛选出该课程下的系统
})
this.curs = res.data
diff --git a/src/pages/project/list/index.vue b/src/pages/project/list/index.vue
index 0c8ff55..716781b 100644
--- a/src/pages/project/list/index.vue
+++ b/src/pages/project/list/index.vue
@@ -28,13 +28,13 @@
:value="item.value">
-
+
e.projectId == this.curProject)