25843
This commit is contained in:
@@ -9,11 +9,18 @@
|
||||
<template slot="left">
|
||||
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">添加</el-button>
|
||||
</template>
|
||||
<!-- <template slot="right">-->
|
||||
<!-- <el-input placeholder="课程主题" size="small" suffix-icon="iconfont iconSearch"></el-input>-->
|
||||
<!-- <el-button type="primary" icon="iconfont iconSearch" size="small">查询</el-button>-->
|
||||
<!-- <el-button icon="el-icon-refresh-right" size="small">重置</el-button>-->
|
||||
<!-- </template>-->
|
||||
<template #right>
|
||||
<el-input
|
||||
v-model="page.title"
|
||||
class="search-input"
|
||||
size="small"
|
||||
@keyup.enter.native="getList()"
|
||||
placeholder="请输入单集名称"
|
||||
clearable
|
||||
@clear="page.current = 1, page.title = '', getList()"
|
||||
suffix-icon="iconfont iconSearch">
|
||||
</el-input>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table
|
||||
:tableData="tableData"
|
||||
@@ -24,16 +31,11 @@
|
||||
:size.sync="page.size"
|
||||
style="margin-top: 10px;"
|
||||
@getList="getList">
|
||||
<el-table-column slot="options" label="操作" align="center">
|
||||
<div slot-scope="{row}">
|
||||
<el-button type="text" icon="iconfont iconChange" :title="row.status==1?'取消发布':'发布'"
|
||||
@click="handleChange(row)"/>
|
||||
<el-button type="text" icon="iconfont iconMediaPlayer_Play" title="播放"
|
||||
@click="handlePlay(row)"/>
|
||||
<el-button type="text" icon="iconfont iconEdit" title="编辑"
|
||||
@click="handleEdit(row)"/>
|
||||
<el-button type="text" icon="iconfont iconDelete" title="删除"
|
||||
@click="handleDelete(row)"/>
|
||||
<el-table-column slot="options" label="操作" align="center" width="200px" fixed="right">
|
||||
<div slot-scope="{row}" class="table-options">
|
||||
<el-button type="text" title="播放" @click="handlePlay(row)">播放</el-button>
|
||||
<el-button type="text" title="编辑" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" title="删除" @click="handleDelete(row)">删除</el-button>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
@@ -83,6 +85,7 @@
|
||||
search: {},
|
||||
isEdit: false,
|
||||
page: {
|
||||
title: '',
|
||||
current: 1,
|
||||
size: 10
|
||||
}
|
||||
@@ -92,28 +95,14 @@
|
||||
colConfigs() {
|
||||
return [
|
||||
{label: "单集名称", prop: "title"},
|
||||
{label: "单集顺序", prop: "num"},
|
||||
{label: "发布状态", render:(h,{row})=>[<span>{this.dict.getLabel('newsCenterStatus',row.status)}</span>]},
|
||||
{label: "创建时间", prop: "createDate"},
|
||||
{label: "单集顺序", align: 'center', prop: "num"},
|
||||
{label: "创建人", align: 'center', prop: "createUser"},
|
||||
{label: "创建时间", align: 'center', prop: "createDate"},
|
||||
{slot: "options"}
|
||||
];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange(row) {
|
||||
this.$confirm(`是否确实要${row.status == 0?'发布':'取消发布'}?`).then(_ => {
|
||||
this.instance.post("/app/apppartyclassroomepisode/addOrUpdate", {
|
||||
id: row.id,
|
||||
classroomId: this.row?.id,
|
||||
status: row.status == 0 ? 1 : 0
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success(`${row.status==0?'发布':'取消发布'}成功`);
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.showList = false;
|
||||
this.isEdit = true;
|
||||
|
||||
Reference in New Issue
Block a user