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: '',