|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<!--
|
|
|
|
|
* @Description: 文章
|
|
|
|
|
* @version: v1
|
|
|
|
|
* @Author: zhangjiabao
|
|
|
|
|
* @Author: Mack
|
|
|
|
|
* @Date: 2024-01-19 23:29:58
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
@ -18,6 +18,7 @@
|
|
|
|
|
<el-input
|
|
|
|
|
placeholder="编号/名称/手机号码"
|
|
|
|
|
size="medium"
|
|
|
|
|
clearable
|
|
|
|
|
v-model="queryForm.data.searchStr"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -26,6 +27,7 @@
|
|
|
|
|
<el-select
|
|
|
|
|
placeholder="艺人类型"
|
|
|
|
|
size="medium"
|
|
|
|
|
clearable
|
|
|
|
|
v-model="queryForm.data.type"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
@ -41,12 +43,13 @@
|
|
|
|
|
<el-select
|
|
|
|
|
placeholder="流派/风格"
|
|
|
|
|
size="medium"
|
|
|
|
|
clearable
|
|
|
|
|
v-model="queryForm.data.style"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in queryForm.remoteData.style"
|
|
|
|
|
:label="item.name"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:label="item.nameCh"
|
|
|
|
|
:value="item.nameEn"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
@ -126,26 +129,30 @@
|
|
|
|
|
<el-table-column label="名称" prop="nickName" />
|
|
|
|
|
<el-table-column label="艺人类型" prop="type">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ getTypeNameByTypeId(scope.row.type) }}
|
|
|
|
|
{{ getTypeNameByTypeId(scope.row && scope.row.type) }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="所在地区" prop="address" />
|
|
|
|
|
<el-table-column label="流派风格" prop="style">
|
|
|
|
|
{{ getStyleNameByTag(scope.row.style) }}
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ getStyleNameByTag(scope.row && scope.row.style) }}
|
|
|
|
|
</template>
|
|
|
|
|
</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"
|
|
|
|
|
width="120"
|
|
|
|
|
prop="updateUser"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
v-show="queryForm.data.status !== '0'"
|
|
|
|
|
label="审批时间"
|
|
|
|
|
width="160"
|
|
|
|
|
prop="modifyTime"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="申请时间" prop="createTime" />
|
|
|
|
|
<el-table-column label="申请时间" width="160" prop="createTime" />
|
|
|
|
|
<el-table-column fixed="right" label="操作" width="200px">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
@ -175,33 +182,6 @@
|
|
|
|
|
>
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
@ -209,8 +189,6 @@
|
|
|
|
|
import artistApi from "@/api/artist";
|
|
|
|
|
import tagApi from "@/api/tag";
|
|
|
|
|
|
|
|
|
|
import ArtistDetail from "./artistDetail.vue";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Artist",
|
|
|
|
|
data() {
|
|
|
|
@ -244,86 +222,62 @@ export default {
|
|
|
|
|
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();
|
|
|
|
|
async created() {
|
|
|
|
|
await this.fetchTypeList();
|
|
|
|
|
this.fetchData(this.queryForm.data);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
log(e) {
|
|
|
|
|
this.$message.success(e);
|
|
|
|
|
},
|
|
|
|
|
// ************************* 数据查询 *************************
|
|
|
|
|
/**
|
|
|
|
|
* 查询表格数据
|
|
|
|
|
*/
|
|
|
|
|
fetchData(param) {
|
|
|
|
|
async fetchData(param) {
|
|
|
|
|
// 记录上一次查询条件
|
|
|
|
|
this.queryForm.lastQuery = param;
|
|
|
|
|
|
|
|
|
|
let queryParam = {
|
|
|
|
|
searchStr: param.searchStr || null,
|
|
|
|
|
startTime: (param.timeRange && param.timeRange[0]) || "",
|
|
|
|
|
endTime: (param.timeRange && param.timeRange[1]) || "",
|
|
|
|
|
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 => {
|
|
|
|
|
const res = await artistApi.getList(
|
|
|
|
|
queryParam,
|
|
|
|
|
this.table.page.current,
|
|
|
|
|
this.table.page.size
|
|
|
|
|
);
|
|
|
|
|
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 => {
|
|
|
|
|
async fetchTypeList() {
|
|
|
|
|
const res = await tagApi.parentNameList();
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
this.queryForm.remoteData.type = res.data;
|
|
|
|
|
} else {
|
|
|
|
|
this.queryForm.remoteData.type = [];
|
|
|
|
|
this.queryForm.remoteData.style = res.data;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//
|
|
|
|
|
handleChangeTab() {
|
|
|
|
|
this.handleQueryClick();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// ************************* 数据处理 *************************
|
|
|
|
|
getTypeNameByTypeId(type) {
|
|
|
|
|
for (let index in this.typeOpts) {
|
|
|
|
@ -336,14 +290,12 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
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 "";
|
|
|
|
|
}
|
|
|
|
|
const styleInfo = this.queryForm.remoteData.style.find(item => {
|
|
|
|
|
return item.nameEn === style;
|
|
|
|
|
});
|
|
|
|
|
return styleInfo.nameCh;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// ************************* 按扭事件 *************************
|
|
|
|
|
/**
|
|
|
|
|
* 查询按扭点击事件
|
|
|
|
@ -370,57 +322,9 @@ export default {
|
|
|
|
|
handleApproveClick(row) {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: `artist-approve`,
|
|
|
|
|
params: row
|
|
|
|
|
params: { ...row, style: this.getStyleNameByTag(row.style) }
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 发布点击事件
|
|
|
|
|
*/
|
|
|
|
|
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();
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 分页组件页数变化事件
|
|
|
|
|
*/
|
|
|
|
@ -434,24 +338,6 @@ export default {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|