|
|
@ -2,90 +2,162 @@ |
|
|
|
<!-- 平台自建 --> |
|
|
|
<!-- 平台自建 --> |
|
|
|
<div style="padding-top: 24px"> |
|
|
|
<div style="padding-top: 24px"> |
|
|
|
<div class="tool"> |
|
|
|
<div class="tool"> |
|
|
|
<ul class="filter" style="align-items: flex-start"> |
|
|
|
<ul class="filter" |
|
|
|
|
|
|
|
style="align-items: flex-start"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>可见范围</label> |
|
|
|
<label>可见范围</label> |
|
|
|
<el-select v-model="form.visibleRange" clearable placeholder="请选择可见范围" @change="getData"> |
|
|
|
<el-select v-model="form.visibleRange" |
|
|
|
<el-option v-for="(item,index) in regions" :key="index" :label="item.name" :value="item.id"></el-option> |
|
|
|
clearable |
|
|
|
|
|
|
|
placeholder="请选择可见范围" |
|
|
|
|
|
|
|
@change="getData"> |
|
|
|
|
|
|
|
<el-option v-for="(item,index) in regions" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>课程分类:</label> |
|
|
|
<label>课程分类:</label> |
|
|
|
<el-select v-model="form.categoryId" clearable placeholder="请选择课程分类" @change="getData"> |
|
|
|
<el-select v-model="form.categoryId" |
|
|
|
<el-option label="不限" value=""></el-option> |
|
|
|
clearable |
|
|
|
<el-option label="暂无分类" value="0"></el-option> |
|
|
|
placeholder="请选择课程分类" |
|
|
|
<el-option v-for="(item,index) in classificationList" :key="index" :label="item.classificationName" :value="item.id"></el-option> |
|
|
|
@change="getData"> |
|
|
|
|
|
|
|
<el-option label="不限" |
|
|
|
|
|
|
|
value=""></el-option> |
|
|
|
|
|
|
|
<el-option label="暂无分类" |
|
|
|
|
|
|
|
value="0"></el-option> |
|
|
|
|
|
|
|
<el-option v-for="(item,index) in classificationList" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.classificationName" |
|
|
|
|
|
|
|
:value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>课程类型:</label> |
|
|
|
<label>课程类型:</label> |
|
|
|
<el-select v-model="form.courseType" clearable placeholder="请选择课程类型" @change="getData"> |
|
|
|
<el-select v-model="form.courseType" |
|
|
|
<el-option v-for="(item,index) in types" :key="index" :label="item.name" :value="item.id"></el-option> |
|
|
|
clearable |
|
|
|
|
|
|
|
placeholder="请选择课程类型" |
|
|
|
|
|
|
|
@change="getData"> |
|
|
|
|
|
|
|
<el-option v-for="(item,index) in types" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.name" |
|
|
|
|
|
|
|
:value="item.id"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>搜索:</label> |
|
|
|
<label>搜索:</label> |
|
|
|
<el-input placeholder="请输入理论课程名称/创建人" suffix-icon="el-icon-search" v-model="keyword" clearable size="small"></el-input> |
|
|
|
<el-input placeholder="请输入理论课程名称/创建人" |
|
|
|
|
|
|
|
suffix-icon="el-icon-search" |
|
|
|
|
|
|
|
v-model="keyword" |
|
|
|
|
|
|
|
clearable |
|
|
|
|
|
|
|
size="small"></el-input> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button v-auth="'平台自建:新增'" type="primary" round @click="addCourse">新增</el-button> |
|
|
|
<el-button v-auth="'平台自建:新增'" |
|
|
|
<el-button v-auth="'平台自建:批量删除'" type="primary" round @click="delAllData">批量删除</el-button> |
|
|
|
type="primary" |
|
|
|
|
|
|
|
round |
|
|
|
|
|
|
|
@click="addCourse">新增</el-button> |
|
|
|
|
|
|
|
<el-button v-auth="'平台自建:批量删除'" |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
round |
|
|
|
|
|
|
|
@click="delAllData">批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<el-table :data="list" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table :data="list" |
|
|
|
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
class="table" |
|
|
|
<el-table-column type="index" width="100" label="序号" align="center"> |
|
|
|
ref="table" |
|
|
|
|
|
|
|
stripe |
|
|
|
|
|
|
|
header-align="center" |
|
|
|
|
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
|
|
|
|
row-key="id"> |
|
|
|
|
|
|
|
<el-table-column type="selection" |
|
|
|
|
|
|
|
width="80" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
:reserve-selection="true"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column type="index" |
|
|
|
|
|
|
|
width="100" |
|
|
|
|
|
|
|
label="序号" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.$index + (page - 1) * pageSize + 1 }} |
|
|
|
{{ scope.$index + (page - 1) * pageSize + 1 }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="courseName" label="课程名称" align="center"> |
|
|
|
<el-table-column prop="courseName" |
|
|
|
|
|
|
|
label="课程名称" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="可见范围" align="center"> |
|
|
|
<el-table-column label="可见范围" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ regionName[scope.row.visibleRange] }} |
|
|
|
{{ regionName[scope.row.visibleRange] }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center"> |
|
|
|
<el-table-column prop="createTime" |
|
|
|
|
|
|
|
label="创建时间" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="courseClassification" label="课程类型" align="center"> |
|
|
|
<el-table-column prop="courseClassification" |
|
|
|
|
|
|
|
label="课程类型" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.courseType == 1 ? '付费' : '免费' }} |
|
|
|
{{ scope.row.courseType == 1 ? '付费' : '免费' }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="founder" label="创建人" align="center"> |
|
|
|
<el-table-column prop="founder" |
|
|
|
|
|
|
|
label="创建人" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="courseClassification" label="课程分类" align="center" show-overflow-tooltip> |
|
|
|
<el-table-column prop="courseClassification" |
|
|
|
|
|
|
|
label="课程分类" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
show-overflow-tooltip> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" width="250"> |
|
|
|
<el-table-column label="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="250"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-auth="'平台自建:编辑信息'" type="text" @click="editCourse(scope.row)">编辑信息</el-button> |
|
|
|
<el-button v-auth="'平台自建:编辑信息'" |
|
|
|
<el-divider v-auth="'平台自建:编辑信息'" direction="vertical"></el-divider> |
|
|
|
type="text" |
|
|
|
<el-button v-auth="'平台自建:内容设置'" type="text" @click="config(scope.row)">内容设置</el-button> |
|
|
|
@click="editCourse(scope.row)">编辑信息</el-button> |
|
|
|
<el-divider v-auth="'平台自建:内容设置'" direction="vertical"></el-divider> |
|
|
|
<el-divider v-auth="'平台自建:编辑信息'" |
|
|
|
<el-button v-auth="'平台自建:预览'" type="text" @click="preview(scope.row)">预览</el-button> |
|
|
|
direction="vertical"></el-divider> |
|
|
|
<el-divider v-auth="'平台自建:预览'" direction="vertical"></el-divider> |
|
|
|
<el-button v-auth="'平台自建:内容设置'" |
|
|
|
<el-button v-auth="'平台自建:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="config(scope.row)">内容设置</el-button> |
|
|
|
|
|
|
|
<el-divider v-auth="'平台自建:内容设置'" |
|
|
|
|
|
|
|
direction="vertical"></el-divider> |
|
|
|
|
|
|
|
<el-button v-auth="'平台自建:预览'" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="preview(scope.row)">预览</el-button> |
|
|
|
|
|
|
|
<el-divider v-auth="'平台自建:预览'" |
|
|
|
|
|
|
|
direction="vertical"></el-divider> |
|
|
|
|
|
|
|
<el-button v-auth="'平台自建:删除'" |
|
|
|
|
|
|
|
type="text" |
|
|
|
|
|
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="可授权状态" align="center" width="120"> |
|
|
|
<el-table-column label="可授权状态" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="120"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-switch |
|
|
|
<el-switch v-auth="'平台自建:禁用'" |
|
|
|
v-auth="'平台自建:禁用'" |
|
|
|
|
|
|
|
v-model="scope.row.ztOpen" |
|
|
|
v-model="scope.row.ztOpen" |
|
|
|
:active-value="0" |
|
|
|
:active-value="0" |
|
|
|
:inactive-value="1" |
|
|
|
:inactive-value="1" |
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
style="margin: 0 10px 0 5px" |
|
|
|
:active-text="scope.row.ztOpen ? '关' : '开'" |
|
|
|
:active-text="scope.row.ztOpen ? '关' : '开'" |
|
|
|
@change="switchOff($event,scope.row,scope.$index)" |
|
|
|
@change="switchOff($event,scope.row,scope.$index)"></el-switch> |
|
|
|
></el-switch> |
|
|
|
|
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"> |
|
|
|
<el-pagination background |
|
|
|
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="total" |
|
|
|
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
:current-page="page"> |
|
|
|
</el-pagination> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -188,10 +260,10 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
getData () { |
|
|
|
getData () { |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
if (!Setting.isDev) { |
|
|
|
// if (!Setting.isDev) { |
|
|
|
clearInterval(this.timer) |
|
|
|
// clearInterval(this.timer) |
|
|
|
this.timer = setInterval(this.getRedis, 1000) |
|
|
|
// this.timer = setInterval(this.getRedis, 1000) |
|
|
|
} |
|
|
|
// } |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData () { |
|
|
|
initData () { |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|