yujialong 9 months ago
parent 192221dd33
commit fce5e3ac92
  1. 2
      src/api/index.js
  2. 11
      src/pages/achievement/info/course.vue
  3. 18
      src/pages/achievement/info/project.vue
  4. 1
      src/pages/achievement/list/course.vue
  5. 2
      src/pages/achievement/list/project.vue
  6. 2
      src/pages/match/add/step1.vue
  7. 2
      src/pages/screen/index.vue
  8. 70
      src/pages/station/preview/index.vue
  9. 4
      src/store/modules/achievement.js

@ -32,6 +32,7 @@ export default {
saveLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/save', saveLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/save',
updateLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/update', updateLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/update',
maximumPracticeScoreList: 'occupationlab/occupationlab/achievement/maximumPracticeScoreList', maximumPracticeScoreList: 'occupationlab/occupationlab/achievement/maximumPracticeScoreList',
getSandTableLastCache: `product/product/bank/operation/getSandTableLastCache`,
// 课程笔记 // 课程笔记
addNote: `nakadai/curriculumNotes/addNote`, addNote: `nakadai/curriculumNotes/addNote`,
curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`, curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`,
@ -105,6 +106,7 @@ export default {
getAssessmentDetail: `occupationlab/occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情 getAssessmentDetail: `occupationlab/occupationlab/achievement/getAssessmentDetail`, // 管理端考核成绩详情
getPracticeDetail: `occupationlab/occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情 getPracticeDetail: `occupationlab/occupationlab/achievement/getPracticeDetail`, // 管理端练习成绩详情
myClass: `occupationlab/occupationlab/achievement/myClass`, // 教师端:我的班级 myClass: `occupationlab/occupationlab/achievement/myClass`, // 教师端:我的班级
allClassesInOurSchool: `occupationlab/occupationlab/achievement/allClassesInOurSchool`,
deleteReportById: `occupationlab/occupationlab/achievement/deleteReportById`, // 批量删除成绩管理中的项目/批量删除成绩管理中的考核 deleteReportById: `occupationlab/occupationlab/achievement/deleteReportById`, // 批量删除成绩管理中的项目/批量删除成绩管理中的考核
reportDetail: `occupationlab/occupationlab/achievement/reportDetail`, // 查看实验报告 reportDetail: `occupationlab/occupationlab/achievement/reportDetail`, // 查看实验报告
schoolCourseByAchievement: `nakadai/nakadai/curriculum/schoolCourseByAchievement`, // 获取学校购买订单后的课程 schoolCourseByAchievement: `nakadai/nakadai/curriculum/schoolCourseByAchievement`, // 获取学校购买订单后的课程

@ -3,7 +3,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="m-b-20 head-card"> class="m-b-20 head-card">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<el-page-header @back="$router.back()" <el-page-header @back="back"
:content="goodsName"></el-page-header> :content="goodsName"></el-page-header>
</div> </div>
</el-card> </el-card>
@ -57,11 +57,11 @@
<div class="wrong"> <div class="wrong">
<div class="line"> <div class="line">
<span class="jud-name">错误率最高{{ max.projectName }}</span> <span class="jud-name">错误率最高{{ max.projectName }}</span>
<span>参加考试{{ max.numberOfParticipants || 0 }}&emsp;&emsp;{{ curTab == 1 ? `${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}%</span> <span>参加考试{{ permissions ? peopleNum || 0 : max.quantityAfterWeightRemoval }}&emsp;&emsp;{{ curTab == 1 ? `${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}%</span>
</div> </div>
<div class="line"> <div class="line">
<span class="jud-name">错误率最低{{ min.projectName }}</span> <span class="jud-name">错误率最低{{ min.projectName }}</span>
<span>参加考试{{ min.numberOfParticipants || 0 }}&emsp;&emsp;{{ curTab == 1 ? `${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}%</span> <span>参加考试{{ permissions ? peopleNum || 0 : min.quantityAfterWeightRemoval }}&emsp;&emsp;{{ curTab == 1 ? `${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}%</span>
</div> </div>
</div> </div>
<div class="chart" <div class="chart"
@ -699,7 +699,10 @@ export default {
] ]
} }
echarts.init(document.querySelector(`#chart1`)).setOption(option) echarts.init(document.querySelector(`#chart1`)).setOption(option)
} },
back () {
location.href = this.$store.state.achievement.referrer
},
} }
}; };
</script> </script>

@ -2,7 +2,7 @@
<div> <div>
<div class="back-wrap"> <div class="back-wrap">
<span class="back" <span class="back"
@click="$router.back()">返回 ></span> @click="back">返回 ></span>
<span class="name">{{ experimentalName }}</span> <span class="name">{{ experimentalName }}</span>
</div> </div>
@ -351,9 +351,14 @@ export default {
methods: { methods: {
// //
async getClass () { async getClass () {
let { list } = this.permissions ? let list
await this.$post(`${this.api.spliceClass}?assessmentId=${this.id}`) : if (this.permissions) {
await this.$post(this.api.myClass) const res = await this.$post(`${this.api.spliceClass}?assessmentId=${this.id}`)
list = res.list
} else {
const res = await this.$post(this.api.allClassesInOurSchool)
list = res.data
}
// //
const i = list.findIndex(e => e.id == 1) const i = list.findIndex(e => e.id == 1)
i !== -1 && list.splice(i, 1) i !== -1 && list.splice(i, 1)
@ -664,7 +669,10 @@ export default {
] ]
} }
echarts.init(document.querySelector(`#chart1`)).setOption(option) echarts.init(document.querySelector(`#chart1`)).setOption(option)
} },
back () {
location.href = this.$store.state.achievement.referrer
},
} }
}; };
</script> </script>

