diff --git a/package-lock.json b/package-lock.json index 35d09e7..196af4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12890,6 +12890,11 @@ "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "dev": true }, + "vue-ueditor-wrap": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/vue-ueditor-wrap/-/vue-ueditor-wrap-2.5.6.tgz", + "integrity": "sha512-EJkYLyyzgOJTxGreiZ9wrmXthIMVVRSeFTzV6n0OR9w4aeqW79Prvog4jZ4G0kkmW3TTTBbZtHM9VNHEl6LJDA==" + }, "vue-uuid": { "version": "2.0.2", "resolved": "https://registry.npm.taobao.org/vue-uuid/download/vue-uuid-2.0.2.tgz", diff --git a/package.json b/package.json index 040b0db..3f0f969 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "vue-quill-editor": "^3.0.6", "vue-router": "^3.5.1", "vue-schart": "^2.0.0", + "vue-ueditor-wrap": "^2.5.6", "vue-uuid": "^2.0.2", "vuedraggable": "^2.17.0", "vuex": "^3.1.2" diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 1351d79..8707bb3 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -141,6 +141,7 @@ export default { this.$store.commit('setOrderParam', null) this.$store.commit('setInfoTab', '1') this.$store.commit('setColumnId', '') + this.$store.commit('setCompetitionCache', null) sessionStorage.setItem('sideBar', index) }, initMenu () { diff --git a/src/setting.js b/src/setting.js index b8f4811..2e098f1 100644 --- a/src/setting.js +++ b/src/setting.js @@ -11,7 +11,7 @@ if (isDev) { jumpPath = 'http://192.168.31.125:8087/' // 本地调试-需要启动本地判分点系统 host = 'http://121.37.12.51/' // host = 'https://huorantech.cn/' - host = 'http://192.168.31.217:9000/'// 榕 + // host = 'http://192.168.31.217:9000/'// 榕 // host = 'http://192.168.31.51:9000/'// 赓 } else if (isPro) { jumpPath = 'https://www.huorantech.cn/judgmentPoint/' diff --git a/src/views/course/AddCurriculum.vue b/src/views/course/AddCurriculum.vue index 9cbe7d2..0565c0a 100644 --- a/src/views/course/AddCurriculum.vue +++ b/src/views/course/AddCurriculum.vue @@ -143,13 +143,13 @@ - +

- 练习配置 + 练习项目配置
批量移除 @@ -218,13 +218,13 @@
- +

- 考核配置 + 考核项目配置
批量移除 @@ -293,13 +293,13 @@
- +

- 竞赛配置 + 大赛项目配置
批量移除 @@ -981,7 +981,7 @@ export default { const form = JSON.parse(JSON.stringify(this.form)) form.supplier = form.supplier.join() if (!this.practiceData.length) { - this.$message.warning("请添加练习配置"); + this.$message.warning("请添加练习项目配置"); return; } else { form.systemIdByPractice = this.practiceData.map(i => { @@ -996,7 +996,7 @@ export default { form.systemIdByPractice.sort((a, b) => a.sort - b.sort) } if (!this.assessmentData.length) { - this.$message.warning("请添加考核配置"); + this.$message.warning("请添加考核项目配置"); return; } else { form.systemIdByAssessment = this.assessmentData.map(i => { @@ -1010,7 +1010,7 @@ export default { }); form.systemIdByAssessment.sort((a, b) => a.sort - b.sort) } - // 竞赛配置 + // 大赛项目配置 form.systemIdByCompetition = this.matches.map(i => { let obj = { isShow: i.isShow, diff --git a/src/views/match/add/set.vue b/src/views/match/add/set.vue index 01c8fae..4460d43 100644 --- a/src/views/match/add/set.vue +++ b/src/views/match/add/set.vue @@ -38,14 +38,13 @@

课程

- - - - +
@@ -130,7 +129,8 @@ export default { data () { return { loadIns: null, - curriculumList: [], + mallIds: [], + curs: [], keyword: '', projects: [], page: 1, @@ -161,38 +161,62 @@ export default { }, methods: { // 获取课程 - getCourse () { - this.loadIns = Loading.service() - this.$post(this.api.listOfGoods, { + async getCourse () { + const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置') + const { serviceList } = await this.$post(this.api.queryServiceConfig, { + pageNum: 1, + pageSize: 1000, + supplierId: sid ? sid.supplierId : '' + }) + const { page } = await this.$post(this.api.listOfGoods, { pageNum: 1, pageSize: 10000, hotTag: 1, sort: 0, isAssociatedProduct: 1, - }).then(({ page }) => { - const list = page.records - this.curriculumList = page.records - if (list.length) { - const { mallId, cid, systemId } = this.form - const first = list[0] - this.form.mallId = mallId || first.mallId - this.form.cid = cid || +first.associatedProduct - this.sysId = systemId || +first.systemId - } + isShelves: 0, + }) + const { records } = page + const { mallId, cid, systemId } = this.form + if (records.length) { + serviceList.records.map(e => { + e.id = +e.systemId + e.label = e.systemName + }) + records.map(e => { + e.id = +e.mallId + e.label = e.productName + e.children = serviceList.records.filter(n => e.systemId.split(',').includes(n.systemId)) // 筛选出该课程下的系统 + }) + this.curs = records - this.courseChange() - }).catch(err => { - this.loadIns.close() - }); + // 查询项目 + const first = records[0] + this.mallIds = [mallId || first.mallId, systemId || first.children[0].id] + this.form.mallId = mallId || first.mallId + this.form.cid = cid || +first.associatedProduct + this.form.systemId = systemId || first.systemId + this.sysId = systemId || first.systemId + this.loadIns = Loading.service() + this.getProject() + } }, // 课程选择回调 - courseChange (val) { - const { systemId, associatedProduct } = this.curriculumList.find(e => e.mallId == this.form.mallId) - this.sysId = systemId - this.form.cid = associatedProduct - if (val) this.loadIns = Loading.service() + curChange (val) { + const id = val[0] + const item = this.curs.find(e => e.id == id) + if (val.length === 1) { + // 如果选择的是课程,则默认选中下面第一个系统 + this.mallIds = [id, item.children[0].id] + } + this.form.mallId = id + this.form.cid = +item.associatedProduct + this.form.systemId = this.mallIds[1] + this.sysId = this.mallIds[1] + this.loadIns = Loading.service() this.getProject() }, + // 查询项目 getProject () { this.$post(this.api.getProjectAssessmentByCompetition, { @@ -226,10 +250,7 @@ export default { form, curStep }) - const item = this.curriculumList.find(e => e.cid == this.form.cid) || {} // 获取选中课程中的系统id - let systemId = item.sysId || '1' - systemId = systemId.split(',')[0] // 系统id可能是多个,逗号分割的,所以处理成数组 - this.$router.push(`/projectList?systemId=${systemId}&show=1&name=${item.sysName.split(',')[0]}`) + this.$router.push(`/projectList?systemId=${this.mallIds[1]}&show=1&name=${this.$refs.cur.getCheckedNodes()[0].label}`) }, // 时间选择回调 timeChange (val) { diff --git a/src/views/match/manage/matchArch.vue b/src/views/match/manage/matchArch.vue index 8bc8cf7..7943a2d 100644 --- a/src/views/match/manage/matchArch.vue +++ b/src/views/match/manage/matchArch.vue @@ -1,109 +1,141 @@ \ No newline at end of file