update: artist-apply

dev
shengbin.ma 4 months ago
parent 78ee809f62
commit 70a008277d

@ -1,7 +1,7 @@
<!-- <!--
* @Description: 文章 * @Description: 文章
* @version: v1 * @version: v1
* @Author: zhangjiabao * @Author: Mack
* @Date: 2024-01-19 23:29:58 * @Date: 2024-01-19 23:29:58
--> -->
<template> <template>
@ -18,6 +18,7 @@
<el-input <el-input
placeholder="编号/名称/手机号码" placeholder="编号/名称/手机号码"
size="medium" size="medium"
clearable
v-model="queryForm.data.searchStr" v-model="queryForm.data.searchStr"
/> />
</el-form-item> </el-form-item>
@ -26,6 +27,7 @@
<el-select <el-select
placeholder="艺人类型" placeholder="艺人类型"
size="medium" size="medium"
clearable
v-model="queryForm.data.type" v-model="queryForm.data.type"
> >
<el-option <el-option
@ -41,12 +43,13 @@
<el-select <el-select
placeholder="流派/风格" placeholder="流派/风格"
size="medium" size="medium"
clearable
v-model="queryForm.data.style" v-model="queryForm.data.style"
> >
<el-option <el-option
v-for="item in queryForm.remoteData.style" v-for="item in queryForm.remoteData.style"
:label="item.name" :label="item.nameCh"
:value="item.id" :value="item.nameEn"
:key="item.id" :key="item.id"
/> />
</el-select> </el-select>
@ -126,26 +129,30 @@
<el-table-column label="名称" prop="nickName" /> <el-table-column label="名称" prop="nickName" />
<el-table-column label="艺人类型" prop="type"> <el-table-column label="艺人类型" prop="type">
<template slot-scope="scope"> <template slot-scope="scope">
{{ getTypeNameByTypeId(scope.row.type) }} {{ getTypeNameByTypeId(scope.row && scope.row.type) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="所在地区" prop="address" /> <el-table-column label="所在地区" prop="address" />
<el-table-column label="流派风格" prop="style"> <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>
<!-- <el-table-column label="所属公司/厂牌" prop="bandUserId" /> --> <!-- <el-table-column label="所属公司/厂牌" prop="bandUserId" /> -->
<!-- <el-table-column label="负责人名称" prop="createUser" /> --> <!-- <el-table-column label="负责人名称" prop="createUser" /> -->
<el-table-column <el-table-column
v-show="queryForm.data.status !== '0'" v-show="queryForm.data.status !== '0'"
label="审批人" label="审批人"
prop="date" width="120"
prop="updateUser"
/> />
<el-table-column <el-table-column
v-show="queryForm.data.status !== '0'" v-show="queryForm.data.status !== '0'"
label="审批时间" label="审批时间"
width="160"
prop="modifyTime" prop="modifyTime"
/> />
<el-table-column label="申请时间" prop="createTime" /> <el-table-column label="申请时间" width="160" prop="createTime" />
<el-table-column fixed="right" label="操作" width="200px"> <el-table-column fixed="right" label="操作" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -175,33 +182,6 @@
> >
</el-pagination> </el-pagination>
</el-card> </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> </div>
</template> </template>
@ -209,8 +189,6 @@
import artistApi from "@/api/artist"; import artistApi from "@/api/artist";
import tagApi from "@/api/tag"; import tagApi from "@/api/tag";
import ArtistDetail from "./artistDetail.vue";
export default { export default {
name: "Artist", name: "Artist",
data() { data() {
@ -244,86 +222,62 @@ export default {
total: 0 total: 0
} }
}, },
//
modifyDialog: {
visible: false,
loading: true,
type: 0, // 0for 1for 2for
data: {} //
},
typeOpts: [ typeOpts: [
{ id: "2", name: "音乐人个人" }, { id: "2", name: "音乐人个人" },
{ id: "3", name: "音乐人乐队" } { id: "3", name: "音乐人乐队" }
] ]
}; };
}, },
components: { async created() {
ArtistDetail await this.fetchTypeList();
},
filters: {},
created() {
this.fetchTypeList();
this.fetchData(this.queryForm.data); this.fetchData(this.queryForm.data);
}, },
methods: { methods: {
log(e) {
this.$message.success(e);
},
// ************************* ************************* // ************************* *************************
/** /**
* 查询表格数据 * 查询表格数据
*/ */
fetchData(param) { async fetchData(param) {
// //
this.queryForm.lastQuery = param; this.queryForm.lastQuery = param;
let queryParam = { let queryParam = {
searchStr: param.searchStr || null, searchStr: param.searchStr || null,
startTime: (param.timeRange && param.timeRange[0]) || "",
endTime: (param.timeRange && param.timeRange[1]) || "",
type: param.type, type: param.type,
style: param.style, style: param.style,
status: param.status 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.loading = true;
this.table.data = []; this.table.data = [];
artistApi const res = await artistApi.getList(
.getList(queryParam, this.table.page.current, this.table.page.size) queryParam,
.then(res => { this.table.page.current,
if (res.code === 200) { this.table.page.size
this.table.data = res.data.rows; );
this.table.page.total = res.data.total; if (res.code === 200) {
} else { this.table.data = res.data.rows;
this.$message.error(res.message); this.table.page.total = res.data.total;
} }
this.table.loading = false; this.table.loading = false;
});
}, },
/** /**
* 类型下拉框 * 类型下拉框
*/ */
fetchTypeList() { async fetchTypeList() {
tagApi.getList().then(res => { const res = await tagApi.parentNameList();
if (res.code === 200) { if (res.code === 200) {
this.queryForm.remoteData.type = res.data; this.queryForm.remoteData.style = res.data;
} else { }
this.queryForm.remoteData.type = [];
}
});
}, },
// //
handleChangeTab() { handleChangeTab() {
this.handleQueryClick(); this.handleQueryClick();
}, },
// ************************* ************************* // ************************* *************************
getTypeNameByTypeId(type) { getTypeNameByTypeId(type) {
for (let index in this.typeOpts) { for (let index in this.typeOpts) {
@ -336,14 +290,12 @@ export default {
}, },
getStyleNameByTag(style) { getStyleNameByTag(style) {
for (let index in this.queryForm.remoteData.style) { const styleInfo = this.queryForm.remoteData.style.find(item => {
let item = this.queryForm.remoteData.style[index]; return item.nameEn === style;
if (item.id === style) { });
return item.name; return styleInfo.nameCh;
}
return "";
}
}, },
// ************************* ************************* // ************************* *************************
/** /**
* 查询按扭点击事件 * 查询按扭点击事件
@ -370,57 +322,9 @@ export default {
handleApproveClick(row) { handleApproveClick(row) {
this.$router.push({ this.$router.push({
name: `artist-approve`, 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) { handlePageSizeChange(val) {
this.table.page.size = val; this.table.page.size = val;
this.fetchData(this.queryForm.lastQuery); 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);
} }
} }
}; };

Loading…
Cancel
Save