|
@@ -26,8 +26,8 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="primary" v-if="tabActive === 1" @click="addEditdialogVisib = true">添加视频</el-button>
|
|
|
- <el-button type="primary" v-if="tabActive === 4" @click="addEditdialogReleaseAudio = true">发布问答</el-button>
|
|
|
+ <el-button type="primary" v-if="tabActive === 4" @click="addEditdialogVisib = true">添加视频</el-button>
|
|
|
+ <el-button type="primary" v-if="tabActive === 3" @click="addEditdialogReleaseAudio = true">发布问答</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table :data="dataList" style="width: 100%" border @sort-change="sortChangeHandle">
|
|
@@ -46,7 +46,7 @@
|
|
|
>
|
|
|
<el-table-column align="center" prop="LastUpdatedTime" width="170" label="操作">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <div v-if="tabActive === 1 || tabActive === 4">
|
|
|
+ <div v-if="tabActive === 4 || tabActive === 3">
|
|
|
<span class="editsty" @click="handlePublish(row)">{{ row.PublishStatus == 1 ? "取消发布" : "发布" }}</span>
|
|
|
|
|
|
<span class="editsty" @click="handleEditVideo(row, '产业')">编辑</span>
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
return {
|
|
|
tableColums: [],
|
|
|
dataList: [],
|
|
|
- tabActive: 2, //tabs 选中
|
|
|
+ tabActive: 1, //tabs 选中
|
|
|
chartPermissionList: [], //行业的数组
|
|
|
chartPermissionId: "", //行业的id
|
|
|
issueTime: "", //活动时间
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async getVideoList() {
|
|
|
- let SortParam = this.sortType && this.tabActive == 1 ? "videoCounts" : this.sortType && this.tabActive == 2 ? "voiceCounts" : "";
|
|
|
+ // let SortParam = this.sortType && this.tabActive == 4 ? "videoCounts" : this.sortType && this.tabActive == 1 ? "voiceCounts" : "";
|
|
|
let params = {
|
|
|
PageSize: this.PageSize,
|
|
|
CurrentIndex: this.page_no,
|
|
@@ -177,16 +177,17 @@ export default {
|
|
|
ChartPermissionId: this.chartPermissionId,
|
|
|
ActivityTypeId: this.cactivityTypeVal,
|
|
|
SortType: this.sortType,
|
|
|
- SortParam,
|
|
|
+ SortParam: "videoCounts",
|
|
|
+ SearchType: this.tabActive,
|
|
|
};
|
|
|
const res =
|
|
|
- this.tabActive == 1
|
|
|
+ this.tabActive == 4
|
|
|
? await raiVideoApi.videoList(params)
|
|
|
- : this.tabActive == 2
|
|
|
- ? await raiVideoApi.getActivityVideo(params)
|
|
|
- : this.tabActive == 4
|
|
|
+ : this.tabActive == 1
|
|
|
+ ? await raiVideoApi.activityVoiceAndVideoList(params)
|
|
|
+ : this.tabActive == 3
|
|
|
? await raiVideoApi.askserie_videoList(params)
|
|
|
- : await raiVideoApi.voiceList(params);
|
|
|
+ : await raiVideoApi.activityVoiceAndVideoList(params);
|
|
|
if (res.Ret === 200) {
|
|
|
this.dataList = res.Data.List;
|
|
|
this.total = res.Data.Paging.Totals;
|
|
@@ -207,7 +208,6 @@ export default {
|
|
|
},
|
|
|
/* 点击表格的排序 */
|
|
|
sortChangeHandle({ prop, order }) {
|
|
|
- console.log(order);
|
|
|
this.sortType = order == "ascending" ? "asc" : order == "descending" ? "desc" : "";
|
|
|
this.getVideoList();
|
|
|
},
|
|
@@ -247,7 +247,7 @@ export default {
|
|
|
this.playDetailsList = row;
|
|
|
} else if (key == "CommentNum") {
|
|
|
this.generaitondialogVisib = true;
|
|
|
- this.generaitonId = this.tabActive == 3 ? row.ActivityId : this.tabActive == 4 ? row.AskserieVideoId : row.VideoId;
|
|
|
+ this.generaitonId = this.tabActive == 1 || this.tabActive == 2 ? row.ActivityId : this.tabActive == 3 ? row.AskserieVideoId : row.VideoId;
|
|
|
}
|
|
|
},
|
|
|
/*
|
|
@@ -264,16 +264,23 @@ export default {
|
|
|
},
|
|
|
//发布或者取消发布
|
|
|
handlePublish(item) {
|
|
|
- this.$confirm(item.PublishStatus == 1 ? "确认取消发布该视频吗?" : "确认发布该视频吗?", "提示", {
|
|
|
+ let str = this.tabActive == 3 ? "音频" : "视频";
|
|
|
+ this.$confirm(item.PublishStatus == 1 ? `确认取消发布该${str}吗?` : `确认发布该${str}吗?`, "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(async () => {
|
|
|
- const res = await raiVideoApi.videoPublish({
|
|
|
- VideoId: item.VideoId,
|
|
|
- PublishOrCancle: item.PublishStatus == 1 ? 0 : 1,
|
|
|
- });
|
|
|
+ const res =
|
|
|
+ this.tabActive == 3
|
|
|
+ ? await raiVideoApi.askseriePublishAndcancel({
|
|
|
+ AskserieVideoId: item.AskserieVideoId,
|
|
|
+ PublishOrCancle: item.PublishStatus == 1 ? 0 : 1,
|
|
|
+ })
|
|
|
+ : await raiVideoApi.videoPublish({
|
|
|
+ VideoId: item.VideoId,
|
|
|
+ PublishOrCancle: item.PublishStatus == 1 ? 0 : 1,
|
|
|
+ });
|
|
|
if (res.Ret === 200) {
|
|
|
this.$message.success("操作成功!");
|
|
|
this.getVideoList();
|
|
@@ -298,7 +305,7 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
this.editDetails = item;
|
|
|
- if (this.tabActive == 4) {
|
|
|
+ if (this.tabActive == 3) {
|
|
|
this.addEditdialogReleaseAudio = true;
|
|
|
} else {
|
|
|
this.addEditdialogVisib = true;
|