diff --git a/src/views/modules/news/notice-add-or-update.vue b/src/views/modules/news/notice-add-or-update.vue
index 2b34ace..a72eb92 100644
--- a/src/views/modules/news/notice-add-or-update.vue
+++ b/src/views/modules/news/notice-add-or-update.vue
@@ -7,7 +7,7 @@
:rules="dataRule"
ref="dataForm"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
-
+
+
+
+
{
+ this.moduleOptions = res.data.moduleOptions
+ }).catch(() => {
+ })
+ },
+ changeHandle(value){
+ this.dataForm.typeId = this.dataForm.allTypeId[value.length-1]
+ },
// 富文本编辑器
quillEditorHandle () {
this.quillEditor = new Quill('#J_quillEditor', {
@@ -162,6 +180,7 @@ export default {
this.quillEditor.insertEmbed(this.quillEditor.getSelection().index, 'image', res.data.url)
},
init () {
+ this.getModuleTypeInfo()
this.visible = true
this.$nextTick(() => {
this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null
diff --git a/src/views/modules/news/notice.vue b/src/views/modules/news/notice.vue
index 1ee2e0c..37b29a3 100644
--- a/src/views/modules/news/notice.vue
+++ b/src/views/modules/news/notice.vue
@@ -5,11 +5,17 @@
-
+
+
+
+
+
{{ $t('query') }}
@@ -32,6 +38,9 @@
+
+ align="center">
+
+ align="center">
+
+ {{scope.row.topFlag=='0'?'推荐':'取消推荐'}}
+
+
+ {{scope.row.noticeUpDownState=='0'?'上架':'下架'}}
+
{
+ this.moduleOptions = res.data.moduleOptions
+ }).catch(() => {
+ })
+ },
+ //推荐设置
+ handleIsTop (val) {
+ this.$confirm(this.$t('prompt.info', { 'handle': '推荐相关' }), this.$t('推荐'), {
+ confirmButtonText: this.$t('confirm'),
+ cancelButtonText: this.$t('cancel'),
+ type: 'warning'
+ }).then(() => {
+ this.$http['put']('/news/notice/handleIsTop', val).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.$message({
+ message: this.$t('prompt.success'),
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ this.getDataList()
+ }
+ })
+ }).catch(() => { })
+ }).catch(() => { })
+ },
+ //上下架设置
+ handleIsUpDown (val) {
+ this.$confirm(this.$t('prompt.info', { 'handle': '上下架' }), this.$t('上下架'), {
+ confirmButtonText: this.$t('confirm'),
+ cancelButtonText: this.$t('cancel'),
+ type: 'warning'
+ }).then(() => {
+ this.$http['put']('/news/notice/handleIsUpDown', val).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.$message({
+ message: this.$t('prompt.success'),
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ this.getDataList()
+ }
+ })
+ }).catch(() => { })
+ }).catch(() => { })
+ },
// 发布
noticePublishHandle (id) {
this.$confirm(this.$t('prompt.info', { 'handle': '发布' }), this.$t('发布'), {