整理

上级 4525804c
...@@ -4773,7 +4773,7 @@ ...@@ -4773,7 +4773,7 @@
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了45' }, { type: 5, name: '评论已经到了42' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
...@@ -5121,7 +5121,7 @@ ...@@ -5121,7 +5121,7 @@
;(this.pageSize = e), this.userPage() ;(this.pageSize = e), this.userPage()
}, },
getTagType: function (e) { getTagType: function (e) {
return '未处理' == e ? 'info' : '已经点过赞' == e || '已经收藏过' == e || '已经评论过' == e ? 'success' : '文章状态不能点赞' == e || '收藏已满' == e || '收藏夹不存在' == e || '评论已满' == e || '禁言' == e || '评论已经到了45' == e ? 'danger' : '点赞成功' == e || '收藏成功' == e || '评论成功' == e ? 'success' : '点赞已满' == e || '参数缺失' == e || '其他错误' == e || '取消点赞' == e || '评论太快' == e ? 'warning' : void 0 return '未处理' == e ? 'info' : '已经点过赞' == e || '已经收藏过' == e || '已经评论过' == e ? 'success' : '文章状态不能点赞' == e || '收藏已满' == e || '收藏夹不存在' == e || '评论已满' == e || '禁言' == e || '评论已经到了42' == e ? 'danger' : '点赞成功' == e || '收藏成功' == e || '评论成功' == e ? 'success' : '点赞已满' == e || '参数缺失' == e || '其他错误' == e || '取消点赞' == e || '评论太快' == e ? 'warning' : void 0
}, },
autoReply: function () { autoReply: function () {
var e = this var e = this
...@@ -7947,7 +7947,7 @@ ...@@ -7947,7 +7947,7 @@
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了45' }, { type: 5, name: '评论已经到了42' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
...@@ -8309,7 +8309,7 @@ ...@@ -8309,7 +8309,7 @@
;(this.pageSize = e), this.articleInfoPage() ;(this.pageSize = e), this.articleInfoPage()
}, },
getTagType: function (e) { getTagType: function (e) {
return '未处理' == e ? 'info' : '已经点过赞' == e || '已经收藏过' == e || '已经评论过' == e ? 'success' : '文章状态不能点赞' == e || '收藏已满' == e || '收藏夹不存在' == e || '评论已满' == e || '禁言' == e || '评论已经到了45' == e ? 'danger' : '点赞成功' == e || '收藏成功' == e || '评论成功' == e ? 'success' : '点赞已满' == e || '参数缺失' == e || '其他错误' == e || '取消点赞' == e || '评论太快' == e ? 'warning' : void 0 return '未处理' == e ? 'info' : '已经点过赞' == e || '已经收藏过' == e || '已经评论过' == e ? 'success' : '文章状态不能点赞' == e || '收藏已满' == e || '收藏夹不存在' == e || '评论已满' == e || '禁言' == e || '评论已经到了42' == e ? 'danger' : '点赞成功' == e || '收藏成功' == e || '评论成功' == e ? 'success' : '点赞已满' == e || '参数缺失' == e || '其他错误' == e || '取消点赞' == e || '评论太快' == e ? 'warning' : void 0
}, },
}, },
}, },
...@@ -8527,7 +8527,7 @@ ...@@ -8527,7 +8527,7 @@
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了45' }, { type: 5, name: '评论已经到了42' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
...@@ -8630,7 +8630,7 @@ ...@@ -8630,7 +8630,7 @@
this.tripletDayInfoPage(), location.reload() this.tripletDayInfoPage(), location.reload()
}, },
getTagType: function (e) { getTagType: function (e) {
return '未处理' == e ? 'info' : '已经点过赞' == e || '已经收藏过' == e || '已经评论过' == e ? 'success' : '文章状态不能点赞' == e || '收藏已满' == e || '收藏夹不存在' == e || '评论已满' == e || '禁言' == e || '评论已经到了45' == e ? 'danger' : '点赞成功' == e || '收藏成功' == e || '评论成功' == e ? 'success' : '点赞已满' == e || '参数缺失' == e || '其他错误' == e || '取消点赞' == e || '评论太快' == e ? 'warning' : void 0 return '未处理' == e ? 'info' : '已经点过赞' == e || '已经收藏过' == e || '已经评论过' == e ? 'success' : '文章状态不能点赞' == e || '收藏已满' == e || '收藏夹不存在' == e || '评论已满' == e || '禁言' == e || '评论已经到了42' == e ? 'danger' : '点赞成功' == e || '收藏成功' == e || '评论成功' == e ? 'success' : '点赞已满' == e || '参数缺失' == e || '其他错误' == e || '取消点赞' == e || '评论太快' == e ? 'warning' : void 0
}, },
handleCurrentChange: function (e) { handleCurrentChange: function (e) {
;(this.currentPage = e), this.tripletDayInfoPage() ;(this.currentPage = e), this.tripletDayInfoPage()
......
此差异已折叠。
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了45' }, { type: 5, name: '评论已经到了42' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
...@@ -605,7 +605,7 @@ export default { ...@@ -605,7 +605,7 @@ export default {
return 'info' return 'info'
} else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') { } else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') {
return 'success' return 'success'
} else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了45') { } else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了42') {
return 'danger' return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') { } else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success' return 'success'
......
...@@ -296,7 +296,7 @@ export default { ...@@ -296,7 +296,7 @@ export default {
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了45' }, { type: 5, name: '评论已经到了42' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
...@@ -617,7 +617,7 @@ export default { ...@@ -617,7 +617,7 @@ export default {
return 'info' return 'info'
} else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') { } else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') {
return 'success' return 'success'
} else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了45') { } else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了42') {
return 'danger' return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') { } else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success' return 'success'
......
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
<el-tag :type="getTagType(scope.row.commentStatusName)">{{ scope.row.commentStatusName }}</el-tag> <el-tag :type="getTagType(scope.row.commentStatusName)">{{ scope.row.commentStatusName }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[8, 50, 100, 200, 400]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[8, 50, 100, 200, 400]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
</el-main> </el-main>
...@@ -63,208 +62,208 @@ ...@@ -63,208 +62,208 @@
import axios from 'axios' import axios from 'axios'
import ApiService from '../../api/ApiService' import ApiService from '../../api/ApiService'
export default { export default {
name: 'MyTripletDayInfo', name: 'MyTripletDayInfo',
data() { data() {
return { return {
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() return time.getTime() > Date.now()
}, },
shortcuts: [ shortcuts: [
{ {
text: '最近一周', text: '最近一周',
onClick(picker) { onClick(picker) {
const end = new Date() const end = new Date()
const start = new Date() const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end]) picker.$emit('pick', [start, end])
}, },
}, },
{ {
text: '最近一个月', text: '最近一个月',
onClick(picker) { onClick(picker) {
const end = new Date() const end = new Date()
const start = new Date() const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end]) picker.$emit('pick', [start, end])
}, },
}, },
{ {
text: '最近三个月', text: '最近三个月',
onClick(picker) { onClick(picker) {
const end = new Date() const end = new Date()
const start = new Date() const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end]) picker.$emit('pick', [start, end])
}, },
}, },
], ],
}, },
formInline: { formInline: {
tripletDate: null, tripletDate: null,
endDate: null, endDate: null,
}, },
// 用户列表数据 // 用户列表数据
tripletDayInfoList: [], tripletDayInfoList: [],
likeStatus: [ likeStatus: [
{ {
type: -1, type: -1,
name: '全部', name: '全部',
}, },
{ {
type: 0, type: 0,
name: '未处理', name: '未处理',
}, },
{ type: 1, name: '已经点过赞' }, { type: 1, name: '已经点过赞' },
{ type: 2, name: '点赞已满' }, { type: 2, name: '点赞已满' },
{ type: 3, name: '取消点赞' }, { type: 3, name: '取消点赞' },
{ type: 4, name: '文章状态不能点赞' }, { type: 4, name: '文章状态不能点赞' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '点赞成功' }, { type: 9, name: '点赞成功' },
], ],
collectStatus: [ collectStatus: [
{ {
type: -1, type: -1,
name: '全部', name: '全部',
}, },
{ {
type: 0, type: 0,
name: '未处理', name: '未处理',
}, },
{ type: 1, name: '已经收藏过' }, { type: 1, name: '已经收藏过' },
{ type: 2, name: '收藏已满' }, { type: 2, name: '收藏已满' },
{ type: 3, name: '参数缺失' }, { type: 3, name: '参数缺失' },
{ type: 4, name: '收藏夹不存在' }, { type: 4, name: '收藏夹不存在' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '收藏成功' }, { type: 9, name: '收藏成功' },
], ],
commentStatus: [ commentStatus: [
{ {
type: -1, type: -1,
name: '全部', name: '全部',
}, },
{ {
type: 0, type: 0,
name: '未处理', name: '未处理',
}, },
{ type: 1, name: '已经评论过' }, { type: 1, name: '已经评论过' },
{ type: 2, name: '评论已满' }, { type: 2, name: '评论已满' },
{ type: 3, name: '禁言' }, { type: 3, name: '禁言' },
{ type: 4, name: '评论太快' }, { type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了45' }, { type: 5, name: '评论已经到了42' },
{ type: 8, name: '其他错误' }, { type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' }, { type: 9, name: '评论成功' },
], ],
loading: false, loading: false,
resetDialogVisible: false, resetDialogVisible: false,
elementui_page_component_key: 0, elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1, currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1,
pageSize: 8, pageSize: 8,
total: 0, total: 0,
} }
}, },
watch: { watch: {
'formInline.tripletDate'(newVal, oldVal) { 'formInline.tripletDate'(newVal, oldVal) {
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.currentPage = 1 this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage) localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage() this.tripletDayInfoPage()
} }
}, },
'formInline.endDate'(newVal, oldVal) { 'formInline.endDate'(newVal, oldVal) {
if (newVal !== oldVal) { if (newVal !== oldVal) {
this.currentPage = 1 this.currentPage = 1
localStorage.setItem('csdnTripletDayInfoPage', this.currentPage) localStorage.setItem('csdnTripletDayInfoPage', this.currentPage)
this.tripletDayInfoPage() this.tripletDayInfoPage()
} }
}, },
// 监听currentPage的变化,将新值保存到localStorage中 // 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) { currentPage(newPage) {
localStorage.setItem('csdnTripletDayInfoPage', newPage.toString()) localStorage.setItem('csdnTripletDayInfoPage', newPage.toString())
}, },
}, },
created() { created() {
//获取问题类型的枚举 //获取问题类型的枚举
this.tripletDayInfoPage() this.tripletDayInfoPage()
}, },
mounted() { mounted() {
this.currentPage = 1 this.currentPage = 1
}, },
methods: { methods: {
prepareReset() { prepareReset() {
this.resetDialogVisible = true this.resetDialogVisible = true
}, },
async tripletDayInfoPage() { async tripletDayInfoPage() {
this.loading = true this.loading = true
const { data: res } = await ApiService.tripletDayInfoPage(this.currentPage, this.pageSize, this.formInline.tripletDate) const { data: res } = await ApiService.tripletDayInfoPage(this.currentPage, this.pageSize, this.formInline.tripletDate)
if (res.code === 200) { if (res.code === 200) {
this.total = res.result.totalElements this.total = res.result.totalElements
const likeStatusMap = {} const likeStatusMap = {}
this.likeStatus.forEach((option) => { this.likeStatus.forEach((option) => {
likeStatusMap[option.type] = option.name likeStatusMap[option.type] = option.name
}) })
res.result.content.forEach((item) => { res.result.content.forEach((item) => {
item.likeStatusName = likeStatusMap[item.likeStatus] item.likeStatusName = likeStatusMap[item.likeStatus]
}) })
const collectStatusMap = {} const collectStatusMap = {}
this.collectStatus.forEach((option) => { this.collectStatus.forEach((option) => {
collectStatusMap[option.type] = option.name collectStatusMap[option.type] = option.name
}) })
res.result.content.forEach((item) => { res.result.content.forEach((item) => {
item.collectStatusName = collectStatusMap[item.collectStatus] item.collectStatusName = collectStatusMap[item.collectStatus]
}) })
const commentStatusMap = {} const commentStatusMap = {}
this.commentStatus.forEach((option) => { this.commentStatus.forEach((option) => {
commentStatusMap[option.type] = option.name commentStatusMap[option.type] = option.name
}) })
res.result.content.forEach((item) => { res.result.content.forEach((item) => {
item.commentStatusName = commentStatusMap[item.commentStatus] item.commentStatusName = commentStatusMap[item.commentStatus]
}) })
this.tripletDayInfoList = res.result.content this.tripletDayInfoList = res.result.content
} }
this.loading = false this.loading = false
}, },
async tripletDayReset() { async tripletDayReset() {
this.loading = true this.loading = true
const { data: res } = await ApiService.tripletDayReset() const { data: res } = await ApiService.tripletDayReset()
this.resetDialogVisible = false this.resetDialogVisible = false
this.tripletDayInfoPage() this.tripletDayInfoPage()
this.loading = false this.loading = false
}, },
refreshPage() { refreshPage() {
//获取问题类型的枚举 //获取问题类型的枚举
this.tripletDayInfoPage() this.tripletDayInfoPage()
location.reload() location.reload()
}, },
getTagType(statusName) { getTagType(statusName) {
if (statusName == '未处理') { if (statusName == '未处理') {
return 'info' return 'info'
} else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') { } else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') {
return 'success' return 'success'
} else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了45') { } else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '收藏夹不存在' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了42') {
return 'danger' return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') { } else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success' return 'success'
} else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') { } else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') {
return 'warning' return 'warning'
} }
}, },
handleCurrentChange(currentPage) { handleCurrentChange(currentPage) {
this.currentPage = currentPage this.currentPage = currentPage
this.tripletDayInfoPage() this.tripletDayInfoPage()
}, },
handleSizeChange(currentSize) { handleSizeChange(currentSize) {
this.pageSize = currentSize this.pageSize = currentSize
this.tripletDayInfoPage() this.tripletDayInfoPage()
}, },
}, },
} }
</script> </script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册