-feat: 音乐人审批

dev
shengbin.ma 4 months ago
parent b1a82ecc49
commit 78ee809f62

@ -0,0 +1,29 @@
/*
* @Description:
* @version: v1
* @Author: zhangjiabao
* @Date: 2024-02-24 23:38:16
*/
import request from "@/utils/request";
export default {
getList(data, page, size) {
return request({
url: `/luoo-user/artist/app/list/${page}/${size}`,
method: "post",
data: data
});
},
/**
* 审批
* @param {*} payload
* @returns
*/
approveArtist(payload) {
return request({
url: `/luoo-user/artist/approve`,
method: "post",
data: payload
});
}
};

@ -86,7 +86,6 @@ export const constantRouterMap = [
path: "detail",
name: "JournalManageDetail",
hidden: true,
component: () => import("@/views/journal/journalDetailPage"),
meta: { title: "期刊详情" }
}
@ -109,7 +108,6 @@ export const constantRouterMap = [
path: "detail",
name: "UserManageDetail",
hidden: true,
component: () => import("@/views/user/detail"),
meta: { title: "用户详情" }
},
@ -266,6 +264,29 @@ export const constantRouterMap = [
}
]
},
{
path: "/approve",
component: Layout,
redirect: "/approve/artist-apply",
name: "Approve",
meta: { title: "审批管理", icon: "tree" },
children: [
{
name: "artist-apply",
path: "artist-apply",
component: () => import("@/views/approve/artist-apply/index"),
meta: { title: "音乐人申请" }
},
{
path: "artist-approve",
name: "artist-approve",
hidden: true,
component: () =>
import("@/views/approve/artist-apply/artistDetailPage"),
meta: { title: "音乐人审批" }
}
]
},
{ path: "*", redirect: "/404", hidden: true }
];

@ -0,0 +1,148 @@
<!--
* @Description:
* @version: v1
* @Author: zhangjiabao
* @Date: 2024-01-20 02:11:55
-->
<template>
<div>
<el-form
style="width: 800px;margin: 0 auto;"
label-position="left"
label-suffix=":"
label-width="100px"
>
<el-form-item label="名称">
<span>{{ data.nickName }}</span>
</el-form-item>
<el-form-item label="类型">
<span> {{ getTypeNameByTypeId(data.type) }} </span>
</el-form-item>
<el-form-item label="所在地区">
<span>{{ data.address }}</span>
</el-form-item>
<!-- <el-form-item label="负责人">
<span>{{ data.createUser }}</span>
</el-form-item> -->
<!-- <el-form-item label="负责人电话">
<span>{{}}</span>
</el-form-item> -->
<el-form-item label="流派风格">
<span>{{ data.style }}</span>
</el-form-item>
<el-form-item label="艺人头像">
<img
style="width: 170px;height: 120px;"
v-if="data.avatar"
:src="data.avatar"
/>
</el-form-item>
<el-form-item label="艺人背景">
<img
style="width: 170px;height: 120px;"
v-if="data.backgroundImage"
:src="data.backgroundImage"
/>
</el-form-item>
<el-form-item label="艺人简介">
{{ data.description }}
</el-form-item>
<el-form-item v-if="data.status === 2" label="拒绝理由">
{{ data.content }}
</el-form-item>
</el-form>
</div>
</template>
<script>
export default {
name: "ArtistDetail",
props: {
data: {}
},
data() {
return {
typeOpts: [
{ id: "2", name: "音乐人个人" },
{ id: "3", name: "音乐人乐队" }
]
};
},
filters: {},
created() {},
components: {},
mounted() {},
methods: {
getTypeNameByTypeId(type) {
for (let index in this.typeOpts) {
let item = this.typeOpts[index];
if (item.type === type) {
return item.name;
}
return "";
}
}
}
};
</script>
<style scoped>
.comment {
font-family: "微软雅黑", sans-serif;
font-weight: 400;
font-style: normal;
color: #999999;
text-align: left;
line-height: 22px;
}
.pagination-right {
text-align: right;
margin-top: 10px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}
.card-header {
height: 23px;
}
.app-container {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
}
.card-header-text {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
font-weight: 700;
font-style: normal;
font-size: 16px;
text-align: left;
line-height: 20px;
letter-spacing: normal;
color: #333333;
}
.box-card {
min-height: 300px;
height: calc(100vh - 140px);
border-radius: 10px;
.el-card__header {
background-color: rgba(249, 249, 249, 1);
}
.el-card__body {
overflow: auto;
height: 100%;
}
}
</style>

