From f0b9757e66af4fb248fc8195105eaa8b5646b899 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 7 Jul 2023 16:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E6=A0=B8=E3=80=81=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=AD=89=E8=AF=BE=E7=A8=8B=E6=94=B9=E6=88=90=E4=BA=A7=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/header/index.vue | 1 + src/pages/achievement/teach/index.vue | 3 +- src/pages/assessment/add/index.vue | 1204 +++++++++++++------------ src/pages/product/list/index.vue | 3 + src/pages/product/show/index.vue | 7 + src/pages/project/add/index.vue | 49 +- src/pages/project/list/index.vue | 92 +- src/pages/station/preview/index.vue | 35 +- src/setting.js | 2 +- src/styles/page/station.scss | 2 +- 10 files changed, 750 insertions(+), 648 deletions(-) diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index 86c5017..e2a0c61 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -174,6 +174,7 @@ export default { // 前往评论列表 async toComment (item) { await this.$post(`${this.api.noticeRead}?isRead=1¬ifyId=${item.notifyId}`) // 该通知置为已读 + this.getNotice() this.$router.push(`/station/preview?courseId=${item.cid}&commentId=${item.commentId}¬ifyId=${item.notifyId}`) }, getUserDetail () { // 获取用户详情 diff --git a/src/pages/achievement/teach/index.vue b/src/pages/achievement/teach/index.vue index 94e2361..99b422b 100644 --- a/src/pages/achievement/teach/index.vue +++ b/src/pages/achievement/teach/index.vue @@ -546,6 +546,7 @@ export default { // 错误率统计图 errorChart () { const data = this.errorAnalysis.scoringPointList + const maxFontLength = data.length > 13 ? 6 : 10 const option = { tooltip: { trigger: 'axis', @@ -580,7 +581,7 @@ export default { color: '#333', }, formatter: function (value, index) { - value = value.substring(0, 10) + (value.length > 10 ? '...' : '') + value = value.substring(0, maxFontLength) + (value.length > maxFontLength ? '...' : '') // if (index % 2 != 0) { // return '\n\n' + value; // } else { diff --git a/src/pages/assessment/add/index.vue b/src/pages/assessment/add/index.vue index 8f85195..ad70a69 100644 --- a/src/pages/assessment/add/index.vue +++ b/src/pages/assessment/add/index.vue @@ -1,79 +1,95 @@ @@ -621,37 +655,37 @@ export default { height: 400px; max-height: 400px; width: 100%; - border: 1px solid #DCDFE6; + border: 1px solid #dcdfe6; border-radius: 4px; padding: 10px 10px 10px 40px; overflow: auto; - /deep/ .el-tree-node__content{ + /deep/ .el-tree-node__content { height: 30px; - .el-tree-node__expand-icon{ + .el-tree-node__expand-icon { padding: 2px; color: #fff; - background-color: #9278FF; + background-color: #9278ff; border-radius: 30px; margin: 0 10px; } - .el-tree-node__expand-icon.is-leaf{ + .el-tree-node__expand-icon.is-leaf { background-color: transparent; } - .el-icon-caret-right:before{ + .el-icon-caret-right:before { font-size: 14px; } - .el-checkbox__inner{ + .el-checkbox__inner { width: 18px; height: 18px; - border: 1px solid #9278FF; + border: 1px solid #9278ff; border-radius: 20px; } - .el-checkbox__inner::after{ + .el-checkbox__inner::after { position: absolute; top: 3px; left: 6px; } - .el-checkbox__input.is-indeterminate .el-checkbox__inner::before{ + .el-checkbox__input.is-indeterminate .el-checkbox__inner::before { position: absolute; top: 7px; } diff --git a/src/pages/product/list/index.vue b/src/pages/product/list/index.vue index 4fa5b09..3347515 100644 --- a/src/pages/product/list/index.vue +++ b/src/pages/product/list/index.vue @@ -9,6 +9,9 @@ + diff --git a/src/pages/product/show/index.vue b/src/pages/product/show/index.vue index 406b758..6fb628d 100644 --- a/src/pages/product/show/index.vue +++ b/src/pages/product/show/index.vue @@ -505,6 +505,13 @@ export default { } .courses { margin-top: 40px; + /deep/.des { + div, + p, + span { + font-family: PingFangSC-Regular !important; + } + } .chapters { margin-top: 16px; max-height: calc(100% - 53px); diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue index 0d0a402..60e5864 100644 --- a/src/pages/project/add/index.vue +++ b/src/pages/project/add/index.vue @@ -24,7 +24,16 @@ :disabled="isDetail">
- + + { - this.systemList = res.data; - }); - }, getInfoData () { // 获取详情数据 this.$get(`${this.api.getProjectDetail}?projectId=${this.projectId}`).then(res => { let { projectManage, projectJudgmentVos } = res; + const { mallId, systemId } = projectManage + if (mallId) { + this.mallIds = [mallId] + systemId && this.mallIds.push(systemId) + } this.projectManage = projectManage; this.originName = projectManage.projectName this.projectJudgmentData = projectJudgmentVos; @@ -428,6 +440,31 @@ export default { console.log(err); }); }, + // 获取系统 + async getSystemData () { + const { data } = await this.$get(this.api.getSystemIdBySchool) + this.systemList = data + const res = await this.$get(this.api.getSchoolEffectiveCourse) + if (res.data.length) { + res.data.map(e => { + e.id = e.mallId + e.label = e.curriculumName + e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) // 筛选出该课程下的系统 + }) + this.curs = res.data + console.log("🚀 ~ file: index.vue:431 ~ getSystemData ~ res.data:", res.data) + } + }, + // 课程选择回调 + curChange (val) { + const id = val[0] + if (val.length === 1) { + // 如果选择的是课程,则默认选中下面第一个系统 + this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id] + } + this.projectManage.mallId = id + this.projectManage.systemId = this.mallIds[1] + }, projectNameExistis () { // 项目管理名称判重 const { projectName } = this.projectManage if (this.originName === projectName) { diff --git a/src/pages/project/list/index.vue b/src/pages/project/list/index.vue index 98ea1d2..0edbe71 100644 --- a/src/pages/project/list/index.vue +++ b/src/pages/project/list/index.vue @@ -200,11 +200,19 @@ width="24%" center :close-on-click-modal="false"> - - - + + + v-model="copyForm.projectName"> + + + { this.isFirst = false @@ -371,12 +386,12 @@ export default { getschoolCourse () { this.$get(this.api.getSchoolEffectiveCourse).then(({ data }) => { this.curriculumList = data - const { cid } = this.queryData + const { mallId } = this.queryData if (data.length) { - this.cid = [cid || data[0].cid] + this.cid = [mallId || data[0].mallId] const all = this.systemListAll data.map(e => { - e.id = e.cid + e.id = e.mallId e.label = e.curriculumName e.children = all.filter(n => e.systemId.split(',').includes(n.id + '')) // 筛选出该课程下的系统 }) @@ -387,12 +402,13 @@ export default { }, // 课程选择回调 curChange (val) { - const cid = val[0] + const mallId = val[0] if (val.length === 1) { // 如果选择的是课程,则默认选中下面第一个系统 - this.cid = [cid, this.curs.find(e => e.id === cid).children[0].id] + this.cid = [mallId, this.curs.find(e => e.id === mallId).children[0].id] } - this.queryData.cid = cid + this.queryData.mallId = mallId + this.queryData.cid = this.curs.find(e => e.id === mallId).cid this.systemId = this.cid[1] this.initData() }, @@ -481,48 +497,44 @@ export default { console.log(err); }); }, - projectNameExistis () { // 项目管理名称判重 - if (this.projectName) { - this.$post(this.api.queryNameIsExist, { projectName: this.projectName }).then(res => { - if (res.status === 200) { - this.projectNameRepeat = false; - } - }).catch(err => { - this.projectNameRepeat = true; - }); - } else { - this.projectNameRepeat = false; - } - }, copyData (projectId) { // 复制,根据项目id查询详情 this.copyVisible = true; this.$get(`${this.api.getProjectDetail}?projectId=${projectId}`).then(res => { - this.projectName = res.projectManage.projectName; - this.currentRow = { - projectManage: res.projectManage, - projectJudgmentList: res.projectJudgmentVos + this.copyMallId = [] + this.copyForm.projectName = res.projectManage.projectName; + this.curRow = { + projectManage: JSON.parse(JSON.stringify(res.projectManage)), + projectJudgmentList: JSON.parse(JSON.stringify(res.projectJudgmentVos)) }; }).catch(err => { console.log(err); }); }, + // 复制项目系统选择回调 + copySystemChange (val) { + this.copyForm.mallId = val[0] + }, copySubmit () { - if (!this.projectName) { + const form = this.copyForm + const row = this.curRow + const fromSystem = !row.projectManage.founder + if (!form.projectName) { util.warningMsg("请输入项目名称"); return; } - ; - if (this.projectNameRepeat) { - util.warningMsg("该项目名称已存在"); + // 系统创建的才需要选择系统 + if (fromSystem && !form.mallId) { + util.warningMsg("请选择系统"); return; } - this.currentRow.projectManage.projectName = this.projectName; - this.currentRow.projectManage.projectId = ""; - this.currentRow.projectManage.founder = 1 - this.currentRow.projectJudgmentList.forEach(i => { + row.projectManage.projectName = form.projectName + if (fromSystem) row.projectManage.mallId = form.mallId + row.projectManage.projectId = ""; + row.projectManage.founder = 1 + row.projectJudgmentList.forEach(i => { i.projectId = ""; }); - this.$post(`${this.api.copyProjectManage}`, this.currentRow).then(res => { + this.$post(`${this.api.copyProjectManage}`, row).then(res => { this.initData(); util.successMsg("复制实验项目成功"); this.copyVisible = false; diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue index dd68c5f..f312016 100644 --- a/src/pages/station/preview/index.vue +++ b/src/pages/station/preview/index.vue @@ -151,7 +151,8 @@