fix: youhua

This commit is contained in:
zzc
2026-02-05 16:33:04 +08:00
parent 61bf50afc7
commit f524b4e00f
3 changed files with 48 additions and 48 deletions

View File

@@ -88,7 +88,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" label="创建时间" show-overflow-tooltip>
<el-table-column align="center" label="保存时间" show-overflow-tooltip>
<template #default="{ row }">
{{ formatTime(row.createdAt) }}
</template>

View File

@@ -88,7 +88,7 @@
</div>
</template>
</el-table-column>
<el-table-column align="center" label="创建时间" show-overflow-tooltip>
<el-table-column align="center" label="分享时间" show-overflow-tooltip>
<template #default="{ row }">
{{ formatTime(row.createdAt) }}
</template>
@@ -138,6 +138,9 @@
}
},
created() {
if (this.$route.query.keyword) {
this.queryForm.keyword = this.$route.query.keyword
}
this.fetchData()
},

View File

@@ -8,7 +8,15 @@
<vab-query-form-left-panel :span="12">
<el-form :inline="true" :model="queryForm" @submit.native.prevent>
<el-form-item>
<el-input v-model.trim="queryForm.permission" clearable placeholder="请输入查询条件" />
<el-input v-model.trim="queryForm.keyword" clearable placeholder="请输入查询条件" />
</el-form-item>
<el-form-item>
<el-select v-model="queryForm.scene" clearable placeholder="请选择浏览场景" @change="queryData">
<el-option label="祝福卡片" value="card_generate" />
<el-option label="抽签" value="fortune_draw" />
<el-option label="壁纸" value="wallpaper_download" />
<el-option label="头像" value="avatar_download" />
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" type="primary" @click="queryData">查询</el-button>
@@ -18,27 +26,36 @@
</vab-query-form>
<el-table v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText" @selection-change="setSelectRows">
<el-table-column align="center" label="生成结果" width="100">
<el-table-column align="center" label="浏览内容" width="100">
<template slot-scope="scope">
<el-tooltip class="item" :content="scope.row.id" effect="dark" placement="top">
<el-image fit="cover" :preview-src-list="[scope.row.imageUrl]" :src="scope.row.imageUrl" style="width: 50px; height: 50px" />
<el-image
fit="cover"
:preview-src-list="[scope.row?.detail?.imageUrl]"
:src="getThumbUrl(scope.row?.detail?.imageUrl)"
style="width: 50px; height: 50px"
/>
</el-tooltip>
</template>
</el-table-column>
<el-table-column align="center" label="浏览类型" show-overflow-tooltip>
<template #default="{ row }">
{{ getSceneName(row.scene) }}
</template>
</el-table-column>
<el-table-column align="left" label="信息" show-overflow-tooltip>
<template #default="{ row }">
<div>
<div>
<strong>节日</strong>
{{ row.year }}-{{ row.festival }}
<strong>shareToken</strong>
<template v-if="row.shareToken">
<el-link type="primary" :underline="false" @click="goToShareRecord(row.shareToken)">{{ row.shareToken }}</el-link>
</template>
<template v-else>--</template>
</div>
<div>
<strong>祝福对象</strong>
{{ row.blessingTo || '--' }}
</div>
<div>
<strong>祝福人</strong>
{{ row.blessingFrom || '--' }}
<strong>是否是作者</strong>
{{ row.isOwner ? '是' : '' }}
</div>
<div>
<strong>设备</strong>
@@ -48,44 +65,16 @@
<template v-else>--</template>
</div>
<div>
<strong>模版id</strong>
<template v-if="row.templateId">
<el-link type="primary" :underline="false" @click="goToTemplate(row.templateId)">{{ row.templateId }}</el-link>
</template>
<template v-else>--</template>
</div>
<div>
<strong>内容id</strong>
<template v-if="row.blessingId">
<el-link type="primary" :underline="false" @click="goToContentTemplate(row.blessingId)">{{ row.blessingId }}</el-link>
</template>
<template v-else>--</template>
<strong>查看地址</strong>
{{ row.address }}
</div>
</div>
</template>
</el-table-column>
<el-table-column align="left" label="交互信息" show-overflow-tooltip>
<el-table-column align="left" label="查看人" show-overflow-tooltip>
<template #default="{ row }">
<div>
<div>
<strong>查看数</strong>
{{ row.viewCount }}
</div>
<div>
<strong>分享数</strong>
{{ row.shareCount }}
</div>
<div>
<strong>保存数</strong>
{{ row.saveCount }}
</div>
</div>
</template>
</el-table-column>
<el-table-column align="left" label="作者信息" show-overflow-tooltip>
<template #default="{ row }">
<div class="author-cell">
<img alt="avatar" class="author-avatar" :src="row?.fromUser?.avatar" />
<div v-if="row.userId" class="author-cell">
<img alt="avatar" class="author-avatar" :src="getThumbUrl(row?.fromUser?.avatar)" />
<div class="author-meta">
<div>
<strong>id</strong>
@@ -97,9 +86,10 @@
</div>
</div>
</div>
<span v-else>未登录用户</span>
</template>
</el-table-column>
<el-table-column align="center" label="创建时间" show-overflow-tooltip>
<el-table-column align="center" label="查看时间" show-overflow-tooltip>
<template #default="{ row }">
{{ formatTime(row.createdAt) }}
</template>
@@ -126,6 +116,7 @@
<script>
import { getViewList } from '@/api/spring/user'
import { formatTime } from '@/utils'
import { getSceneName, getThumbUrl } from '@/utils/blessing'
export default {
name: 'ViewRecord',
@@ -141,7 +132,8 @@
queryForm: {
pageNo: 1,
pageSize: 10,
permission: '',
scene: '',
keyword: '',
},
timeOutID: null,
}
@@ -155,6 +147,8 @@
},
methods: {
formatTime,
getSceneName,
getThumbUrl,
setSelectRows(val) {
this.selectRows = val
},
@@ -198,6 +192,9 @@
this.queryForm.pageNo = 1
this.fetchData()
},
goToShareRecord(shareToken) {
this.$router.push({ path: '/spring/user/shareRecord', query: { keyword: shareToken } })
},
goToDevice(deviceId) {
this.$router.push({ path: '/spring/user/userChat', query: { deviceId } })
},