25843
This commit is contained in:
@@ -4,23 +4,23 @@
|
|||||||
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$emit('back')">
|
<ai-title slot="title" :title="detailTitle" isShowBottomBorder isShowBack @onBackClick="$emit('back')">
|
||||||
</ai-title>
|
</ai-title>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-card title="基本信息" class="detail-content" v-if="isEdit">
|
<ai-card title="基本信息" v-if="isEdit">
|
||||||
<template #content>
|
<template #content>
|
||||||
<el-form :model="form" label-width="120px" ref="ruleForm" :rules="rules">
|
<el-form class="ai-form" :model="form" label-width="120px" ref="ruleForm" :rules="rules">
|
||||||
<el-form-item label="单集名称" prop="title">
|
<el-form-item style="width: 100%;" label="单集名称" prop="title">
|
||||||
<el-input size="small" v-model="form.title" clearable placeholder="请输入..." maxlength="100"
|
<el-input size="small" v-model="form.title" clearable placeholder="请输入..." maxlength="100"
|
||||||
show-word-limit/>
|
show-word-limit/>
|
||||||
</el-form-item>
|
</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">
|
<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"
|
<el-input size="small" v-model="form.num" clearable placeholder="请输入..." maxlength="100"
|
||||||
show-word-limit/>
|
show-word-limit/>
|
||||||
</div>
|
</div>
|
||||||
<span>已更新至{{episodeNum}}集</span>
|
<span>已更新至{{episodeNum}}集</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</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"
|
<el-input size="small" v-model="form.videoUrl" clearable placeholder="请输入..." maxlength="300"
|
||||||
show-word-limit/>
|
show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -61,9 +61,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
import { mapState } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
components: { Template },
|
|
||||||
name: "seriesAdd",
|
name: "seriesAdd",
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
@@ -76,7 +75,8 @@ import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
|||||||
computed: {
|
computed: {
|
||||||
detailTitle() {
|
detailTitle() {
|
||||||
return this.isEdit ? '编辑剧集' : '新增剧集'
|
return this.isEdit ? '编辑剧集' : '新增剧集'
|
||||||
}
|
},
|
||||||
|
...mapState(['user'])
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -98,17 +98,21 @@ import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
downLoad(url) {
|
downLoad(url) {
|
||||||
window.open(url);
|
window.open(url);
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
saveAdd(status) {
|
saveAdd(status) {
|
||||||
|
console.log(this.user)
|
||||||
this.$refs.ruleForm.validate(v => {
|
this.$refs.ruleForm.validate(v => {
|
||||||
if (v) {
|
if (v) {
|
||||||
this.instance.post('/app/apppartyclassroomepisode/addOrUpdate', {
|
this.instance.post('/app/apppartyclassroomepisode/addOrUpdate', {
|
||||||
...this.form,
|
...this.form,
|
||||||
status,
|
status,
|
||||||
|
createUser: this.user.info.name,
|
||||||
|
createUserId: this.user.info.id,
|
||||||
classroomId: this.parentRow?.id,
|
classroomId: this.parentRow?.id,
|
||||||
id: !!this.row.id ? this.row.id : null
|
id: !!this.row.id ? this.row.id : null
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@@ -190,16 +194,6 @@ import Template from '../../../wechat/AppAskForm/components/Template.vue';
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-form {
|
.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 {
|
.upload-tip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
|
|||||||
@@ -9,11 +9,18 @@
|
|||||||
<template slot="left">
|
<template slot="left">
|
||||||
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">添加</el-button>
|
<el-button type="primary" icon="iconfont iconAdd" @click="handleAdd">添加</el-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template slot="right">-->
|
<template #right>
|
||||||
<!-- <el-input placeholder="课程主题" size="small" suffix-icon="iconfont iconSearch"></el-input>-->
|
<el-input
|
||||||
<!-- <el-button type="primary" icon="iconfont iconSearch" size="small">查询</el-button>-->
|
v-model="page.title"
|
||||||
<!-- <el-button icon="el-icon-refresh-right" size="small">重置</el-button>-->
|
class="search-input"
|
||||||
<!-- </template>-->
|
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-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
@@ -24,16 +31,11 @@
|
|||||||
:size.sync="page.size"
|
:size.sync="page.size"
|
||||||
style="margin-top: 10px;"
|
style="margin-top: 10px;"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="options" label="操作" align="center">
|
<el-table-column slot="options" label="操作" align="center" width="200px" fixed="right">
|
||||||
<div slot-scope="{row}">
|
<div slot-scope="{row}" class="table-options">
|
||||||
<el-button type="text" icon="iconfont iconChange" :title="row.status==1?'取消发布':'发布'"
|
<el-button type="text" title="播放" @click="handlePlay(row)">播放</el-button>
|
||||||
@click="handleChange(row)"/>
|
<el-button type="text" title="编辑" @click="handleEdit(row)">编辑</el-button>
|
||||||
<el-button type="text" icon="iconfont iconMediaPlayer_Play" title="播放"
|
<el-button type="text" title="删除" @click="handleDelete(row)">删除</el-button>
|
||||||
@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)"/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
@@ -83,6 +85,7 @@
|
|||||||
search: {},
|
search: {},
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
page: {
|
page: {
|
||||||
|
title: '',
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10
|
size: 10
|
||||||
}
|
}
|
||||||
@@ -92,28 +95,14 @@
|
|||||||
colConfigs() {
|
colConfigs() {
|
||||||
return [
|
return [
|
||||||
{label: "单集名称", prop: "title"},
|
{label: "单集名称", prop: "title"},
|
||||||
{label: "单集顺序", prop: "num"},
|
{label: "单集顺序", align: 'center', prop: "num"},
|
||||||
{label: "发布状态", render:(h,{row})=>[<span>{this.dict.getLabel('newsCenterStatus',row.status)}</span>]},
|
{label: "创建人", align: 'center', prop: "createUser"},
|
||||||
{label: "创建时间", prop: "createDate"},
|
{label: "创建时间", align: 'center', prop: "createDate"},
|
||||||
{slot: "options"}
|
{slot: "options"}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
handleEdit(row) {
|
||||||
this.showList = false;
|
this.showList = false;
|
||||||
this.isEdit = true;
|
this.isEdit = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user