@ -262,6 +262,7 @@ export default {
}, },
// //
entry (row) { entry (row) {
this.$store.commit('achievement/setReferrer', location.href)
this.$router.push(`course?id=${row.mallId}&curriculumName=${row.curriculumName}&cid=${row.cid}`) this.$router.push(`course?id=${row.mallId}&curriculumName=${row.curriculumName}&cid=${row.cid}`)
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //

@ -38,6 +38,7 @@
<li v-show="projectPermissions === 1"> <li v-show="projectPermissions === 1">
<label>班级</label> <label>班级</label>
<el-select v-model="classId" <el-select v-model="classId"
clearable
@change="classChange"> @change="classChange">
<el-option v-for="item in classList" <el-option v-for="item in classList"
:key="item.id" :key="item.id"
@ -360,6 +361,7 @@ export default {
}, },
// //
entry (row) { entry (row) {
this.$store.commit('achievement/setReferrer', location.href)
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) { //

@ -696,7 +696,7 @@ export default {
this.$parent.showLoad() this.$parent.showLoad()
delete form.publishStatus delete form.publishStatus
if (status === 1) form.publishStatus = 1 if (status === 1) form.publishStatus = 1
form.ztOpen = status ? 0 : 1 // form.ztOpen = form.id ? form.ztOpen : (status ? 0 : 1) //
form.releaseType = releaseType form.releaseType = releaseType
form.id = this.$route.query.id form.id = this.$route.query.id

@ -535,7 +535,7 @@ export default {
name: '', name: '',
type: 'pie', type: 'pie',
radius: [60, 80], radius: [60, 80],
center: ['50%', '50%'], center: ['50%', '60%'],
label: { label: {
normal: { normal: {
show: true, show: true,

@ -576,6 +576,7 @@ export default {
this.teachingObjectives = data.teachingObjectives; this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig; this.assessmentList = data.assessmentConfig;
this.systemIds = data.systemIds this.systemIds = data.systemIds
this.queryProject()
this.getStatus() this.getStatus()
}, },
// 使 // 使
@ -913,43 +914,62 @@ export default {
this.curProject = item.projectId this.curProject = item.projectId
}, },
// //
queryProject () { showProjectDia () {
this.projectVisible = true this.projectVisible = true
this.loading = true },
//
queryProject () {
this.$get(this.api.getProjectBySystemId, { this.$get(this.api.getProjectBySystemId, {
systemId: this.systemIds, systemId: this.systemIds,
cId: this.courseId, // id cId: this.courseId, // id
mallId: this.mallId, mallId: this.mallId,
permissions: 0 // 0: ,1: permissions: 0 // 0: ,1:
}).then(({ projects }) => { }).then(({ projects }) => {
this.loading = false
this.projects = projects this.projects = projects
}).catch(res => { }) }).catch(res => { })
}, },
// //
entry () { entryProject (projectId) {
// this.$confirm('是否要继续上次的实验?', '提示', {
this.$get(this.api.getTheMostRecentlyRunProject, { confirmButtonText: '是',
cid: this.courseId cancelButtonText: '否',
}).then(({ data }) => { type: 'success'
// data }).then(() => {
if (data && data.length) { this.curProject = projectId
this.$confirm('是否要继续上次的实验?', '提示', { this.toSub()
confirmButtonText: '是', }).catch(() => {
cancelButtonText: '否', this.showProjectDia()
type: 'success'
}).then(() => {
this.toPython(data[0].projectId)
}).catch(() => {
this.queryProject()
})
} else {
this.queryProject()
}
}).catch(res => {
this.queryProject()
}) })
}, },
//
entry () {
// (python)
if (this.systemIds.split(',').includes('19')) { //
this.$post(`${this.api.getSandTableLastCache}?cid=${this.courseId}`).then(res => {
// data
if (res.getLastCache) {
this.entryProject(+res.getLastCache)
} else {
this.showProjectDia()
}
}).catch(res => {
this.showProjectDia()
})
} else { // python
this.$get(this.api.getTheMostRecentlyRunProject, {
cid: this.courseId
}).then(({ data }) => {
// data
if (data && data.length) {
this.entryProject(data[0].projectId)
} else {
this.showProjectDia()
}
}).catch(res => {
this.showProjectDia()
})
}
},
// python // python
toPython (projectId) { toPython (projectId) {
const id = this.systemIds const id = this.systemIds
@ -979,8 +999,6 @@ export default {
toSub () { toSub () {
const { systemId } = this.projects.find(e => e.projectId == this.curProject) const { systemId } = this.projects.find(e => e.projectId == this.curProject)
let token = util.local.get(Setting.tokenKey); let token = util.local.get(Setting.tokenKey);
let roleId = this.roleId == 4 ? 0 : 1;
let userName = window.btoa(encodeURIComponent(this.userName));
if (systemId == 11) { if (systemId == 11) {
// //
sessionStorage.removeItem('projectId') sessionStorage.removeItem('projectId')

@ -5,11 +5,15 @@ export default {
namespaced: true, namespaced: true,
state: { state: {
row: null, row: null,
referrer: '',
}, },
mutations: { mutations: {
setRow: (state, row) => { setRow: (state, row) => {
state.row = row state.row = row
}, },
setReferrer: (state, val) => {
state.referrer = val
},
}, },
actions: { actions: {

Loading…
Cancel
Save