From 8744c566e3de241826c96b0b3ef06fd9c9993170 Mon Sep 17 00:00:00 2001 From: gupeng Date: Fri, 29 Nov 2019 18:25:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=96=B0=E9=97=BB=E5=92=8Cba?= =?UTF-8?q?nner=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/news/banner-add-or-update.vue | 25 ++++++++++++++-- src/views/modules/news/news-add-or-update.vue | 25 ++++++++++++++-- src/views/modules/news/news-publish.vue | 25 ++++++++++++++-- src/views/modules/news/news.vue | 30 +++++++++++++++++-- src/views/modules/news/newsdraft.vue | 30 +++++++++++++++++-- 5 files changed, 122 insertions(+), 13 deletions(-) diff --git a/src/views/modules/news/banner-add-or-update.vue b/src/views/modules/news/banner-add-or-update.vue index 904e9430..b17dcf3a 100644 --- a/src/views/modules/news/banner-add-or-update.vue +++ b/src/views/modules/news/banner-add-or-update.vue @@ -23,7 +23,15 @@ show-word-limit placeholder="标题"> - + + + { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => {}) this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street')) this.getListFromDict('bannerType') this.getListFromDict('bannerPosition') diff --git a/src/views/modules/news/news-add-or-update.vue b/src/views/modules/news/news-add-or-update.vue index fd79cd18..63639188 100644 --- a/src/views/modules/news/news-add-or-update.vue +++ b/src/views/modules/news/news-add-or-update.vue @@ -9,7 +9,15 @@ ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> - + + + { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => {}) this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street')) this.getListCategory() this.visible = true diff --git a/src/views/modules/news/news-publish.vue b/src/views/modules/news/news-publish.vue index 44d91954..04e78344 100644 --- a/src/views/modules/news/news-publish.vue +++ b/src/views/modules/news/news-publish.vue @@ -8,7 +8,15 @@ ref="dataForm" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> - + + + { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => {}) this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street')) this.getListCategory() this.visible = true diff --git a/src/views/modules/news/news.vue b/src/views/modules/news/news.vue index 010f3166..4d8f85ed 100644 --- a/src/views/modules/news/news.vue +++ b/src/views/modules/news/news.vue @@ -5,7 +5,15 @@ - + + +
提交时间   { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => {}) this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street')) this.getListCategory() }, @@ -374,6 +393,13 @@ export default { }, components: { AddOrUpdate + }, + watch: { + 'deptIdList': function (val) { + if (val.length !== 0) { + this.dataForm.gridId = val[val.length - 1] + } + } } } diff --git a/src/views/modules/news/newsdraft.vue b/src/views/modules/news/newsdraft.vue index 296ec1bb..46e2e510 100644 --- a/src/views/modules/news/newsdraft.vue +++ b/src/views/modules/news/newsdraft.vue @@ -5,7 +5,15 @@ - + + +
提交时间   { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => {}) this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street')) this.getListCategory() }, @@ -331,6 +350,13 @@ export default { }, components: { AddOrUpdate + }, + watch: { + 'deptIdList': function (val) { + if (val.length !== 0) { + this.dataForm.gridId = val[val.length - 1] + } + } } }