From d40a2540964ed912c41595c5a77f6f400ffd1d11 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 15 Aug 2023 18:44:00 +0800 Subject: [PATCH] fix --- src/layouts/header/index.vue | 2 +- src/pages/achievement/info/course.vue | 12 ++--- src/pages/achievement/info/project.vue | 6 +-- src/pages/match/add/index.vue | 3 +- src/pages/match/add/set.vue | 1 + src/pages/match/manage/matchArch.vue | 66 ++++++++++++++++++-------- src/pages/product/list/index.vue | 2 +- src/pages/product/show/index.vue | 6 ++- src/pages/screen/index.vue | 61 ++++++++++++------------ src/pages/station/preview/index.vue | 11 +++-- src/setting.js | 2 +- 11 files changed, 104 insertions(+), 68 deletions(-) diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index 6200152..0c47853 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -153,7 +153,7 @@ export default { }, initSocket ({ id, account }) { // 实例化socket - this.socket = new WebSocket(`${Setting.isTest ? 'ws' : 'wss'}://${Setting.isDev ? '192.168.31.51' : location.host}/nakadai/websocket/${id}/${account}`) + this.socket = new WebSocket(`${Setting.isTest ? 'ws' : 'wss'}://${Setting.isDev ? '192.168.31.51:9100' : location.host}/nakadai/websocket/${id}/${account}`) // this.socket = new WebSocket(`ws://121.37.12.51:9100/nakadai/websocket/${id}/${account}`) // 监听socket连接 this.socket.onopen = this.open; diff --git a/src/pages/achievement/info/course.vue b/src/pages/achievement/info/course.vue index e6d28d0..7037925 100644 --- a/src/pages/achievement/info/course.vue +++ b/src/pages/achievement/info/course.vue @@ -30,11 +30,11 @@

实验最高分

-

{{ maxScore }}

+

{{ maxScore || 0 }}

实验最低分

-

{{ minScore }}

+

{{ minScore || 0 }}

错误率最高:{{ max.projectName }} - 参加考试{{ max.numberOfParticipants }}人 | {{ curTab == 1 ? `共${max.itemErrorCount || ''}人做错,` : '' }}错误率{{ max.errorRate }}% + 参加考试{{ max.numberOfParticipants || 0 }}人 | {{ curTab == 1 ? `共${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}%
错误率最低:{{ min.projectName }} - 参加考试{{ min.numberOfParticipants }}人 | {{ curTab == 1 ? `共${min.itemErrorCount || ''}人做错,` : '' }}错误率{{ min.errorRate }}% + 参加考试{{ min.numberOfParticipants || 0 }}人 | {{ curTab == 1 ? `共${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}%
{ e.errorRate = (+e.errorRate).toFixed(2) }) - this.errorAnalysis = err + this.errorAnalysis = err || [] this.max = err[0] || {} this.min = err[err.length - 1] || {} this.errorChart() diff --git a/src/pages/achievement/info/project.vue b/src/pages/achievement/info/project.vue index d8647f1..232ae4f 100644 --- a/src/pages/achievement/info/project.vue +++ b/src/pages/achievement/info/project.vue @@ -60,11 +60,11 @@
错误率最高:{{ max.judgmentName }} - 参加考试{{ permissions ? max.peopleNum : peopleNum }}人 | {{ permissions ? `共${max.errorTotal}人做错,` : '' }}错误率{{ max.errorRate }}% + 参加考试{{ permissions ? max.peopleNum : peopleNum }}人 | {{ permissions ? `共${max.errorTotal || 0}人做错,` : '' }}错误率{{ max.errorRate }}%
错误率最低:{{ min.judgmentName }} - 参加考试{{ permissions ? min.peopleNum : peopleNum }}人 | {{ permissions ? `共${min.errorTotal}人做错,` : '' }}错误率{{ min.errorRate }}% + 参加考试{{ permissions ? min.peopleNum : peopleNum }}人 | {{ permissions ? `共${min.errorTotal || 0}人做错,` : '' }}错误率{{ min.errorRate }}%
{ @@ -275,6 +275,7 @@ export default { back () { // 更改了信息才需要提示 const { updateTime } = this.$refs['step' + this.step] + console.log("🚀 ~ file: index.vue:278 ~ back ~ updateTime:", updateTime) if (this.step < 4 && this.$refs['step' + this.step] && updateTime) { this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { type: 'warning' diff --git a/src/pages/match/add/set.vue b/src/pages/match/add/set.vue index 483f83b..58fca1e 100644 --- a/src/pages/match/add/set.vue +++ b/src/pages/match/add/set.vue @@ -228,6 +228,7 @@ export default { toProject () { const { form, curStep } = this.$parent form[curStep] = this.form + this.$parent.pass = 1 this.$store.commit('match/setCache', { form, curStep diff --git a/src/pages/match/manage/matchArch.vue b/src/pages/match/manage/matchArch.vue index a47f9ba..04cd8d6 100644 --- a/src/pages/match/manage/matchArch.vue +++ b/src/pages/match/manage/matchArch.vue @@ -2,26 +2,52 @@
- - -
- 比赛方式:{{ item.methodName }} - 比赛形式:{{ item.competitionType ? '团队赛' : '个人赛' }} - 赛制:{{ item.ruleName }} - 状态:{{ item.status }} - 竞赛起止时间:{{ item.startTime + ' ~ ' + item.endTime }} -
- 排名 - 成绩管理 -
-
-
-
+ + + + + + + + + + + + + + + + +
diff --git a/src/pages/product/list/index.vue b/src/pages/product/list/index.vue index 3c05ec7..87e9126 100644 --- a/src/pages/product/list/index.vue +++ b/src/pages/product/list/index.vue @@ -356,7 +356,7 @@ export default { el.innerHTML = e.productIntroduction e.productIntroduction = el.innerText const cid = e.classificationId - e.isCourse = (cid === 1 || cid === 2) && !e.isAssociatedProduct + e.isCourse = (cid === 1 || cid === 2) && !e.isAssociatedProduct // 产品分类为实训或者理论,并且已经关联了产品 }) this.list = list ? list : [] this.total = page.total diff --git a/src/pages/product/show/index.vue b/src/pages/product/show/index.vue index 8fa9bef..bd74c69 100644 --- a/src/pages/product/show/index.vue +++ b/src/pages/product/show/index.vue @@ -141,7 +141,7 @@ alt=""> {{ section.name }}
-
@@ -310,7 +310,9 @@ export default { }, // 跳转播放资源 toPreview (i, j) { - this.form.goodsRes.logoOfOurSchool ? + const bought = this.form.goodsRes.logoOfOurSchool + // 购买了 || 没购买但是是第一个课程,就可以查看课程 + bought || (!bought && !j) ? this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.productName}&mallId=${this.id}&chapter=${i}§ion=${j}&admin=1`) : this.toTrail() }, diff --git a/src/pages/screen/index.vue b/src/pages/screen/index.vue index f185bf0..eeb0554 100644 --- a/src/pages/screen/index.vue +++ b/src/pages/screen/index.vue @@ -718,11 +718,11 @@ export default { }, { color1: '#e71872', - color2: 'rgba(243, 147, 189, 0.4)' + color2: 'rgba(40, 147, 189, 0.4)' }, { color1: '#f9d437', - color2: 'rgba(255, 234, 144, 0.4)' + color2: 'rgba(50, 234, 144, 0.4)' }, { color1: '#912892', @@ -730,11 +730,11 @@ export default { }, { color1: '#f21259', - color2: 'rgba(213, 22, 11, 0.4)' + color2: 'rgba(40, 176, 97, 0.4)' }, { color1: '#7343fe', - color2: 'rgba(243, 123, 2, 0.4)' + color2: 'rgba(50, 240, 140, 0.4)' }, { color1: '#ea7321', @@ -746,8 +746,24 @@ export default { }, { color1: '#672313', - color2: 'rgba(156, 163, 2, 0.4)' - } + color2: 'rgba(156, 40, 100, 0.4)' + }, + { + color1: '#0184d5', + color2: 'rgba(60, 132, 60, 0.4)' + }, + { + color1: '#00d887', + color2: 'rgba(60, 42, 244, 0.4)' + }, + { + color1: '#e71872', + color2: 'rgba(90, 147, 180, 0.4)' + }, + { + color1: '#f9d437', + color2: 'rgba(150, 20, 144, 0.4)' + }, ] // 登录前登录后调的课程接口不一样 const cousrseRes = await this.$post(this.api.listOfGoods, { @@ -758,22 +774,20 @@ export default { hotTag: 1, }) if (cousrseRes) { - const courseList = - cousrseRes.page.records + const courseList = cousrseRes.page.records const ids = courseList.map(e => e.mallId) times.map(e => { e.mallId = ids }) const courseData = {} - courseList.map(e => { - // e.productName = e.productName.substring(0, 10) - courseData[e.productName] = [] - }) this.$post(this.api.studentAssessSchievement, times).then(({ data }) => { - const times = [] + const xData = data.map(e => e.time) + const len = xData.length + courseList.map(e => { + courseData[e.productName] = new Array(len).fill(0, 0) + }) const series = [] data.map((e, i) => { - times.push(e.time) e.assesScoreRespList.map(n => { const item = courseList.find(j => j.mallId == n.mallId) if (item) { @@ -790,7 +804,7 @@ export default { series.push({ name: i, type: 'line', - smooth: true, + // smooth: true, symbol: 'circle', symbolSize: 5, lineStyle: { @@ -799,23 +813,10 @@ export default { width: 2 } }, - areaStyle: { - normal: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ - offset: 0, - color: colors[index].color2 - }, { - offset: 0.8, - color: colors[index].color2 - }], false), - shadowColor: 'rgba(0, 0, 0, 0.1)', - } - }, itemStyle: { normal: { color: colors[index].color1, - borderColor: 'rgba(221, 220, 107, .1)', - borderWidth: 12 + borderWidth: 8 } }, data: courseData[i] @@ -871,7 +872,7 @@ export default { color: 'rgba(255,255,255,.2)' } }, - data: times + data: xData }, yAxis: [{ type: 'value', diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue index 8f445d4..54f9146 100644 --- a/src/pages/station/preview/index.vue +++ b/src/pages/station/preview/index.vue @@ -159,7 +159,7 @@