整理

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