yujialong 9 months ago
parent 8ee53be060
commit 8d0e6ec72f
  1. 2
      src/api/index.js
  2. 54
      src/pages/achievement/info/course.vue
  3. 36
      src/pages/achievement/info/project.vue
  4. 8
      src/pages/product/list/index.vue
  5. 2
      src/pages/product/show/index.vue
  6. 2
      src/pages/screen/index.vue

@ -405,7 +405,7 @@ export default {
productTypeList: `nakadai/productType/productTypeList`, productTypeList: `nakadai/productType/productTypeList`,
supplierList: `nakadai/supplier/supplierList`, supplierList: `nakadai/supplier/supplierList`,
tagsList: `nakadai/tags/tagsList`, tagsList: `nakadai/tags/tagsList`,
listOfGoods: `nakadai/mall/listOfGoods`, websiteProductList: `nakadai/mall/websiteProductList`,
detailsOfGoods: `nakadai/mall/detailsOfGoods`, detailsOfGoods: `nakadai/mall/detailsOfGoods`,
addLearningRecord: `nakadai/mallCourseLearningRecord/addLearningRecord`, addLearningRecord: `nakadai/mallCourseLearningRecord/addLearningRecord`,
// 课程管理三级联查 // 课程管理三级联查

@ -326,7 +326,7 @@ export default {
pageSizeDetail: 5, pageSizeDetail: 5,
totalDetail: 0, totalDetail: 0,
curRow: {}, curRow: {},
stageNumber: [], stageNumber: {},
loadIns: null loadIns: null
}; };
}, },
@ -351,20 +351,21 @@ export default {
const per = +this.curTab const per = +this.curTab
const res = await this.$post(this.api.productReadScore, { const res = await this.$post(this.api.productReadScore, {
pageNum: this.page, pageNum: this.page,
pageSize: 10000, pageSize: this.pageSize,
keyWord: this.keyword, keyWord: this.keyword,
mallId: this.id, mallId: this.id,
cid: this.cid, cid: this.cid,
permissions: per, permissions: per,
classId: this.classId classId: this.classId
}) })
this.listDataAll = per ? res.listOfAssessmentResults.records : res.userScoreList.records this.listData = per ? res.listOfAssessmentResults.records : res.userScoreList.records
this.total = per ? res.listOfAssessmentResults.total : res.userScoreList.total this.total = per ? res.listOfAssessmentResults.total : res.userScoreList.total
const stat = res.experimentalStatistics const stat = res.experimentalStatistics
this.avgScore = stat.averageScore this.avgScore = stat.averageScore
this.peopleNum = stat.experimentalPopulation this.peopleNum = stat.experimentalPopulation
this.maxScore = stat.maxScore this.maxScore = stat.maxScore
this.minScore = stat.minScore this.minScore = stat.minScore
this.stageNumber = res.stageNumber
const err = (per ? res.testErrorRateUnderProduct : res.projectErrorRateAnalysisUnderProduct) || [] const err = (per ? res.testErrorRateUnderProduct : res.projectErrorRateAnalysisUnderProduct) || []
err.forEach(e => { err.forEach(e => {
e.errorRate = (+e.errorRate).toFixed(2) e.errorRate = (+e.errorRate).toFixed(2)
@ -379,7 +380,6 @@ export default {
this.show(row) this.show(row)
this.$store.commit('achievement/setRow', null) this.$store.commit('achievement/setRow', null)
}) })
this.handlePage()
this.getChart() this.getChart()
}, },
initData () { initData () {
@ -405,11 +405,6 @@ export default {
}) })
this.initData() this.initData()
}, },
//
handlePage () {
const list = this.listDataAll
this.listData = list.slice((this.page - 1) * this.pageSize, this.page * this.pageSize)
},
// //
tabChange () { tabChange () {
this.$router.push({ this.$router.push({
@ -509,7 +504,7 @@ export default {
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.page = val this.page = val
this.handlePage() this.getData();
}, },
// //
@ -566,36 +561,10 @@ export default {
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}`) 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]
const list = this.listDataAll for (const i in this.stageNumber) {
const prop = this.curTab == 0 ? 'avgScore' : 'averageScore' data[+(i.replace('num', '')) - 1] = this.stageNumber[i]
list.map(n => { }
const val = n[prop]
if (val === 0) {
data[0]++;
} else if (val > 0 && val <= 10) {
data[1]++;
} else if (val > 10 && val <= 20) {
data[2]++;
} else if (val > 20 && val <= 30) {
data[3]++;
} else if (val > 30 && val <= 40) {
data[4]++;
} else if (val > 40 && val <= 50) {
data[5]++;
} else if (val > 50 && val <= 60) {
data[6]++;
} else if (val > 60 && val <= 70) {
data[7]++;
} else if (val > 70 && val <= 80) {
data[8]++;
} else if (val > 80 && val <= 90) {
data[9]++;
} else if (val > 90 && val <= 100) {
data[10]++;
}
})
let myChart = echarts.init(document.getElementById("chart")); let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({ myChart.setOption({
title: { text: "实验分数分布图" }, title: { text: "实验分数分布图" },
@ -605,12 +574,13 @@ export default {
type: "category", type: "category",
boundaryGap: false, boundaryGap: false,
interval: 10, interval: 10,
data: ["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", '100'] data: ["0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"]
}, },
yAxis: { yAxis: {
name: "人数", name: "人数",
type: "value", type: "value",
interval: 1 interval: 5,
minInterval: 5,
}, },
series: [{ series: [{
data, data,

@ -60,11 +60,11 @@
<div class="wrong"> <div class="wrong">
<div class="line"> <div class="line">
<span class="jud-name">错误率最高{{ max.judgmentName }}</span> <span class="jud-name">错误率最高{{ max.judgmentName }}</span>
<span>参加考试{{ permissions ? max.peopleNum : peopleNum }}&emsp;&emsp;{{ permissions ? `${max.errorTotal || 0}人做错,` : '' }}错误率{{ max.errorRate }}%</span> <span>参加考试{{ peopleNum }}&emsp;&emsp;{{ permissions ? `${max.errorTotal || 0}人做错,` : '' }}错误率{{ max.errorRate }}%</span>
</div> </div>
<div class="line"> <div class="line">
<span class="jud-name">错误率最低{{ min.judgmentName }}</span> <span class="jud-name">错误率最低{{ min.judgmentName }}</span>
<span>参加考试{{ permissions ? min.peopleNum : peopleNum }}&emsp;&emsp;{{ permissions ? `${min.errorTotal || 0}人做错,` : '' }}错误率{{ min.errorRate }}%</span> <span>参加考试{{ peopleNum }}&emsp;&emsp;{{ permissions ? `${min.errorTotal || 0}人做错,` : '' }}错误率{{ min.errorRate }}%</span>
</div> </div>
</div> </div>
<div class="chart" <div class="chart"
@ -398,11 +398,6 @@ export default {
this.pageActivation = 1 this.pageActivation = 1
this.curTab == 0 ? this.getData() : this.getActivity() this.curTab == 0 ? this.getData() : this.getActivity()
}, },
//
handlePage () {
const list = this.listDataAll
this.listData = list.slice((this.page - 1) * this.pageSize, this.page * this.pageSize)
},
// //
show (row) { show (row) {
this.$store.commit('achievement/setRow', null) this.$store.commit('achievement/setRow', null)
@ -521,7 +516,7 @@ export default {
responseType: 'blob' responseType: 'blob'
}) })
} else { } else {
res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}&mallId=${this.mallId}`, { res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}&mallId=${this.mallId}&classId=${this.classId}&keyWord=${this.keyword}`, {
headers: { headers: {
token: this.token token: this.token
}, },
@ -531,12 +526,10 @@ export default {
util.downloadFileDirect(`活跃度.xls`, new Blob([res.data])) util.downloadFileDirect(`活跃度.xls`, new Blob([res.data]))
}, },
getChart () { // 线 getChart () { // 线
const xData = Array.from({ length: 101 }, (v, k) => k) const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
const yData = Array.from({ length: 101 }, (v, k) => 0) for (const i in this.scores) {
const list = this.listData data[+(i.replace('num', '')) - 1] = this.scores[i]
list.map(n => { }
yData[n.score]++
})
let myChart = echarts.init(document.getElementById("chart")); let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({ myChart.setOption({
title: { text: "实验分数分布图" }, title: { text: "实验分数分布图" },
@ -545,19 +538,20 @@ export default {
name: "分数", name: "分数",
type: "category", type: "category",
boundaryGap: false, boundaryGap: false,
interval: 5, // interval: 5,
axisLabel: { // axisLabel: {
interval: 9, // interval: 9,
}, // },
data: xData data: ["0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"]
}, },
yAxis: { yAxis: {
name: this.permissions ? "人数" : '成绩报告数量', name: this.permissions ? "人数" : '成绩报告数量',
type: "value", type: "value",
interval: 5 interval: 5,
minInterval: 5,
}, },
series: [{ series: [{
data: yData, data,
type: "line", type: "line",
areaStyle: {}, areaStyle: {},
color: ["#8191fd"] color: ["#8191fd"]

@ -301,8 +301,8 @@ export default {
}, },
// //
getData () { getData () {
this.loadIns = Loading.service() // this.loadIns = Loading.service()
this.$post(this.api.listOfGoods, { this.$post(this.api.websiteProductList, {
...this.form, ...this.form,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
@ -321,9 +321,9 @@ export default {
}) })
this.list = list ? list : [] this.list = list ? list : []
this.total = page.total this.total = page.total
this.loadIns.close() // this.loadIns.close()
}).catch(res => { }).catch(res => {
this.loadIns.close() // this.loadIns.close()
}) })
}, },
initData () { initData () {

@ -348,7 +348,7 @@ export default {
}, },
// //
getHot () { getHot () {
this.$post(this.api.listOfGoods, { this.$post(this.api.websiteProductList, {
hotTag: 1, hotTag: 1,
sort: 1, sort: 1,
pageNum: 1, pageNum: 1,

@ -766,7 +766,7 @@ export default {
}, },
] ]
// //
const cousrseRes = await this.$post(this.api.listOfGoods, { const cousrseRes = await this.$post(this.api.websiteProductList, {
pageNum: 1, pageNum: 1,
pageSize: 1000, pageSize: 1000,
sort: 0, sort: 0,

Loading…
Cancel
Save