25843
This commit is contained in:
@@ -4,23 +4,23 @@
|
||||
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$emit('back')">
|
||||
</ai-title>
|
||||
<template #content>
|
||||
<ai-card title="基本信息" class="detail-content" v-if="isEdit">
|
||||
<ai-card title="基本信息" v-if="isEdit">
|
||||
<template #content>
|
||||
<el-form :model="form" label-width="120px" ref="ruleForm" :rules="rules">
|
||||
<el-form-item label="单集名称" prop="title">
|
||||
<el-form class="ai-form" :model="form" label-width="120px" ref="ruleForm" :rules="rules">
|
||||
<el-form-item style="width: 100%;" label="单集名称" prop="title">
|
||||
<el-input size="small" v-model="form.title" clearable placeholder="请输入..." maxlength="100"
|
||||
show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单集顺序" prop="num">
|
||||
<el-form-item style="width: 100%;" label="单集顺序" prop="num">
|
||||
<el-row type="flex" justify="space-between">
|
||||
<div style="width: 540px">
|
||||
<div style="flex: 1;margin-right: 20px;">
|
||||
<el-input size="small" v-model="form.num" clearable placeholder="请输入..." maxlength="100"
|
||||
show-word-limit/>
|
||||
</div>
|
||||
<span>已更新至{{episodeNum}}集</span>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频" prop="videoUrl">
|
||||
<el-form-item style="width: 100%;" label="视频" prop="videoUrl">
|
||||
<el-input size="small" v-model="form.videoUrl" clearable placeholder="请输入..." maxlength="300"
|
||||
show-word-limit/>
|
||||
</el-form-item>
|
||||
@@ -61,9 +61,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
components: { Template },
|
||||
name: "seriesAdd",
|
||||
props: {
|
||||
instance: Function,
|
||||
@@ -76,7 +75,8 @@ import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
||||
computed: {
|
||||
detailTitle() {
|
||||
return this.isEdit ? '编辑剧集' : '新增剧集'
|
||||
}
|
||||
},
|
||||
...mapState(['user'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -98,17 +98,21 @@ import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
downLoad(url) {
|
||||
window.open(url);
|
||||
},
|
||||
// 保存
|
||||
saveAdd(status) {
|
||||
console.log(this.user)
|
||||
this.$refs.ruleForm.validate(v => {
|
||||
if (v) {
|
||||
this.instance.post('/app/apppartyclassroomepisode/addOrUpdate', {
|
||||
...this.form,
|
||||
status,
|
||||
createUser: this.user.info.name,
|
||||
createUserId: this.user.info.id,
|
||||
classroomId: this.parentRow?.id,
|
||||
id: !!this.row.id ? this.row.id : null
|
||||
}).then((res) => {
|
||||
@@ -190,16 +194,6 @@ import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
||||
}
|
||||
|
||||
.el-form {
|
||||
width: 760px;
|
||||
margin: 18px auto 64px;
|
||||
// overflow-x: auto;
|
||||
// overflow-y: auto;
|
||||
padding-right: 3px !important;
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.upload-tip {
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
|
||||
@@ -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