@ -0,0 +1,187 @@
<!--
* @Author: zhangjiabao
* @Date: 2024-02-03 00:03:50
* @LastEditors: zhangjiabao
* @LastEditTime: 2024-02-25 00:36:28
* @FilePath: /luoo_manage_fe/src/views/article/articleDetailPage.vue
-->
<template>
<div class="app-container">
<el-card class="box-card" style="overflow:auto">
<div slot="header" class="card-header clearfix">
<span class="card-header-text">艺人信息</span>
</div>
<ArtistDetail style="margin-left: -300px" :data="data" />
<div v-if="data.status === 0" class="bottom">
<el-button plain @click="handleShowReject" type="primary">
拒绝
</el-button>
<el-button type="primary" @click="handlePass"></el-button>
</div>
</el-card>
<el-dialog title="拒绝原因" :visible.sync="showReject" width="30%">
<el-form
:model="rejectContent"
:rules="rules"
ref="form"
label-width="100px"
>
<el-form-item prop="text" label="拒绝原因">
<el-input
type="textarea"
v-model="rejectContent.text"
:autosize="{ minRows: 6, maxRows: 6 }"
placeholder=""
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="showReject = false">取消</el-button>
<el-button type="primary" @click="handleFormSubmit">
确定
</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import ArtistDetail from "./artistDetail.vue";
import artistApi from "@/api/artist";
export default {
name: "ArtistDetailPage",
components: { ArtistDetail },
props: {},
data() {
return {
data: {},
showReject: false,
rejectContent: {
text: ""
},
rules: {
text: [{ required: true, message: "请输入拒绝原因", trigger: "blur" }]
}
};
},
computed: {},
watch: {},
created() {},
mounted() {
this.data = this.$route.params;
},
methods: {
handleShowReject() {
this.showReject = true;
this.rejectContent.text = "";
},
handleFormSubmit() {
this.$refs.form.validate(valid => {
if (valid) {
this.handleReject();
} else {
return false;
}
});
},
async handleReject() {
const res = await artistApi.approveArtist({
id: this.data.id,
status: 2,
content: this.rejectContent.text
});
if (res.code === 200) {
this.$message({
message: "提交成功",
type: "success"
});
this.$router.push({ name: "artist-apply" });
}
this.showReject = false;
},
async handlePass() {
const res = await artistApi.approveArtist({
id: this.data.id,
status: 1
});
if (res.code === 200) {
this.$message({
message: "提交成功",
type: "success"
});
this.$router.push({ name: "artist-apply" });
}
}
}
};
</script>
<style scoped>
.pagination-right {
text-align: right;
margin-top: 10px;
}
.box-card {
min-height: 300px;
height: calc(100vh - 140px);
border-radius: 10px;
.el-card__header {
background-color: rgba(249, 249, 249, 1);
}
}
/deep/ .el-dialog {
border-radius: 5px;
}
.popup-dialog {
.el-dialog__header {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
height: 50px;
background-color: #f5f5f5f5;
}
.el-dialog__title {
font-size: 15px;
font-weight: bolder;
}
.el-dialog__footer {
border-top: solid;
border-top-width: thin;
border-top-color: rgb(233, 233, 233);
padding: 10px 20px 10px;
}
}
.in-card-form {
height: 60px;
display: flex;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}
.card-header {
height: 23px;
}
.app-container {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
}
.card-header-text {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
font-weight: 700;
font-style: normal;
font-size: 16px;
text-align: left;
line-height: 20px;
letter-spacing: normal;
color: #333333;
}
</style>

