Commit dcd315f0 authored by yuwenwen's avatar yuwenwen

修改BUG

parent 992dc3be
<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="user-info-box">
<img class="avatar" src="@/assets/images/default-avatar.png"></img>
......
......@@ -2,9 +2,11 @@
<div class="app-container">
<div class="page-container">
<el-form :model="queryParams" :inline="true" label-width="80px">
<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 label="创建时间">
<el-date-picker placeholder="请选择" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
......@@ -14,24 +16,35 @@
<el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="handleReset">重置</el-button>
</el-form-item>
</el-form>
<el-row class="mb10">
<el-button type="primary" @click="handleExport">导出</el-button>
</el-row>
<el-table :data="tableList">
<el-table-column label="序号" width="55" type="index" align="center"></el-table-column>
<el-table-column label="动态内容" prop="content" align="center">
<template #default="{ row }">
<div v-html="formatContent(row.content)" class="content-container"></div>
<div 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>
</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="240"></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="160"></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="createTime" align="center" width="160"></el-table-column>
......@@ -87,7 +100,17 @@ export default {
getList() {
listData(this.queryParams).then(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
})
},
......@@ -124,6 +147,11 @@ export default {
this.dateRange = []
this.getList()
},
handleExport() {
this.download('bbs/moment/list/export', {
...this.queryParams
}, `动态_${new Date().getTime()}.xlsx`)
},
/**
* 将内容中的表情符号转换为iconfont标签
* @param {string} content - 原始内容
......@@ -209,4 +237,15 @@ export default {
overflow: auto;
}
}
.pic-box {
display: flex;
flex-wrap: wrap;
justify-content: center;
.img {
color: #999;
font-size: 12px;
}
}
</style>
<template>
<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-row :gutter="20">
<el-col :span="24">
......
<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-column type="index" label="序号" width="55" align="center"></el-table-column>
<el-table-column label="明细名称" prop="detailName" align="center" width="150"></el-table-column>
......
<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-item label="兑换人" prop="userName">
<UserSelectInput v-model="form.userName" :value.sync="form.userName" placeholder="请选择兑换人"></UserSelectInput>
......
<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="add-box">
<div class="label-box">加分设置</div>
......
<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"
:action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
:on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
......
<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-item label="敏感词" prop="name">
<el-input placeholder="请输入" v-model="form.name"></el-input>
......
<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-item label="话题名称" prop="name">
<el-input placeholder="请输入" v-model="form.name"></el-input>
......
......@@ -103,7 +103,7 @@
<view class="comment-item" v-for="(item,index) in form.comments">
<view class="user-info">
<view class="username">{{item.nickName}}:</view>
<view class="datetime">2025-07-01 04:21:21</view>
<view class="datetime">{{item.createTime}}</view>
</view>
<view class="content">
<view class="text" v-if="!item.replyNickName" @click.stop="handleReplayComment(item)">
......
const emotions = [{
code: 'icon-meigui',
name: '玫瑰',
symbol: '[玫瑰]'
},
const emotions = [
{
code: 'icon-a-heshi',
name: '合十',
symbol: '[合十]'
code: 'icon-biaoqing-weixiao',
name: '微笑',
symbol: '[微笑]'
},
{
code: 'icon-a-jizhi',
......@@ -23,21 +19,6 @@ const emotions = [{
name: '兴奋',
symbol: '[兴奋]'
},
{
code: 'icon-emo_bucuo',
name: '调皮',
symbol: '[调皮]'
},
{
code: 'icon-neijiu',
name: '内疚',
symbol: '[内疚]'
},
{
code: 'icon-icon-test',
name: '疲倦',
symbol: '[疲倦]'
},
{
code: 'icon-icon-test1',
name: '大哭',
......@@ -63,6 +44,27 @@ const emotions = [{
name: '亲亲',
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',
name: '哭脸',
......@@ -83,11 +85,7 @@ const emotions = [{
name: '睡着了',
symbol: '[睡着了]'
},
{
code: 'icon-biaoqing-weixiao',
name: '微笑',
symbol: '[微笑]'
},
{
code: 'icon-ico_emoji_26',
name: '叹气',
......@@ -128,17 +126,21 @@ const emotions = [{
name: '爱心',
symbol: '[爱心]'
},
{
code: 'icon-meigui',
name: '玫瑰',
symbol: '[玫瑰]'
},
{
code: 'icon-a-heshi',
name: '合十',
symbol: '[合十]'
},
{
code: 'icon-a-Thumbsup',
name: '点赞',
symbol: '[点赞]'
},
{
code:'icon-biaoqing-bugaoxing',
name: '不高兴',
symbol: '[不高兴]'
}
]
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