fix:项目初始化

This commit is contained in:
ouyangxiu
2025-06-10 17:11:41 +07:00
commit db9bffd2c5
713 changed files with 159746 additions and 0 deletions
+562
View File
@@ -0,0 +1,562 @@
<template>
<div class="pf-warpper">
<el-row class="table-form">
<!-- 查询条件 -->
<el-form :inline="true" :model="searchData" class="form-inline" label-width="80px" size="mini">
<el-form-item>
<el-input placeholder="请输入漫画ID" clearable v-model.number="searchData.id" @clear="onClear('id')" />
</el-form-item>
<el-form-item>
<el-input placeholder="请输入漫画标题" clearable v-model.trim="searchData.title" @clear="onClear('title')" />
</el-form-item>
<el-form-item>
<el-input placeholder="请输入漫画作者" clearable v-model.trim="searchData.author" @clear="onClear('author')" />
</el-form-item>
<el-form-item>
<el-input placeholder="请输入漫画唯一标识" clearable v-model.trim="searchData.jmid" @clear="onClear('jmid')" />
</el-form-item>
<el-form-item>
<el-select placeholder="请选择漫画上架状态" clearable v-model.number="searchData.status" @clear="onClear('status')">
<el-option label="待上架" :value="0" />
<el-option label="上架" :value="1" />
<el-option label="下架" :value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-select
placeholder="是否参与会员日活动"
clearable
v-model.number="searchData.memberDayActivity"
@clear="onClear('memberDayActivity')">
<el-option label="是" :value="true" />
<el-option label="否" :value="false" />
</el-select>
</el-form-item>
<el-form-item>
<el-select
placeholder="请选择漫画更新状态"
clearable
v-model.number="searchData.updateStatus"
@clear="onClear('updateStatus')">
<el-option label="待发布" :value="0" />
<el-option label="连载中" :value="1" />
<el-option label="已完结" :value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-select
placeholder="请选择漫画主题"
clearable
v-model.number="searchData.topicId"
@clear="onClear('topicId')"
filterable>
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in topicIdList" />
</el-select>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入漫画标签" clearable v-model.trim="searchData.tagStr" @clear="onClear('tagStr')" />
</el-form-item>
<el-form-item>
<el-select
placeholder="请选择漫画付费类型"
clearable
v-model="searchData.comicsPayType"
@clear="onClear('comicsPayType')">
<el-option label="免费" :value="0" />
<el-option label="会员" :value="1" />
<el-option label="金币" :value="2" />
</el-select>
</el-form-item>
<el-form-item>
<el-select placeholder="排序方式" clearable v-model.number="searchData.sort" @clear="onClear('sort')">
<el-option label="上架时间" :value="0" />
<el-option label="更新时间" :value="1" />
<el-option label="观看次数排序" :value="2" />
<el-option label="收藏次数排序" :value="3" />
<el-option label="章节数量排序" :value="4" />
<el-option label="图片数量排序" :value="5" />
<el-option label="虚假观看数排序" :value="6" />
<el-option label="周观看次数" :value="7" />
<el-option label="月观看次数" :value="8" />
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="onSearch" icon="el-icon-search" plain type="primary">搜索</el-button>
<el-button @click="handleAdd()" icon="el-icon-circle-plus-outline" plain type="success">新增</el-button>
<el-button @click="getData" icon="el-icon-refresh" plain type="info">刷新</el-button>
<el-button @click="setTag" icon="el-icon-edit-outline" plain type="warning">批量设置主题</el-button>
<el-button @click="setTags" icon="el-icon-edit-outline" plain type="warning">批量添加标签</el-button>
<!-- <el-button @click="delTheme" icon="el-icon-edit-outline" plain type="warning">一键移除漫画主题</el-button> -->
</el-form-item>
</el-form>
</el-row>
<el-row>
<el-col>
<!-- 展示列表 -->
<el-table
:data="tableData"
border
height="750"
highlight-current-row
style="width: 100%"
@selection-change="handleSelectionChange"
:row-style="{ height: '70px' }">
<el-table-column type="selection" width="50" fixed="left"> </el-table-column>
<el-table-column align="center" label="ID">
<template slot-scope="scope">{{ scope.row.id }}</template>
</el-table-column>
<el-table-column align="center" label="唯一标识">
<template slot-scope="scope">{{ scope.row.jmid }}</template>
</el-table-column>
<el-table-column align="center" label="漫画标题" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.title }}</template>
</el-table-column>
<el-table-column align="center" label="漫画作者" width="200">
<template slot-scope="scope">
<el-tag v-for="(item, index) in scope.row.author" :key="index">{{ item }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="章节数量">
<template slot-scope="scope">{{ scope.row.chapterCount }}</template>
</el-table-column>
<el-table-column align="center" label="最新章节">
<template slot-scope="scope">{{ scope.row.chapterCount }}</template>
</el-table-column>
<el-table-column align="center" label="页数">
<template slot-scope="scope">{{ scope.row.pageCount }}</template>
</el-table-column>
<el-table-column align="center" label="售价">
<template slot-scope="scope">{{ scope.row.price | changeMoneyYuan }}</template>
</el-table-column>
<el-table-column align="center" label="免费章节">
<template slot-scope="scope">{{ scope.row.noneChapter }}</template>
</el-table-column>
<el-table-column align="center" label="周观看次数">
<template slot-scope="scope">{{ scope.row.weekWatchTimes }}</template>
</el-table-column>
<el-table-column align="center" label="月观看次数">
<template slot-scope="scope">{{ scope.row.monthWatchTimes }}</template>
</el-table-column>
<el-table-column align="center" label="最后观看时间">
<template slot-scope="scope">{{ scope.row.lastWatchTime | BeiJingTime }}</template>
</el-table-column>
<el-table-column align="center" label="排序">
<template slot-scope="scope">{{ scope.row.rank }}</template>
</el-table-column>
<el-table-column align="center" label="封面">
<template slot-scope="scope">
<ShowImg style="width: 40px; height: 40px; margin: 0 auto;line-height: 40px" :urls="scope.row.coverImg">
</ShowImg>
</template>
</el-table-column>
<el-table-column align="center" label="背景图">
<template slot-scope="scope">
<ShowImg
style="width: 40px; height: 40px; margin: 0 auto;line-height: 40px"
:urls="scope.row.backgroundImg"></ShowImg>
</template>
</el-table-column>
<el-table-column align="center" label="人物图">
<template slot-scope="scope">
<ShowImg
style="width: 40px; height: 40px; margin: 0 auto;line-height: 40px"
:urls="scope.row.characterImg"></ShowImg>
</template>
</el-table-column>
<el-table-column align="center " label="字体颜色">
<template slot-scope="scope">
<div :style="{ backgroundColor: '#' + scope.row.backGroupImage }">
{{ scope.row.backGroupImage }}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="描述信息" width="300" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.desc }}</template>
</el-table-column>
<el-table-column align="center" label="是否VIP" width="100">
<template slot-scope="scope">
<el-button :type="scope.row.isVip ? 'success' : 'danger'" plain size="mini">{{ scope.row.isVip ? "VIP" :
"非VIP" }}</el-button>
</template>
</el-table-column>
<el-table-column align="center" label="上架状态">
<template slot-scope="scope">{{ scope.row.status | changeStatus }}</template>
</el-table-column>
<el-table-column align="center" label="上架时间" width="150">
<template slot-scope="scope">{{ scope.row.addedTime | BeiJingTime2 }}</template>
</el-table-column>
<el-table-column align="center" label="更新状态">
<template slot-scope="scope">{{ scope.row.updateStatus | changeUpdateStatus }}</template>
</el-table-column>
<el-table-column align="center" label="漫画主题" width="300">
<template slot-scope="scope">
<el-tag :key="index" v-for="(item, index) in scope.row.topics" type="success">{{
item | changeName(topicIdList, 'id', 'name') }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="漫画标签" width="300">
<template slot-scope="scope">
<el-tag :key="index" v-for="(item, index) in scope.row.tagName" type="success">{{ item.name }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="配音角色" width="300">
<template slot-scope="scope">
<template>
<el-table :data="scope.row.roleList" max-height="200" border style="width: 100%">
<el-table-column align="center" prop="comicsCvId" label="CV-id" width="135">
<template slot-scope="scopes">{{
scopes.row.comicsCvId
}}</template>
</el-table-column>
<el-table-column align="center" prop="roleName" label="配音角色" width="135">
<template slot-scope="scopes">{{
scopes.row.roleName
}}</template>
</el-table-column>
</el-table>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="真实信息">
<el-table-column align="center" label="评论数">
<template slot-scope="scope">{{ scope.row.real.comments }}</template>
</el-table-column>
<el-table-column align="center" label="点赞数">
<template slot-scope="scope">{{ scope.row.real.likes }}</template>
</el-table-column>
<el-table-column align="center" label="售卖数">
<template slot-scope="scope">{{ scope.row.real.sells }}</template>
</el-table-column>
<el-table-column align="center" label="分享数">
<template slot-scope="scope">{{ scope.row.real.shares }}</template>
</el-table-column>
<el-table-column align="center" label="观看数">
<template slot-scope="scope">{{ scope.row.real.watchTimes }}</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" label="虚拟信息">
<el-table-column align="center" label="评论数">
<template slot-scope="scope">{{ scope.row.fake.comments }}</template>
</el-table-column>
<el-table-column align="center" label="点赞数">
<template slot-scope="scope">{{ scope.row.fake.likes }}</template>
</el-table-column>
<el-table-column align="center" label="售卖数">
<template slot-scope="scope">{{ scope.row.fake.sells }}</template>
</el-table-column>
<el-table-column align="center" label="分享数">
<template slot-scope="scope">{{ scope.row.fake.shares }}</template>
</el-table-column>
<el-table-column align="center" label="观看数">
<template slot-scope="scope">{{ scope.row.fake.watchTimes }}</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" label="创建时间" width="150">
<template slot-scope="scope">{{ scope.row.createdAt | BeiJingTime }}</template>
</el-table-column>
<el-table-column align="center" label="更新时间" width="150">
<template slot-scope="scope">{{ scope.row.updatedAt | BeiJingTime }}</template>
</el-table-column>
<el-table-column align="center" fixed="right" label="操作" width="450">
<template slot-scope="scope">
<el-button @click="onAddComment(scope.row)" size="mini" type="success">添加评论</el-button>
<el-button @click="showChapterList(scope.$index, scope.row)" size="mini" type="primary">查看章节列表</el-button>
<el-button @click="topComics(scope.$index, scope.row)" size="mini" type="success">最新置顶</el-button>
<el-button @click="handleEdit(scope.$index, scope.row)" size="mini" type="primary">编辑</el-button>
<el-button @click="handleDelete(scope.$index, scope.row)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<!-- 分页 -->
<div class="table-pagination">
<el-pagination
:current-page="searchData.pageNum"
:page-size="searchData.pageSize"
:page-sizes="[10, 20, 30, 50, 100]"
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
layout="total, sizes, prev, pager, next, jumper" />
</div>
<!-- 新增/编辑弹出框 -->
<Edit :data="editData" v-if="dialogFormVisible" @close="closeEdit" :circleList="circleList"></Edit>
<ChapterList :data="editData" v-if="chapterListVisible" @close="closeEdit" />
<SetTag :data="selectBatch" v-if="setTagVisible" @close="closeEdit"></SetTag>
<DelTag :data="topicIdList" v-if="delThemeVisible" @close="closeEdit"></DelTag>
<EditCom :data="editData" v-if="editComVisible" :objectype="5" @close="closeEdit" />
<AddTags :data="selectBatch" v-if="tagsVisible" @close="closeEdit" />
</div>
</template>
<script>
import {
comicsList,
comicsDel,
comicsNewOne
} from '@/api/comicsManagement/comics'
import { comicsTopicList } from '@/api/comicsManagement/comicsTopic'
import { comicsTagList } from '@/api/comicsManagement/comicsTag'
import { circleListSearch } from '@/api/user/circleList'
import ChapterList from './components/chapterList'
import ShowImg from '@/components/ShowImg/index.vue'
import Edit from './components/AddOrEdit'
import SetTag from './components/setTag'
import DelTag from './components/delTag'
import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
import AddTags from './components/addTags'
export default {
name: 'Comics',
components: {
Edit,
ShowImg,
ChapterList,
SetTag,
EditCom,
AddTags,
DelTag
},
data() {
return {
// 请求列表筛选参数
searchData: {
id: undefined,
status: undefined, // 激活状态
pageNum: 1,
pageSize: 10,
comicsPayType: undefined, // true 是否VIp
sort: undefined, // integer 排序,0创建时间,1rank排序,2观看数量排序,3收藏数量排序
tagId: undefined, // integer 标签
title: undefined, // "string",标题
topicId: undefined, // integer 主题
author: undefined, // 漫画作者
tagStr: undefined,
memberDayActivity: undefined
},
tableData: [],
total: 0,
dialogFormVisible: false,
chapterListVisible: false,
editComVisible: false, // 评论弹出框
setTagVisible: false,
tagsVisible: false, // 批量添加标签
delThemeVisible: false,
editData: {},
topicIdList: [],
tagIdList: [],
selectBatch: [],
circleList: []
}
},
filters: {
changeStatus(val) {
switch (val) {
case 0:
return '待上架'
case 1:
return '上架'
case 2:
return '取消上架'
case 3:
return '待审核'
case 4:
return '拒绝'
}
},
changeUpdateStatus(val) {
switch (val) {
case 0:
return '待发布'
case 1:
return '连载中'
case 2:
return '已完结'
}
}
},
async mounted() {
// this.getComicsTagList()
this.getComicsTopicList()
await this.getData()
// this.getCircleListSearch()
},
methods: {
// TODO:请求漫画主题列表数据
getComicsTopicList() {
const param = {
pageNum: 1,
pageSize: 500,
status: true
}
comicsTopicList(param).then((res) => {
if (res.code === 200) {
this.topicIdList = res.data.list
this.$store.dispatch('comics/setComicsTopicList', res.data.list)
} else {
this.topicIdList = []
this.$store.dispatch('comics/setComicsTopicList', [])
this.$message.error('请求漫画主题列表失败')
}
})
},
// TODO:请求漫画标签列表数据
getComicsTagList() {
const param = {
pageNum: 1,
pageSize: 10000
}
comicsTagList(param).then((res) => {
if (res.code === 200) {
this.tagIdList = res.data.list
this.$store.dispatch('comics/setComicsTagList', res.data.list)
} else {
this.tagIdList = []
this.$store.dispatch('comics/setComicsTagList', [])
this.$message.error('请求漫画标签列表失败!')
}
})
},
// TODO:请求漫画列表数据
getData() {
comicsList(this.searchData).then((res) => {
if (res.code === 200) {
this.tableData = res.data.list
this.total = res.data.count
} else {
this.tableData = []
this.total = 0
this.$message.error('请求漫画列表数据失败')
}
})
},
// TODO:漫画置顶
topComics(index, row) {
comicsNewOne({ id: row.id }).then((res) => {
if (res.code === 200) {
this.$message.success('置顶成功')
} else {
this.$message.error('置顶失败')
}
})
},
// TODO:删除漫画列表数据
handleDelete(index, row) {
this.$confirm('确定删除?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
comicsDel({ comicsId: row.id }).then((res) => {
if (res.code === 200) {
this.getData({ pageNum: 1 }) // 刷新商品列表
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
})
},
// TODO:请求圈子列表数据
getCircleListSearch() {
circleListSearch({ pageNum: 1, pageSize: 5000 }).then((res) => {
if (res.code === 200) {
this.circleList = res.data.list
} else {
this.$message.error('请求圈子列表失败!')
this.circleList = []
}
})
},
onSearch() {
this.searchData.pageNum = 1
this.getData()
},
handleSelectionChange(val) {
this.selectBatch = val
},
setTag() {
this.setTagVisible = true
},
setTags() {
this.tagsVisible = true
},
delTheme() {
this.delThemeVisible = true
},
showChapterList(index, row) {
this.editData = {
title: '视频列表',
type: 3,
data: row
}
this.chapterListVisible = true
},
// 列表编辑按钮点击事件
handleAdd() {
this.editData = {
title: '新增',
data: {}
}
this.dialogFormVisible = true
},
// 列表编辑按钮点击事件
handleEdit(index, row) {
this.editData = {
title: '编辑',
data: row
}
this.dialogFormVisible = true
},
closeEdit() {
this.editData = {
title: '新增',
data: {}
}
this.editComVisible = false
this.setTagVisible = false
this.delThemeVisible = false
this.dialogFormVisible = false
this.chapterListVisible = false
this.tagsVisible = false
this.getData()
},
onClear(key) {
this.searchData[key] = undefined
this.getData()
},
// 切换每页显示的条数触发
handleSizeChange(val) {
this.searchData.pageSize = val
this.getData()
},
// 切换页码时触发
handleCurrentChange(val) {
this.searchData.pageNum = val
this.getData()
},
onAddComment(row) {
this.editData = {
title: '添加评论',
data: row
}
this.editComVisible = true
}
}
}
</script>