@ -0,0 +1,523 @@
<!--
* @Description: 文章
* @version: v1
* @Author: zhangjiabao
* @Date: 2024-01-19 23:29:58
-->
<template>
<div class="app-container">
<!-- card -->
<el-card class="box-card">
<div slot="header" class="card-header clearfix">
<span class="card-header-text">音乐人申请列表</span>
</div>
<!-- 查询条件 -->
<el-form :inline="true" class="in-card-form" label-suffix=":">
<el-form-item>
<el-input
placeholder="编号/名称/手机号码"
size="medium"
v-model="queryForm.data.searchStr"
/>
</el-form-item>
<el-form-item>
<el-select
placeholder="艺人类型"
size="medium"
v-model="queryForm.data.type"
>
<el-option
v-for="item in typeOpts"
:label="item.name"
:value="item.id"
:key="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-select
placeholder="流派/风格"
size="medium"
v-model="queryForm.data.style"
>
<el-option
v-for="item in queryForm.remoteData.style"
:label="item.name"
:value="item.id"
:key="item.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-date-picker
placeholder="申请时间"
v-model="queryForm.data.timeRange"
type="daterange"
:range-separator="
queryForm.data.timeRange && queryForm.data.timeRange.length > 0
? '~'
: null
"
:editable="false"
:clearable="true"
value-format="yyyy-MM-dd"
start-placeholder="申请时间"
size="medium"
style="width: 280px;"
/>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-search"
type="primary"
size="medium"
@click="handleQueryClick"
>
查询
</el-button>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh-left"
size="medium"
@click="handleResetClick"
>
重置
</el-button>
</el-form-item>
</el-form>
<!-- tab -->
<div>
<el-tabs
v-model="queryForm.data.status"
type="card"
@tab-click="handleChangeTab"
>
<el-tab-pane label="新申请" name="0" />
<el-tab-pane label="已通过" name="1" />
<el-tab-pane label="已拒绝" name="2" />
</el-tabs>
</div>
<!-- 表格 -->
<el-table
stripe
:data="table.data"
height="calc(100vh - 400px)"
v-loading="table.loading"
v-if="table.show"
element-loading-text="加载中"
:header-cell-style="{ background: '#f5f7fa', color: '#606266' }"
border
fit
>
<el-table-column align="center" label="序号" width="95">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column label="编号" prop="serialNo" />
<el-table-column label="名称" prop="nickName" />
<el-table-column label="艺人类型" prop="type">
<template slot-scope="scope">
{{ getTypeNameByTypeId(scope.row.type) }}
</template>
</el-table-column>
<el-table-column label="所在地区" prop="address" />
<el-table-column label="流派风格" prop="style">
{{ getStyleNameByTag(scope.row.style) }}
</el-table-column>
<!-- <el-table-column label="所属公司/厂牌" prop="bandUserId" /> -->
<!-- <el-table-column label="负责人名称" prop="createUser" /> -->
<el-table-column
v-show="queryForm.data.status !== '0'"
label="审批人"
prop="date"
/>
<el-table-column
v-show="queryForm.data.status !== '0'"
label="审批时间"
prop="modifyTime"
/>
<el-table-column label="申请时间" prop="createTime" />
<el-table-column fixed="right" label="操作" width="200px">
<template slot-scope="scope">
<el-button
plain
icon="el-icon-edit"
@click="handleApproveClick(scope.row)"
type="primary"
size="mini"
>
{{ queryForm.data.status === "0" ? "审批" : "详情" }}
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
class="pagination-right"
background
v-if="table.show"
layout="total, prev, pager, next, sizes"
:current-page.sync="table.page.current"
:page-size="table.page.size"
:total="table.page.total"
@size-change="handlePageSizeChange"
@current-change="handlePageCurrentChange"
>
</el-pagination>
</el-card>
<el-dialog
title="详情"
class="popup-dialog"
:visible="true"
v-if="modifyDialog.visible"
width="80%"
top="60px"
:before-close="handleModifyDialogBeforeClose"
>
<div
v-loading="modifyDialog.loading"
style="height: 70vh;overflow: auto;padding-left:20px;padding-right:20px"
>
<ArtistDetail
v-if="modifyDialog.visible && modifyDialog.type === 2"
:data="modifyDialog.data"
:remoteTagList="queryForm.remoteData.superFilterTags"
:publisher="queryForm.remoteData.publisher"
></ArtistDetail>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" type="primary" @click="handleDialogCancel"
>确定</el-button
>
<el-button size="small" @click="handleDialogCancel"></el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import artistApi from "@/api/artist";
import tagApi from "@/api/tag";
import ArtistDetail from "./artistDetail.vue";
export default {
name: "Artist",
data() {
return {
//
queryForm: {
remoteData: {
type: [],
style: []
},
lastQuery: {},
superFilterDialog: {
visible: false
},
data: {
searchStr: "", // //
type: null, //
style: null, // /
status: 0, // 0- 1- 2-
timeRange: [] //
}
},
//
table: {
show: true,
loading: true,
data: [],
page: {
current: 1,
size: 10,
total: 0
}
},
//
modifyDialog: {
visible: false,
loading: true,
type: 0, // 0for 1for 2for
data: {} //
},
typeOpts: [
{ id: "2", name: "音乐人个人" },
{ id: "3", name: "音乐人乐队" }
]
};
},
components: {
ArtistDetail
},
filters: {},
created() {
this.fetchTypeList();
this.fetchData(this.queryForm.data);
},
methods: {
log(e) {
this.$message.success(e);
},
// ************************* *************************
/**
* 查询表格数据
*/
fetchData(param) {
//
this.queryForm.lastQuery = param;
let queryParam = {
searchStr: param.searchStr || null,
type: param.type,
style: param.style,
status: param.status
};
if (param.timeRange) {
if (param.timeRange[0]) {
queryParam.startTime = param.timeRange[0] || "";
}
if (param.timeRange[1]) {
queryParam.endTime = param.timeRange[1] || "";
}
}
this.table.loading = true;
this.table.data = [];
artistApi
.getList(queryParam, this.table.page.current, this.table.page.size)
.then(res => {
if (res.code === 200) {
this.table.data = res.data.rows;
this.table.page.total = res.data.total;
} else {
this.$message.error(res.message);
}
this.table.loading = false;
});
},
/**
* 类型下拉框
*/
fetchTypeList() {
tagApi.getList().then(res => {
if (res.code === 200) {
this.queryForm.remoteData.type = res.data;
} else {
this.queryForm.remoteData.type = [];
}
});
},
//
handleChangeTab() {
this.handleQueryClick();
},
// ************************* *************************
getTypeNameByTypeId(type) {
for (let index in this.typeOpts) {
let item = this.typeOpts[index];
if (item.type === type) {
return item.name;
}
return "";
}
},
getStyleNameByTag(style) {
for (let index in this.queryForm.remoteData.style) {
let item = this.queryForm.remoteData.style[index];
if (item.id === style) {
return item.name;
}
return "";
}
},
// ************************* *************************
/**
* 查询按扭点击事件
*/
handleQueryClick() {
this.table.page.current = 1;
this.table.page.total = 0;
this.fetchData(this.queryForm.data);
},
/**
* 重置点击事件
*/
handleResetClick() {
this.queryForm.data = {
searchStr: "",
type: null,
style: null,
status: 0,
timeRange: []
};
},
handleApproveClick(row) {
this.$router.push({
name: `artist-approve`,
params: row
});
},
/**
* 发布点击事件
*/
handlePublishClick(row) {
this.publishDialog.id = row.id;
this.publishDialog.time = null;
this.publishDialog.type = 0;
this.publishDialog.visible = true;
},
/**
* 弹窗取消按扭点击事件
*/
handleDialogCancel() {
this.modifyDialog.visible = false;
},
/**
* 弹窗取消按扭点击事件
*/
handlePublishDialogCancel() {
this.publishDialog.visible = false;
},
/**
* 弹窗重置
*/
handleDialogReset() {
this.$message.success("重置");
},
/**
* 弹窗关闭按扭点击事件
*/
handleModifyDialogBeforeClose(done) {
this.modifyDialog.visible = false;
done();
},
/**
* 弹窗关闭按扭点击事件
*/
handleTagsDialogBeforeClose(done) {
this.queryForm.superFilterDialog.visible = false;
done();
},
/**
* 弹窗关闭按扭点击事件
*/
handlePublishDialogBeforeClose(done) {
this.publishDialog.visible = false;
done();
},
/**
* 分页组件页数变化事件
*/
handlePageCurrentChange(val) {
this.table.page.current = val;
this.fetchData(this.queryForm.lastQuery);
},
/**
* 分页组件大小变化事件
*/
handlePageSizeChange(val) {
this.table.page.size = val;
this.fetchData(this.queryForm.lastQuery);
},
/**
* 切换标签事件
*/
handleChangeActivateTab(tab) {
this.activateTab = tab;
//
this.handleResetClick();
//
this.table.data = [];
this.table.page.current = 1;
this.table.page.size = 10;
this.table.show = false;
this.$nextTick(() => {
this.table.show = true;
});
this.fetchData(this.queryForm.data);
}
}
};
</script>
<style scoped>
.pagination-right {
text-align: right;
margin-top: 10px;
}
.box-card {
min-height: 300px;
height: calc(100vh - 140px);
border-radius: 10px;
.el-card__header {
background-color: rgba(249, 249, 249, 1);
}
}
/deep/ .el-dialog {
border-radius: 5px;
}
.popup-dialog {
.el-dialog__header {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
height: 50px;
background-color: #f5f5f5f5;
}
.el-dialog__title {
font-size: 15px;
font-weight: bolder;
}
.el-dialog__footer {
border-top: solid;
border-top-width: thin;
border-top-color: rgb(233, 233, 233);
padding: 10px 20px 10px;
}
}
.in-card-form {
height: 60px;
display: flex;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both;
}
.card-header {
height: 23px;
}
.app-container {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
}
.card-header-text {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular",
"Microsoft YaHei", sans-serif;
font-weight: 700;
font-style: normal;
font-size: 16px;
text-align: left;
line-height: 20px;
letter-spacing: normal;
color: #333333;
}
</style>
Loading…
Cancel
Save