From 3bb334508c3d10468333b759e2a18ef7bf41d095 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 8 Sep 2023 10:40:13 +0800 Subject: [PATCH] fix --- src/pages/expSystem/list/index.vue | 13 + src/pages/match/add/step2.vue | 869 +++++++++++++++------------- src/pages/product/list/index.vue | 226 ++------ src/pages/station/preview/index.vue | 2 +- 4 files changed, 542 insertions(+), 568 deletions(-) diff --git a/src/pages/expSystem/list/index.vue b/src/pages/expSystem/list/index.vue index f7506fd..b74c109 100644 --- a/src/pages/expSystem/list/index.vue +++ b/src/pages/expSystem/list/index.vue @@ -23,6 +23,11 @@ clearable> +
+ 进入沙盘系统 +
import Setting from "@/setting"; +import util from "@/libs/util"; +import Cookie from 'js-cookie' export default { data () { return { + isDev: Setting.isDev, + token: util.local.get(Setting.tokenKey), systemType: "", systemSearch: "", searchTimer: null, @@ -151,6 +160,10 @@ export default { toBackstage (row) { this.$router.push(`backstage?systemId=${row.systemId}&show=1&name=${row.systemName}`) }, + toSand () { + Cookie.set('sand-token', this.token) + window.open(`http://192.168.31.125:9520/#/product/index`) + } } }; diff --git a/src/pages/match/add/step2.vue b/src/pages/match/add/step2.vue index e3fb959..bea38ee 100644 --- a/src/pages/match/add/step2.vue +++ b/src/pages/match/add/step2.vue @@ -1,143 +1,217 @@ \ No newline at end of file diff --git a/src/pages/product/list/index.vue b/src/pages/product/list/index.vue index 733d2af..33d4118 100644 --- a/src/pages/product/list/index.vue +++ b/src/pages/product/list/index.vue @@ -46,29 +46,44 @@
-
-
学科专业
-
-
全部
-
不限
-
- {{ item.val.length ? item.name : item.categoryName }} - +
产品标签
@@ -220,62 +235,9 @@ export default { professionalCategoryId: '', professionalId: '', category: [], - // 学科动态加载 - props: { - checkStrictly: true, - lazy: true, - lazyLoad (node, resolve) { - const { level, value } = node - // 学科类别 - if (!level) { - that.$get(that.api.courseDiscipline).then(({ list }) => { - list = list.slice(1).filter(e => e.level > 1) - list.map(e => { - e.value = e.disciplineId - e.label = e.disciplineName - e.children = [] - }) - that.category = [list[0].disciplineId] - resolve(list) - }).catch(err => { }) - } else if (level === 1) { - // 专业类 - that.$get(that.api.courseProfessionalClass, { - disciplineId: value - }).then(({ list }) => { - list = list.filter(e => e.level > 1) - list.map(e => { - e.value = e.professionalClassId - e.label = e.professionalClassName - e.children = [] - }) - resolve(list) - }).catch(err => { }) - } else if (level === 2) { - // 专业 - that.$get(that.api.courseProfessional, { - professionalClassId: value - }).then(({ list }) => { - list = list.filter(e => e.level > 1) - list.map(e => { - e.value = e.professionalId - e.label = e.professionalName - e.leaf = true - }) - resolve(list) - }).catch(err => { }) - } else { - resolve([]) - } - } - }, + professionalClasses: [], + professionals: [], labels: [], - subjectList: [], //专业学科 - professionalClassList: [], //专业类 - professionalList: [], //专业 - categoryName: '', - professionalCategoryName: '', - professionalName: '', classifications: [], status: [ { @@ -379,109 +341,41 @@ export default { async getSubject () { // 学科类别 this.$get(this.api.subjectCategoryCited).then(({ list }) => { - const result = [] - const promises = [] list = list.filter(e => e.disciplineId != 1) list.map((e, i) => { + e.id = e.disciplineId + e.name = e.disciplineName // 专业类 e.professionalClasses.map(e => { - e.value = e.professionalClassId - e.label = e.professionalClassName + e.id = e.professionalClassId + e.name = e.professionalClassName // 专业 e.professionals.map(e => { - e.value = e.professionalId - e.label = e.professionalName + e.id = e.professionalId + e.name = e.professionalName }) e.children = e.professionals }) - result.push({ - val: [], - disciplineId: e.disciplineId, - name: e.disciplineName, - categoryName: e.disciplineName, - list: e.professionalClasses - }) - }) - - Promise.all(promises).then(_ => { - console.log("🚀 ~ file: index.vue:378 ~ this.$get ~ result:", result) - this.category = result + e.children = e.professionalClasses }) + this.category = list }).catch(err => { }) }, - nameClick (item, i) { - this.categoryId = item.disciplineId - this.professionalCategoryId = '' - this.professionalId = '' - this.$refs['category' + i][0].toggleDropDownVisible() - this.clearCategory() - this.initData() - }, - // 清除所有学科所选 - clearCategory () { - const list = this.category - list.map(e => { - e.val = [] - }) - }, - categoryChange (val, item, i) { - const name = this.$refs['category' + i][0].getCheckedNodes()[0].pathLabels - console.log("🚀 ~ file: index.vue:431 ~ categoryChange ~ val, item:", val, item, name) - item.name = item.categoryName + '/' + name.join('/') - this.clearCategory() - item.val = val - this.categoryId = item.disciplineId - this.professionalCategoryId = val[0] || '' - this.professionalId = val[1] || '' - this.initData() - }, - // 返回学科name - handleCategoryName () { - if (this.subjectList.length) { - const id = this.categoryId - const list = this.subjectList - if (list.length) { - if (id === '' || id === 1) { - this.categoryName = list[0].disciplineName - } else { - const item = list.find(e => e.disciplineId == id) - this.categoryName = item ? item.disciplineName : '' - } - } - } - - if (this.professionalClassList.length) { - const id = this.professionalCategoryId - const list = this.professionalClassList - if (list.length) { - if (id === '' || id === 1) { - this.professionalCategoryName = list[0].professionalClassName - } else { - const item = list.find(e => e.professionalClassId == id) - this.professionalCategoryName = item ? item.professionalClassName : '' - } - } - } - if (this.professionalList.length) { - const id = this.professionalId - const list = this.professionalList - if (list.length) { - if (id === '' || id === 1) { - this.professionalName = list[0].professionalName - } else { - const item = list.find(e => e.professionalId == id) - this.professionalName = item ? item.professionalName : '' - } - } - } - }, // 学科点击回调 - catetoryClick (id) { - this.categoryId = id - this.professionalCategoryId = id - this.professionalId = id - this.clearCategory() + categoryClick (item, i) { + const { id, children } = item + this[i === 1 ? 'categoryId' : i === 2 ? 'professionalCategoryId' : 'professionalId'] = id + // 学科类别 + if (i === 1) { + this.professionalCategoryId = '' + this.professionalId = '' + if (children) this.professionalClasses = children + this.professionals = [] + } else if (i === 2) { // 专业类 + this.professionalId = '' + if (children) this.professionals = children + } this.initData() }, // 获取产品类型 diff --git a/src/pages/station/preview/index.vue b/src/pages/station/preview/index.vue index 54f9146..73a8751 100644 --- a/src/pages/station/preview/index.vue +++ b/src/pages/station/preview/index.vue @@ -602,7 +602,7 @@ export default { }, // 获取最高分列表 async getMaximumScore () { - let { message } = await this.$post(`${this.api.maximumPracticeScoreList}?projectId=${this.archProject}&pageNum=1&pageSize=1000`); + let { message } = await this.$post(`${this.api.maximumPracticeScoreList}?projectId=${this.archProject}&pageNum=1&pageSize=1000&mallId=${this.mallId}&cid=${this.courseId}`); const list = message.records list.forEach(e => { if (!e.userAvatars) e.userAvatars = 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'