From 45504f258c9bb9913ec548bfec37749ed50f01ab Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 29 Apr 2022 17:28:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AD=89=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/setting.js | 4 +-- src/views/course/contentSettings.vue | 48 +++++++++++++++++++++------- src/views/serve/backstage/index.vue | 1 + src/views/setting/info.vue | 2 +- src/views/user/AddUser.vue | 1 + src/views/user/User.vue | 3 +- 6 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/setting.js b/src/setting.js index 913910d..63a150f 100644 --- a/src/setting.js +++ b/src/setting.js @@ -9,8 +9,8 @@ let jumpPath = `${location.origin}/judgmentPoint` let host = `${location.origin}:9000/` if (isDev) { jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统 - host = 'http://39.108.250.202:9000/' - // host = 'http://192.168.31.151:9000/'// 榕 + // host = 'http://39.108.250.202:9000/' + host = 'http://192.168.31.151:9000/'// 榕 // host = 'http://192.168.31.137:9000/'// 赓 } else if (isPro) { jumpPath = "http://www.huorantech.cn/judgmentPoint/"; diff --git a/src/views/course/contentSettings.vue b/src/views/course/contentSettings.vue index 9e7714f..a010042 100644 --- a/src/views/course/contentSettings.vue +++ b/src/views/course/contentSettings.vue @@ -200,7 +200,7 @@ 取消 - 确定 + 确定 @@ -255,10 +255,19 @@ export default { showProgress: false, progressPercent: 0, moveVisible: false, - sortList: [], + sortList: [ + { + id: 'bottom', + name: '置末' + }, + { + id: 'top', + name: '置顶' + } + ], moveForm: { id: '', - sort: '' + sort: 'bottom' } }; }, @@ -293,7 +302,11 @@ export default { if (this.previewing) { this.closeIframe(); } else { + if (this.sorting) { + this.sorting = false + } else { this.$router.back() + } } }, iframeOnload() { @@ -413,9 +426,18 @@ export default { if (this.multipleSelection.length) { this.moveForm = { id: '', - sort: '' + sort: 'bottom' } - this.sortList = [] + this.sortList = [ + { + id: 'bottom', + name: '置末' + }, + { + id: 'top', + name: '置顶' + } + ] this.moveVisible = true } else { this.$message.warning('请选择小节!') @@ -448,8 +470,6 @@ export default { moveSubmit() { const { moveForm } = this let { id, sort } = moveForm - if (!id) return this.$message.warning('请选择目标章节') - if (sort === '') return this.$message.warning('请选择目标排序') if (typeof sort === 'string') sort = sort === 'top' ? 0 : this.sortList.length - 2 // 置顶和置末直接给排序 const list = this.multipleSelection const promises = [] @@ -481,12 +501,19 @@ export default { chapterVOList: chapterList }).then(res => { this.$message.success('移动成功!') - this.moveVisible = false this.getData() }).catch(res => {}) }).catch(err => {}) }) }, + // 资源移动校验 + moveConfirm() { + const { moveForm } = this + let { id, sort } = moveForm + if (!id) return this.$message.warning('请选择目标章节') + if (sort === '') return this.$message.warning('请选择目标排序') + this.moveVisible = false + }, cancelSort() { this.sorting = false; }, @@ -502,9 +529,8 @@ export default { }; this.$post(this.api.reorder, data).then(res => { this.sorting = false; - this.getData(); - }).catch(res => { - }); + this.moveSubmit() + }).catch(res => {}) }, editChapter(item) { this.chapterId = item.id; diff --git a/src/views/serve/backstage/index.vue b/src/views/serve/backstage/index.vue index 61d2897..faef260 100644 --- a/src/views/serve/backstage/index.vue +++ b/src/views/serve/backstage/index.vue @@ -42,6 +42,7 @@ export default { path: 'backstage', query: { ...this.$route.query, + page: 1, type: index, categoryId: '' } diff --git a/src/views/setting/info.vue b/src/views/setting/info.vue index 0c8a4c2..75d6052 100644 --- a/src/views/setting/info.vue +++ b/src/views/setting/info.vue @@ -184,7 +184,7 @@ - +
diff --git a/src/views/user/AddUser.vue b/src/views/user/AddUser.vue index ebefbcb..3415ab0 100644 --- a/src/views/user/AddUser.vue +++ b/src/views/user/AddUser.vue @@ -87,6 +87,7 @@ value="1" clearable placeholder="请选择证件类型" + style="width: 100%" > { this.$message.success(val ? '启用成功' : '禁用成功') }).catch(res => {})