From 204770970c0934004ada603913c452d38dafac33 Mon Sep 17 00:00:00 2001 From: liuchuang <123456> Date: Wed, 16 Sep 2020 17:04:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E7=BE=A41+1=20=E8=AF=9D=E9=A2=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E7=BD=AE=E9=A1=B6=E5=92=8C?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=BD=AE=E9=A1=B6=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/partygroup/partytopic-list.vue | 38 ++++++++++++++++++- src/views/modules/sys/role-add-or-update.vue | 2 +- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/views/modules/partygroup/partytopic-list.vue b/src/views/modules/partygroup/partytopic-list.vue index fd35b2b..fcb92c3 100644 --- a/src/views/modules/partygroup/partytopic-list.vue +++ b/src/views/modules/partygroup/partytopic-list.vue @@ -48,16 +48,19 @@ - + + @@ -187,6 +190,39 @@ export default { } this.options = res.data.options }).catch(() => {}) + }, + topFlagFormat: function (row, column) { + let topFlag = row.topFlag + if (topFlag === '0') { + return '未置顶' + } else if (topFlag === '1') { + return '已置顶' + } + }, + top (id, topFlag) { + let title = '置顶' + if (topFlag === '0') { + title = '取消置顶' + } + this.$confirm(this.$t('prompt.info', { 'handle': title }), this.$t(title), { + confirmButtonText: this.$t('confirm'), + cancelButtonText: this.$t('cancel'), + type: 'warning' + }).then(() => { + this.$http['post']('/partyGroup/partytopic/top', { 'topicId': id, 'topFlag': topFlag }).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(() => {}) } } } diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index d503eab..7c9a8a1 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -124,7 +124,7 @@ export default { appMenuList: [], categoryList: [], roleTypeList: [], - analysisMenuList:[], + analysisMenuList: [], dataForm: { id: '', name: '',