增加图集和短剧
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="Visible"
|
||||
width="1100px"
|
||||
center
|
||||
class="ac-dialog"
|
||||
:close-on-click-modal="false"
|
||||
@close="close">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
class="demo-form-inline"
|
||||
label-width="80px"
|
||||
label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="分类名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="排序" prop="name">
|
||||
<el-input v-model.number="form.rank" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="广告模式" prop="advertisingId">
|
||||
<el-select placeholder="请选择广告模式" clearable v-model="form.adsType" filterable>
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in videoTypeMode" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="广告ID" prop="advertisingId">
|
||||
<el-input v-model.number="form.advertisingId" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="展示类型">
|
||||
<el-select placeholder="请选择展示方式" clearable v-model="form.showType">
|
||||
<el-option :key="item.value" :label="item.name" :value="item.value" v-for="item in showTypeList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-switch
|
||||
v-model="form.status"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<el-form-item label="描述" prop="desc">
|
||||
<el-input placeholder="请输入描述" v-model="form.desc" type="textarea" style="width: 500px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TagSelectV2 type="atlas" @selectTags="selectTags" :formTags="form.tagIds" :mediatagCategory="[]" :allTags="tagList" />
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="submit('ruleForm')"> 确 定 </el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
classifyAdd,
|
||||
classifyUpdate
|
||||
} from '@/api/atlas/index.js'
|
||||
import { videoTypeMode } from '@/filters/videoManagement/videoType'
|
||||
import TagSelectV2 from '@/components/TagSelectV2/index'
|
||||
export default {
|
||||
name: 'AddOrEdit',
|
||||
props: ['data', 'showTypeList', 'tagList'],
|
||||
components: { TagSelectV2 },
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
videoTypeMode: videoTypeMode(),
|
||||
title: '',
|
||||
// 表单数据
|
||||
form: {
|
||||
|
||||
advertisingId: undefined, // 0,广告ID
|
||||
desc: undefined, // "string",描述信息
|
||||
name: undefined, // "string",分类名
|
||||
rank: undefined, // 0,排序
|
||||
status: undefined, // true,是否启用
|
||||
tagIds: []
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.title = this.data.title
|
||||
|
||||
if (this.title === '编辑') {
|
||||
this.form = JSON.parse(JSON.stringify(this.data.data))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectTags(tags) {
|
||||
this.form.tagIds = tags
|
||||
},
|
||||
// TODO:新增漫画分类列表数据
|
||||
add(data) {
|
||||
classifyAdd(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('新增成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('新增失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:编辑漫画分类列表数据
|
||||
update(data) {
|
||||
classifyUpdate(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交按钮
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
const data = JSON.parse(JSON.stringify(this.form))
|
||||
data.location = 5
|
||||
if (this.title === '新增') {
|
||||
this.add(data)
|
||||
} else if (this.title === '编辑') {
|
||||
this.update(data)
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<div class="pf-warpper avlist">
|
||||
<el-row class="table-form">
|
||||
<el-form :inline="true" :model="searchData" class="form-inline" size="mini">
|
||||
<el-form-item>
|
||||
<el-input placeholder="请输入分类名称" clearable v-model.trim="searchData.name" @clear="onClear('name')" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select placeholder="请选择是否启用" clearable v-model="searchData.status" @clear="onClear('status')">
|
||||
<el-option label="启用" :value="true" />
|
||||
<el-option label="未启用" :value="false" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch" icon="el-icon-search" plain type="primary">搜索</el-button>
|
||||
<el-button @click="add" icon="el-icon-circle-plus-outline" plain type="success">新增</el-button>
|
||||
<el-button @click="getList" icon="el-icon-refresh" plain type="info">刷新</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-table
|
||||
:data="resData"
|
||||
element-loading-text="拼命加载中"
|
||||
border
|
||||
height="750"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
v-loading="loading">
|
||||
<el-table-column align="center" label="排序" width="80">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.rank
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="ID" width="80">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.id
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="分类名称">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否启用" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.status ? '已开启' : '已关闭' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="描述信息" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.desc
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="展示类型" width="80">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.showType | changeName(showTypeList, 'value', 'name')
|
||||
}}</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.tagIds" size="mini">
|
||||
{{ item|changeName(tagList,'id','name') }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="广告模式" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.adsType | changeVideoTypeMode }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创建时间" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.createdAt | BeiJingTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创建时间" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.createdAt | BeiJingTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="更新时间" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.updatedAt | BeiJingTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="180">
|
||||
<template slot-scope="scope">
|
||||
<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 :tagList='tagList' :data="editData" :showTypeList="showTypeList" v-if="editVisible" @close="closeEdit" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 引入模块
|
||||
import Edit from './components/AddOrEdit'
|
||||
import {
|
||||
classifyList,
|
||||
categoryDel
|
||||
} from '@/api/atlas/index.js'
|
||||
import { tagList } from '@/api/atlas/index.js'
|
||||
export default {
|
||||
name: 'ComicsCategory',
|
||||
components: {
|
||||
Edit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 请求列表参数
|
||||
searchData: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
name: undefined, // "string",
|
||||
status: undefined // true
|
||||
},
|
||||
resData: [], // el-table表格数据
|
||||
editVisible: false, // 新增或编辑弹出框
|
||||
total: 0, // 数据总条数
|
||||
loading: false, // 列表加载状态
|
||||
// 编辑数据
|
||||
editData: {
|
||||
title: '新增',
|
||||
data: {}
|
||||
},
|
||||
showTypeList: [
|
||||
{ name: '主题模式', value: 1 },
|
||||
{ name: '写真列表', value: 2 },
|
||||
{ name: '发现展示', value: 3 }
|
||||
|
||||
],
|
||||
tagList: []
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getTagList()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// TODO:请求图集标签列表数据
|
||||
getTagList() {
|
||||
tagList({ pageNum: 1, pageSize: 500 }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tagList = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求标签列表失败!')
|
||||
this.tagList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:请求漫画分类列表数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
classifyList(this.searchData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.resData = res.data.list
|
||||
this.total = res.data.count
|
||||
} else {
|
||||
this.$message.error('请求列表失败!')
|
||||
this.resData = []
|
||||
this.total = 0
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
||||
// TODO:删除漫画分类列表数据
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
categoryDel({ id: row.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.getList()
|
||||
this.$message.success('成功删除!')
|
||||
} else {
|
||||
this.$message.error(res.tip)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.searchData.pageNum = 1
|
||||
this.searchData.pageSize = 10
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 新增按钮
|
||||
add() {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
// 编辑按钮
|
||||
handleEdit(index, row) {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '编辑',
|
||||
data: row
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
this.editVisible = false
|
||||
this.getList()
|
||||
},
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val
|
||||
this.getList()
|
||||
},
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.pageNum = val
|
||||
this.getList()
|
||||
},
|
||||
// 清空某一项筛选列表
|
||||
onClear(key) {
|
||||
this.searchData[key] = undefined
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="Visible"
|
||||
width="700px"
|
||||
center
|
||||
class="ac-dialog"
|
||||
:close-on-click-modal="false"
|
||||
@close="close">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
class="demo-form-inline"
|
||||
label-width="80px"
|
||||
label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="标签名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入标签名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="排序" prop="rank">
|
||||
<el-input v-model.number="form.rank" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="观看数" prop="watchTimes">
|
||||
<el-input v-model.number="form.watchTimes" placeholder="请输入观看数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="是否启用" prop="status">
|
||||
<el-switch
|
||||
v-model="form.status"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="submit('ruleForm')"> 确 定 </el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { tagAdd, tagUpdate } from '@/api/atlas/index.js'
|
||||
export default {
|
||||
name: 'AddOrEdit',
|
||||
props: ['data'],
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
title: '',
|
||||
// 表单数据
|
||||
form: {
|
||||
cover: undefined, // "string",
|
||||
name: undefined, // "string",
|
||||
rank: undefined, // 0,
|
||||
status: undefined, // true,
|
||||
watchTimes: undefined // 0
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.title = this.data.title
|
||||
if (this.title === '编辑') {
|
||||
this.form = { ...this.data.data }
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
add(data) {
|
||||
tagAdd(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('新增成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('新增失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
update(data) {
|
||||
tagUpdate(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交按钮
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.title === '新增') {
|
||||
this.add(this.form)
|
||||
} else if (this.title === '编辑') {
|
||||
this.update(this.form)
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<div class="pf-warpper avlist">
|
||||
<el-row class="table-form">
|
||||
<el-form :inline="true" :model="searchData" class="form-inline" 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.name" @clear="onClear('name')" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select placeholder="请选择是否启用" clearable v-model="searchData.status" @clear="onClear('status')">
|
||||
<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.sort" @clear="onClear('sort')">
|
||||
<el-option label="rank排序" :value="0" />
|
||||
<el-option label="观看次数排序" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch" icon="el-icon-search" plain type="primary">搜索</el-button>
|
||||
<el-button @click="add" icon="el-icon-circle-plus-outline" plain type="success">新增</el-button>
|
||||
<el-button @click="getList" icon="el-icon-refresh" plain type="info">刷新</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-table
|
||||
:data="resData"
|
||||
element-loading-text="拼命加载中"
|
||||
border
|
||||
height="750"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
v-loading="loading">
|
||||
<el-table-column align="center" label="标签ID" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.id }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="标签名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="标签排序" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.rank }}</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="标签封面">
|
||||
<template slot-scope="scope">
|
||||
<ShowImg style="width: 104px; height: 70px; margin: 0 auto" :urls="scope.row.cover"></ShowImg>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" label="观看次数" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.watchTimes }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否展示" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.status ? 'success' : 'danger'" plain size="mini">{{
|
||||
scope.row.status ? '已启用' : '未启用'
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创建时间" width="180">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.createdAt | BeiJingTime
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="更新时间" width="180">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.updatedAt | BeiJingTime
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="180">
|
||||
<template slot-scope="scope">
|
||||
<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="editVisible" @close="closeEdit" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 引入模块
|
||||
import Edit from './components/AddOrEdit'
|
||||
import { tagList, tagDel } from '@/api/atlas/index.js'
|
||||
export default {
|
||||
name: 'AtlasLabel',
|
||||
components: {
|
||||
Edit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 请求列表参数
|
||||
searchData: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
name: undefined, // "string",
|
||||
status: undefined // true
|
||||
},
|
||||
resData: [], // el-table表格数据
|
||||
editVisible: false, // 新增或编辑弹出框
|
||||
total: 0, // 数据总条数
|
||||
loading: false, // 列表加载状态
|
||||
|
||||
// 编辑数据
|
||||
editData: {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// TODO:请求漫画标签列表数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
tagList(this.searchData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.resData = res.data.list
|
||||
this.total = res.data.count
|
||||
} else {
|
||||
this.$message.error('请求列表失败!')
|
||||
this.resData = []
|
||||
this.total = 0
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// TODO:删除漫画标签列表数据
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
tagDel({ id: row.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.getList()
|
||||
this.$message.success('成功删除!')
|
||||
} else {
|
||||
this.$message.error(res.tip)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.searchData.pageNum = 1
|
||||
this.searchData.pageSize = 50
|
||||
this.getList()
|
||||
},
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val
|
||||
this.getList()
|
||||
},
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.pageNum = val
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 新增按钮
|
||||
add() {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
// 编辑按钮
|
||||
handleEdit(index, row) {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '编辑',
|
||||
data: row
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
this.editVisible = false
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 清空某一项筛选列表
|
||||
onClear(key) {
|
||||
this.searchData[key] = undefined
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="Visible" width="1100px" center class="ac-dialog" :close-on-click-modal="false" @close="close">
|
||||
<el-form :inline="true" :model="form" :rules="rules" ref="ruleForm" class="demo-form-inline" label-width="80px" label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="封面">
|
||||
<UploadImg @changeImgUrl="changeCoverUrl" :img="form.cover" @onRemove="handleRemove('cover')"></UploadImg>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="写真名称">
|
||||
<el-input v-model="form.name" placeholder="请输入写真名称" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="排序">
|
||||
<el-input v-model.number="form.rank" placeholder="请输入排序" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="写真分类">
|
||||
<el-select placeholder="请选择写真分类" v-model="form.categoryId" style="width: 180px">
|
||||
<el-option :label="item.name" :value="item.id" v-for="(item, index) in atlasClassifyList" :key="index" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="写真主题">
|
||||
<el-select placeholder="请选择写真主题" v-model="form.topicId" multiple style="width: 180px">
|
||||
<el-option :label="item.name" :value="item.id" v-for="(item, index) in photoToipcList" :key="index" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="内容分类">
|
||||
<el-select placeholder="请选择内容分类" v-model="form.pictureType" style="width: 180px">
|
||||
<el-option label="图片" :value="0" />
|
||||
<el-option label="GIF" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="评分">
|
||||
<el-input v-model.number="form.photoScore" placeholder="请输入评分" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="form.status" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input v-model.number="form.price" placeholder="请输入价格" style="width: 180px">
|
||||
<template
|
||||
slot="append">钻石</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="背景">
|
||||
<UploadImg @changeImgUrl="changeBackUrl" :img="form.backgroud" @onRemove="handleRemove('backgroud')"> </UploadImg>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='8'>
|
||||
<el-form-item label="是否Vip">
|
||||
<el-switch v-model="form.isVip" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='16'>
|
||||
<el-form-item label="写真描述">
|
||||
<el-input v-model="form.desc" placeholder="请输入排序" style="width: 480px" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<el-form-item label="写真">
|
||||
<UploadImgArr @changeImgUrl="changePicturesUrl" :img="form.pictures" style="width: 950px"></UploadImgArr>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TagSelectV2 type="atlas" @selectTags="selectTags" :formTags="form.tags" :mediatagCategory="[]" :allTags="tagList" />
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="submit('ruleForm')"> 确 定 </el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { photoAdd, photoUpdate } from '@/api/atlas/index.js'
|
||||
import UploadImg from '@/components/UploadImg/index'
|
||||
import UploadImgArr from '@/components/UploadImgArr/index'
|
||||
import { changeMoneyFen, changeMoneyYuan } from '@/filters'
|
||||
import TagSelectV2 from '@/components/TagSelectV2/index'
|
||||
export default {
|
||||
name: 'AddOrEdit',
|
||||
props: ['data', 'atlasClassifyList', 'photoTopicListAll', 'tagList'],
|
||||
components: {
|
||||
UploadImg,
|
||||
UploadImgArr,
|
||||
TagSelectV2
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tagsList: [],
|
||||
chooseMediatag: [],
|
||||
showTagsFlag: false,
|
||||
ActressList: this.$store.getters.getActressList,
|
||||
Visible: true,
|
||||
title: '',
|
||||
// 表单数据
|
||||
form: {
|
||||
backgroud: undefined, // 背景
|
||||
cover: undefined, // "string",封面
|
||||
isVip: undefined, // [],是否需要VIp
|
||||
name: undefined, // 写真名称
|
||||
photoScore: undefined, // 评分
|
||||
pictures: undefined, // [],写真集
|
||||
price: undefined, // [],价格
|
||||
rank: undefined, // 0,排序
|
||||
status: undefined, // true,是否启用
|
||||
topicId: [], // [],写真专题
|
||||
categoryId: undefined, // 分类ID
|
||||
pictureType: undefined, // 图片类型 0:静态图片 1:动图gif
|
||||
tags: [], // 标签
|
||||
desc: '' // 描述
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.title = this.data.title
|
||||
if (this.title === '编辑') {
|
||||
const data = { ...this.data.data }
|
||||
data.price = changeMoneyYuan(data.price)
|
||||
this.form = data
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
photoToipcList() {
|
||||
const arr = []
|
||||
if (this.form.categoryId) {
|
||||
this.photoTopicListAll.map(item => {
|
||||
})
|
||||
}
|
||||
return arr
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectTags(tags) {
|
||||
this.form.tags = tags
|
||||
},
|
||||
|
||||
handleRemove(key) {
|
||||
this.form[key] = ''
|
||||
},
|
||||
// 修改封面
|
||||
changeCoverUrl(data) {
|
||||
this.form.cover = data
|
||||
},
|
||||
// 上传图片返回地址
|
||||
changePicturesUrl(data) {
|
||||
this.form.pictures = data
|
||||
},
|
||||
// 修改背景图
|
||||
changeBackUrl(data) {
|
||||
this.form.backgroud = data
|
||||
},
|
||||
// 提交按钮
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate(valid => {
|
||||
if (valid) {
|
||||
const param = JSON.parse(JSON.stringify(this.form))
|
||||
param.rank = param.rank ? Number(param.rank) : 0
|
||||
param.price = changeMoneyFen(this.form.price)
|
||||
let data
|
||||
if (this.title === '新增') {
|
||||
data = param
|
||||
this.add(data)
|
||||
} else if (this.title === '编辑') {
|
||||
data = {
|
||||
id: param.id,
|
||||
param: param
|
||||
}
|
||||
this.update(data)
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:新增写真列表数据
|
||||
add(data) {
|
||||
photoAdd(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('新增成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('新增失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:编辑写真列表数据
|
||||
update(data) {
|
||||
photoUpdate(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,126 @@
|
||||
<!--
|
||||
* @Date: 2024-08-20 20:14:48
|
||||
* @LastEditors: Administrator admin@example.com
|
||||
* @LastEditTime: 2024-12-26 15:40:35
|
||||
* @FilePath: /aiqi_admin/src/views/atlas/atlasList/components/batch.vue
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="Visible"
|
||||
width="1100px"
|
||||
center
|
||||
class="ac-dialog"
|
||||
:close-on-click-modal="false"
|
||||
@close="close">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
class="demo-form-inline"
|
||||
label-width="120px"
|
||||
label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="写真分类">
|
||||
<el-select placeholder="请选择写真分类" v-model="form.categoryId" style="width: 180px">
|
||||
<el-option :label="item.name" :value="item.id" v-for="(item, index) in atlasClassifyList" :key="index" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否Vip">
|
||||
<el-switch v-model="form.isVip" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input v-model.number="form.price" placeholder="请输入价格" style="width: 180px">
|
||||
<template slot="append">钻石</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="form.status" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TagSelectV2 type="atlas" @selectTags="selectTags" :formTags="form.tags" :mediatagCategory="[]" :allTags="tagList" />
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="submit"> 确 定 </el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { photoBathUpdate } from '@/api/atlas/index'
|
||||
import TagSelectV2 from '@/components/TagSelectV2/index'
|
||||
export default {
|
||||
name: 'Batch',
|
||||
props: ['data', 'atlasClassifyList', 'tagList'],
|
||||
components: {
|
||||
TagSelectV2
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tagsList: [],
|
||||
Visible: true,
|
||||
title: '',
|
||||
// 表单数据
|
||||
form: {
|
||||
categoryId: undefined,
|
||||
isVip: undefined,
|
||||
price: undefined,
|
||||
status: undefined,
|
||||
tags: []
|
||||
},
|
||||
//
|
||||
dates: [],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
selectTags(tags) {
|
||||
this.form.tags = tags
|
||||
},
|
||||
// 提交按钮
|
||||
submit() {
|
||||
if (this.data.length) {
|
||||
const param = JSON.parse(JSON.stringify(this.form))
|
||||
param.ids = []
|
||||
this.data.forEach(item => {
|
||||
param.ids.push(item.id)
|
||||
})
|
||||
photoBathUpdate(param).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '修改成功'
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '未选择视频'
|
||||
})
|
||||
}
|
||||
this.Visible = false
|
||||
},
|
||||
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,369 @@
|
||||
<template>
|
||||
<div class="pf-warpper avlist">
|
||||
<el-row class="table-form">
|
||||
<el-form :inline="true" :model="searchData" class="form-inline" size="mini">
|
||||
<el-form-item>
|
||||
<el-select clearable placeholder="请选择内容分类" v-model="searchData.pictureType" @clear="onClear('pictureType')">
|
||||
<el-option label="图片" :value="0" />
|
||||
<el-option label="GIF" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select
|
||||
clearable
|
||||
placeholder="请选择写真分类"
|
||||
filterable
|
||||
remote
|
||||
v-model="searchData.categoryId"
|
||||
@clear="onClear('categoryId')">
|
||||
<el-option :label="item.name" :value="item.id" v-for="(item, index) in atlasClassifyList" :key="index" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select
|
||||
clearable
|
||||
placeholder="请选择写真主题"
|
||||
filterable
|
||||
remote
|
||||
v-model="searchData.topicId"
|
||||
@clear="onClear('topicId')">
|
||||
<el-option :label="item.name" :value="item.id" v-for="(item, index) in photoToipcList" :key="index" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch" icon="el-icon-search" plain type="primary">搜索</el-button>
|
||||
<el-button @click="add" icon="el-icon-circle-plus-outline" plain type="success">新增</el-button>
|
||||
<el-button @click="batch" icon="el-icon-edit-outline" plain type="warning">批量设置图集</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-table
|
||||
:data="resData"
|
||||
element-loading-text="拼命加载中"
|
||||
border
|
||||
height="750"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
v-loading="loading"
|
||||
:row-style="{ height: '70px' }"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" fixed="left"> </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="写真ID">
|
||||
<template slot-scope="scope">{{ scope.row.id }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="写真名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="写真分类">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.categoryId | changeName(atlasClassifyList, 'id', 'name') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="写真主题">
|
||||
<template slot-scope="scope">{{ scope.row.topicId | changeName(photoTopicListAll, 'id', 'name')
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="写真标签" width="300px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :key="index" v-for="(item, index) in scope.row.tags" type="primary">{{item | changeName(tagList, 'id', 'name')}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="写真描述">
|
||||
<template slot-scope="scope">{{ scope.row.desc }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="写真演员ID">
|
||||
<template slot-scope="scope">{{ scope.row.actorId }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="写真用户ID">
|
||||
<template slot-scope="scope">{{ scope.row.userId }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否Vip">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.isVip ? 'success' : 'danger'" plain size="mini">{{
|
||||
scope.row.isVip ? '是' : '否'
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="评分">
|
||||
<template slot-scope="scope">{{ scope.row.photoScore }}</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">
|
||||
<ShowImg style="width: 70px; height: 40px; margin: 0 auto" :urls="scope.row.cover"></ShowImg>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="背景">
|
||||
<template slot-scope="scope">
|
||||
<ShowImg style="width: 70px; height: 40px; margin: 0 auto" :urls="scope.row.backgroud"></ShowImg>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="图集">
|
||||
<template slot-scope="scope">
|
||||
<ShowImg style="width: 70px; height: 40px; margin: 0 auto" :urls="scope.row.pictures"></ShowImg>
|
||||
</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.topicId" type="success">{{
|
||||
item | changeValuetoLabel(atlasClassifyList)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="center" label="是否推荐" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.recommend ? 'success' : 'danger'" plain size="mini">{{
|
||||
scope.row.recommend ? '推荐' : '未推荐'
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否启用" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.status ? 'success' : 'danger'" plain size="mini">{{
|
||||
scope.row.status ? '已启用' : '未启用'
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创建时间" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.createdAt | BeiJingTime }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="更新时间" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.updatedAt | BeiJingTime }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<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="editVisible"
|
||||
:atlasClassifyList="atlasClassifyList"
|
||||
:photoTopicListAll="photoTopicListAll"
|
||||
:tagList="tagList"
|
||||
@close="closeEdit" />
|
||||
<Batch :tagList="tagList" :data="selectBatch" :atlasClassifyList="atlasClassifyList" v-if="batchVisible" @close="closeEdit">
|
||||
</Batch>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 引入模块
|
||||
import Edit from './components/AddOrEdit'
|
||||
import Batch from './components/batch'
|
||||
import { photoList, photoDel, classifyList } from '@/api/atlas/index.js'
|
||||
import ShowImg from '@/components/ShowImg/index.vue'
|
||||
import { topicSearch } from '@/api/videoManagement/topic'
|
||||
import { tagList } from '@/api/atlas/index.js'
|
||||
export default {
|
||||
name: 'PhotoManagement',
|
||||
components: {
|
||||
Edit,
|
||||
ShowImg,
|
||||
Batch
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
ActressList: [],
|
||||
atlasClassifyList: [],
|
||||
tagList: [], // 标签列表
|
||||
photoTopicListAll: [],
|
||||
// 请求列表参数
|
||||
searchData: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
categoryId: undefined,
|
||||
topicId: undefined
|
||||
},
|
||||
resData: [], // el-table表格数据
|
||||
editVisible: false, // 新增或编辑弹出框
|
||||
total: 0, // 数据总条数
|
||||
loading: true, // 列表加载状态
|
||||
// 编辑数据
|
||||
editData: {
|
||||
title: '新增',
|
||||
data: {}
|
||||
},
|
||||
selectBatch: [],
|
||||
batchVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
photoToipcList() {
|
||||
const arr = this.photoTopicListAll.filter(item => {
|
||||
if (item && item.categoryId) {
|
||||
return item.categoryId === this.searchData.categoryId
|
||||
}
|
||||
})
|
||||
return arr
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.getPhotoList()
|
||||
await this.getCategoryList()
|
||||
await this.getTopicList()
|
||||
await this.gettagList()
|
||||
},
|
||||
methods: {
|
||||
// 批量设置
|
||||
batch() {
|
||||
this.batchVisible = true
|
||||
},
|
||||
// 批量选择
|
||||
handleSelectionChange(val) {
|
||||
this.selectBatch = val
|
||||
},
|
||||
|
||||
// TODO:请求写真列表数据
|
||||
getPhotoList() {
|
||||
this.loading = true
|
||||
photoList(this.searchData).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.resData = res.data.list
|
||||
this.total = res.data.total
|
||||
} else {
|
||||
this.$message.error('请求列表失败!')
|
||||
this.resData = []
|
||||
this.total = 0
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// TODO:请求写真分类列表数据
|
||||
async getCategoryList() {
|
||||
const param = {
|
||||
pageNum: 1,
|
||||
pageSize: 500
|
||||
}
|
||||
await classifyList(param).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.atlasClassifyList = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求写真分类列表失败!')
|
||||
this.atlasClassifyList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:请求写真主题列表数据
|
||||
async getTopicList() {
|
||||
const param = {
|
||||
pageNum: 1,
|
||||
pageSize: 500
|
||||
}
|
||||
await topicSearch(param).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.photoTopicListAll = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求写真主题列表失败!')
|
||||
this.photoTopicListAll = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取标签
|
||||
gettagList(val) {
|
||||
this.chooseMediatag = []
|
||||
const param = {
|
||||
pageNum: 1,
|
||||
pageSize: 500
|
||||
}
|
||||
tagList(param).then(res => {
|
||||
if (res.data.list) {
|
||||
this.tagList = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求标签列表失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:删除写真列表数据
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
photoDel({ id: row.id }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.getPhotoList()
|
||||
this.$message.success('成功删除!')
|
||||
} else {
|
||||
this.$message.error(res.tip)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onSearch() {
|
||||
this.searchData.pageNum = 1
|
||||
this.searchData.pageSize = 10
|
||||
this.getPhotoList()
|
||||
},
|
||||
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val
|
||||
this.getPhotoList()
|
||||
},
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.pageNum = val
|
||||
this.getPhotoList()
|
||||
},
|
||||
|
||||
// 新增按钮
|
||||
add() {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
// 编辑按钮
|
||||
handleEdit(index, row) {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '编辑',
|
||||
data: row
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
this.batchVisible = false
|
||||
this.editVisible = false
|
||||
this.getPhotoList()
|
||||
},
|
||||
// 清空某一项筛选列表
|
||||
onClear(key) {
|
||||
this.searchData[key] = undefined
|
||||
this.getPhotoList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,161 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="Visible"
|
||||
width="1100px"
|
||||
center
|
||||
class="ac-dialog"
|
||||
:close-on-click-modal="false"
|
||||
@close="close">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="ruleForm"
|
||||
class="demo-form-inline"
|
||||
label-width="100px"
|
||||
label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="封面图">
|
||||
<UploadImg @changeImgUrl="changeCoverImgUrl" :img="form.coverImg"></UploadImg>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="主题名称">
|
||||
<el-input v-model="form.name" placeholder="请输入主题名称" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="排序">
|
||||
<el-input v-model.number="form.rank" placeholder="请输入排序" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="主题所属分类">
|
||||
<el-select placeholder="请选择主题所属分类" v-model="form.categoryId" filterable allow-create default-first-option>
|
||||
<el-option :key="item.value" :label="item.name" :value="item.id" v-for="item in categoryList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="展示方式">
|
||||
<el-select placeholder="请选择展示方式" v-model="form.showType">
|
||||
<el-option :key="item.value" :label="item.name" :value="item.value" v-for="item in showTypeList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="虚拟图片数量">
|
||||
<el-input v-model.number="form.photoCount" placeholder="请输入虚拟图片数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="虚拟观看次数">
|
||||
<el-input v-model.number="form.watchTimes" placeholder="请输入虚拟观看次数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态">
|
||||
<el-switch v-model="form.status" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="主题描述">
|
||||
<el-input v-model="form.desc" placeholder="请输入主题描述" style="width: 400px" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<TagSelectV2 type="atlas" @selectTags="selectTags" :formTags="form.tagIds" :mediatagCategory="[]" :allTags="tagList" />
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="submit('ruleForm')"> 确 定 </el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { photoTopicAdd, photoTopicUpdate } from '@/api/atlas/index.js'
|
||||
import UploadImg from '@/components/UploadImg/index'
|
||||
import TagSelectV2 from '@/components/TagSelectV2/index'
|
||||
export default {
|
||||
name: 'AddOrEdit',
|
||||
props: ['data', 'categoryList', 'showTypeList', 'tagList'],
|
||||
components: { UploadImg, TagSelectV2 },
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
title: '',
|
||||
// 表单数据
|
||||
form: {
|
||||
categoryId: undefined, // 分类ID
|
||||
coverImg: undefined, // 封面
|
||||
desc: undefined, // 描述
|
||||
name: undefined, // 专题名称
|
||||
photoCount: undefined, // 图片数量
|
||||
rank: undefined, // 排序
|
||||
showType: undefined, // 展示方式
|
||||
status: undefined, // 是否启用
|
||||
watchTimes: undefined, // 观看次数
|
||||
tagIds: []
|
||||
},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.title = this.data.title
|
||||
if (this.title === '编辑') {
|
||||
this.form = { ...this.data.data }
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectTags(tags) {
|
||||
this.form.tagIds = tags
|
||||
},
|
||||
add(data) {
|
||||
photoTopicAdd(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('新增成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('新增失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
update(data) {
|
||||
photoTopicUpdate(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交按钮
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.title === '新增') {
|
||||
this.add(this.form)
|
||||
} else if (this.title === '编辑') {
|
||||
this.update(this.form)
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
changeCoverImgUrl(data) {
|
||||
this.form.coverImg = data
|
||||
},
|
||||
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,279 @@
|
||||
<template>
|
||||
<div class="pf-warpper avlist">
|
||||
<el-row class="table-form">
|
||||
<el-form :inline="true" :model="searchData" class="form-inline" 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.name" @clear="onClear('name')" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select placeholder="请选择是否启用" clearable v-model="searchData.status" @clear="onClear('status')">
|
||||
<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.sort" @clear="onClear('sort')">
|
||||
<el-option label="rank排序" :value="0" />
|
||||
<el-option label="创建时间" :value="1" />
|
||||
<el-option label="观看数量" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="onSearch" icon="el-icon-search" plain type="primary">搜索</el-button>
|
||||
<el-button @click="add" icon="el-icon-circle-plus-outline" plain type="success">新增</el-button>
|
||||
<el-button @click="getList" icon="el-icon-refresh" plain type="info">刷新</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-table
|
||||
:data="resData"
|
||||
element-loading-text="拼命加载中"
|
||||
border
|
||||
height="750"
|
||||
highlight-current-row
|
||||
style="width: 100%"
|
||||
v-loading="loading">
|
||||
<el-table-column align="center" label="专题ID" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.id }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="专题名称" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="专题排序" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.rank }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="主题描述" width="400" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.desc }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="标签" width="400">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :key="index" v-for="(item, index) in scope.row.tagIds" size="mini">
|
||||
{{ item|changeName(tagList,'id','name') }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否展示" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.status ? 'success' : 'danger'" plain size="mini">{{
|
||||
scope.row.status ? '已启用' : '未启用'
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="封面图" width="100px">
|
||||
<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">
|
||||
{{ scope.row.categoryId | changeName(categoryList, 'id', 'name') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="展示方式" width="180">
|
||||
<template slot-scope="scope">{{ scope.row.showType|changeName(showTypeList,'value','name') }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="虚拟观看次数" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.watchTimes }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="虚拟图片数量" width="80">
|
||||
<template slot-scope="scope">{{ scope.row.photoCount }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="创建时间" width="180">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.createdAt | BeiJingTime
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="更新时间" width="180">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.updatedAt | BeiJingTime
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" width="180">
|
||||
<template slot-scope="scope">
|
||||
<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 :tagList="tagList" :data="editData" :showTypeList="showTypeList" :categoryList="categoryList" v-if="editVisible" @close="closeEdit" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 引入模块
|
||||
import Edit from './components/AddOrEdit'
|
||||
import ShowImg from '@/components/ShowImg/index.vue'
|
||||
import { photoTopicList, photoTopicDel } from '@/api/atlas/index.js'
|
||||
import { classifyList } from '@/api/atlas/index.js'
|
||||
import { tagList } from '@/api/atlas/index.js'
|
||||
export default {
|
||||
name: 'AtlasLabel',
|
||||
components: {
|
||||
Edit, ShowImg
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 请求列表参数
|
||||
searchData: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
name: undefined, // "string",
|
||||
status: undefined // true
|
||||
},
|
||||
resData: [], // el-table表格数据
|
||||
editVisible: false, // 新增或编辑弹出框
|
||||
total: 0, // 数据总条数
|
||||
loading: false, // 列表加载状态
|
||||
showTypeList: [
|
||||
{ name: '五宫格', value: 1 },
|
||||
{ name: '四宫格', value: 2 },
|
||||
{ name: '大列表', value: 3 }
|
||||
],
|
||||
categoryList: [],
|
||||
tagList: [],
|
||||
|
||||
// 编辑数据
|
||||
editData: {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.getTagList()
|
||||
this.getClassifyList()
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// TODO:请求图集标签列表数据
|
||||
getTagList() {
|
||||
tagList({ pageNum: 1, pageSize: 500 }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.tagList = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求标签列表失败!')
|
||||
this.tagList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:请求图集分类列表数据
|
||||
getClassifyList() {
|
||||
classifyList({ pageNum: 1, pageSize: 100 }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.categoryList = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求图集分类列表失败!')
|
||||
this.categoryList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:请求漫画标签列表数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
photoTopicList(this.searchData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.resData = res.data.list
|
||||
this.total = res.data.count
|
||||
} else {
|
||||
this.$message.error('请求列表失败!')
|
||||
this.resData = []
|
||||
this.total = 0
|
||||
}
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// TODO:删除漫画标签列表数据
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
photoTopicDel({ id: row.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.getList()
|
||||
this.$message.success('成功删除!')
|
||||
} else {
|
||||
this.$message.error(res.tip)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onSearch() {
|
||||
this.searchData.pageNum = 1
|
||||
this.searchData.pageSize = 50
|
||||
this.getList()
|
||||
},
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val
|
||||
this.getList()
|
||||
},
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.pageNum = val
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 新增按钮
|
||||
add() {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
// 编辑按钮
|
||||
handleEdit(index, row) {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '编辑',
|
||||
data: row
|
||||
}
|
||||
},
|
||||
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.editData = {
|
||||
title: '新增',
|
||||
data: {}
|
||||
}
|
||||
this.editVisible = false
|
||||
this.getList()
|
||||
},
|
||||
|
||||
// 清空某一项筛选列表
|
||||
onClear(key) {
|
||||
this.searchData[key] = undefined
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -287,7 +287,7 @@ layout="total, sizes, prev, pager, next, jumper" />
|
||||
<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" />
|
||||
<!-- <EditCom :data="editData" v-if="editComVisible" :objectype="5" @close="closeEdit" /> -->
|
||||
<AddTags :data="selectBatch" v-if="tagsVisible" @close="closeEdit" />
|
||||
<Bach :data="selectBatch" v-if="batchVisible" @close="closeEdit" />
|
||||
</div>
|
||||
@@ -307,7 +307,7 @@ import Edit from './components/AddOrEdit'
|
||||
import Bach from './components/Bach'
|
||||
import SetTag from './components/setTag'
|
||||
import DelTag from './components/delTag'
|
||||
import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
||||
// import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
||||
import AddTags from './components/addTags'
|
||||
export default {
|
||||
name: 'Comics',
|
||||
@@ -316,7 +316,7 @@ export default {
|
||||
ShowImg,
|
||||
ChapterList,
|
||||
SetTag,
|
||||
EditCom,
|
||||
// EditCom,
|
||||
AddTags,
|
||||
DelTag,
|
||||
Bach
|
||||
|
||||
@@ -257,7 +257,7 @@
|
||||
<ChapterList :data="editData" v-if="chapterListVisible" @close="closeEdit" />
|
||||
<SetTag :data="selectBatch" v-if="setTagVisible" @close="closeEdit"></SetTag>
|
||||
<EditCom :data="editData" v-if="editComVisible" :objectype="6" @close="closeEdit" />
|
||||
<AddTags :data="selectBatch" v-if="tagsVisible" @close="closeEdit" />
|
||||
<!-- <AddTags :data="selectBatch" v-if="tagsVisible" @close="closeEdit" /> -->
|
||||
<AddTotal :data="editData" v-if="addTotalVisible" @close="closeEdit" />
|
||||
<Batch :data="selectBatch" v-if="batchVisible" @close="closeEdit"></Batch>
|
||||
</div>
|
||||
@@ -271,7 +271,7 @@ import ChapterList from './components/chapterList'
|
||||
import ShowImg from '@/components/ShowImg/index.vue'
|
||||
import Edit from './components/AddOrEdit'
|
||||
import SetTag from './components/setTag'
|
||||
import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
||||
// import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
||||
import AddTags from './components/addTags'
|
||||
import Batch from './components/batch'
|
||||
import AddTotal from './components/addTotal'
|
||||
@@ -283,7 +283,7 @@ export default {
|
||||
ShowImg,
|
||||
ChapterList,
|
||||
SetTag,
|
||||
EditCom,
|
||||
// EditCom,
|
||||
AddTags,
|
||||
AddTotal,
|
||||
Batch
|
||||
|
||||
@@ -279,7 +279,7 @@ style="
|
||||
<Audit :data="editData" v-if="auditVisible" @close="closeEdit"></Audit>
|
||||
<ShowVideo ref="showvideo"></ShowVideo>
|
||||
<Edit :allPostTags="allPostTags" :postDiscussList="postDiscussList" :data="editData" v-if="editVisible" :circleList="circleList" :infoCategoryList="infoCategoryList" @close="closeEdit" />
|
||||
<EditCom :objectype="8" :data="editData" v-if='editComVisible' @close="closeEdit" />
|
||||
<!-- <EditCom :objectype="8" :data="editData" v-if='editComVisible' @close="closeEdit" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -288,7 +288,7 @@ import Edit from './components/AddOrEdit'
|
||||
import ShowImg from '@/components/ShowImg/index.vue'
|
||||
import Audit from './components/auditEdit'
|
||||
import ShowVideo from '@/components/ShowVideo/index.vue'
|
||||
import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
||||
// import EditCom from '@/views/videoManagement/videoList/components/videoComment.vue'
|
||||
import {
|
||||
infomationSearch,
|
||||
infomationDel,
|
||||
@@ -305,7 +305,7 @@ export default {
|
||||
Edit,
|
||||
ShowImg,
|
||||
ShowVideo,
|
||||
EditCom,
|
||||
// EditCom,
|
||||
Audit
|
||||
},
|
||||
filters: {},
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="Visible" width="1200px" top="50px" center class="ac-dialog" :close-on-click-modal="false" @close="close">
|
||||
<el-form :inline="true" :model="form" :rules="rules" class="demo-form-inline" label-width="120px" label-position="right" style="" ref="ruleForm">
|
||||
<el-dialog :title="title" :visible.sync="Visible" width="1200px" top="50px" center class="ac-dialog"
|
||||
:close-on-click-modal="false" @close="close">
|
||||
<el-form :inline="true" :model="form" :rules="rules" class="demo-form-inline" label-width="120px"
|
||||
label-position="right" style="" ref="ruleForm">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="标题">
|
||||
@@ -24,10 +26,16 @@
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="视频类型">
|
||||
<el-select placeholder="请选择视频类型" v-model="form.contentType" clearable @change="changeContentType">
|
||||
<el-option :key="index" :label="item.label" :value="item.value" v-for="(item, index) in contentTypeList" />
|
||||
<el-option :key="index" :label="item.label" :value="item.value"
|
||||
v-for="(item, index) in contentTypeList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="绑定女优ID">
|
||||
<el-input v-model="form.actorIds" style="width: 220px" placeholder="多个女优用英文逗号隔开" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
@@ -40,7 +48,8 @@
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="所属视频合集">
|
||||
<el-select placeholder="请选择所视频合集" v-model="form.collectionId" filterable allow-create default-first-option multiple>
|
||||
<el-select placeholder="请选择所视频合集" v-model="form.collectionId" filterable allow-create default-first-option
|
||||
multiple>
|
||||
<el-option :key="index" :label="item.name" :value="item.id" v-for="(item, index) in mediaCollList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -65,7 +74,8 @@
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="圈子">
|
||||
<el-select style="width: 163px" placeholder="请选择圈子" v-model="form.circleId" filterable>
|
||||
<el-option :key="index + item.name" :label="item.name" :value="item.id" v-for="(item, index) in circleList" />
|
||||
<el-option :key="index + item.name" :label="item.name" :value="item.id"
|
||||
v-for="(item, index) in circleList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -74,11 +84,6 @@
|
||||
<el-input v-model.number="form.rank" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="预览时长">
|
||||
<el-input v-model.number="form.preTime" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="24">
|
||||
@@ -92,26 +97,17 @@
|
||||
<el-input v-model.number="form.fake.likes" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">-->
|
||||
<!-- <el-form-item label="虚拟评论数">-->
|
||||
<!-- <el-input v-model.number="form.fake.comments" style="width: 180px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">-->
|
||||
<!-- <el-form-item label="虚拟售卖数">-->
|
||||
<!-- <el-input v-model.number="form.fake.sells" style="width: 180px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">-->
|
||||
<!-- <el-form-item label="虚拟分享数">-->
|
||||
<!-- <el-input v-model.number="form.fake.shares" style="width: 180px" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="预览时间">
|
||||
<el-input v-model.number="form.preTime" style="width: 180px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="16" :sm="16" :md="16" :lg="16" :xl="16">
|
||||
<el-form-item label="详细描述">
|
||||
<el-input v-model="form.desc" type="textarea" :autosize="{ minRows: 6, maxRows: 10 }" style="width: 590px" />
|
||||
<el-input v-model="form.desc" type="textarea" :autosize="{ minRows: 6, maxRows: 10 }"
|
||||
style="width: 590px" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
@@ -121,17 +117,32 @@
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="是否是vip">
|
||||
<el-switch v-model="form.isVip" active-color="#13ce66" inactive-color="#ff4949" style="width: 180px"></el-switch>
|
||||
<el-switch v-model="form.isVip" active-color="#13ce66" inactive-color="#ff4949"
|
||||
style="width: 180px"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="是否热搜">
|
||||
<el-switch v-model="form.isHotSearches" active-color="#13ce66" inactive-color="#ff4949" style="width: 180px"></el-switch>
|
||||
<el-switch v-model="form.isHotSearches" active-color="#13ce66" inactive-color="#ff4949"
|
||||
style="width: 180px"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="是否精选">
|
||||
<el-switch v-model="form.isRecomend" active-color="#13ce66" inactive-color="#ff4949" style="width: 180px"></el-switch>
|
||||
<el-switch v-model="form.isRecomend" active-color="#13ce66" inactive-color="#ff4949"
|
||||
style="width: 180px"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="是否专属">
|
||||
<el-switch v-model="form.isExclusive" active-color="#13ce66" inactive-color="#ff4949"
|
||||
style="width: 180px"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="是否原创">
|
||||
<el-switch v-model="form.isOriginal" active-color="#13ce66" inactive-color="#ff4949"
|
||||
style="width: 180px"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -140,7 +151,8 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
|
||||
<el-form-item label="所属主题">
|
||||
<el-select placeholder="请选择所属主题" v-model="form.topicIds" filterable allow-create default-first-option multiple @change="selectTopic">
|
||||
<el-select placeholder="请选择所属主题" v-model="form.topicIds" filterable allow-create default-first-option
|
||||
multiple @change="selectTopic">
|
||||
<el-option :key="index" :label="item.name" :value="item.id" v-for="(item, index) in chooseVideoType" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -160,7 +172,8 @@
|
||||
</el-row>
|
||||
<!-- 标签 -->
|
||||
<el-divider content-position="center">标签绑定设置</el-divider>
|
||||
<TagSelectV2 type="resourceManagement" ref="TagSelect" @selectTags="selectTags" :formTags="form.tags" :mediatagCategory="newMediatagCategory" :allTags="allMediaList" />
|
||||
<TagSelectV2 type="resourceManagement" @selectTags="selectTags" :formTags="form.tags"
|
||||
:mediatagCategory="newMediatagCategory" :allTags="allMediaList" />
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消</el-button>
|
||||
@@ -182,7 +195,7 @@ import TagSelectV2 from '@/components/TagSelectV2/index'
|
||||
|
||||
export default {
|
||||
name: 'AddOrEdit',
|
||||
props: ['data', 'videoType', 'actorList', 'circleList', 'mediaCollList', 'mediatagCategory'],
|
||||
props: ['data', 'videoType', 'circleList', 'mediaCollList', 'mediatagCategory'],
|
||||
components: {
|
||||
UploadImg,
|
||||
AddVideo,
|
||||
@@ -223,7 +236,9 @@ export default {
|
||||
id: undefined, // 0,视频Id
|
||||
isHotSearches: undefined,
|
||||
isRecomend: undefined,
|
||||
collectionId: [] // 合集id
|
||||
collectionId: [], // 合集id
|
||||
preTime: undefined,
|
||||
actorIds: undefined // 绑定的女优
|
||||
},
|
||||
rules: {},
|
||||
searchTagTxt: '' // 本地标签搜索
|
||||
@@ -234,6 +249,7 @@ export default {
|
||||
this.title = this.data.title
|
||||
if (this.title === '编辑') {
|
||||
this.form = { ...this.data.data }
|
||||
if (Array.isArray(this.form.actorIds)) this.form.actorIds = this.form.actorIds.join(',');
|
||||
this.form.price = Number(changeMoneyYuan(this.form.price))
|
||||
this.form.mediaSet = arryToString(this.form.mediaSet)
|
||||
this.form.sortTime = moment(this.data.data.sortTime).utcOffset(480).format('YYYY-MM-DDTHH:mm:ss') + '+08:00'
|
||||
@@ -344,6 +360,7 @@ export default {
|
||||
id: this.form.id,
|
||||
param: JSON.parse(JSON.stringify(this.form))
|
||||
}
|
||||
if (data.param.actorIds) data.param.actorIds = data.param.actorIds.split(',').map(Number);
|
||||
data.param.mediaSet = data.param.mediaSet ? stringToArry(data.param.mediaSet) : []
|
||||
if (data.param.price !== undefined) {
|
||||
data.param.price = changeMoneyFen(data.param.price)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="Visible" width="700px" center class="ac-dialog" :close-on-click-modal="false" @close="close">
|
||||
<el-dialog :title="title" :visible.sync="Visible" width="1100px" center class="ac-dialog" :close-on-click-modal="false" @close="close">
|
||||
<el-form :inline="true" :model="form" :rules="rules" ref="ruleForm" class="demo-form-inline" label-width="120px" label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
@@ -20,20 +20,28 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="主题分类">
|
||||
<el-select style="width: 180px" multiple placeholder="请选择主题分类" v-model="form.topicIds" filterable allow-create default-first-option>
|
||||
<el-option :key="item.value" :label="item.name" :value="item.id" v-for="item in newVideoType" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="视频所属位置">
|
||||
<el-select placeholder="请选择视频所属位置" clearable v-model="form.location" @change="changeLocationFn">
|
||||
<el-option :key="item.value" :label="item.label" :value="item.value" v-for="item in videoLocationList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属分类">
|
||||
<el-select placeholder="请选择所属分类" clearable v-model="form.category" @change="changeCategoryFn">
|
||||
<el-option :key="item.value" :label="item.name" :value="item.id" v-for="item in categoryList" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="所属主题">
|
||||
<el-select multiple placeholder="请选择所属主题" v-model="form.topicIds" filterable allow-create default-first-option>
|
||||
<el-option :key="item.value" :label="item.name" :value="item.id" v-for="item in newVideoType" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="所属视频合集">
|
||||
<el-select placeholder="请选择所视频合集" v-model="form.collectionId" filterable allow-create default-first-option multiple>
|
||||
@@ -82,6 +90,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider content-position="center">标签绑定设置</el-divider>
|
||||
<TagSelectV2 type="resourceManagement" ref="TagSelect" @selectTags="selectTags" :formTags="form.tags" :mediatagCategory="newMediatagCategory" :allTags="allMediaList" />
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
@@ -91,13 +101,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mediaUpdate } from '@/api/videoManagement/videoList'
|
||||
import { mediaUpdate, mediatagTopic } from '@/api/videoManagement/videoList'
|
||||
import { MediaSatusList } from '@/filters/videoManagement/videoList'
|
||||
import { mediaAllList } from '@/api/postManagement/newList'
|
||||
// import { arryToString, changeMoneyYuan, changeMoneyFen } from '@/filters/index'
|
||||
import { contentTypeList, videoLocationList } from '@/filters/mediaLibrary/videoList'
|
||||
import TagSelectV2 from '@/components/TagSelectV2/index'
|
||||
export default {
|
||||
name: 'Batch',
|
||||
props: ['data', 'videoType', 'gatherList', 'studioList', 'actorList', 'circleList', 'mediaCollList'],
|
||||
props: ['data', 'videoType', 'gatherList', 'studioList', 'circleList', 'mediaCollList', 'mediatagCategory', 'categoryList'],
|
||||
components: {
|
||||
TagSelectV2
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
contentTypeList: contentTypeList(),
|
||||
@@ -106,6 +121,8 @@ export default {
|
||||
Visible: true,
|
||||
title: '',
|
||||
newVideoType: [],
|
||||
allMediaList: [],
|
||||
|
||||
// 表单数据
|
||||
form: {
|
||||
isVip: undefined,
|
||||
@@ -122,7 +139,8 @@ export default {
|
||||
contentType: undefined,
|
||||
location: undefined,
|
||||
circleId: undefined,
|
||||
price: undefined
|
||||
price: undefined,
|
||||
tags: []
|
||||
},
|
||||
//
|
||||
dates: [],
|
||||
@@ -144,14 +162,71 @@ export default {
|
||||
} else {
|
||||
return this.mediaCollList
|
||||
}
|
||||
},
|
||||
newMediatagCategory() {
|
||||
let arr = []
|
||||
if (this.form.location === 1 || this.form.location === 3) {
|
||||
arr = this.mediatagCategory.filter(item => {
|
||||
return item.location === this.form.location
|
||||
})
|
||||
return arr
|
||||
} else {
|
||||
return this.mediatagCategory
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeLocationFn(val) {
|
||||
this.newVideoType = this.newVideoType.filter(item => {
|
||||
return item.location === val
|
||||
// 请求带分类的标签列表
|
||||
async getMediaAllList(location) {
|
||||
await mediaAllList({ pageNum: 1, pageSize: 100, location }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.allMediaList = res.data.list
|
||||
} else {
|
||||
this.allMediaList = []
|
||||
this.$message.error('请求标签分类失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
selectTags(tags) {
|
||||
if (!this.form.topicIds.length) {
|
||||
mediatagTopic({ ids: tags }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.form.tagTopicIds = [res.data.id]
|
||||
this.form.topicIds = []
|
||||
}
|
||||
})
|
||||
}
|
||||
this.form.tags = tags
|
||||
},
|
||||
changeLocationFn(val) {
|
||||
this.getMediaAllList(val)
|
||||
if (this.form.category && this.form.category !== '') {
|
||||
this.newVideoType = this.videoType.filter(item => {
|
||||
return item.categoryId === this.form.category
|
||||
})
|
||||
this.newVideoType = this.newVideoType.filter(item => {
|
||||
return item.location === val
|
||||
})
|
||||
} else {
|
||||
this.newVideoType = this.videoType.filter(item => {
|
||||
return item.location === val
|
||||
})
|
||||
}
|
||||
},
|
||||
changeCategoryFn(val) {
|
||||
if (this.form.location && this.form.location !== '') {
|
||||
this.newVideoType = this.videoType.filter(item => {
|
||||
return item.location === this.form.location
|
||||
})
|
||||
this.newVideoType = this.newVideoType.filter(item => {
|
||||
return item.categoryId === val
|
||||
})
|
||||
} else {
|
||||
this.newVideoType = this.videoType.filter(item => {
|
||||
return item.categoryId === val
|
||||
})
|
||||
}
|
||||
},
|
||||
// 提交按钮
|
||||
submit() {
|
||||
if (this.data.length) {
|
||||
@@ -173,23 +248,6 @@ export default {
|
||||
if (this.form.collectionId.length !== 0) {
|
||||
data.param.collectionId = this.form.collectionId
|
||||
}
|
||||
|
||||
// if (this.form.actorIds.length !== 0) {
|
||||
// data.param.actorIds = this.form.actorIds;
|
||||
// const actorNameArr = [];
|
||||
// Object.keys(this.actorList).forEach(key => {
|
||||
// if (this.form.actorIds.length > 0) {
|
||||
// for (let index = 0; index < this.form.actorIds.length; index++) {
|
||||
// if (this.form.actorIds[index] === this.actorList[key].id) {
|
||||
// actorNameArr.push(this.actorList[key].name);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// data.param.actor = arryToString(actorNameArr);
|
||||
// } else {
|
||||
// data.param.actor = arryToString(data.param.actor);
|
||||
// }
|
||||
if (this.form.companiesId) {
|
||||
data.param.companiesId = this.form.companiesId
|
||||
}
|
||||
@@ -216,6 +274,9 @@ export default {
|
||||
} else if (this.form.price === 0) {
|
||||
data.param.price = 0
|
||||
}
|
||||
if (this.form.tags) {
|
||||
data.param.tags = this.form.tags
|
||||
}
|
||||
mediaUpdate(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message({
|
||||
@@ -245,6 +306,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getMediaAllList(this.form.location)
|
||||
this.newVideoType = JSON.parse(JSON.stringify(this.videoType))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="Visible" @close="close" center class="ac-dialog" width="500px">
|
||||
<el-form :inline="true" :model="form" class="demo-form-inline" label-position="right" label-width="100px" ref="form">
|
||||
<el-row :gutter="24">
|
||||
<el-col :lg="12" :md="12" :sm="12" :xl="12" :xs="12">
|
||||
<el-form-item label="点赞数">
|
||||
<el-input v-model.number="form.likes" placeholder="请输入点赞数" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="12" :md="12" :sm="12" :xl="12" :xs="12">
|
||||
<el-form-item label="评分">
|
||||
<el-input v-model="form.score" placeholder="请输入评分" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="12" :md="12" :sm="12" :xl="12" :xs="12">
|
||||
<el-form-item label="评论置顶">
|
||||
<el-switch v-model="form.isTop" active-color="#13ce66" inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :lg="12" :md="12" :sm="12" :xl="12" :xs="12">-->
|
||||
<!-- <el-form-item label="系统置顶">-->
|
||||
<!-- <el-switch v-model="form.isTopAll" :disabled="form.userId !== 1" active-color="#13ce66" inactive-color="#ff4949">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
<el-button @click="Visible=false">取 消</el-button>
|
||||
<el-button @click="submit('form')" type="primary">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { commentUpdate } from '@/api/videoManagement/commentManage'
|
||||
export default {
|
||||
name: 'EditScore',
|
||||
props: ['data'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
title: '',
|
||||
// 表单数据
|
||||
form: {
|
||||
likes: undefined,
|
||||
score: undefined,
|
||||
isTop: undefined, // 是否置顶(当前媒体评论区)
|
||||
isTopAll: undefined // 是否置顶(所有媒体评论区+弹幕)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.title = this.data.title
|
||||
this.form = { ...this.data.data }
|
||||
this.formData = Object.assign({}, this.form)
|
||||
},
|
||||
methods: {
|
||||
// TODO:更新评分
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.score = this.form.score ? Number(this.form.score) : 0
|
||||
const data = {
|
||||
id: this.data.data.id,
|
||||
param: {
|
||||
likes: this.form.likes,
|
||||
score: this.form.score,
|
||||
isTop: this.form.isTop,
|
||||
isTopAll: this.form.isTopAll
|
||||
}
|
||||
}
|
||||
commentUpdate(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :close-on-click-modal="false" :title="title" :visible.sync="Visible" @close="close" center class="ac-dialog" width="350px">
|
||||
<el-form :inline="true" :model="form" class="demo-form-inline" label-position="right" label-width="100px" ref="form">
|
||||
<el-row :gutter="24">
|
||||
<el-form-item label="审核状态" prop="reviewStatus">
|
||||
<el-select
|
||||
placeholder="请选择审核状态"
|
||||
clearable
|
||||
v-model="form.reviewStatus"
|
||||
style="width: 180px">
|
||||
<el-option label="未审核" :value="0" />
|
||||
<el-option label="审核通过" :value="1" />
|
||||
<el-option label="审核拒绝" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
<el-button @click="Visible=false">取 消</el-button>
|
||||
<el-button @click="submit('form')" type="primary">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { commentReview, commentReviewBatch } from '@/api/videoManagement/commentManage'
|
||||
export default {
|
||||
name: 'EditScore',
|
||||
props: ['data'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
title: '审核列表',
|
||||
// 表单数据
|
||||
form: {
|
||||
reviewStatus: undefined
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.data, 'datadatadata')
|
||||
this.title = this.data.title
|
||||
if (this.title !== '批量审核') {
|
||||
this.form = { ...this.data.data }
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// TODO:提交评论审核
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.data.title === '批量审核') {
|
||||
const id = []
|
||||
for (let index = 0; index < this.data.data.length; index++) {
|
||||
const element = this.data.data[index]
|
||||
id.push(element.id)
|
||||
}
|
||||
console.log(id, 'ididididid')
|
||||
const data = {
|
||||
ids: id,
|
||||
reviewStatus: this.form.reviewStatus
|
||||
}
|
||||
commentReviewBatch(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const data = {
|
||||
id: this.data.data.id,
|
||||
reviewStatus: this.form.reviewStatus
|
||||
}
|
||||
commentReview(data).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('更新成功')
|
||||
this.Visible = false
|
||||
} else {
|
||||
this.$message.error('更新失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<!--
|
||||
* @Author:
|
||||
* @Mail:
|
||||
* @Date: 2022-03-14 15:22:04
|
||||
* @LastEditTime: 2022-03-18 11:58:24
|
||||
* @LastEditors:
|
||||
* @FilePath: /comics-admin/src/views/videoManagement/videoList/components/setTag.vue
|
||||
-->
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="Visible" width="700px" center class="ac-dialog" :close-on-click-modal="false" @close="close">
|
||||
<el-form :inline="true" :model="form" :rules="rules" ref="ruleForm" class="demo-form-inline" label-width="120px" label-position="right">
|
||||
<el-row :gutter="24">
|
||||
<el-col :xs="12" :sm="12" :md="12" :lg="12" :xl="12">
|
||||
<el-form-item label="视频标签" prop="status">
|
||||
<el-select placeholder="请选择视频标签" clearable v-model="form.tags" style="width: 180px" multiple filterable>
|
||||
<el-option v-for="item in MediaSatusList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="submit"> 确 定 </el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mediatagAddTags } from '@/api/videoManagement/videoList'
|
||||
import { mediatagList } from '@/api/videoManagement/mediatag'
|
||||
export default {
|
||||
name: 'AvList',
|
||||
props: ['data'],
|
||||
data() {
|
||||
return {
|
||||
MediaSatusList: [],
|
||||
Visible: true,
|
||||
title: '',
|
||||
// 表单数据
|
||||
form: {
|
||||
tags: undefined
|
||||
},
|
||||
//
|
||||
rules: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getMediatagList()
|
||||
},
|
||||
methods: {
|
||||
// 提交按钮
|
||||
submit() {
|
||||
if (this.data.length) {
|
||||
const mediaIds = []
|
||||
this.data.forEach(item => {
|
||||
mediaIds.push(item.id)
|
||||
})
|
||||
const param = {
|
||||
mediaIds: mediaIds,
|
||||
tags: this.form.tags
|
||||
}
|
||||
mediatagAddTags(param).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('设置标签成功')
|
||||
} else {
|
||||
this.$message.error('设置标签失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '未选择视频'
|
||||
})
|
||||
}
|
||||
this.Visible = false
|
||||
},
|
||||
|
||||
getMediatagList(val) {
|
||||
const param = {
|
||||
pageNum: 1,
|
||||
pageSize: 5000
|
||||
}
|
||||
mediatagList(param).then((res) => {
|
||||
if (res.data.list) {
|
||||
this.MediaSatusList = res.data.list
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,276 +0,0 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="评论列表" :visible.sync="Visible" width="90%" center class="ac-dialog" :close-on-click-modal="false" @close="close">
|
||||
<el-row style="margin-bottom:10px">
|
||||
<el-col>
|
||||
<el-button @click="onAddComments()" size="mini" type="success">批量添加评论</el-button>
|
||||
<el-button @click="onAddComment()" size="mini" type="success">新增单条评论</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-table :data="resData" border height="600px" style="width: 100%" highlight-current-row>
|
||||
<el-table-column align="center" label="用户名称" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.userName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="评论级别" width="100">
|
||||
<template slot-scope="scope">{{ scope.row.level|changeCommentManageLevel}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="评论内容" width="200">
|
||||
<template slot-scope="scope">{{ scope.row.text }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.status | changeCommentStatus }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="评论置顶" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.isTop ? '是' : '否' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="系统置顶" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.isTopAll ? '是' : '否' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="点赞数" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.likes }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="评分" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.score }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="上级评论ID" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.parentsId }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="被评论消息ID" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.replyId }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="被评论用户名称" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.replyUserName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="回复人数" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.commentCount }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="用户会员级别" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.vipType |changevipType}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="审核状态" width="120">
|
||||
<template slot-scope="scope">{{ scope.row.reviewStatus | reviewType}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创建时间" width="160">
|
||||
<template slot-scope="scope">{{ scope.row.createdAt |BeiJingTime}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="更新时间" width="160">
|
||||
<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 v-if='scope.row.status' @click="unbanUser(scope.row,'status')" size="mini" type="success">解封</el-button>
|
||||
<el-button v-else @click="banUser( scope.row,'status')" size="mini" type="danger">封禁</el-button>
|
||||
<el-button @click="review(scope.$index, scope.row)" size="mini" type="success">审核</el-button>
|
||||
<el-button @click="edit(scope.$index, scope.row)" size="mini" type="success">编辑</el-button>
|
||||
<el-button @click="reply(scope.$index, scope.row)" size="mini" type="success">回复</el-button>
|
||||
<el-button @click="delet(scope.$index, scope.row)" size="mini" type="danger">删除</el-button>
|
||||
<el-button @click="deletAll(scope.$index, scope.row)" size="mini" type="info">删除该用户所有评论</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>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="Visible = false"> 取 消 </el-button>
|
||||
<el-button type="primary" @click="close()"> 确 定 </el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<Edit :data="editData" v-if='editVisible' @close="closeEdit" />
|
||||
<EditScore :data="editData" v-if='editScoreVisible' @close="closeEdit" />
|
||||
<Review :data="editData" v-if='revieweVisible' @close="closeEdit" />
|
||||
<BanUser :data="editData" v-if='banUserVisible' @close="closeEdit"></BanUser>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
commentList,
|
||||
commentDelete,
|
||||
commentDeluser
|
||||
} from '@/api/videoManagement/commentManage'
|
||||
import { userUnBan } from '@/api/user/userList'
|
||||
import BanUser from '@/views/user/userList/components/banUser'
|
||||
import Edit from '@/views/videoManagement/commentManage/components/AddOrEdit'
|
||||
import EditScore from '@/views/videoManagement/videoList/components/editScore'
|
||||
import Review from '@/views/videoManagement/videoList/components/review'
|
||||
|
||||
// import qs from 'qs'
|
||||
export default {
|
||||
name: 'VideoComment',
|
||||
props: ['data', 'objectype'],
|
||||
components: {
|
||||
Edit,
|
||||
EditScore,
|
||||
BanUser,
|
||||
Review
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Visible: true,
|
||||
// 表单数据
|
||||
searchData: {
|
||||
objectId: undefined, // 对象ID
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
resData: [],
|
||||
total: 0,
|
||||
banUserVisible: false,
|
||||
editVisible: false,
|
||||
editScoreVisible: false,
|
||||
revieweVisible: false
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.searchData.objectId = this.data.data.id
|
||||
this.getCommentListSearch()
|
||||
},
|
||||
methods: {
|
||||
// TODO:请求评论列表数据
|
||||
getCommentListSearch() {
|
||||
commentList(this.searchData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.resData = res.data.list
|
||||
this.total = res.data.totalCount
|
||||
} else {
|
||||
this.$message.error('请求列表失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:用户解封
|
||||
unbanUser(row) {
|
||||
userUnBan({ userId: row.userId }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('解封成功')
|
||||
this.getCommentListSearch()
|
||||
} else {
|
||||
this.$message.error('解封失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// TODO:删除评论列表数据
|
||||
delet(key, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
commentDelete({ id: row.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success('删除成功')
|
||||
this.getCommentListSearch()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// TODO:删除用户所有评论
|
||||
deletAll(index, row) {
|
||||
this.$confirm('确定删除?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
commentDeluser({ id: row.userId }).then((ret) => {
|
||||
if (ret.code === 200) {
|
||||
this.$message.success('删除所有评论成功')
|
||||
this.getCommentListSearch()
|
||||
} else {
|
||||
this.$message.error('删除所有评论失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭编辑
|
||||
close() {
|
||||
this.banUserVisible = false
|
||||
this.editVisible = false
|
||||
this.editScoreVisible = false
|
||||
this.revieweVisible = false
|
||||
this.$emit('close')
|
||||
},
|
||||
// 关闭编辑弹窗
|
||||
closeEdit() {
|
||||
this.banUserVisible = false
|
||||
this.editVisible = false
|
||||
this.editScoreVisible = false
|
||||
this.revieweVisible = false
|
||||
this.getCommentListSearch()
|
||||
},
|
||||
|
||||
// 添加单条评论
|
||||
onAddComment(row) {
|
||||
this.editData = {
|
||||
title: '添加评论',
|
||||
data: {
|
||||
userId: 0,
|
||||
objectId: this.searchData.objectId,
|
||||
objectype: this.objectype
|
||||
}
|
||||
}
|
||||
this.editVisible = true
|
||||
},
|
||||
// 批量添加评论
|
||||
onAddComments() {
|
||||
this.editData = {
|
||||
title: '批量添加评论',
|
||||
data: {
|
||||
objectId: this.searchData.objectId,
|
||||
objectype: this.objectype
|
||||
}
|
||||
}
|
||||
this.editVisible = true
|
||||
},
|
||||
// 回复
|
||||
reply(index, row) {
|
||||
this.editVisible = true
|
||||
this.editData = {
|
||||
title: '回复消息',
|
||||
data: row
|
||||
}
|
||||
},
|
||||
// 审核
|
||||
review(index, row) {
|
||||
this.revieweVisible = true
|
||||
this.editData = {
|
||||
title: '审核列表',
|
||||
data: row
|
||||
}
|
||||
},
|
||||
// 更新评分
|
||||
edit(index, row) {
|
||||
this.editScoreVisible = true
|
||||
this.editData = {
|
||||
title: '编辑',
|
||||
data: row
|
||||
}
|
||||
},
|
||||
// 封禁用户
|
||||
banUser(row) {
|
||||
this.editData = {
|
||||
id: row.userId
|
||||
}
|
||||
this.banUserVisible = true
|
||||
},
|
||||
// 切换每页数据量
|
||||
handleSizeChange(val) {
|
||||
this.searchData.pageSize = val
|
||||
this.getCommentListSearch()
|
||||
},
|
||||
|
||||
// 切换页数
|
||||
handleCurrentChange(val) {
|
||||
this.searchData.pageNum = val
|
||||
this.getCommentListSearch()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -77,7 +77,6 @@
|
||||
<el-button @click="add" icon="el-icon-circle-plus-outline" plain type="success">新增</el-button>
|
||||
<el-button @click="addVideoArray" icon="el-icon-circle-plus-outline" plain type="warning">添加视频</el-button>
|
||||
<el-button @click="batch" icon="el-icon-edit-outline" plain type="warning">批量设置视频</el-button>
|
||||
<el-button @click="setTag" icon="el-icon-edit-outline" plain type="warning">批量设置标签</el-button>
|
||||
<!-- <el-button @click="delTag" icon="el-icon-edit-outline" plain type="danger">批量删除标签</el-button> -->
|
||||
<el-button @click="delAll" icon="el-icon-edit-outline" plain type="danger">批量删除视频</el-button>
|
||||
</el-form-item>
|
||||
@@ -145,9 +144,6 @@
|
||||
<div v-else>暂无</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="预览时长" width="100px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.preTime }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="详细描述" width="200px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.desc }}</template>
|
||||
</el-table-column>
|
||||
@@ -190,6 +186,16 @@
|
||||
<el-button :type="scope.row.isRecomend ? 'success' : 'danger'" plain size="mini">{{ scope.row.isRecomend ? '是' : '否' }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否专属" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.isExclusive ? 'success' : 'danger'" plain size="mini">{{ scope.row.isExclusive ? '是' : '否' }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否原创" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button :type="scope.row.isOriginal ? 'success' : 'danger'" plain size="mini">{{ scope.row.isOriginal ? '是' : '否' }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="影片时长">
|
||||
<template slot-scope="scope">{{ scope.row.playTime | secondToHouseMinuteSecond }}</template>
|
||||
</el-table-column>
|
||||
@@ -284,7 +290,7 @@
|
||||
<el-pagination
|
||||
:current-page="searchData.pageNum"
|
||||
:page-size="searchData.pageSize"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-sizes="[10, 20, 30, 50,100]"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
@@ -294,17 +300,14 @@
|
||||
<Edit
|
||||
:mediatagCategory="mediatagCategory"
|
||||
:videoType="videoType"
|
||||
:actorList="actorList"
|
||||
:circleList="circleList"
|
||||
:mediaCollList="mediaCollList"
|
||||
:data="editData"
|
||||
v-if="editVisible"
|
||||
@close="closeEdit"/>
|
||||
<EditCom :data="editData" v-if="editComVisible" :objectype="1" @close="closeEdit" />
|
||||
|
||||
<EditCom :data="editData" v-if="editComVisible" @close="closeEdit" />
|
||||
<ShowVideo ref="showvideo"></ShowVideo>
|
||||
<Batch :mediaCollList="mediaCollList" :data="selectBatch" :videoType="videoType" :actorList="actorList" :circleList="circleList" v-if="batchVisible" @close="closeEdit"></Batch>
|
||||
<SetTag :data="selectBatch" v-if="setTagVisible" @close="closeEdit"></SetTag>
|
||||
<Batch :mediatagCategory="mediatagCategory" :categoryList="categoryList" :mediaCollList="mediaCollList" :data="selectBatch" :videoType="videoType" :circleList="circleList" v-if="batchVisible" @close="closeEdit"></Batch>
|
||||
<AddVideo2 :data="selectBatch" v-if="addVideoVisible" @close="closeEdit"></AddVideo2>
|
||||
<!-- <ShareUrl v-if="showH5Share" :data="editData" @close="closeEdit"></ShareUrl> -->
|
||||
<DelTag :data="selectBatch" v-if="delTagVisible" @close="closeEdit"></DelTag>
|
||||
@@ -314,13 +317,11 @@
|
||||
// 引入模块
|
||||
import ShowImg from '@/components/ShowImg/index.vue'
|
||||
import Edit from './components/AddOrEdit'
|
||||
import EditCom from './components/videoComment'
|
||||
import EditCom from '@/views/videoManagement/commentManage/components/AddOrEdit'
|
||||
import Batch from './components/batch'
|
||||
import SetTag from './components/setTag'
|
||||
import AddVideo2 from './components/addVideo2.vue'
|
||||
import DelTag from './components/delTag'
|
||||
|
||||
import { actressSearch } from '@/api/videoManagement/actressList'
|
||||
import { contentTypeList, videoLocationList } from '@/filters/mediaLibrary/videoList'
|
||||
|
||||
import { rankSo, MediaPayTypeList, MediaSatusList } from '@/filters/videoManagement/videoList'
|
||||
@@ -328,9 +329,9 @@ import { mediaSearch, mediaDel } from '@/api/videoManagement/videoList'
|
||||
import ShowVideo from '@/components/ShowVideo/index.vue'
|
||||
import { mediatagList } from '@/api/videoManagement/mediatag'
|
||||
import { topicSearch, topicMediaTop } from '@/api/videoManagement/topic'
|
||||
import { circleListSearch } from '@/api/user/circleList'
|
||||
import { mediacollList } from '@/api/videoManagement/collectionList'
|
||||
import { mediatagCategoryList } from '@/api/videoManagement/videoTagType'
|
||||
import { mediacategoryList } from '@/api/videoManagement/mediacategory'
|
||||
// import ShareUrl from './components/shareUrl'
|
||||
export default {
|
||||
name: 'VideoList',
|
||||
@@ -340,7 +341,6 @@ export default {
|
||||
ShowVideo,
|
||||
Batch,
|
||||
EditCom,
|
||||
SetTag,
|
||||
AddVideo2,
|
||||
// ShareUrl,
|
||||
DelTag
|
||||
@@ -369,7 +369,6 @@ export default {
|
||||
],
|
||||
mediatag: [],
|
||||
videoType: [],
|
||||
actorList: [], // 女优列表
|
||||
MediaPayTypeList: MediaPayTypeList(),
|
||||
circleList: [],
|
||||
mediaCollList: [],
|
||||
@@ -407,7 +406,6 @@ export default {
|
||||
// 编辑数据
|
||||
editVisible: false, // 新增或编辑弹出框
|
||||
editComVisible: false, // 评论弹出框
|
||||
setTagVisible: false,
|
||||
addVideoVisible: false,
|
||||
showH5Share: false,
|
||||
editData: {
|
||||
@@ -417,7 +415,8 @@ export default {
|
||||
batchVisible: false,
|
||||
videoList: [],
|
||||
selectBatch: [],
|
||||
delTagVisible: false
|
||||
delTagVisible: false,
|
||||
categoryList: []// 视频分类列表
|
||||
}
|
||||
},
|
||||
|
||||
@@ -425,12 +424,26 @@ export default {
|
||||
this.getMediatagList()
|
||||
this.getmediatagCategoryList()
|
||||
this.getMediacategoryList()
|
||||
this.getTopicSearch()
|
||||
this.searchData = this.$store.getters.getSeachParam
|
||||
this.getMediaSearch()
|
||||
this.getCircleListSearch()
|
||||
this.getMediacollList()
|
||||
},
|
||||
methods: {
|
||||
// TODO:请求视频分类列表数据
|
||||
getMediacategoryList() {
|
||||
const param = {
|
||||
pageNum: 1,
|
||||
pageSize: 500
|
||||
}
|
||||
mediacategoryList(param).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.categoryList = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求列表失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分享H5
|
||||
H5Share(row) {
|
||||
this.editData = {
|
||||
@@ -500,17 +513,7 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
// TODO:请求演员列表数据
|
||||
getActorList() {
|
||||
actressSearch({ pageNum: 1, pageSize: 5000, param: {}}).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.actorList = res.data.list
|
||||
} else {
|
||||
this.actorList = []
|
||||
this.$message.error('请求演员列表失败!')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
delTag() {
|
||||
console.log(111)
|
||||
this.delTagVisible = true
|
||||
@@ -534,7 +537,7 @@ export default {
|
||||
},
|
||||
|
||||
// TODO:请求视频分类列表
|
||||
getMediacategoryList(val) {
|
||||
getTopicSearch(val) {
|
||||
const param = {
|
||||
pageNum: 1,
|
||||
pageSize: 500,
|
||||
@@ -602,7 +605,6 @@ export default {
|
||||
}
|
||||
this.$store.dispatch('videoManagement/setSeachParam', param)
|
||||
mediaSearch(param).then(res => {
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
res.data.list.forEach(item => {
|
||||
item.actor ? (item.actor = item.actor.split(',')) : ''
|
||||
@@ -634,17 +636,7 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
// TODO:请求圈子列表数据
|
||||
getCircleListSearch() {
|
||||
circleListSearch({ pageNum: 1, pageSize: 5000 }).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.circleList = res.data.list
|
||||
} else {
|
||||
this.$message.error('请求圈子列表失败!')
|
||||
this.circleList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// TODO:请求合集列表数据
|
||||
getMediacollList() {
|
||||
mediacollList({ pageNum: 1, pageSize: 5000 }).then(res => {
|
||||
@@ -660,9 +652,6 @@ export default {
|
||||
batch() {
|
||||
this.batchVisible = true
|
||||
},
|
||||
setTag() {
|
||||
this.setTagVisible = true
|
||||
},
|
||||
|
||||
onSeach() {
|
||||
this.searchData.pageNum = 1
|
||||
@@ -703,7 +692,6 @@ export default {
|
||||
this.batchVisible = false
|
||||
this.editVisible = false
|
||||
this.editComVisible = false
|
||||
this.setTagVisible = false
|
||||
this.addVideoVisible = false
|
||||
this.showH5Share = false
|
||||
this.delTagVisible = false
|
||||
|
||||
Reference in New Issue
Block a user