Commit e40e7b17 authored by 万成波's avatar 万成波

Merge remote-tracking branch 'origin/master'

parents c78b8f1c d4ea2053
<template> <template>
<el-dialog :visible.sync="visible" title="动态详情" width="26%" class="detail-dialog"> <el-dialog :visible.sync="visible" title="动态详情" width="26%" class="detail-dialog" :close-on-click-modal="false">
<div class="dynamic-item"> <div class="dynamic-item">
<div class="user-info-box"> <div class="user-info-box">
<img class="avatar" src="@/assets/images/default-avatar.png"></img> <img class="avatar" src="@/assets/images/default-avatar.png"></img>
......
...@@ -2,9 +2,11 @@ ...@@ -2,9 +2,11 @@
<div class="app-container"> <div class="app-container">
<div class="page-container"> <div class="page-container">
<el-form :model="queryParams" :inline="true" label-width="80px"> <el-form :model="queryParams" :inline="true" label-width="80px">
<el-form-item label="动态内容"> <el-form-item label="动态内容">
<el-input placeholder="请输入" v-model="queryParams.content" style="width: 220px;"></el-input> <el-input placeholder="请输入" v-model="queryParams.content" style="width: 200px;"></el-input>
</el-form-item>
<el-form-item label="话题">
<el-input placeholder="请输入" v-model="queryParams.topicNames" style="width: 200px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker placeholder="请选择" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" <el-date-picker placeholder="请选择" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
...@@ -14,24 +16,35 @@ ...@@ -14,24 +16,35 @@
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button> <el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="handleReset">重置</el-button> <el-button @click="handleReset">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="mb10"> <el-row class="mb10">
<el-button type="primary" @click="handleExport">导出</el-button>
</el-row> </el-row>
<el-table :data="tableList"> <el-table :data="tableList">
<el-table-column label="序号" width="55" type="index" align="center"></el-table-column> <el-table-column label="序号" width="55" type="index" align="center"></el-table-column>
<el-table-column label="动态内容" prop="content" align="center"> <el-table-column label="动态内容" prop="content" align="center">
<template #default="{ row }"> <template #default="{ row }">
<div v-html="formatContent(row.content)" class="content-container"></div> <div v-html="formatContent(row.content)" class="content-container"></div>
<div v-if="row.type == 'IMAGE' && row.attachments && row.attachments.length > 0"> <span v-if="row.type == 'IMAGE' && row.attachments && row.attachments.length > 0"
<el-image v-for="(img,idx) in row.attachments" :key="idx" :src="img.url"></el-image> class="pic-box">
</div> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="话题" align="center" prop="topicNames" width="240"></el-table-column> <el-table-column label="话题" align="center" prop="topicNames" width="240"></el-table-column>
<el-table-column label="帐号" prop="userName" align="center" width="140"></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="nickName" align="center" width="120"></el-table-column>
<el-table-column label="部门" prop="deptName" align="center" width="160"></el-table-column>
<el-table-column label="点赞数" prop="likeCount" align="center" width="100"></el-table-column> <el-table-column label="点赞数" prop="likeCount" align="center" width="100"></el-table-column>
<el-table-column label="评论数" prop="commentCount" align="center" width="100"></el-table-column> <el-table-column label="评论数" prop="commentCount" align="center" width="100"></el-table-column>
<el-table-column label="创建时间" prop="createTime" align="center" width="160"></el-table-column> <el-table-column label="创建时间" prop="createTime" align="center" width="160"></el-table-column>
...@@ -87,7 +100,17 @@ export default { ...@@ -87,7 +100,17 @@ export default {
getList() { getList() {
listData(this.queryParams).then(res => { listData(this.queryParams).then(res => {
console.log(res) console.log(res)
this.tableList = res.rows; this.tableList = res.rows.map((item) => {
item.previewList = []
if (item.attachments && item.attachments.length > 0) {
item.previewList = item.attachments.map((img) => {
return img.url
})
return item;
}
return item;
});
this.total = res.total this.total = res.total
}) })
}, },
...@@ -124,6 +147,11 @@ export default { ...@@ -124,6 +147,11 @@ export default {
this.dateRange = [] this.dateRange = []
this.getList() this.getList()
}, },
handleExport() {
this.download('bbs/moment/list/export', {
...this.queryParams
}, `动态_${new Date().getTime()}.xlsx`)
},
/** /**
* 将内容中的表情符号转换为iconfont标签 * 将内容中的表情符号转换为iconfont标签
* @param {string} content - 原始内容 * @param {string} content - 原始内容
...@@ -209,4 +237,15 @@ export default { ...@@ -209,4 +237,15 @@ export default {
overflow: auto; overflow: auto;
} }
} }
.pic-box {
display: flex;
flex-wrap: wrap;
justify-content: center;
.img {
color: #999;
font-size: 12px;
}
}
</style> </style>
<template> <template>
<el-dialog :visible.sync="visible" v-if="visible" :title="dialogTitle" width="58%" class="dialog" <el-dialog :visible.sync="visible" v-if="visible" :title="dialogTitle" width="58%" class="dialog"
@close="handleClose"> @close="handleClose" :close-on-click-modal="false">
<el-form :model="form" ref="formRef" :rules="rules" label-position="top"> <el-form :model="form" ref="formRef" :rules="rules" label-position="top">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
......
<template> <template>
<el-dialog :visible.sync="visible" title="积分明细" width="70%"> <el-dialog :visible.sync="visible" title="积分明细" width="70%" :close-on-click-modal="false">
<el-table :data="tableList" v-loading="loading"> <el-table :data="tableList" v-loading="loading">
<el-table-column type="index" label="序号" width="55" align="center"></el-table-column> <el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column label="明细名称" prop="detailName" align="center" width="150"></el-table-column> <el-table-column label="明细名称" prop="detailName" align="center" width="150"></el-table-column>
......
<template> <template>
<el-dialog :visible.sync="visible" v-if="visible" title="积分兑换" width="36%" class="dialog" @close="handleClose"> <el-dialog :visible.sync="visible" v-if="visible" title="积分兑换" :close-on-click-modal="false" width="36%" class="dialog" @close="handleClose">
<el-form :model="form" ref="formRef" label-position="top" :rules="rules"> <el-form :model="form" ref="formRef" label-position="top" :rules="rules">
<el-form-item label="兑换人" prop="userName"> <el-form-item label="兑换人" prop="userName">
<UserSelectInput v-model="form.userName" :value.sync="form.userName" placeholder="请选择兑换人"></UserSelectInput> <UserSelectInput v-model="form.userName" :value.sync="form.userName" placeholder="请选择兑换人"></UserSelectInput>
......
<template> <template>
<el-dialog :visible.sync="visible" title="积分规则设置" width="70%"> <el-dialog :visible.sync="visible" title="积分规则设置" width="70%" :close-on-click-modal="false">
<div class="rules-setting-container"> <div class="rules-setting-container">
<div class="add-box"> <div class="add-box">
<div class="label-box">加分设置</div> <div class="label-box">加分设置</div>
......
<template> <template>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body> <el-dialog :title="upload.title" :visible.sync="upload.open" :close-on-click-modal="false" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".txt" :headers="upload.headers" <el-upload ref="upload" :limit="1" accept=".txt" :headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag> :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
......
<template> <template>
<el-dialog :visible.sync="visible" v-if="visible" :title="dialogTitle" width="28%" class="dialog" @close="handleClose"> <el-dialog :visible.sync="visible" v-if="visible" :title="dialogTitle" :close-on-click-modal="false" width="28%" class="dialog" @close="handleClose">
<el-form :model="form" ref="formRef" :rules="rules" @submit.native.prevent> <el-form :model="form" ref="formRef" :rules="rules" @submit.native.prevent>
<el-form-item label="敏感词" prop="name"> <el-form-item label="敏感词" prop="name">
<el-input placeholder="请输入" v-model="form.name"></el-input> <el-input placeholder="请输入" v-model="form.name"></el-input>
......
<template> <template>
<el-dialog :visible.sync="visible" v-if="visible" :title="dialogTitle" width="28%" class="dialog" @close="handleClose"> <el-dialog :visible.sync="visible" v-if="visible" :close-on-click-modal="false" :title="dialogTitle" width="28%" class="dialog" @close="handleClose">
<el-form :model="form" ref="formRef" :rules="rules"> <el-form :model="form" ref="formRef" :rules="rules">
<el-form-item label="话题名称" prop="name"> <el-form-item label="话题名称" prop="name">
<el-input placeholder="请输入" v-model="form.name"></el-input> <el-input placeholder="请输入" v-model="form.name"></el-input>
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<view class="comment-item" v-for="(item,index) in form.comments"> <view class="comment-item" v-for="(item,index) in form.comments">
<view class="user-info"> <view class="user-info">
<view class="username">{{item.nickName}}:</view> <view class="username">{{item.nickName}}:</view>
<view class="datetime">2025-07-01 04:21:21</view> <view class="datetime">{{item.createTime}}</view>
</view> </view>
<view class="content"> <view class="content">
<view class="text" v-if="!item.replyNickName" @click.stop="handleReplayComment(item)"> <view class="text" v-if="!item.replyNickName" @click.stop="handleReplayComment(item)">
......
const emotions = [{ const emotions = [
code: 'icon-meigui',
name: '玫瑰',
symbol: '[玫瑰]'
},
{ {
code: 'icon-a-heshi', code: 'icon-biaoqing-weixiao',
name: '合十', name: '微笑',
symbol: '[合十]' symbol: '[微笑]'
}, },
{ {
code: 'icon-a-jizhi', code: 'icon-a-jizhi',
...@@ -23,21 +19,6 @@ const emotions = [{ ...@@ -23,21 +19,6 @@ const emotions = [{
name: '兴奋', name: '兴奋',
symbol: '[兴奋]' symbol: '[兴奋]'
}, },
{
code: 'icon-emo_bucuo',
name: '调皮',
symbol: '[调皮]'
},
{
code: 'icon-neijiu',
name: '内疚',
symbol: '[内疚]'
},
{
code: 'icon-icon-test',
name: '疲倦',
symbol: '[疲倦]'
},
{ {
code: 'icon-icon-test1', code: 'icon-icon-test1',
name: '大哭', name: '大哭',
...@@ -63,6 +44,27 @@ const emotions = [{ ...@@ -63,6 +44,27 @@ const emotions = [{
name: '亲亲', name: '亲亲',
symbol: '[亲亲]' symbol: '[亲亲]'
}, },
{
code:'icon-biaoqing-bugaoxing',
name: '不高兴',
symbol: '[不高兴]'
},
{
code: 'icon-emo_bucuo',
name: '调皮',
symbol: '[调皮]'
},
{
code: 'icon-neijiu',
name: '内疚',
symbol: '[内疚]'
},
{
code: 'icon-icon-test',
name: '疲倦',
symbol: '[疲倦]'
},
{ {
code: 'icon-kulian', code: 'icon-kulian',
name: '哭脸', name: '哭脸',
...@@ -83,11 +85,7 @@ const emotions = [{ ...@@ -83,11 +85,7 @@ const emotions = [{
name: '睡着了', name: '睡着了',
symbol: '[睡着了]' symbol: '[睡着了]'
}, },
{
code: 'icon-biaoqing-weixiao',
name: '微笑',
symbol: '[微笑]'
},
{ {
code: 'icon-ico_emoji_26', code: 'icon-ico_emoji_26',
name: '叹气', name: '叹气',
...@@ -128,17 +126,21 @@ const emotions = [{ ...@@ -128,17 +126,21 @@ const emotions = [{
name: '爱心', name: '爱心',
symbol: '[爱心]' symbol: '[爱心]'
}, },
{
code: 'icon-meigui',
name: '玫瑰',
symbol: '[玫瑰]'
},
{
code: 'icon-a-heshi',
name: '合十',
symbol: '[合十]'
},
{ {
code: 'icon-a-Thumbsup', code: 'icon-a-Thumbsup',
name: '点赞', name: '点赞',
symbol: '[点赞]' symbol: '[点赞]'
},
{
code:'icon-biaoqing-bugaoxing',
name: '不高兴',
symbol: '[不高兴]'
} }
] ]
export default emotions; export default emotions;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment