Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
safe-campus-bbs
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
万成波
safe-campus-bbs
Commits
e3829402
Commit
e3829402
authored
Dec 03, 2025
by
yuwenwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PC端调整
parent
8d6b9d8c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
10 deletions
+31
-10
safe-campus-bbs-ui/src/api/moments/index.js
safe-campus-bbs-ui/src/api/moments/index.js
+9
-0
safe-campus-bbs-ui/src/views/comment/index.vue
safe-campus-bbs-ui/src/views/comment/index.vue
+2
-2
safe-campus-bbs-ui/src/views/moments/index.vue
safe-campus-bbs-ui/src/views/moments/index.vue
+20
-8
No files found.
safe-campus-bbs-ui/src/api/moments/index.js
View file @
e3829402
...
...
@@ -33,4 +33,13 @@ export function getMomentComments(momentId, params) {
method
:
'
get
'
,
params
})
}
// 置顶取消置顶
export
function
isTopData
(
data
){
return
request
({
url
:
`/bbs/moment/top`
,
method
:
'
put
'
,
data
})
}
\ No newline at end of file
safe-campus-bbs-ui/src/views/comment/index.vue
View file @
e3829402
...
...
@@ -24,8 +24,8 @@
</el-row>
<el-table
:data=
"tableList"
>
<el-table-column
label=
"评论内容"
prop=
"content"
align=
"center"
></el-table-column>
<el-table-column
label=
"动态编号"
align=
"center"
prop=
"momentId"
width=
"100"
></el-table-column>
<el-table-column
label=
"动态内容"
prop=
"momentContent"
align=
"center"
></el-table-column>
<el-table-column
label=
"
所属
动态编号"
align=
"center"
prop=
"momentId"
width=
"100"
></el-table-column>
<el-table-column
label=
"动态内容"
prop=
"momentContent"
align=
"center"
width=
"300"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"账号"
prop=
"userName"
align=
"center"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"nickName"
align=
"center"
></el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
></el-table-column>
...
...
safe-campus-bbs-ui/src/views/moments/index.vue
View file @
e3829402
...
...
@@ -30,24 +30,20 @@
</el-row>
<el-table
:data=
"tableList"
>
<el-table-column
label=
"动态编号"
align=
"center"
prop=
"id"
width=
"100"
></el-table-column>
<el-table-column
label=
"动态内容"
prop=
"content"
align=
"center"
>
<el-table-column
label=
"动态内容"
prop=
"content"
align=
"center"
width=
"320"
show-overflow-tooltip
>
<template
#default
="
{ row }">
<div
v-html=
"formatContent(row.content)"
class=
"content-container"
></div>
<span
v-if=
"row.type == 'IMAGE' && row.attachments && row.attachments.length > 0"
class=
"pic-box"
>
<span
v-for=
"(img, idx) in row.attachments"
>
[图片]
</span>
<!--
<el-image
:preview-src-list=
"row.previewList"
class=
"img"
v-for=
"(img, idx) in row.attachments"
:initial-index=
"idx"
:key=
"idx"
:src=
"img.url"
></el-image>
-->
</span>
<span
v-if=
"row.type == 'VIDEO' && row.attachments && row.attachments.length > 0"
class=
"pic-box"
>
<span
v-for=
"(img, idx) in row.attachments"
>
[视频]
</span>
<!--
<video
class=
"img"
v-for=
"(img, idx) in row.attachments"
:key=
"idx"
:src=
"img.url"
></video>
-->
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"话题"
align=
"center"
prop=
"topicNames"
width=
"200"
></el-table-column>
<el-table-column
label=
"话题"
align=
"center"
prop=
"topicNames"
width=
"200"
show-overflow-tooltip
></el-table-column>
<el-table-column
label=
"学工号"
prop=
"userName"
align=
"center"
width=
"140"
></el-table-column>
<el-table-column
label=
"姓名"
prop=
"nickName"
align=
"center"
width=
"120"
></el-table-column>
<el-table-column
label=
"部门(班级)"
prop=
"deptName"
align=
"center"
width=
"120"
></el-table-column>
...
...
@@ -55,10 +51,12 @@
<el-table-column
label=
"点赞数"
prop=
"likeCount"
align=
"center"
width=
"80"
></el-table-column>
<el-table-column
label=
"评论数"
prop=
"commentCount"
align=
"center"
width=
"80"
></el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
align=
"center"
width=
"160"
></el-table-column>
<el-table-column
label=
"操作"
align=
"center"
width=
"1
60
"
>
<el-table-column
label=
"操作"
align=
"center"
width=
"1
80"
fixed=
"right
"
>
<
template
#default
="{
row
}"
>
<el-button
type=
"text"
@
click=
"handleDetail(row)"
>
详情
</el-button>
<el-button
type=
"text"
@
click=
"handleDelete(row)"
>
删除
</el-button>
<el-button
type=
"text"
v-if=
"!row.isTop"
@
click=
"handleTop(row, 1)"
>
置顶
</el-button>
<el-button
type=
"text"
v-if=
"row.isTop == 1"
@
click=
"handleTop(row, 0)"
>
取消置顶
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -71,7 +69,7 @@
</template>
<
script
>
import
{
listData
,
delData
}
from
'
@/api/moments
'
;
import
{
listData
,
delData
,
isTopData
}
from
'
@/api/moments
'
;
import
DetailDialog
from
'
./DetailDialog.vue
'
;
import
emotions
from
'
@/utils/emjo
'
;
export
default
{
...
...
@@ -159,6 +157,20 @@ export default {
...
this
.
queryParams
},
`动态_
${
new
Date
().
getTime
()}
.xlsx`
)
},
// 置顶/取消置顶
handleTop
(
row
,
isTop
)
{
let
text
=
isTop
==
'
0
'
?
'
取消置顶
'
:
'
置顶
'
let
data
=
{
isTop
,
momentId
:
row
.
id
}
this
.
$modal
.
confirm
(
`确认要
${
text
}
评论内容为:
${
row
.
content
}
的数据吗?`
).
then
(
function
()
{
return
isTopData
(
data
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
text
+
"
成功
"
);
this
.
getList
()
})
},
/**
* 将内容中的表情符号转换为iconfont标签
* @param {string} content - 原始内容
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment