|
@@ -4,6 +4,9 @@
|
|
|
<el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
<el-col :span="24" class="one">
|
|
|
<c-search :is_search="true" :fields="fields" @search="btSearch">
|
|
|
+ <template #head_actor>
|
|
|
+ <el-option v-for="i in actorList" :key="i._id" :label="i.title" :value="i._id"></el-option>
|
|
|
+ </template>
|
|
|
<template #is_use>
|
|
|
<el-option v-for="i in isuseList" :key="i._id" :label="i.label" :value="i.value"></el-option>
|
|
|
</template>
|
|
@@ -26,6 +29,8 @@
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions } = createNamespacedHelpers('videos');
|
|
|
+const { mapActions: scenetype } = createNamespacedHelpers('scenetype');
|
|
|
+const { mapActions: scenedata } = createNamespacedHelpers('scenedata');
|
|
|
const { mapActions: dictdata } = createNamespacedHelpers('dictdata');
|
|
|
export default {
|
|
|
name: 'index',
|
|
@@ -38,6 +43,17 @@ export default {
|
|
|
fields: [
|
|
|
{ label: '序号', options: { type: 'index' } },
|
|
|
{ label: '名称', model: 'title', isSearch: true },
|
|
|
+ {
|
|
|
+ label: '领衔演员',
|
|
|
+ model: 'head_actor',
|
|
|
+ type: 'select',
|
|
|
+ format: (i) => {
|
|
|
+ let data = this.actorList.find((r) => r._id == i);
|
|
|
+ if (data) return data.title;
|
|
|
+ else return '暂无';
|
|
|
+ },
|
|
|
+ isSearch: true,
|
|
|
+ },
|
|
|
{ label: '演员', model: 'actor' },
|
|
|
{ label: '来源', model: 'origin' },
|
|
|
{ label: '时长', model: 'time_num' },
|
|
@@ -76,6 +92,8 @@ export default {
|
|
|
isuseList: [],
|
|
|
// 是否
|
|
|
isnoList: [],
|
|
|
+ // 领衔演员
|
|
|
+ actorList: [],
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -84,6 +102,8 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['query', 'delete']),
|
|
|
+ ...scenetype({ scQuery: 'query' }),
|
|
|
+ ...scenedata({ scdQuery: 'query' }),
|
|
|
...dictdata({ dQuery: 'query' }),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
let res = await this.query({ skip, limit, ...info, ...this.searchInfo });
|
|
@@ -121,6 +141,19 @@ export default {
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `isnoList`, res.data);
|
|
|
}
|
|
|
+ // 领衔演员
|
|
|
+ res = await this.scQuery({ is_use: '0' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ for (const val of res.data) {
|
|
|
+ let arr;
|
|
|
+ let type = '';
|
|
|
+ if (val.title == '演员') type = 'actor';
|
|
|
+ arr = await this.scdQuery({ is_use: '0', type_id: val._id });
|
|
|
+ if (this.$checkRes(arr)) {
|
|
|
+ this.$set(this, `${type}List`, arr.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
computed: {
|