From fd597a434c1c607650fba49628a5ce1df3145c65 Mon Sep 17 00:00:00 2001
From: liuchuang <123456>
Date: Tue, 22 Sep 2020 10:06:47 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=A4=84=E7=90=86=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E5=92=8C=E5=B7=B2=E7=BB=93=E6=A1=88=E9=A1=B9=E7=9B=AE=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E7=BD=AE=E9=A1=B6=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/events/item-deal-list.vue | 36 +++++++++++++++++++++
src/views/modules/events/item-end-list.vue | 36 +++++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/src/views/modules/events/item-deal-list.vue b/src/views/modules/events/item-deal-list.vue
index 56f0bfe..8d0e666 100644
--- a/src/views/modules/events/item-deal-list.vue
+++ b/src/views/modules/events/item-deal-list.vue
@@ -123,6 +123,7 @@
header-align="center"
align="center"
>
+
{{ $t('deal') }}
+ {{ '置顶' }}
+ {{ '取消置顶' }}
@@ -249,6 +252,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']('/events/item/top', { 'itemId': 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/events/item-end-list.vue b/src/views/modules/events/item-end-list.vue
index 4bcb607..5e8b7f8 100644
--- a/src/views/modules/events/item-end-list.vue
+++ b/src/views/modules/events/item-end-list.vue
@@ -130,6 +130,7 @@
width="65"
align="center"
>
+
{{ $t('look') }}
+ {{ '置顶' }}
+ {{ '取消置顶' }}
@@ -255,6 +258,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']('/events/item/top', { 'itemId': 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(() => {})
}
}
}