|
@@ -2,23 +2,24 @@
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
|
|
<el-form-item label="课堂分类" prop="cateId">
|
|
<el-form-item label="课堂分类" prop="cateId">
|
|
- <el-select v-model="queryParams.cateId" placeholder="请选择" clearable size="small" @change="getQuerySubCateList(queryParams.cateId)">
|
|
|
|
|
|
+ <el-select v-model="queryParams.cateId" placeholder="请选择" clearable size="small"
|
|
|
|
+ @change="getQuerySubCateList(queryParams.cateId)">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in categoryOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- />
|
|
|
|
|
|
+ v-for="dict in categoryOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="课堂子分类" prop="subCateId">
|
|
<el-form-item label="课堂子分类" prop="subCateId">
|
|
<el-select v-model="queryParams.subCateId" placeholder="请选择" clearable size="small">
|
|
<el-select v-model="queryParams.subCateId" placeholder="请选择" clearable size="small">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in querySubCateOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- />
|
|
|
|
|
|
+ v-for="dict in querySubCateOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="课堂名称" prop="courseName">
|
|
<el-form-item label="课堂名称" prop="courseName">
|
|
@@ -30,14 +31,14 @@
|
|
@keyup.enter.native="handleQuery"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="课堂类型" prop="isPrivate">
|
|
|
|
|
|
+ <el-form-item label="课堂类型" prop="isPrivate" style="display: none">
|
|
<el-select v-model="queryParams.isPrivate" placeholder="请选择" clearable size="small">
|
|
<el-select v-model="queryParams.isPrivate" placeholder="请选择" clearable size="small">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in courseTypeOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- />
|
|
|
|
|
|
+ v-for="dict in courseTypeOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
@@ -55,7 +56,8 @@
|
|
size="mini"
|
|
size="mini"
|
|
@click="handleAdd"
|
|
@click="handleAdd"
|
|
v-hasPermi="['course:userCourse:add']"
|
|
v-hasPermi="['course:userCourse:add']"
|
|
- >新增</el-button>
|
|
|
|
|
|
+ >新增
|
|
|
|
+ </el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
@@ -66,7 +68,8 @@
|
|
:disabled="single"
|
|
:disabled="single"
|
|
@click="handleUpdate"
|
|
@click="handleUpdate"
|
|
v-hasPermi="['course:userCourse:edit']"
|
|
v-hasPermi="['course:userCourse:edit']"
|
|
- >修改</el-button>
|
|
|
|
|
|
+ >修改
|
|
|
|
+ </el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
@@ -77,7 +80,8 @@
|
|
:disabled="multiple"
|
|
:disabled="multiple"
|
|
@click="handleDelete"
|
|
@click="handleDelete"
|
|
v-hasPermi="['course:userCourse:remove']"
|
|
v-hasPermi="['course:userCourse:remove']"
|
|
- >删除</el-button>
|
|
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
@@ -88,42 +92,16 @@
|
|
:loading="exportLoading"
|
|
:loading="exportLoading"
|
|
@click="handleExport"
|
|
@click="handleExport"
|
|
v-hasPermi="['course:userCourse:export']"
|
|
v-hasPermi="['course:userCourse:export']"
|
|
- >导出</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
- v-if="queryParams.isShow==0"
|
|
|
|
- type="success"
|
|
|
|
- plain
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- size="mini"
|
|
|
|
- :disabled="multiple"
|
|
|
|
- @click="putOn"
|
|
|
|
- v-hasPermi="['course:userCourse:putOn']"
|
|
|
|
- >上架</el-button>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
- <el-button
|
|
|
|
- v-if="queryParams.isShow==1"
|
|
|
|
- type="success"
|
|
|
|
- plain
|
|
|
|
- icon="el-icon-edit"
|
|
|
|
- size="mini"
|
|
|
|
- :disabled="multiple"
|
|
|
|
- @click="pullOff"
|
|
|
|
- v-hasPermi="['course:userCourse:pullOff']"
|
|
|
|
- >下架</el-button>
|
|
|
|
|
|
+ >导出
|
|
|
|
+ </el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
- <el-tabs type="card" v-model="queryParams.isShow" @tab-click="handleClick">
|
|
|
|
- <el-tab-pane label="已上架" name="1"></el-tab-pane>
|
|
|
|
- <el-tab-pane label="待上架" name="0"></el-tab-pane>
|
|
|
|
- </el-tabs>
|
|
|
|
<el-table height="600" border v-loading="loading" :data="userCourseList" @selection-change="handleSelectionChange">
|
|
<el-table height="600" border v-loading="loading" :data="userCourseList" @selection-change="handleSelectionChange">
|
|
- <el-table-column type="selection" width="55" align="center" />
|
|
|
|
- <el-table-column label="课程ID" align="center" prop="courseId" />
|
|
|
|
|
|
+ <el-table-column type="selection" width="55" align="center"/>
|
|
|
|
+ <el-table-column label="课程ID" align="center" prop="courseId"/>
|
|
|
|
+ <el-table-column label="所属项目" align="center" prop="projectName"/>
|
|
<el-table-column label="封面图片" align="center" prop="imgUrl" width="120">
|
|
<el-table-column label="封面图片" align="center" prop="imgUrl" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-popover
|
|
<el-popover
|
|
@@ -131,45 +109,22 @@
|
|
title=""
|
|
title=""
|
|
trigger="hover"
|
|
trigger="hover"
|
|
>
|
|
>
|
|
- <img slot="reference" :src="scope.row.imgUrl" width="100" >
|
|
|
|
|
|
+ <img slot="reference" :src="scope.row.imgUrl" width="100">
|
|
<img :src="scope.row.imgUrl" style="max-width: 300px;">
|
|
<img :src="scope.row.imgUrl" style="max-width: 300px;">
|
|
</el-popover>
|
|
</el-popover>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
-<!-- <el-table-column label="小封面" align="center" prop="secondImg" width="100">-->
|
|
|
|
-<!-- <template slot-scope="scope">-->
|
|
|
|
-<!-- <el-popover-->
|
|
|
|
-<!-- placement="right"-->
|
|
|
|
-<!-- title=""-->
|
|
|
|
-<!-- trigger="hover"-->
|
|
|
|
-<!-- >-->
|
|
|
|
-<!-- <img slot="reference" :src="scope.row.secondImg" width="50">-->
|
|
|
|
-<!-- <img :src="scope.row.secondImg" style="max-width: 100px;">-->
|
|
|
|
-<!-- </el-popover>-->
|
|
|
|
-<!-- </template>-->
|
|
|
|
-<!-- </el-table-column>-->
|
|
|
|
- <el-table-column label="课堂名称" align="center" show-overflow-tooltip prop="courseName" />
|
|
|
|
- <el-table-column label="排序" align="center" prop="sort" />
|
|
|
|
- <el-table-column label="分类名称" align="center" prop="cateName" />
|
|
|
|
- <el-table-column label="子分类名称" align="center" prop="subCateName" />
|
|
|
|
- <el-table-column label="原价" align="center" prop="price" />
|
|
|
|
- <el-table-column label="售价" align="center" prop="sellPrice" />
|
|
|
|
- <el-table-column label="单节积分" align="center" prop="integral" />
|
|
|
|
|
|
+ <el-table-column label="课堂名称" align="center" show-overflow-tooltip prop="courseName"/>
|
|
|
|
+ <el-table-column label="排序" align="center" prop="sort"/>
|
|
|
|
+ <el-table-column label="分类名称" align="center" prop="cateName"/>
|
|
|
|
+ <el-table-column label="子分类名称" align="center" prop="subCateName"/>
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
@click="handleCatalog(scope.row)"
|
|
@click="handleCatalog(scope.row)"
|
|
- >目录管理</el-button>
|
|
|
|
- <el-button
|
|
|
|
- size="mini"
|
|
|
|
- type="text"
|
|
|
|
- :icon="scope.row.isShow === 1 ? 'el-icon-close' : 'el-icon-open'"
|
|
|
|
- @click="handleShow(scope.row)"
|
|
|
|
- v-hasPermi="['course:userCourse:editShow']"
|
|
|
|
- >
|
|
|
|
- {{ scope.row.isShow === 1 ? '下架' : '上架' }}
|
|
|
|
|
|
+ >目录管理
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
@@ -177,14 +132,16 @@
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
v-hasPermi="['course:userCourse:edit']"
|
|
v-hasPermi="['course:userCourse:edit']"
|
|
- >修改</el-button>
|
|
|
|
|
|
+ >修改
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
size="mini"
|
|
size="mini"
|
|
type="text"
|
|
type="text"
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
v-hasPermi="['course:userCourse:remove']"
|
|
v-hasPermi="['course:userCourse:remove']"
|
|
- >删除</el-button>
|
|
|
|
|
|
+ >删除
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -200,85 +157,30 @@
|
|
<!-- 添加或修改课程对话框 -->
|
|
<!-- 添加或修改课程对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
|
- <el-row >
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item label="所属项目" prop="project">
|
|
|
|
+ <el-select v-model="form.project" placeholder="请选择项目" filterable clearable size="small">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in projectOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="课堂名称" prop="courseName">
|
|
<el-form-item label="课堂名称" prop="courseName">
|
|
- <el-input v-model="form.courseName" placeholder="请输入课堂名称" />
|
|
|
|
|
|
+ <el-input v-model="form.courseName" placeholder="请输入课堂名称"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="课堂分类" prop="cateId">
|
|
<el-form-item label="课堂分类" prop="cateId">
|
|
- <el-select v-model="form.cateId" placeholder="请选择" clearable size="small" @change="getSubCateList(form.cateId)">
|
|
|
|
|
|
+ <el-select v-model="form.cateId" placeholder="请选择" clearable size="small"
|
|
|
|
+ @change="getSubCateList(form.cateId)">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in categoryOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="课堂子分类" prop="subCateId">
|
|
|
|
- <el-select v-model="form.subCateId" placeholder="请选择" clearable size="small">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in subCategoryOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <!-- <el-col :span="8">
|
|
|
|
- <el-form-item label="课堂类型" prop="courseType">
|
|
|
|
- <el-select v-model="form.courseType" placeholder="请选择" clearable size="small">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in courseTypeOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col> -->
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="关联达人" prop="talentId" >
|
|
|
|
- <el-select v-model="form.talentId" remote filterable reserve-keyword placeholder="输入手机号搜索" :remote-method="talentMethod" >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in talentList"
|
|
|
|
- :key="item.talentId"
|
|
|
|
- :label="item.nickName +'#'+item.phone"
|
|
|
|
- :value="item.talentId">
|
|
|
|
- <span style="float: left">{{ item.talentId }}</span>
|
|
|
|
- <span style="margin-left: 30px ;">{{item.nickName}}</span>
|
|
|
|
- <span style="margin-left: 30px">{{ item.phone }}</span>
|
|
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="24">
|
|
|
|
- <el-form-item label="课堂简介" prop="description">
|
|
|
|
- <el-input v-model="form.description" type="textarea" :rows="2" placeholder="请输入课堂简介" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-form-item label="课程封面" prop="imgUrl">
|
|
|
|
- <ImageUpload v-model="form.imgUrl" type="image" :num="10" :width="150" :height="150" />
|
|
|
|
- </el-form-item>
|
|
|
|
-<!-- <el-form-item label="小封面" prop="imgUrl">-->
|
|
|
|
-<!-- <ImageUpload v-model="form.secondImg" type="image" :num="10" :width="150" :height="150" />-->
|
|
|
|
-<!-- </el-form-item>-->
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="12">
|
|
|
|
- <el-form-item label="所属项目" prop="project">
|
|
|
|
- <el-select v-model="form.project" placeholder="请选择项目" filterable clearable size="small">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in projectOptions"
|
|
|
|
|
|
+ v-for="dict in categoryOptions"
|
|
:key="dict.dictValue"
|
|
:key="dict.dictValue"
|
|
:label="dict.dictLabel"
|
|
:label="dict.dictLabel"
|
|
:value="dict.dictValue"
|
|
:value="dict.dictValue"
|
|
@@ -286,11 +188,11 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="12">
|
|
|
|
- <el-form-item label="标签" prop="tags">
|
|
|
|
- <el-select v-model="tags" multiple placeholder="请选择标签" filterable clearable size="small">
|
|
|
|
|
|
+ <el-col :span="8">
|
|
|
|
+ <el-form-item label="课堂子分类" prop="subCateId">
|
|
|
|
+ <el-select v-model="form.subCateId" placeholder="请选择" clearable size="small">
|
|
<el-option
|
|
<el-option
|
|
- v-for="dict in tagsOptions"
|
|
|
|
|
|
+ v-for="dict in subCategoryOptions"
|
|
:key="dict.dictValue"
|
|
:key="dict.dictValue"
|
|
:label="dict.dictLabel"
|
|
:label="dict.dictLabel"
|
|
:value="dict.dictValue"
|
|
:value="dict.dictValue"
|
|
@@ -300,129 +202,25 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="排序" prop="sort">
|
|
|
|
- <el-input-number v-model="form.sort" :min="0" label="排序"></el-input-number>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="播放量" prop="views">
|
|
|
|
- <el-input-number v-model="form.views" :min="0" label="浏览量"></el-input-number>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="点赞量" prop="likes">
|
|
|
|
- <el-input-number v-model="form.likes" :min="0" label="点赞量"></el-input-number>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
-
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="收藏数" prop="favoriteNum">
|
|
|
|
- <el-input-number v-model="form.favoriteNum" :min="0" label="收藏数"></el-input-number>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="分享数" prop="shares">
|
|
|
|
- <el-input-number v-model="form.shares" :min="0" label="分享数"></el-input-number>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="热度值" prop="hotNum">
|
|
|
|
- <el-input-number v-model="form.hotNum" :min="0" label="热度值"></el-input-number>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="状态" prop="isShow">
|
|
|
|
- <el-radio-group v-model="form.isShow">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in specShowOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="是否推荐" prop="isTui">
|
|
|
|
- <el-radio-group v-model="form.isTui">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="是否精选" prop="isBest">
|
|
|
|
- <el-radio-group v-model="form.isBest">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="是否自动播放" prop="isAutoPlay">
|
|
|
|
- <el-radio-group v-model="form.isAutoPlay">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="是否允许快进" prop="isFast">
|
|
|
|
- <el-radio-group v-model="form.isFast">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="是否积分兑换" prop="isIntegral">
|
|
|
|
- <el-radio-group v-model="form.isIntegral">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="是否逐级播放" prop="isNext">
|
|
|
|
- <el-radio-group v-model="form.isNext">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="是否私域" prop="isPrivate">
|
|
|
|
- <el-radio-group v-model="form.isPrivate">
|
|
|
|
- <el-radio :label="item.dictValue" v-for="item in orOptions" >{{item.dictLabel}}</el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- <el-row>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="课程原价" prop="price" >
|
|
|
|
- <el-input v-model="form.price" placeholder="请输入课程原价" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="课程售价" prop="sellPrice" >
|
|
|
|
- <el-input v-model="form.sellPrice" placeholder="请输入课程售价" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="8">
|
|
|
|
- <el-form-item label="单节所需积分" prop="integral" v-if="form.isIntegral==1">
|
|
|
|
- <el-input v-model="form.integral" placeholder="请输入单节所需积分" />
|
|
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="课堂简介" prop="description">
|
|
|
|
+ <el-input v-model="form.description" type="textarea" :rows="2" placeholder="请输入课堂简介"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-form-item label="关联公司" prop="tags">
|
|
|
|
- <el-select v-model="companyIds" multiple placeholder="请选择公司" filterable clearable style="width: 90%;">
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in companyOptions"
|
|
|
|
- :key="dict.dictValue"
|
|
|
|
- :label="dict.dictLabel"
|
|
|
|
- :value="dict.dictValue"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-form-item label="课程封面" prop="imgUrl">
|
|
|
|
+ <ImageUpload v-model="form.imgUrl" type="image" :num="10" :width="150" :height="150"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="关联公司" prop="tags">
|
|
|
|
+ <el-select v-model="companyIds" multiple placeholder="请选择公司" filterable clearable style="width: 90%;">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in companyOptions"
|
|
|
|
+ :key="dict.dictValue"
|
|
|
|
+ :label="dict.dictLabel"
|
|
|
|
+ :value="dict.dictValue"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
@@ -430,53 +228,67 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<el-drawer
|
|
<el-drawer
|
|
- :with-header="false"
|
|
|
|
- size="75%"
|
|
|
|
- :title="show.title" :visible.sync="show.open" append-to-body>
|
|
|
|
- <userCourseCatalogDetails ref="userCourseCatalogDetails" />
|
|
|
|
- </el-drawer>
|
|
|
|
|
|
+ :with-header="false"
|
|
|
|
+ size="75%"
|
|
|
|
+ :title="show.title" :visible.sync="show.open" append-to-body>
|
|
|
|
+ <userCourseCatalogDetails ref="userCourseCatalogDetails"/>
|
|
|
|
+ </el-drawer>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { listUserCourse, getUserCourse, delUserCourse, addUserCourse, updateUserCourse, exportUserCourse,updateIsShow,putOn,pullOff } from "@/api/course/userCourse";
|
|
|
|
|
|
+import {
|
|
|
|
+ listUserCourse,
|
|
|
|
+ getUserCourse,
|
|
|
|
+ delUserCourse,
|
|
|
|
+ addUserCourse,
|
|
|
|
+ updateUserCourse,
|
|
|
|
+ exportUserCourse,
|
|
|
|
+ updateIsShow,
|
|
|
|
+ putOn,
|
|
|
|
+ pullOff
|
|
|
|
+} from "@/api/course/userCourse";
|
|
|
|
+
|
|
|
|
+import {getSelectableRange} from "@/api/qw/sopTemp";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import Editor from '@/components/Editor/wang';
|
|
import Editor from '@/components/Editor/wang';
|
|
import ImageUpload from '@/components/ImageUpload/index';
|
|
import ImageUpload from '@/components/ImageUpload/index';
|
|
-import { listBySearch} from "@/api/course/userTalent";
|
|
|
|
|
|
+import {listBySearch} from "@/api/course/userTalent";
|
|
import userCourseCatalogDetails from '../../components/course/userCourseCatalogDetails.vue';
|
|
import userCourseCatalogDetails from '../../components/course/userCourseCatalogDetails.vue';
|
|
-import { getAllCourseCategoryList,getCatePidList ,getCateListByPid} from "@/api/course/userCourseCategory";
|
|
|
|
|
|
+import {getAllCourseCategoryList, getCatePidList, getCateListByPid} from "@/api/course/userCourseCategory";
|
|
import {allList} from "@/api/company/company";
|
|
import {allList} from "@/api/company/company";
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: "UserCourse",
|
|
name: "UserCourse",
|
|
components: {
|
|
components: {
|
|
Treeselect,
|
|
Treeselect,
|
|
- Editor,ImageUpload,userCourseCatalogDetails
|
|
|
|
|
|
+ Editor, ImageUpload, userCourseCatalogDetails
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- talentParam:{
|
|
|
|
- phone:null,
|
|
|
|
- talentId:null
|
|
|
|
|
|
+ talentParam: {
|
|
|
|
+ phone: null,
|
|
|
|
+ talentId: null
|
|
},
|
|
},
|
|
- talentList:[],
|
|
|
|
- show:{
|
|
|
|
- title:"目录管理",
|
|
|
|
- open:false
|
|
|
|
|
|
+ talentList: [],
|
|
|
|
+ startTimeRange: [],
|
|
|
|
+ show: {
|
|
|
|
+ title: "目录管理",
|
|
|
|
+ open: false
|
|
},
|
|
},
|
|
- activeName:"1",
|
|
|
|
- projectOptions:[],
|
|
|
|
- tagsOptions:[],
|
|
|
|
- tags:[],
|
|
|
|
- companyIds:[],
|
|
|
|
- courseTypeOptions:[],
|
|
|
|
|
|
+ activeName: "1",
|
|
|
|
+ projectOptions: [],
|
|
|
|
+ tagsOptions: [],
|
|
|
|
+ tags: [],
|
|
|
|
+ companyIds: [],
|
|
|
|
+ courseTypeOptions: [],
|
|
orOptions: [],
|
|
orOptions: [],
|
|
specShowOptions: [],
|
|
specShowOptions: [],
|
|
specTypeOptions: [],
|
|
specTypeOptions: [],
|
|
- categoryOptions:[],
|
|
|
|
- subCategoryOptions:[],
|
|
|
|
- querySubCateOptions:[],
|
|
|
|
|
|
+ categoryOptions: [],
|
|
|
|
+ subCategoryOptions: [],
|
|
|
|
+ querySubCateOptions: [],
|
|
// 遮罩层
|
|
// 遮罩层
|
|
loading: true,
|
|
loading: true,
|
|
// 导出遮罩层
|
|
// 导出遮罩层
|
|
@@ -493,7 +305,7 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
// 课程表格数据
|
|
// 课程表格数据
|
|
userCourseList: [],
|
|
userCourseList: [],
|
|
- companyOptions:[],
|
|
|
|
|
|
+ companyOptions: [],
|
|
// 弹出层标题
|
|
// 弹出层标题
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
@@ -503,7 +315,7 @@ export default {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
cateId: null,
|
|
cateId: null,
|
|
- subCateId:null,
|
|
|
|
|
|
+ subCateId: null,
|
|
title: null,
|
|
title: null,
|
|
imgUrl: null,
|
|
imgUrl: null,
|
|
userId: null,
|
|
userId: null,
|
|
@@ -517,56 +329,57 @@ export default {
|
|
description: null,
|
|
description: null,
|
|
hotRanking: null,
|
|
hotRanking: null,
|
|
integral: null,
|
|
integral: null,
|
|
- price: null
|
|
|
|
|
|
+ price: null,
|
|
|
|
+ isPrivate: 1
|
|
},
|
|
},
|
|
// 表单参数
|
|
// 表单参数
|
|
form: {},
|
|
form: {},
|
|
// 表单校验
|
|
// 表单校验
|
|
rules: {
|
|
rules: {
|
|
courseName: [
|
|
courseName: [
|
|
- { required: true, message: "课堂名称不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "课堂名称不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
imgUrl: [
|
|
imgUrl: [
|
|
- { required: true, message: "封面图片不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "封面图片不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
isTui: [
|
|
isTui: [
|
|
- { required: true, message: "是否推荐不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "是否推荐不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
isBest: [
|
|
isBest: [
|
|
- { required: true, message: "是否精选不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "是否精选不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
isFast: [
|
|
isFast: [
|
|
- { required: true, message: "是否允许快进不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "是否允许快进不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
isAutoPlay: [
|
|
isAutoPlay: [
|
|
- { required: true, message: "是否自动播放不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "是否自动播放不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
sort: [
|
|
sort: [
|
|
- { required: true, message: "排序不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "排序不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
views: [
|
|
views: [
|
|
- { required: true, message: "播放量不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "播放量不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
likes: [
|
|
likes: [
|
|
- { required: true, message: "点赞数不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "点赞数不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
favoriteNum: [
|
|
favoriteNum: [
|
|
- { required: true, message: "收藏数不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "收藏数不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
shares: [
|
|
shares: [
|
|
- { required: true, message: "分享数不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "分享数不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
isIntegral: [
|
|
isIntegral: [
|
|
- { required: true, message: "是否允许积分兑换不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "是否允许积分兑换不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
isShow: [
|
|
isShow: [
|
|
- { required: true, message: "上架状态不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "上架状态不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
isPrivate: [
|
|
isPrivate: [
|
|
- { required: true, message: "公私域不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "公私域不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
integral: [
|
|
integral: [
|
|
- { required: true, message: "小节兑换积分不能为空", trigger: "blur" }
|
|
|
|
|
|
+ {required: true, message: "小节兑换积分不能为空", trigger: "blur"}
|
|
],
|
|
],
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -574,9 +387,13 @@ export default {
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
getCatePidList().then(response => {
|
|
getCatePidList().then(response => {
|
|
- this.categoryOptions = response.data;
|
|
|
|
|
|
+ this.categoryOptions = response.data;
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+
|
|
|
|
+ getSelectableRange().then(e => {
|
|
|
|
+ this.startTimeRange = e.data;
|
|
|
|
+ })
|
|
// this.getTreeselect();
|
|
// this.getTreeselect();
|
|
this.getDicts("sys_spec_show").then(response => {
|
|
this.getDicts("sys_spec_show").then(response => {
|
|
this.specShowOptions = response.data;
|
|
this.specShowOptions = response.data;
|
|
@@ -596,15 +413,15 @@ export default {
|
|
this.getDicts("sys_company_or").then(response => {
|
|
this.getDicts("sys_company_or").then(response => {
|
|
this.orOptions = response.data;
|
|
this.orOptions = response.data;
|
|
});
|
|
});
|
|
- allList().then(response => {
|
|
|
|
- this.companyOptions = response.rows;
|
|
|
|
- });
|
|
|
|
|
|
+ allList().then(response => {
|
|
|
|
+ this.companyOptions = response.rows;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- selectTalent(){
|
|
|
|
|
|
+ selectTalent() {
|
|
|
|
|
|
},
|
|
},
|
|
- talentMethod(query){
|
|
|
|
|
|
+ talentMethod(query) {
|
|
if (query !== '') {
|
|
if (query !== '') {
|
|
this.talentParam.phone = query;
|
|
this.talentParam.phone = query;
|
|
listBySearch(this.talentParam).then(response => {
|
|
listBySearch(this.talentParam).then(response => {
|
|
@@ -612,45 +429,41 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- getSubCateList(pid){
|
|
|
|
- this.form.subCateId=null;
|
|
|
|
- if(pid == ''){
|
|
|
|
- this.subCategoryOptions=[];
|
|
|
|
|
|
+ getSubCateList(pid) {
|
|
|
|
+ this.form.subCateId = null;
|
|
|
|
+ if (pid == '') {
|
|
|
|
+ this.subCategoryOptions = [];
|
|
return
|
|
return
|
|
}
|
|
}
|
|
getCateListByPid(pid).then(response => {
|
|
getCateListByPid(pid).then(response => {
|
|
this.subCategoryOptions = response.data;
|
|
this.subCategoryOptions = response.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- getQuerySubCateList(pid){
|
|
|
|
- this.queryParams.subCateId=null;
|
|
|
|
- if(pid == ''){
|
|
|
|
- this.querySubCateOptions=[];
|
|
|
|
|
|
+ getQuerySubCateList(pid) {
|
|
|
|
+ this.queryParams.subCateId = null;
|
|
|
|
+ if (pid == '') {
|
|
|
|
+ this.querySubCateOptions = [];
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- this.queryParams.subCateId=null;
|
|
|
|
|
|
+ this.queryParams.subCateId = null;
|
|
getCateListByPid(pid).then(response => {
|
|
getCateListByPid(pid).then(response => {
|
|
this.querySubCateOptions = response.data;
|
|
this.querySubCateOptions = response.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
handleShow(row) {
|
|
handleShow(row) {
|
|
var isShowValue = row.isShow === 0 ? 1 : 0;
|
|
var isShowValue = row.isShow === 0 ? 1 : 0;
|
|
- var course = { courseId: row.courseId, isShow: isShowValue };
|
|
|
|
|
|
+ var course = {courseId: row.courseId, isShow: isShowValue};
|
|
updateIsShow(course).then(response => {
|
|
updateIsShow(course).then(response => {
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
this.getList();
|
|
this.getList();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- handleCatalog(row){
|
|
|
|
|
|
+ handleCatalog(row) {
|
|
const courseId = row.courseId;
|
|
const courseId = row.courseId;
|
|
- this.show.open=true;
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.$refs.userCourseCatalogDetails.getDetails(courseId,row.courseName,row.isPrivate);
|
|
|
|
- }, 200);
|
|
|
|
- },
|
|
|
|
- handleClick(tab, event) {
|
|
|
|
- this.queryParams.isShow=tab.name;
|
|
|
|
- this.getList();
|
|
|
|
|
|
+ this.show.open = true;
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$refs.userCourseCatalogDetails.getDetails(courseId, row.courseName, row.isPrivate);
|
|
|
|
+ }, 200);
|
|
},
|
|
},
|
|
/** 转换课堂分类数据结构 */
|
|
/** 转换课堂分类数据结构 */
|
|
normalizer(node) {
|
|
normalizer(node) {
|
|
@@ -667,7 +480,7 @@ export default {
|
|
getAllCourseCategoryList().then(response => {
|
|
getAllCourseCategoryList().then(response => {
|
|
this.categoryOptions = [];
|
|
this.categoryOptions = [];
|
|
const data = this.handleTree(response.data, "cateId", "pid");
|
|
const data = this.handleTree(response.data, "cateId", "pid");
|
|
- this.categoryOptions=data;
|
|
|
|
|
|
+ this.categoryOptions = data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 查询课程列表 */
|
|
/** 查询课程列表 */
|
|
@@ -689,10 +502,10 @@ export default {
|
|
this.form = {
|
|
this.form = {
|
|
courseId: null,
|
|
courseId: null,
|
|
cateId: null,
|
|
cateId: null,
|
|
- subCateId:null,
|
|
|
|
|
|
+ subCateId: null,
|
|
title: null,
|
|
title: null,
|
|
imgUrl: null,
|
|
imgUrl: null,
|
|
- // secondImg:null,
|
|
|
|
|
|
+ secondImg: null,
|
|
userId: null,
|
|
userId: null,
|
|
sort: null,
|
|
sort: null,
|
|
createTime: null,
|
|
createTime: null,
|
|
@@ -700,26 +513,27 @@ export default {
|
|
status: 0,
|
|
status: 0,
|
|
isVip: null,
|
|
isVip: null,
|
|
isAutoPlay: "1",
|
|
isAutoPlay: "1",
|
|
- isIntegral:"0",
|
|
|
|
|
|
+ isIntegral: "0",
|
|
isShow: "1",
|
|
isShow: "1",
|
|
- isFast:"1",
|
|
|
|
- isTui:"1",
|
|
|
|
- isBest:"1",
|
|
|
|
- isNext:"1",
|
|
|
|
- isPrivate:"0",
|
|
|
|
|
|
+ isFast: "1",
|
|
|
|
+ isTui: "1",
|
|
|
|
+ isBest: "1",
|
|
|
|
+ isNext: "1",
|
|
|
|
+ isPrivate: "1",
|
|
views: 100000,
|
|
views: 100000,
|
|
duration: null,
|
|
duration: null,
|
|
description: null,
|
|
description: null,
|
|
hotRanking: null,
|
|
hotRanking: null,
|
|
integral: null,
|
|
integral: null,
|
|
price: null,
|
|
price: null,
|
|
- likes:100000,
|
|
|
|
- shares:100000,
|
|
|
|
- favoriteNum:100000,
|
|
|
|
- hotNum:100000
|
|
|
|
|
|
+ likes: 100000,
|
|
|
|
+ shares: 100000,
|
|
|
|
+ favoriteNum: 100000,
|
|
|
|
+ hotNum: 100000,
|
|
};
|
|
};
|
|
- this.tags=[];
|
|
|
|
- this.subCategoryOptions=[]
|
|
|
|
|
|
+ this.tags = [];
|
|
|
|
+ this.subCategoryOptions = []
|
|
|
|
+ this.companyIds = []
|
|
this.resetForm("form");
|
|
this.resetForm("form");
|
|
},
|
|
},
|
|
/** 搜索按钮操作 */
|
|
/** 搜索按钮操作 */
|
|
@@ -730,38 +544,40 @@ export default {
|
|
/** 重置按钮操作 */
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
resetQuery() {
|
|
this.resetForm("queryForm");
|
|
this.resetForm("queryForm");
|
|
- this.queryParams.isShow=this.activeName
|
|
|
|
|
|
+ this.queryParams.isShow = this.activeName
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
},
|
|
},
|
|
// 多选框选中数据
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.courseId)
|
|
this.ids = selection.map(item => item.courseId)
|
|
- this.single = selection.length!==1
|
|
|
|
|
|
+ this.single = selection.length !== 1
|
|
this.multiple = !selection.length
|
|
this.multiple = !selection.length
|
|
},
|
|
},
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.reset();
|
|
this.reset();
|
|
- this.talentList=[];
|
|
|
|
|
|
+ this.talentList = [];
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加课程";
|
|
this.title = "添加课程";
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
this.reset();
|
|
- this.talentList=[];
|
|
|
|
|
|
+ this.talentList = [];
|
|
const courseId = row.courseId || this.ids
|
|
const courseId = row.courseId || this.ids
|
|
getUserCourse(courseId).then(response => {
|
|
getUserCourse(courseId).then(response => {
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
// this.form.cateId = response.data.cateId.toString();
|
|
// this.form.cateId = response.data.cateId.toString();
|
|
- getCateListByPid(this.form.cateId).then(response => {
|
|
|
|
- this.subCategoryOptions = response.data;
|
|
|
|
- });
|
|
|
|
|
|
+ if (this.form.cateId) {
|
|
|
|
+ getCateListByPid(this.form.cateId).then(response => {
|
|
|
|
+ this.subCategoryOptions = response.data;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
// this.form.courseType = response.data.courseType.toString();
|
|
// this.form.courseType = response.data.courseType.toString();
|
|
- if(response.data.project!=null){
|
|
|
|
|
|
+ if (response.data.project != null) {
|
|
this.form.project = response.data.project.toString();
|
|
this.form.project = response.data.project.toString();
|
|
}
|
|
}
|
|
- if(response.data.tags!=null){
|
|
|
|
|
|
+ if (response.data.tags != null) {
|
|
this.tags = response.data.tags.split(",")
|
|
this.tags = response.data.tags.split(",")
|
|
}
|
|
}
|
|
this.form.isAutoPlay = response.data.isAutoPlay.toString();
|
|
this.form.isAutoPlay = response.data.isAutoPlay.toString();
|
|
@@ -773,11 +589,11 @@ export default {
|
|
this.form.isNext = response.data.isNext.toString();
|
|
this.form.isNext = response.data.isNext.toString();
|
|
this.form.isPrivate = response.data.isPrivate.toString();
|
|
this.form.isPrivate = response.data.isPrivate.toString();
|
|
this.talentParam.talentId = response.data.talentId;
|
|
this.talentParam.talentId = response.data.talentId;
|
|
- if(this.form.companyIds!=null){
|
|
|
|
- this.companyIds=((this.form.companyIds).split(",").map(Number))
|
|
|
|
- }else{
|
|
|
|
- this.companyIds=[]
|
|
|
|
- }
|
|
|
|
|
|
+ if (this.form.companyIds != null) {
|
|
|
|
+ this.companyIds = ((this.form.companyIds).split(",").map(Number))
|
|
|
|
+ } else {
|
|
|
|
+ this.companyIds = []
|
|
|
|
+ }
|
|
|
|
|
|
listBySearch(this.talentParam).then(response => {
|
|
listBySearch(this.talentParam).then(response => {
|
|
this.talentList = response.data;
|
|
this.talentList = response.data;
|
|
@@ -790,13 +606,10 @@ export default {
|
|
submitForm() {
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- if(this.tags.length>0){
|
|
|
|
- this.form.tags=this.tags.toString();
|
|
|
|
- }
|
|
|
|
- else{
|
|
|
|
- this.form.tags=null
|
|
|
|
- }
|
|
|
|
- this.form.companyIds=this.companyIds.toString()
|
|
|
|
|
|
+
|
|
|
|
+ this.form.companyIds = this.companyIds.toString()
|
|
|
|
+ // 私域课程
|
|
|
|
+ this.form.isPrivate = 1
|
|
if (this.form.courseId != null) {
|
|
if (this.form.courseId != null) {
|
|
updateUserCourse(this.form).then(response => {
|
|
updateUserCourse(this.form).then(response => {
|
|
this.msgSuccess("修改成功");
|
|
this.msgSuccess("修改成功");
|
|
@@ -817,62 +630,66 @@ export default {
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
const courseIds = row.courseId || this.ids;
|
|
const courseIds = row.courseId || this.ids;
|
|
this.$confirm('是否确认删除课程编号为"' + courseIds + '"的数据项?', "警告", {
|
|
this.$confirm('是否确认删除课程编号为"' + courseIds + '"的数据项?', "警告", {
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- return delUserCourse(courseIds);
|
|
|
|
- }).then(() => {
|
|
|
|
- this.getList();
|
|
|
|
- this.msgSuccess("删除成功");
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return delUserCourse(courseIds);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ });
|
|
},
|
|
},
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
handleExport() {
|
|
const queryParams = this.queryParams;
|
|
const queryParams = this.queryParams;
|
|
this.$confirm('是否确认导出所有课程数据项?', "警告", {
|
|
this.$confirm('是否确认导出所有课程数据项?', "警告", {
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(() => {
|
|
|
|
- this.exportLoading = true;
|
|
|
|
- return exportUserCourse(queryParams);
|
|
|
|
- }).then(response => {
|
|
|
|
- this.download(response.msg);
|
|
|
|
- this.exportLoading = false;
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.exportLoading = true;
|
|
|
|
+ return exportUserCourse(queryParams);
|
|
|
|
+ }).then(response => {
|
|
|
|
+ this.download(response.msg);
|
|
|
|
+ this.exportLoading = false;
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ });
|
|
},
|
|
},
|
|
putOn() {
|
|
putOn() {
|
|
- const courseIds =this.ids;
|
|
|
|
- if(courseIds==null||courseIds==""){
|
|
|
|
- return this.$message("未选择课程");
|
|
|
|
|
|
+ const courseIds = this.ids;
|
|
|
|
+ if (courseIds == null || courseIds == "") {
|
|
|
|
+ return this.$message("未选择课程");
|
|
}
|
|
}
|
|
this.$confirm('是否确认批量上架课程?', "警告", {
|
|
this.$confirm('是否确认批量上架课程?', "警告", {
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- return putOn(courseIds);
|
|
|
|
- }).then(() => {
|
|
|
|
- this.getList();
|
|
|
|
- this.msgSuccess("上架成功");
|
|
|
|
- }).catch(function() {});
|
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return putOn(courseIds);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.msgSuccess("上架成功");
|
|
|
|
+ }).catch(function () {
|
|
|
|
+ });
|
|
},
|
|
},
|
|
pullOff() {
|
|
pullOff() {
|
|
- const courseIds =this.ids;
|
|
|
|
- if(courseIds==null||courseIds==""){
|
|
|
|
- return this.$message("未选择课程");
|
|
|
|
|
|
+ const courseIds = this.ids;
|
|
|
|
+ if (courseIds == null || courseIds == "") {
|
|
|
|
+ return this.$message("未选择课程");
|
|
}
|
|
}
|
|
this.$confirm('是否确认批量下架课程?', "警告", {
|
|
this.$confirm('是否确认批量下架课程?', "警告", {
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
- type: "warning"
|
|
|
|
- }).then(function() {
|
|
|
|
- return pullOff(courseIds);
|
|
|
|
- }).then(() => {
|
|
|
|
- this.getList();
|
|
|
|
- this.msgSuccess("下架成功");
|
|
|
|
- }).catch(function() {});
|
|
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function () {
|
|
|
|
+ return pullOff(courseIds);
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.getList();
|
|
|
|
+ this.msgSuccess("下架成功");
|
|
|
|
+ }).catch(function () {
|
|
|
|
+ });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|