From c22c9fae40b10e40d03be02cad67ebf7f3249af3 Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Fri, 30 Oct 2020 23:12:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=B1=BB=E5=9E=8Bbug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{custom => news}/module-style-list.vue | 39 ++++++++----- .../modulecategory-add-or-update.vue | 8 +-- .../{custom => news}/modulecategory.vue | 6 +- .../modules/news/notice-add-or-update.vue | 46 ++++++++++++--- src/views/modules/news/notice.vue | 57 ++++++++++++------- 5 files changed, 106 insertions(+), 50 deletions(-) rename src/views/modules/{custom => news}/module-style-list.vue (80%) rename src/views/modules/{custom => news}/modulecategory-add-or-update.vue (96%) rename src/views/modules/{custom => news}/modulecategory.vue (89%) diff --git a/src/views/modules/custom/module-style-list.vue b/src/views/modules/news/module-style-list.vue similarity index 80% rename from src/views/modules/custom/module-style-list.vue rename to src/views/modules/news/module-style-list.vue index 2dad220..8003832 100644 --- a/src/views/modules/custom/module-style-list.vue +++ b/src/views/modules/news/module-style-list.vue @@ -14,18 +14,22 @@ :label="item.dictValue" style="margin-left: 30px;margin-top: 30px" @change="setModuleStyle(item.dictName,item.dictValue)"> {{ `${item.dictName}` }}
- - + +
+ @@ -41,7 +45,11 @@ export default { moduleStyle: '' }, moduleStyleList: [], - previewImgList: [] + previewImgList: [], + data: { + moduleStyle: '', + moduleStyleName: '' + } } }, computed: { @@ -62,7 +70,7 @@ export default { this.previewImgList.push(url) }, getModuleStyleList () { - this.$http.get(`/custom/module/listSimple/jinshui_gui_style`).then(({ data: res }) => { + this.$http.get(`/sys/dict/listSimple/jinshui_gui_style`).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -70,15 +78,18 @@ export default { }).catch(() => {}) }, setModuleStyle (name, value) { + this.data.moduleStyle = value + this.data.moduleStyleName = name + }, + dataFormSubmitHandle () { + if (this.data.moduleStyle === '' || this.data.moduleStyle === undefined || this.data.moduleStyleName === '' || this.data.moduleStyleName === undefined) { + return this.$message.error('请选择模块样式') + } this.$refs['dataForm'].validate((valid) => { if (!valid) { return false } - let data = { - moduleStyle: value, - moduleStyleName: name - } - this.$emit('setModuleStyle', data) + this.$emit('setModuleStyle', this.data) this.visible = false }) }, diff --git a/src/views/modules/custom/modulecategory-add-or-update.vue b/src/views/modules/news/modulecategory-add-or-update.vue similarity index 96% rename from src/views/modules/custom/modulecategory-add-or-update.vue rename to src/views/modules/news/modulecategory-add-or-update.vue index 1139085..e7a8f13 100644 --- a/src/views/modules/custom/modulecategory-add-or-update.vue +++ b/src/views/modules/news/modulecategory-add-or-update.vue @@ -175,7 +175,7 @@ export default { this.getSecondOrgDicList() }, getModuleStyleList () { - this.$http.get(`/custom/module/listSimple/jinshui_gui_style`).then(({ data: res }) => { + this.$http.get(`/sys/dict/listSimple/jinshui_gui_style`).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -207,7 +207,7 @@ export default { this.dataForm.categoryType = item }, getcategoryList () { - return this.$http.get('/custom/modulecategory/list').then(({ data: res }) => { + return this.$http.get('/news/modulecategory/list').then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -223,7 +223,7 @@ export default { }).catch(() => { }) }, getInfo () { - this.$http.get(`/custom/modulecategory/${this.dataForm.id}`).then(({ data: res }) => { + this.$http.get(`/news/modulecategory/${this.dataForm.id}`).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -258,7 +258,7 @@ export default { if (!valid) { return false } - this.$http[!this.dataForm.id ? 'post' : 'put']('/custom/modulecategory', this.dataForm).then(({ data: res }) => { + this.$http[!this.dataForm.id ? 'post' : 'put']('/news/modulecategory', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } diff --git a/src/views/modules/custom/modulecategory.vue b/src/views/modules/news/modulecategory.vue similarity index 89% rename from src/views/modules/custom/modulecategory.vue rename to src/views/modules/news/modulecategory.vue index 232c4f3..3b7f20c 100644 --- a/src/views/modules/custom/modulecategory.vue +++ b/src/views/modules/news/modulecategory.vue @@ -8,7 +8,6 @@ -