整理

上级 591a28b8
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-left-img[data-v-0bc02e96]{height:50px}.layout-aside-container[data-v-04b0cce7]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-04b0cce7]{font-size:20px}.el-main{padding:20px 3px!important}.el-header[data-v-5503bb7a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-5503bb7a]{color:#333}.pagination[data-v-5503bb7a]{margin-top:16px;text-align:right}.arrow-button[data-v-5503bb7a]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-5503bb7a]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-5503bb7a]{pointer-events:none;opacity:.1}.el-header[data-v-46e73c50]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-46e73c50]{color:#333}.pagination[data-v-46e73c50]{margin-top:16px;text-align:right}.header-button-item[data-v-46e73c50]{margin-right:15px;font-size:20px}.backtop[data-v-46e73c50]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-46e73c50]:hover{background-color:#0050a0}.el-header[data-v-a05e897a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-a05e897a]{color:#333}.pagination[data-v-a05e897a]{margin-top:16px;text-align:right}.header-button-item[data-v-a05e897a]{margin-right:15px;font-size:20px}.red-title[data-v-a05e897a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-a05e897a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-a05e897a]{width:100%;text-align:left}.backtop[data-v-a05e897a]:hover{background-color:#0050a0}.el-header[data-v-277bc25c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-277bc25c]{color:#333}.pagination[data-v-277bc25c]{margin-top:16px;text-align:right}.header-button-item[data-v-277bc25c]{margin-right:15px;font-size:20px}.red-title[data-v-277bc25c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-277bc25c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-277bc25c]{width:100%;text-align:left}.backtop[data-v-277bc25c]:hover{background-color:#0050a0}.el-header[data-v-7f9d4b2f]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-7f9d4b2f]{color:#333}.pagination[data-v-7f9d4b2f]{margin-top:16px;text-align:right}.header-button-item[data-v-7f9d4b2f]{margin-right:15px;font-size:20px}.red-title[data-v-7f9d4b2f]{line-height:24px;font-size:18px;color:red}.backtop[data-v-7f9d4b2f]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-7f9d4b2f]{width:100%;text-align:left}.backtop[data-v-7f9d4b2f]:hover{background-color:#0050a0}.el-header[data-v-46c1f8ba]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-46c1f8ba]{color:#333}.pagination[data-v-46c1f8ba]{margin-top:16px;text-align:right}.header-button-item[data-v-46c1f8ba]{margin-right:15px;font-size:20px}.red-title[data-v-46c1f8ba]{line-height:24px;font-size:18px;color:red}.backtop[data-v-46c1f8ba]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-46c1f8ba]{width:100%;text-align:left}.backtop[data-v-46c1f8ba]:hover{background-color:#0050a0}.el-header[data-v-38003344]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-38003344]{color:#333}.pagination[data-v-38003344]{margin-top:16px;text-align:right}.header-button-item[data-v-38003344]{margin-right:15px;font-size:20px}.red-title[data-v-38003344]{line-height:24px;font-size:18px;color:red}.backtop[data-v-38003344]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-38003344]{width:100%;text-align:left}.backtop[data-v-38003344]:hover{background-color:#0050a0}.el-header[data-v-9d40f752]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-9d40f752]{color:#333}.pagination[data-v-9d40f752]{margin-top:16px;text-align:right}.header-button-item[data-v-9d40f752]{margin-right:15px;font-size:20px}.red-title[data-v-9d40f752]{line-height:24px;font-size:18px;color:red}.backtop[data-v-9d40f752]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-9d40f752]{width:100%;text-align:left}.backtop[data-v-9d40f752]:hover{background-color:#0050a0}.button-container[data-v-bdbc2b14]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-19e0b810]{display:flex;justify-content:center;align-items:center;height:30vh}
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-left-img[data-v-0bc02e96]{height:50px}.layout-aside-container[data-v-5b66f297]{width:200px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-5b66f297]{font-size:20px}.el-main{padding:20px 3px!important}.el-header[data-v-5503bb7a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-5503bb7a]{color:#333}.pagination[data-v-5503bb7a]{margin-top:16px;text-align:right}.arrow-button[data-v-5503bb7a]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-5503bb7a]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-5503bb7a]{pointer-events:none;opacity:.1}.el-header[data-v-46e73c50]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-46e73c50]{color:#333}.pagination[data-v-46e73c50]{margin-top:16px;text-align:right}.header-button-item[data-v-46e73c50]{margin-right:15px;font-size:20px}.backtop[data-v-46e73c50]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-46e73c50]:hover{background-color:#0050a0}.el-header[data-v-a05e897a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-a05e897a]{color:#333}.pagination[data-v-a05e897a]{margin-top:16px;text-align:right}.header-button-item[data-v-a05e897a]{margin-right:15px;font-size:20px}.red-title[data-v-a05e897a]{line-height:24px;font-size:18px;color:red}.backtop[data-v-a05e897a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-a05e897a]{width:100%;text-align:left}.backtop[data-v-a05e897a]:hover{background-color:#0050a0}.el-header[data-v-277bc25c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-277bc25c]{color:#333}.pagination[data-v-277bc25c]{margin-top:16px;text-align:right}.header-button-item[data-v-277bc25c]{margin-right:15px;font-size:20px}.red-title[data-v-277bc25c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-277bc25c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-277bc25c]{width:100%;text-align:left}.backtop[data-v-277bc25c]:hover{background-color:#0050a0}.el-header[data-v-7f9d4b2f]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-7f9d4b2f]{color:#333}.pagination[data-v-7f9d4b2f]{margin-top:16px;text-align:right}.header-button-item[data-v-7f9d4b2f]{margin-right:15px;font-size:20px}.red-title[data-v-7f9d4b2f]{line-height:24px;font-size:18px;color:red}.backtop[data-v-7f9d4b2f]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-7f9d4b2f]{width:100%;text-align:left}.backtop[data-v-7f9d4b2f]:hover{background-color:#0050a0}.el-header[data-v-570cb36f]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-570cb36f]{color:#333}.pagination[data-v-570cb36f]{margin-top:16px;text-align:right}.header-button-item[data-v-570cb36f]{margin-right:15px;font-size:20px}.red-title[data-v-570cb36f]{line-height:24px;font-size:18px;color:red}.backtop[data-v-570cb36f]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-570cb36f]{width:100%;text-align:left}.backtop[data-v-570cb36f]:hover{background-color:#0050a0}.el-header[data-v-33b199a6]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-33b199a6]{color:#333}.pagination[data-v-33b199a6]{margin-top:16px;text-align:right}.header-button-item[data-v-33b199a6]{margin-right:15px;font-size:20px}.red-title[data-v-33b199a6]{line-height:24px;font-size:18px;color:red}.backtop[data-v-33b199a6]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-33b199a6]{width:100%;text-align:left}.backtop[data-v-33b199a6]:hover{background-color:#0050a0}.el-header[data-v-410d989c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-410d989c]{color:#333}.pagination[data-v-410d989c]{margin-top:16px;text-align:right}.header-button-item[data-v-410d989c]{margin-right:15px;font-size:20px}.red-title[data-v-410d989c]{line-height:24px;font-size:18px;color:red}.backtop[data-v-410d989c]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-410d989c]{width:100%;text-align:left}.backtop[data-v-410d989c]:hover{background-color:#0050a0}.el-header[data-v-0f57df08]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-0f57df08]{color:#333}.pagination[data-v-0f57df08]{margin-top:16px;text-align:right}.header-button-item[data-v-0f57df08]{margin-right:15px;font-size:20px}.red-title[data-v-0f57df08]{line-height:24px;font-size:18px;color:red}.backtop[data-v-0f57df08]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.custom-textarea[data-v-0f57df08]{width:100%;text-align:left}.backtop[data-v-0f57df08]:hover{background-color:#0050a0}.button-container[data-v-bdbc2b14]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-19e0b810]{display:flex;justify-content:center;align-items:center;height:30vh}
/*!
* Bootstrap v4.5.0 (https://getbootstrap.com/)
......
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan</title><link href="/css/app.8cde8efd.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.c2e5544a.js" rel="preload" as="script"><link href="/js/chunk-vendors.533b9d47.js" rel="preload" as="script"><link href="/css/chunk-vendors.0bfa23eb.css" rel="stylesheet"><link href="/css/app.8cde8efd.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.533b9d47.js"></script><script src="/js/app.c2e5544a.js"></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan</title><link href="/css/app.78b5c797.css" rel="preload" as="style"><link href="/css/chunk-vendors.0bfa23eb.css" rel="preload" as="style"><link href="/js/app.743e7515.js" rel="preload" as="script"><link href="/js/chunk-vendors.533b9d47.js" rel="preload" as="script"><link href="/css/chunk-vendors.0bfa23eb.css" rel="stylesheet"><link href="/css/app.78b5c797.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.533b9d47.js"></script><script src="/js/app.743e7515.js"></script></body></html>
\ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
import axios from 'axios'
// 创建一个名为 ApiService 的对象,包含您的异步方法
const ApiService = {
async triplet(articleId) {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/triplet?articleId=' + articleId);
},
async resetLikes() {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/fixLikesStatus');
},
async allTriplet(articleIds) {
return await axios.post('http://43.139.90.182:8888/csdnArticleInfo/multiTriplet', articleIds);
},
async onDelete(id) {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/delete', {
params: {
id: id
}
})
}
async triplet(articleId) {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/triplet?articleId=' + articleId)
},
async resetLikes() {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/fixLikesStatus')
},
async allTriplet(articleIds) {
return await axios.post('http://43.139.90.182:8888/csdnArticleInfo/multiTriplet', articleIds)
},
async onDelete(id) {
return await axios.get('http://43.139.90.182:8888/csdnArticleInfo/delete', {
params: {
id: id,
},
})
},
}
export default ApiService;
export default ApiService
......@@ -194,368 +194,368 @@
import axios from 'axios'
import ApiService from '../../api/ApiService'
export default {
name: 'MyArticleInfo',
name: 'MyArticleInfo',
data() {
return {
form: {
userName: '',
articleId: '',
articleUrl: '',
articleScore: '',
},
formInline: {
articleId: '',
userName: '',
nickName: '',
articleUrl: '',
isMyself: null,
articleScoreStart: 0,
articleScoreEnd: 100,
likeStatus: null,
collectStatus: null,
commentStatus: null,
},
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: 9, name: '收藏成功' },
],
data() {
return {
form: {
userName: '',
articleId: '',
articleUrl: '',
articleScore: '',
},
formInline: {
articleId: '',
userName: '',
nickName: '',
articleUrl: '',
isMyself: null,
articleScoreStart: 0,
articleScoreEnd: 100,
likeStatus: null,
collectStatus: null,
commentStatus: null,
},
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: 9, name: '收藏成功' },
],
commentStatus: [
{
type: -1,
name: '全部',
},
{
type: 0,
name: '未处理',
},
{ type: 1, name: '已经评论过' },
{ type: 2, name: '评论已满' },
{ type: 3, name: '禁言' },
{ type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了48条' },
{ type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' },
],
isMyself: [
{
type: -1,
name: '全部',
},
{
type: 0,
name: '',
},
{ type: 1, name: '' },
],
dialogAddFormVisible: false,
dialogDelVisible: false,
editVisible: false,
tripletVisible: false,
allTripletDialogVisible: false,
getScoreFormVisible: false,
resetLikesDialogVisible: false,
// 用户列表数据
articleInfoList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnUserPage')) || 1,
pageSize: 8,
total: 0,
// 新增的内容
formLabelWidth: '120px',
currentRowId: null,
articleId: null,
multipleSelection: [],
}
},
watch: {
formInline: {
handler(newVal, oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.articleInfoPage()
},
deep: true,
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnUserPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.articleInfoPage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareAdd() {
this.form.userName = ''
this.form.articleId = ''
this.dialogAddFormVisible = true
},
prepareGetScore() {
this.form.articleUrl = ''
this.form.articleScore = ''
this.getScoreFormVisible = true
},
prepareResetLikes() {
this.resetLikesDialogVisible = true
},
prepareAllTriplet() {
this.allTripletDialogVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.dialogDelVisible = true
},
prepareTriplet(articleId) {
this.articleId = articleId
this.tripletVisible = true
},
preEdit(id, articleId, userName, nickName, articleUrl) {
this.form.articleId = articleId
this.form.userName = userName
this.form.nickName = nickName
this.form.articleUrl = articleUrl
this.currentRowId = id
this.editVisible = true
},
handleSelectionChange(val) {
this.multipleSelection = val
},
commentStatus: [
{
type: -1,
name: '全部',
},
{
type: 0,
name: '未处理',
},
{ type: 1, name: '已经评论过' },
{ type: 2, name: '评论已满' },
{ type: 3, name: '禁言' },
{ type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了48条' },
{ type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' },
],
isMyself: [
{
type: -1,
name: '全部',
},
{
type: 0,
name: '',
},
{ type: 1, name: '' },
],
dialogAddFormVisible: false,
dialogDelVisible: false,
editVisible: false,
tripletVisible: false,
allTripletDialogVisible: false,
getScoreFormVisible: false,
resetLikesDialogVisible: false,
// 用户列表数据
articleInfoList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnUserPage')) || 1,
pageSize: 8,
total: 0,
// 新增的内容
formLabelWidth: '120px',
currentRowId: null,
articleId: null,
multipleSelection: [],
}
},
watch: {
formInline: {
handler(newVal, oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.articleInfoPage()
},
deep: true,
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnUserPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.articleInfoPage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareAdd() {
this.form.userName = ''
this.form.articleId = ''
this.dialogAddFormVisible = true
},
prepareGetScore() {
this.form.articleUrl = ''
this.form.articleScore = ''
this.getScoreFormVisible = true
},
prepareResetLikes() {
this.resetLikesDialogVisible = true
},
prepareAllTriplet() {
this.allTripletDialogVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.dialogDelVisible = true
},
prepareTriplet(articleId) {
this.articleId = articleId
this.tripletVisible = true
},
preEdit(id, articleId, userName, nickName, articleUrl) {
this.form.articleId = articleId
this.form.userName = userName
this.form.nickName = nickName
this.form.articleUrl = articleUrl
this.currentRowId = id
this.editVisible = true
},
handleSelectionChange(val) {
this.multipleSelection = val
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogAddFormVisible = false // 关闭对话框
this.addUser(addType) // 发送请求
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogAddFormVisible = false // 关闭对话框
this.addUser(addType) // 发送请求
},
async addUser(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdnArticleInfo/add', {
addType: addType,
userName: this.form.userName,
articleId: this.form.articleId,
})
if (res.code === 200) {
this.currentPage = 1
this.form.userName = ''
this.form.articleId = ''
this.articleInfoPage()
} else {
this.errorMsg(res.message)
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdnArticleInfo/update', {
id: this.currentRowId,
articleId: this.form.articleId,
userName: this.form.userName,
nickName: this.form.nickName,
articleUrl: this.form.articleUrl,
})
if (res.code === 200) {
this.form.userName = ''
this.form.nickName = ''
this.form.articleId = ''
this.form.articleUrl = ''
this.editVisible = false
currentRowId: null
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
async getScore() {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdnArticleInfo/getScore?articleUrl=' + this.form.articleUrl)
if (res.code === 200) {
this.form.articleScore = res.result
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async triplet(articleId) {
this.loading = true
this.tripletVisible = false
const { data: res } = await ApiService.triplet(articleId)
if (res.code === 200) {
this.articleId = null
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async allTriplet() {
this.loading = true
this.allTripletDialogVisible = false
if (this.multipleSelection && this.multipleSelection.length === 0) {
console.error('请选择需要三连的数据行')
} else {
let articleIds = this.multipleSelection.map((item) => item.articleId)
const { data: res } = await ApiService.allTriplet(articleIds)
if (res.code === 200) {
this.multipleSelection = []
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
}
this.loading = false
},
//重置点赞评论状态
async resetLikes() {
this.loading = true
this.resetLikesDialogVisible = false
const { data: res } = await ApiService.resetLikes()
if (res.code === 200) {
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async onDelete(id) {
this.loading = true
this.dialogDelVisible = false
await ApiService.onDelete(id)
this.articleInfoPage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.articleInfoPage()
location.reload()
},
async articleInfoPage() {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdnArticleInfo/page', {
page: this.currentPage,
pageSize: this.pageSize,
articleId: this.formInline.articleId,
userName: this.formInline.userName,
nickName: this.formInline.nickName,
articleScoreStart: this.formInline.articleScoreStart,
articleScoreEnd: this.formInline.articleScoreEnd,
isMyself: this.formInline.isMyself,
likeStatus: this.formInline.likeStatus == -1 ? null : this.formInline.likeStatus,
collectStatus: this.formInline.collectStatus == -1 ? null : this.formInline.collectStatus,
commentStatus: this.formInline.commentStatus == -1 ? null : this.formInline.commentStatus,
})
if (res.code === 200) {
this.total = res.result.totalElements
async addUser(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdnArticleInfo/add', {
addType: addType,
userName: this.form.userName,
articleId: this.form.articleId,
})
if (res.code === 200) {
this.currentPage = 1
this.form.userName = ''
this.form.articleId = ''
this.articleInfoPage()
} else {
this.errorMsg(res.message)
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdnArticleInfo/update', {
id: this.currentRowId,
articleId: this.form.articleId,
userName: this.form.userName,
nickName: this.form.nickName,
articleUrl: this.form.articleUrl,
})
if (res.code === 200) {
this.form.userName = ''
this.form.nickName = ''
this.form.articleId = ''
this.form.articleUrl = ''
this.editVisible = false
currentRowId: null
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the questionName:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
async getScore() {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdnArticleInfo/getScore?articleUrl=' + this.form.articleUrl)
if (res.code === 200) {
this.form.articleScore = res.result
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async triplet(articleId) {
this.loading = true
this.tripletVisible = false
const { data: res } = await ApiService.triplet(articleId)
if (res.code === 200) {
this.articleId = null
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async allTriplet() {
this.loading = true
this.allTripletDialogVisible = false
if (this.multipleSelection && this.multipleSelection.length === 0) {
console.error('请选择需要三连的数据行')
} else {
let articleIds = this.multipleSelection.map((item) => item.articleId)
const { data: res } = await ApiService.allTriplet(articleIds)
if (res.code === 200) {
this.multipleSelection = []
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
}
this.loading = false
},
//重置点赞评论状态
async resetLikes() {
this.loading = true
this.resetLikesDialogVisible = false
const { data: res } = await ApiService.resetLikes()
if (res.code === 200) {
this.articleInfoPage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async onDelete(id) {
this.loading = true
this.dialogDelVisible = false
await ApiService.onDelete(id)
this.articleInfoPage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.articleInfoPage()
location.reload()
},
async articleInfoPage() {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdnArticleInfo/page', {
page: this.currentPage,
pageSize: this.pageSize,
articleId: this.formInline.articleId,
userName: this.formInline.userName,
nickName: this.formInline.nickName,
articleScoreStart: this.formInline.articleScoreStart,
articleScoreEnd: this.formInline.articleScoreEnd,
isMyself: this.formInline.isMyself,
likeStatus: this.formInline.likeStatus == -1 ? null : this.formInline.likeStatus,
collectStatus: this.formInline.collectStatus == -1 ? null : this.formInline.collectStatus,
commentStatus: this.formInline.commentStatus == -1 ? null : this.formInline.commentStatus,
})
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.articleInfoList = res.result.content
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.articleInfoPage()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.articleInfoPage()
},
getTagType(statusName) {
if (statusName == '未处理') {
return 'info'
} else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') {
return 'success'
} else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了48条') {
return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success'
} else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') {
return 'warning'
}
},
},
this.articleInfoList = res.result.content
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.articleInfoPage()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.articleInfoPage()
},
getTagType(statusName) {
if (statusName == '未处理') {
return 'info'
} else if (statusName == '已经点过赞' || statusName == '已经收藏过' || statusName == '已经评论过') {
return 'success'
} else if (statusName == '文章状态不能点赞' || statusName == '收藏已满' || statusName == '评论已满' || statusName == '禁言' || statusName == '评论已经到了48条') {
return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success'
} else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') {
return 'warning'
}
},
},
}
</script>
......
......@@ -92,17 +92,6 @@
</el-dialog>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareMeaasge">私信点赞收藏</el-button>
<el-dialog title="提示" :visible.sync="messageDialogVisible" width="30%" :before-close="handleClose">
<span>确认处理私信点赞收藏吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="messageDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="messageDeal()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
<el-form-item>
<el-button size="small" type="warning" @click="prepareResetLikesComment">核验状态</el-button>
<el-dialog title="提示" :visible.sync="resetLikesCommentDialogVisible" width="30%" :before-close="handleClose">
......@@ -319,7 +308,6 @@ export default {
resetUserDayStatusVisible: false,
blog10DialogVisible: false,
resetLikesCommentDialogVisible: false,
messageDialogVisible: false,
// 用户列表数据
csdnUserList: [],
loading: false,
......@@ -370,9 +358,6 @@ export default {
prepareAllTriplet() {
this.allTripletDialogVisible = true
},
prepareMeaasge() {
this.messageDialogVisible = true
},
prepareResetUserDayStatus(userName) {
this.resetUserDayStatusVisible = true
this.currentUserName = userName
......@@ -514,25 +499,6 @@ export default {
}
this.loading = false
},
async messageDeal() {
this.loading = true
this.messageDialogVisible = false
const { data: res1 } = await axios.get('http://43.139.90.182:8888/csdn/message/dealMessage')
if (res1.code === 200) {
this.userPage()
} else {
console.error('Received non-200 status code', res1)
}
const { data: res2 } = await axios.get('http://43.139.90.182:8888/csdn/likeCollect/dealLikeCollect')
if (res2.code === 200) {
this.userPage()
} else {
console.error('Received non-200 status code', res2)
}
this.loading = false
},
async fixUserLikesStatus() {
this.loading = true
this.resetLikesCommentDialogVisible = false
......
<template>
<div>
<el-container>
<el-main>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item>
<el-input size="small" clearable v-model="formInline.userName" placeholder="请输入用户名" @keydown.enter.native="messagePage"></el-input>
</el-form-item>
<el-form-item>
<el-input size="small" clearable v-model="formInline.nickName" placeholder="请输入用户昵称" @keydown.enter.native="messagePage"></el-input>
</el-form-item>
<el-form-item>
<el-select size="small" v-model="formInline.hasRepliedInfo" placeholder="请选择收藏状态" @change="messagePage">
<el-option v-for="item in hasRepliedInfo" :key="item.type" :label="item.name" :value="item.type"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="messagePage">查询</el-button>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareRefreshMessage">刷新私信列表</el-button>
<el-dialog title="提示" :visible.sync="refreshMessageDialogVisible" width="30%" :before-close="handleClose">
<span>确认刷新私信列表吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="refreshMessageDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="refreshMessage()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
<el-form-item>
<el-button size="small" type="primary" @click="prepareMeaasge">私信点赞收藏</el-button>
<el-dialog title="提示" :visible.sync="messageDialogVisible" width="30%" :before-close="handleClose">
<span>确认处理私信点赞收藏吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="messageDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="messageDeal()">确 定</el-button>
</span>
</el-dialog>
</el-form-item>
</el-form>
<el-table ref="multipleTable" v-loading="loading" :data="csdnMessageList" tooltip-effect="dark" style="width: 100%">
<el-table-column prop="id" label="序号" width="100" sortable></el-table-column>
<el-table-column prop="userName" label="用户名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="nickName" label="用户昵称" show-overflow-tooltip>
<template slot-scope="scope">
<a :href="scope.row.messageUrl" target="_blank">{{ scope.row.nickName }}</a>
</template>
</el-table-column>
<el-table-column prop="hasRepliedName" label="是否回复" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag :type="getTagType(scope.row.hasRepliedName)">{{ scope.row.hasRepliedName }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="content" label="回复内容" show-overflow-tooltip></el-table-column>
<el-table-column label="更新时间">
<template slot-scope="props">
{{ props.row.updateTime | dateFormat }}
</template>
</el-table-column>
<el-table-column prop="操作" label="操作" width="380px">
<template slot-scope="props">
<el-button type="primary" @click="prepareDealMessageOne(props.row.userName)" size="small">私信</el-button>
<el-dialog title="提示" :visible.sync="dealMessageOneVisible" width="30%" :before-close="handleClose">
<span>确认私信吗?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dealMessageOneVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="dealMessageOne(currentUserName)">确 定</el-button>
</span>
</el-dialog>
<el-button type="danger" @click="prepareDelete(props.row.id)" size="small">删除</el-button>
<el-dialog title="提示" :visible.sync="deleteDialogVisible" width="30%" :before-close="handleClose">
<span>确认删除?</span>
<span slot="footer" class="dialog-footer">
<el-button @click="deleteDialogVisible = false">取 消</el-button>
<el-button type="primary" @click.prevent="onDelete(currentRowId)">确 定</el-button>
</span>
</el-dialog>
</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>
<el-backtop class="backtop"></el-backtop>
</el-container>
</div>
</template>
<script>
import axios from 'axios'
export default {
name: 'MyMessage',
data() {
return {
formInline: {
userName: '',
nickName: '',
hasRepliedInfo: null,
},
hasRepliedInfo: [
{
type: -1,
name: '全部',
},
{
type: 0,
name: '未回复',
},
{ type: 1, name: '已回复' },
],
deleteDialogVisible: false,
dealMessageOneVisible: false,
messageDialogVisible: false,
refreshMessageDialogVisible: false,
// 用户列表数据
csdnMessageList: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnUserPage')) || 1,
pageSize: 8,
total: 0,
currentRowId: null,
currentUserName: null,
}
},
watch: {
'formInline.userName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.messagePage()
}
},
'formInline.nickName'(newVal, oldVal) {
if (newVal !== oldVal) {
this.currentPage = 1
localStorage.setItem('csdnUserPage', this.currentPage)
this.messagePage()
}
},
// 监听currentPage的变化,将新值保存到localStorage中
currentPage(newPage) {
localStorage.setItem('csdnUserPage', newPage.toString())
},
},
created() {
//获取问题类型的枚举
this.messagePage()
},
mounted() {
this.currentPage = 1
},
methods: {
prepareMeaasge() {
this.messageDialogVisible = true
},
prepareRefreshMessage() {
this.refreshMessageDialogVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.deleteDialogVisible = true
},
prepareDealMessageOne(userName) {
this.currentUserName = userName
this.dealMessageOneVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addUser(addType) // 发送请求
},
async messagePage() {
this.loading = true
const { data: res } = await axios.post('http://43.139.90.182:8888/csdn/message/page', {
page: this.currentPage,
pageSize: this.pageSize,
userName: this.formInline.userName,
nickName: this.formInline.nickName,
hasReplied: this.formInline.hasRepliedInfo == -1 ? null : this.formInline.hasRepliedInfo,
})
if (res.code === 200) {
this.total = res.result.totalElements
const userWeightMap = {}
this.hasRepliedInfo.forEach((option) => {
userWeightMap[option.type] = option.name
})
res.result.content.forEach((item) => {
item.hasRepliedName = userWeightMap[item.hasReplied]
})
this.csdnMessageList = res.result.content
}
this.loading = false
},
async dealMessageOne(userName) {
this.loading = true
this.dealMessageOneVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/message/dealMessageOne?userName=' + userName)
if (res.code === 200) {
this.currentUserName = null
this.messagePage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async messageDeal() {
this.loading = true
this.messageDialogVisible = false
const { data: res1 } = await axios.get('http://43.139.90.182:8888/csdn/message/dealMessage')
if (res1.code === 200) {
this.messagePage()
} else {
console.error('Received non-200 status code', res1)
}
const { data: res2 } = await axios.get('http://43.139.90.182:8888/csdn/likeCollect/dealLikeCollect')
if (res2.code === 200) {
this.messagePage()
} else {
console.error('Received non-200 status code', res2)
}
this.loading = false
},
async refreshMessage() {
this.loading = true
this.refreshMessageDialogVisible = false
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/message/acquireMessage')
if (res.code === 200) {
this.messagePage()
} else {
console.error('Received non-200 status code', res)
}
this.loading = false
},
async onDelete(id) {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/csdn/user/delete', {
params: {
id: id,
},
})
this.deleteDialogVisible = false
this.messagePage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.messagePage()
location.reload()
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.messagePage()
},
handleSizeChange(currentSize) {
this.pageSize = currentSize
this.messagePage()
},
getTagType(hasRepliedName) {
if (hasRepliedName == '未回复') {
return 'warning'
} else {
return 'success'
}
},
},
}
</script>
<style lang="less" scoped>
.el-header {
background-color: #b3c0d1;
color: #333;
line-height: 60px;
}
.el-aside {
color: #333;
}
.pagination {
margin-top: 16px;
text-align: right;
}
.header-button-item {
margin-right: 15px;
font-size: 20px;
}
.red-title {
line-height: 24px;
font-size: 18px;
color: red;
}
.backtop {
position: fixed;
bottom: 50px;
right: 50px;
height: 40px;
width: 40px;
line-height: 40px;
text-align: center;
border-radius: 20px;
background-color: #007aff;
color: #fff;
cursor: pointer;
z-index: 999;
}
.custom-textarea {
width: 100%;
text-align: left;
}
.backtop:hover {
background-color: #0050a0;
}
</style>
\ No newline at end of file
......@@ -72,172 +72,172 @@
<script>
import axios from 'axios'
export default {
name: 'MyTripletDayInfo',
name: 'MyTripletDayInfo',
data() {
return {
formInline: {
startDate: 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: 9, name: '收藏成功' },
],
data() {
return {
formInline: {
startDate: 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: 9, name: '收藏成功' },
],
commentStatus: [
{
type: -1,
name: '全部',
},
{
type: 0,
name: '未处理',
},
{ type: 1, name: '已经评论过' },
{ type: 2, name: '评论已满' },
{ type: 3, name: '禁言' },
{ type: 4, name: '评论太快' },
{ type: 5, name: '评论已经到了48条' },
{ type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' },
],
loading: false,
resetDialogVisible: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1,
pageSize: 9,
total: 0,
}
},
watch: {
'formInline.startDate'(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 axios.post('http://43.139.90.182:8888/dayInfo/page', {
page: this.currentPage,
pageSize: this.pageSize,
startDate: this.formInline.startDate,
endDate: this.formInline.endDate,
})
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: '评论已经到了48条' },
{ type: 8, name: '其他错误' },
{ type: 9, name: '评论成功' },
],
loading: false,
resetDialogVisible: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('csdnTripletDayInfoPage')) || 1,
pageSize: 9,
total: 0,
}
},
watch: {
'formInline.startDate'(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 axios.post('http://43.139.90.182:8888/dayInfo/page', {
page: this.currentPage,
pageSize: this.pageSize,
startDate: this.formInline.startDate,
endDate: this.formInline.endDate,
})
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 reset() {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/dayInfo/add')
this.resetDialogVisible = false
this.tripletDayInfoPage()
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.tripletDayInfoPage()
},
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 == '评论已经到了48条') {
return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success'
} else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') {
return 'warning'
}
},
},
this.tripletDayInfoList = res.result.content
}
this.loading = false
},
async reset() {
this.loading = true
const { data: res } = await axios.get('http://43.139.90.182:8888/dayInfo/add')
this.resetDialogVisible = false
this.tripletDayInfoPage()
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.tripletDayInfoPage()
},
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 == '评论已经到了48条') {
return 'danger'
} else if (statusName == '点赞成功' || statusName == '收藏成功' || statusName == '评论成功') {
return 'success'
} else if (statusName == '点赞已满' || statusName == '参数缺失' || statusName == '其他错误' || statusName == '取消点赞' || statusName == '评论太快') {
return 'warning'
}
},
},
}
</script>
......
......@@ -15,6 +15,9 @@
<router-link :to="{ path: '/home/articleInfo' }">
<el-menu-item index="/home/articleInfo">文章管理</el-menu-item>
</router-link>
<router-link :to="{ path: '/home/message' }">
<el-menu-item index="/home/message">私信管理</el-menu-item>
</router-link>
</el-menu-item-group>
</el-submenu>
<el-submenu index="2">
......
......@@ -12,116 +12,129 @@ import Interview from '@/components/menus/MyInterview.vue'
import Algorithmic from '@/components/menus/MyAlgorithmic.vue'
import AphorismPoetry from '@/components/menus/MyAphorismPoetry.vue'
import MyCsdnUser from '@/components/menus/MyCsdnUser.vue'
import MyMessage from '@/components/menus/MyMessage.vue'
import MyArticleInfo from '@/components/menus/MyArticleInfo.vue'
import MyTripletDayInfo from '@/components/menus/MyTripletDayInfo.vue'
import MyChatDetail from '@/components/user/MyChatDetail.vue'
import AddChatDetail from '@/components/user/AddChatDetail.vue'
Vue.use(VueRouter)
const router = new VueRouter({
routes: [
{
path: '/',
redirect: '/login'
},
// 登录的路由规则
{
path: '/login',
component: Login,
meta: {
title: '登录' // 设置默认标题
}
},
// 后台主页的路由规则
{
path: '/home',
component: Home,
redirect: '/home/interview',
children: [
{
path: 'interview',
component: Interview,
meta: {
title: '面试题' // 设置默认标题
}
},
{
path: 'algorithmic',
component: Algorithmic,
meta: {
title: '算法题' // 设置默认标题
}
},
{
path: 'aphorismpoetry',
component: AphorismPoetry,
meta: {
title: '名言警句' // 设置默认标题
}
},
{
path: 'chat',
component: Chat,
meta: {
title: 'chatgpt记录' // 设置默认标题
}
}, {
path: 'pic',
component: Pic,
meta: {
title: '图片' // 设置默认标题
}
}, {
path: 'csdnUser',
component: MyCsdnUser,
meta: {
title: '用户管理' // 设置默认标题
}
}, {
path: 'tripletDayInfo',
component: MyTripletDayInfo,
meta: {
title: '三连管理' // 设置默认标题
}
}, {
path: 'articleInfo',
component: MyArticleInfo,
meta: {
title: '文章管理' // 设置默认标题
}
}, {
path: 'chatinfo/:id',
component: MyChatDetail,
props: true,
meta: {
title: 'chat信息' // 设置默认标题
}
}, {
path: 'addChat',
component: AddChatDetail,
meta: {
title: '添加chat信息' // 设置默认标题
}
},
]
}
]
routes: [
{
path: '/',
redirect: '/login',
},
// 登录的路由规则
{
path: '/login',
component: Login,
meta: {
title: '登录', // 设置默认标题
},
},
// 后台主页的路由规则
{
path: '/home',
component: Home,
redirect: '/home/interview',
children: [
{
path: 'interview',
component: Interview,
meta: {
title: '面试题', // 设置默认标题
},
},
{
path: 'algorithmic',
component: Algorithmic,
meta: {
title: '算法题', // 设置默认标题
},
},
{
path: 'aphorismpoetry',
component: AphorismPoetry,
meta: {
title: '名言警句', // 设置默认标题
},
},
{
path: 'chat',
component: Chat,
meta: {
title: 'chatgpt记录', // 设置默认标题
},
},
{
path: 'pic',
component: Pic,
meta: {
title: '图片', // 设置默认标题
},
},
{
path: 'csdnUser',
component: MyCsdnUser,
meta: {
title: '用户管理', // 设置默认标题
},
},
{
path: 'tripletDayInfo',
component: MyTripletDayInfo,
meta: {
title: '三连管理', // 设置默认标题
},
},
{
path: 'articleInfo',
component: MyArticleInfo,
meta: {
title: '文章管理', // 设置默认标题
},
},
{
path: 'message',
component: MyMessage,
meta: {
title: '私信管理', // 设置默认标题
},
},
{
path: 'chatinfo/:id',
component: MyChatDetail,
props: true,
meta: {
title: 'chat信息', // 设置默认标题
},
},
{
path: 'addChat',
component: AddChatDetail,
meta: {
title: '添加chat信息', // 设置默认标题
},
},
],
},
],
})
// 全局前置守卫
router.beforeEach(function (to, from, next) {
if (pathArr.indexOf(to.path) !== -1) {
const token = localStorage.getItem('token')
if (token) {
next()
} else {
next('/login')
}
} else {
next()
}
if (pathArr.indexOf(to.path) !== -1) {
const token = localStorage.getItem('token')
if (token) {
next()
} else {
next('/login')
}
} else {
next()
}
})
export default router
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册