课件分类、课件、课程分类、课程功能完成
This commit is contained in:
parent
fcc00e5177
commit
f29c5424b5
|
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||
@Controller
|
||||
@RequestMapping("/train/course/category")
|
||||
public class TrainCourseCategoryController extends BaseController {
|
||||
private String prefix = "course/category";
|
||||
private String prefix = "train/course/category";
|
||||
|
||||
@Autowired
|
||||
private ITrainCourseCategoryService trainCourseCategoryService;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,133 @@
|
|||
package com.ruoyi.web.controller.train;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.train.course.domain.TrainCourseCategory;
|
||||
import com.ruoyi.train.course.service.ITrainCourseCategoryService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.train.domain.TrainCourse;
|
||||
import com.ruoyi.train.service.ITrainCourseService;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 课程 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/train/trainCourse")
|
||||
public class TrainCourseController extends BaseController
|
||||
{
|
||||
private String prefix = "train/course/trainCourse";
|
||||
|
||||
@Autowired
|
||||
private ITrainCourseService trainCourseService;
|
||||
|
||||
@Autowired
|
||||
private ITrainCourseCategoryService trainCourseCategoryService;
|
||||
@RequiresPermissions("train:trainCourse:view")
|
||||
@GetMapping()
|
||||
public String trainCourse()
|
||||
{
|
||||
return prefix + "/trainCourse";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询课程列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourse:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TrainCourse trainCourse)
|
||||
{
|
||||
List<TrainCourse> list = trainCourseService.selectTrainCoursePage(trainCourse);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出课程列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourse:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TrainCourse trainCourse)
|
||||
{
|
||||
List<TrainCourse> list = trainCourseService.selectTrainCourseList(trainCourse);
|
||||
ExcelUtil<TrainCourse> util = new ExcelUtil<TrainCourse>(TrainCourse.class);
|
||||
return util.exportExcel(list, "trainCourse");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增课程
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存课程
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourse:add")
|
||||
@Log(title = "课程", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TrainCourse trainCourse)
|
||||
{
|
||||
return toAjax(trainCourseService.insert(trainCourse));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改课程
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
TrainCourse trainCourse = trainCourseService.selectById(id);
|
||||
TrainCourseCategory courseCategory = trainCourseCategoryService.selectCategoryById( (long) trainCourse.getTrainCourseCategoryId() );
|
||||
mmap.put("trainCourse", trainCourse);
|
||||
mmap.put("category", courseCategory);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存课程
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourse:edit")
|
||||
@Log(title = "课程", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TrainCourse trainCourse)
|
||||
{
|
||||
return toAjax(trainCourseService.updateById(trainCourse));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课程
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourse:remove")
|
||||
@Log(title = "课程", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(trainCourseService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.ruoyi.web.controller.train;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.train.domain.TrainCourseSection;
|
||||
import com.ruoyi.train.service.ITrainCourseSectionService;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 课程章节 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/train/trainCourseSection")
|
||||
public class TrainCourseSectionController extends BaseController
|
||||
{
|
||||
private String prefix = "train/trainCourseSection";
|
||||
|
||||
@Autowired
|
||||
private ITrainCourseSectionService trainCourseSectionService;
|
||||
|
||||
@RequiresPermissions("train:trainCourseSection:view")
|
||||
@GetMapping()
|
||||
public String trainCourseSection()
|
||||
{
|
||||
return prefix + "/trainCourseSection";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询课程章节列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSection:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TrainCourseSection trainCourseSection)
|
||||
{
|
||||
List<TrainCourseSection> list = trainCourseSectionService.selectTrainCourseSectionPage(trainCourseSection);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出课程章节列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSection:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TrainCourseSection trainCourseSection)
|
||||
{
|
||||
List<TrainCourseSection> list = trainCourseSectionService.selectTrainCourseSectionList(trainCourseSection);
|
||||
ExcelUtil<TrainCourseSection> util = new ExcelUtil<TrainCourseSection>(TrainCourseSection.class);
|
||||
return util.exportExcel(list, "trainCourseSection");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增课程章节
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存课程章节
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSection:add")
|
||||
@Log(title = "课程章节", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TrainCourseSection trainCourseSection)
|
||||
{
|
||||
return toAjax(trainCourseSectionService.insert(trainCourseSection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改课程章节
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
TrainCourseSection trainCourseSection = trainCourseSectionService.selectById(id);
|
||||
mmap.put("trainCourseSection", trainCourseSection);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存课程章节
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSection:edit")
|
||||
@Log(title = "课程章节", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TrainCourseSection trainCourseSection)
|
||||
{
|
||||
return toAjax(trainCourseSectionService.updateById(trainCourseSection));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课程章节
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSection:remove")
|
||||
@Log(title = "课程章节", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(trainCourseSectionService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.ruoyi.web.controller.train;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.train.domain.TrainCourseSectionCourseware;
|
||||
import com.ruoyi.train.service.ITrainCourseSectionCoursewareService;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 章节课件 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/train/trainCourseSectionCourseware")
|
||||
public class TrainCourseSectionCoursewareController extends BaseController
|
||||
{
|
||||
private String prefix = "train/trainCourseSectionCourseware";
|
||||
|
||||
@Autowired
|
||||
private ITrainCourseSectionCoursewareService trainCourseSectionCoursewareService;
|
||||
|
||||
@RequiresPermissions("train:trainCourseSectionCourseware:view")
|
||||
@GetMapping()
|
||||
public String trainCourseSectionCourseware()
|
||||
{
|
||||
return prefix + "/trainCourseSectionCourseware";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询章节课件列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSectionCourseware:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TrainCourseSectionCourseware trainCourseSectionCourseware)
|
||||
{
|
||||
List<TrainCourseSectionCourseware> list = trainCourseSectionCoursewareService.selectTrainCourseSectionCoursewarePage(trainCourseSectionCourseware);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出章节课件列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSectionCourseware:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TrainCourseSectionCourseware trainCourseSectionCourseware)
|
||||
{
|
||||
List<TrainCourseSectionCourseware> list = trainCourseSectionCoursewareService.selectTrainCourseSectionCoursewareList(trainCourseSectionCourseware);
|
||||
ExcelUtil<TrainCourseSectionCourseware> util = new ExcelUtil<TrainCourseSectionCourseware>(TrainCourseSectionCourseware.class);
|
||||
return util.exportExcel(list, "trainCourseSectionCourseware");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增章节课件
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存章节课件
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSectionCourseware:add")
|
||||
@Log(title = "章节课件", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TrainCourseSectionCourseware trainCourseSectionCourseware)
|
||||
{
|
||||
return toAjax(trainCourseSectionCoursewareService.insert(trainCourseSectionCourseware));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改章节课件
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
TrainCourseSectionCourseware trainCourseSectionCourseware = trainCourseSectionCoursewareService.selectById(id);
|
||||
mmap.put("trainCourseSectionCourseware", trainCourseSectionCourseware);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存章节课件
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSectionCourseware:edit")
|
||||
@Log(title = "章节课件", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TrainCourseSectionCourseware trainCourseSectionCourseware)
|
||||
{
|
||||
return toAjax(trainCourseSectionCoursewareService.updateById(trainCourseSectionCourseware));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除章节课件
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseSectionCourseware:remove")
|
||||
@Log(title = "章节课件", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(trainCourseSectionCoursewareService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.ruoyi.web.controller.train;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.train.domain.TrainCourseUser;
|
||||
import com.ruoyi.train.service.ITrainCourseUserService;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 课程使用对象 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/train/trainCourseUser")
|
||||
public class TrainCourseUserController extends BaseController
|
||||
{
|
||||
private String prefix = "train/trainCourseUser";
|
||||
|
||||
@Autowired
|
||||
private ITrainCourseUserService trainCourseUserService;
|
||||
|
||||
@RequiresPermissions("train:trainCourseUser:view")
|
||||
@GetMapping()
|
||||
public String trainCourseUser()
|
||||
{
|
||||
return prefix + "/trainCourseUser";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询课程使用对象列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseUser:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TrainCourseUser trainCourseUser)
|
||||
{
|
||||
List<TrainCourseUser> list = trainCourseUserService.selectTrainCourseUserPage(trainCourseUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出课程使用对象列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseUser:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TrainCourseUser trainCourseUser)
|
||||
{
|
||||
List<TrainCourseUser> list = trainCourseUserService.selectTrainCourseUserList(trainCourseUser);
|
||||
ExcelUtil<TrainCourseUser> util = new ExcelUtil<TrainCourseUser>(TrainCourseUser.class);
|
||||
return util.exportExcel(list, "trainCourseUser");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增课程使用对象
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存课程使用对象
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseUser:add")
|
||||
@Log(title = "课程使用对象", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TrainCourseUser trainCourseUser)
|
||||
{
|
||||
return toAjax(trainCourseUserService.insert(trainCourseUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改课程使用对象
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
TrainCourseUser trainCourseUser = trainCourseUserService.selectById(id);
|
||||
mmap.put("trainCourseUser", trainCourseUser);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存课程使用对象
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseUser:edit")
|
||||
@Log(title = "课程使用对象", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TrainCourseUser trainCourseUser)
|
||||
{
|
||||
return toAjax(trainCourseUserService.updateById(trainCourseUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课程使用对象
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseUser:remove")
|
||||
@Log(title = "课程使用对象", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(trainCourseUserService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,270 @@
|
|||
package com.ruoyi.train.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.base.BaseEntity;
|
||||
|
||||
import javax.persistence.Id;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 课程表 train_course
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public class TrainCourse {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 课程ID
|
||||
*/
|
||||
@Id
|
||||
private Integer id;
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Integer deptId;
|
||||
/**
|
||||
* 课程分类
|
||||
*/
|
||||
private Integer trainCourseCategoryId;
|
||||
/**
|
||||
* 课程名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 课程封面
|
||||
*/
|
||||
private String cover;
|
||||
/** */
|
||||
private String description;
|
||||
/**
|
||||
* 是否公开(默认 1-公开,2-不公开)
|
||||
*/
|
||||
private String state;
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 设置课程ID
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取课程ID
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置部门ID
|
||||
*/
|
||||
public void setDeptId(Integer deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门ID
|
||||
*/
|
||||
public Integer getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置课程分类
|
||||
*/
|
||||
public void setTrainCourseCategoryId(Integer trainCourseCategoryId) {
|
||||
this.trainCourseCategoryId = trainCourseCategoryId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取课程分类
|
||||
*/
|
||||
public Integer getTrainCourseCategoryId() {
|
||||
return trainCourseCategoryId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置课程名称
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取课程名称
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置课程封面
|
||||
*/
|
||||
public void setCover(String cover) {
|
||||
this.cover = cover;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取课程封面
|
||||
*/
|
||||
public String getCover() {
|
||||
return cover;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置是否公开(默认 1-公开,2-不公开)
|
||||
*/
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否公开(默认 1-公开,2-不公开)
|
||||
*/
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建者
|
||||
*/
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建者
|
||||
*/
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置创建时间
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取创建时间
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新者
|
||||
*/
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新者
|
||||
*/
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新时间
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更新时间
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置备注
|
||||
*/
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取备注
|
||||
*/
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder( this, ToStringStyle.MULTI_LINE_STYLE )
|
||||
.append( "id", getId() )
|
||||
.append( "deptId", getDeptId() )
|
||||
.append( "trainCourseCategoryId", getTrainCourseCategoryId() )
|
||||
.append( "name", getName() )
|
||||
.append( "cover", getCover() )
|
||||
.append( "description", getDescription() )
|
||||
.append( "state", getState() )
|
||||
.append( "delFlag", getDelFlag() )
|
||||
.append( "createBy", getCreateBy() )
|
||||
.append( "createTime", getCreateTime() )
|
||||
.append( "updateBy", getUpdateBy() )
|
||||
.append( "updateTime", getUpdateTime() )
|
||||
.append( "remark", getRemark() )
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package com.ruoyi.train.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.base.BaseEntity;
|
||||
import javax.persistence.Id;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 课程章节表 train_course_section
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public class TrainCourseSection
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 章节id */
|
||||
@Id
|
||||
private Integer id;
|
||||
/** 课程ID */
|
||||
private Integer trainCourseId;
|
||||
/** 章节名称 */
|
||||
private String name;
|
||||
/** 显示顺序 */
|
||||
private Integer orderNum;
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 设置章节id */
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/** 获取章节id */
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
/** 设置课程ID */
|
||||
public void setTrainCourseId(Integer trainCourseId)
|
||||
{
|
||||
this.trainCourseId = trainCourseId;
|
||||
}
|
||||
|
||||
/** 获取课程ID */
|
||||
public Integer getTrainCourseId()
|
||||
{
|
||||
return trainCourseId;
|
||||
}
|
||||
/** 设置章节名称 */
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/** 获取章节名称 */
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
/** 设置显示顺序 */
|
||||
public void setOrderNum(Integer orderNum)
|
||||
{
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
/** 获取显示顺序 */
|
||||
public Integer getOrderNum()
|
||||
{
|
||||
return orderNum;
|
||||
}
|
||||
/** 设置删除标志(0代表存在 2代表删除) */
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
/** 获取删除标志(0代表存在 2代表删除) */
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
/** 设置创建者 */
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
/** 获取创建者 */
|
||||
public String getCreateBy()
|
||||
{
|
||||
return createBy;
|
||||
}
|
||||
/** 设置创建时间 */
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/** 获取创建时间 */
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
/** 设置更新者 */
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
/** 获取更新者 */
|
||||
public String getUpdateBy()
|
||||
{
|
||||
return updateBy;
|
||||
}
|
||||
/** 设置更新时间 */
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/** 获取更新时间 */
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
/** 设置备注 */
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
/** 获取备注 */
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("trainCourseId", getTrainCourseId())
|
||||
.append("name", getName())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
package com.ruoyi.train.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.base.BaseEntity;
|
||||
import javax.persistence.Id;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 章节课件表 train_course_section_courseware
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public class TrainCourseSectionCourseware
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 章节课件id */
|
||||
@Id
|
||||
private Integer id;
|
||||
/** 课程章节ID */
|
||||
private Integer trainCourseSectionId;
|
||||
/** 课件ID */
|
||||
private Integer trainCoursewareId;
|
||||
/** 显示顺序 */
|
||||
private Integer orderNum;
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 设置章节课件id */
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/** 获取章节课件id */
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
/** 设置课程章节ID */
|
||||
public void setTrainCourseSectionId(Integer trainCourseSectionId)
|
||||
{
|
||||
this.trainCourseSectionId = trainCourseSectionId;
|
||||
}
|
||||
|
||||
/** 获取课程章节ID */
|
||||
public Integer getTrainCourseSectionId()
|
||||
{
|
||||
return trainCourseSectionId;
|
||||
}
|
||||
/** 设置课件ID */
|
||||
public void setTrainCoursewareId(Integer trainCoursewareId)
|
||||
{
|
||||
this.trainCoursewareId = trainCoursewareId;
|
||||
}
|
||||
|
||||
/** 获取课件ID */
|
||||
public Integer getTrainCoursewareId()
|
||||
{
|
||||
return trainCoursewareId;
|
||||
}
|
||||
/** 设置显示顺序 */
|
||||
public void setOrderNum(Integer orderNum)
|
||||
{
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
/** 获取显示顺序 */
|
||||
public Integer getOrderNum()
|
||||
{
|
||||
return orderNum;
|
||||
}
|
||||
/** 设置删除标志(0代表存在 2代表删除) */
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
/** 获取删除标志(0代表存在 2代表删除) */
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
/** 设置创建者 */
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
/** 获取创建者 */
|
||||
public String getCreateBy()
|
||||
{
|
||||
return createBy;
|
||||
}
|
||||
/** 设置创建时间 */
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/** 获取创建时间 */
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
/** 设置更新者 */
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
/** 获取更新者 */
|
||||
public String getUpdateBy()
|
||||
{
|
||||
return updateBy;
|
||||
}
|
||||
/** 设置更新时间 */
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/** 获取更新时间 */
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
/** 设置备注 */
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
/** 获取备注 */
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("trainCourseSectionId", getTrainCourseSectionId())
|
||||
.append("trainCoursewareId", getTrainCoursewareId())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
package com.ruoyi.train.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.base.BaseEntity;
|
||||
import javax.persistence.Id;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 课程使用对象表 train_course_user
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public class TrainCourseUser
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 考试对象 */
|
||||
@Id
|
||||
private Integer id;
|
||||
/** 考试代码 */
|
||||
private Integer trainCourseId;
|
||||
/** 会员代码 */
|
||||
private Integer vipUserId;
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Date createDate;
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Date updateDate;
|
||||
/** 备注信息 */
|
||||
private String remarks;
|
||||
/** 删除标记 */
|
||||
private String delFlag;
|
||||
|
||||
/** 设置考试对象 */
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/** 获取考试对象 */
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
/** 设置考试代码 */
|
||||
public void setTrainCourseId(Integer trainCourseId)
|
||||
{
|
||||
this.trainCourseId = trainCourseId;
|
||||
}
|
||||
|
||||
/** 获取考试代码 */
|
||||
public Integer getTrainCourseId()
|
||||
{
|
||||
return trainCourseId;
|
||||
}
|
||||
/** 设置会员代码 */
|
||||
public void setVipUserId(Integer vipUserId)
|
||||
{
|
||||
this.vipUserId = vipUserId;
|
||||
}
|
||||
|
||||
/** 获取会员代码 */
|
||||
public Integer getVipUserId()
|
||||
{
|
||||
return vipUserId;
|
||||
}
|
||||
/** 设置创建者 */
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
/** 获取创建者 */
|
||||
public String getCreateBy()
|
||||
{
|
||||
return createBy;
|
||||
}
|
||||
/** 设置创建时间 */
|
||||
public void setCreateDate(Date createDate)
|
||||
{
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
/** 获取创建时间 */
|
||||
public Date getCreateDate()
|
||||
{
|
||||
return createDate;
|
||||
}
|
||||
/** 设置更新者 */
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
/** 获取更新者 */
|
||||
public String getUpdateBy()
|
||||
{
|
||||
return updateBy;
|
||||
}
|
||||
/** 设置更新时间 */
|
||||
public void setUpdateDate(Date updateDate)
|
||||
{
|
||||
this.updateDate = updateDate;
|
||||
}
|
||||
|
||||
/** 获取更新时间 */
|
||||
public Date getUpdateDate()
|
||||
{
|
||||
return updateDate;
|
||||
}
|
||||
/** 设置备注信息 */
|
||||
public void setRemarks(String remarks)
|
||||
{
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
/** 获取备注信息 */
|
||||
public String getRemarks()
|
||||
{
|
||||
return remarks;
|
||||
}
|
||||
/** 设置删除标记 */
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
/** 获取删除标记 */
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("trainCourseId", getTrainCourseId())
|
||||
.append("vipUserId", getVipUserId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createDate", getCreateDate())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateDate", getUpdateDate())
|
||||
.append("remarks", getRemarks())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.ruoyi.train.mapper;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourse;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.MyMapper;
|
||||
|
||||
/**
|
||||
* 课程 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface TrainCourseMapper extends MyMapper<TrainCourse>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询课程列表
|
||||
*
|
||||
* @param trainCourse 课程信息
|
||||
* @return 课程集合
|
||||
*/
|
||||
public List<TrainCourse> selectTrainCourseList(TrainCourse trainCourse);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.ruoyi.train.mapper;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourseSectionCourseware;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.MyMapper;
|
||||
|
||||
/**
|
||||
* 章节课件 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface TrainCourseSectionCoursewareMapper extends MyMapper<TrainCourseSectionCourseware>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询章节课件列表
|
||||
*
|
||||
* @param trainCourseSectionCourseware 章节课件信息
|
||||
* @return 章节课件集合
|
||||
*/
|
||||
public List<TrainCourseSectionCourseware> selectTrainCourseSectionCoursewareList(TrainCourseSectionCourseware trainCourseSectionCourseware);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.ruoyi.train.mapper;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourseSection;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.MyMapper;
|
||||
|
||||
/**
|
||||
* 课程章节 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface TrainCourseSectionMapper extends MyMapper<TrainCourseSection>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询课程章节列表
|
||||
*
|
||||
* @param trainCourseSection 课程章节信息
|
||||
* @return 课程章节集合
|
||||
*/
|
||||
public List<TrainCourseSection> selectTrainCourseSectionList(TrainCourseSection trainCourseSection);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.ruoyi.train.mapper;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourseUser;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.MyMapper;
|
||||
|
||||
/**
|
||||
* 课程使用对象 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface TrainCourseUserMapper extends MyMapper<TrainCourseUser>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询课程使用对象列表
|
||||
*
|
||||
* @param trainCourseUser 课程使用对象信息
|
||||
* @return 课程使用对象集合
|
||||
*/
|
||||
public List<TrainCourseUser> selectTrainCourseUserList(TrainCourseUser trainCourseUser);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.train.service;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourseSectionCourseware;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||
/**
|
||||
* 章节课件 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface ITrainCourseSectionCoursewareService extends AbstractBaseService<TrainCourseSectionCourseware>
|
||||
{
|
||||
/**
|
||||
* 查询章节课件分页列表
|
||||
*
|
||||
* @param trainCourseSectionCourseware 章节课件信息
|
||||
* @return 章节课件集合
|
||||
*/
|
||||
public List<TrainCourseSectionCourseware> selectTrainCourseSectionCoursewarePage(TrainCourseSectionCourseware trainCourseSectionCourseware);
|
||||
/**
|
||||
* 查询章节课件列表
|
||||
*
|
||||
* @param trainCourseSectionCourseware 章节课件信息
|
||||
* @return 章节课件集合
|
||||
*/
|
||||
public List<TrainCourseSectionCourseware> selectTrainCourseSectionCoursewareList(TrainCourseSectionCourseware trainCourseSectionCourseware);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.train.service;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourseSection;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||
/**
|
||||
* 课程章节 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface ITrainCourseSectionService extends AbstractBaseService<TrainCourseSection>
|
||||
{
|
||||
/**
|
||||
* 查询课程章节分页列表
|
||||
*
|
||||
* @param trainCourseSection 课程章节信息
|
||||
* @return 课程章节集合
|
||||
*/
|
||||
public List<TrainCourseSection> selectTrainCourseSectionPage(TrainCourseSection trainCourseSection);
|
||||
/**
|
||||
* 查询课程章节列表
|
||||
*
|
||||
* @param trainCourseSection 课程章节信息
|
||||
* @return 课程章节集合
|
||||
*/
|
||||
public List<TrainCourseSection> selectTrainCourseSectionList(TrainCourseSection trainCourseSection);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.train.service;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourse;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||
/**
|
||||
* 课程 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface ITrainCourseService extends AbstractBaseService<TrainCourse>
|
||||
{
|
||||
/**
|
||||
* 查询课程分页列表
|
||||
*
|
||||
* @param trainCourse 课程信息
|
||||
* @return 课程集合
|
||||
*/
|
||||
public List<TrainCourse> selectTrainCoursePage(TrainCourse trainCourse);
|
||||
/**
|
||||
* 查询课程列表
|
||||
*
|
||||
* @param trainCourse 课程信息
|
||||
* @return 课程集合
|
||||
*/
|
||||
public List<TrainCourse> selectTrainCourseList(TrainCourse trainCourse);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.ruoyi.train.service;
|
||||
|
||||
import com.ruoyi.train.domain.TrainCourseUser;
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||
/**
|
||||
* 课程使用对象 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface ITrainCourseUserService extends AbstractBaseService<TrainCourseUser>
|
||||
{
|
||||
/**
|
||||
* 查询课程使用对象分页列表
|
||||
*
|
||||
* @param trainCourseUser 课程使用对象信息
|
||||
* @return 课程使用对象集合
|
||||
*/
|
||||
public List<TrainCourseUser> selectTrainCourseUserPage(TrainCourseUser trainCourseUser);
|
||||
/**
|
||||
* 查询课程使用对象列表
|
||||
*
|
||||
* @param trainCourseUser 课程使用对象信息
|
||||
* @return 课程使用对象集合
|
||||
*/
|
||||
public List<TrainCourseUser> selectTrainCourseUserList(TrainCourseUser trainCourseUser);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.ruoyi.train.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.train.mapper.TrainCourseSectionCoursewareMapper;
|
||||
import com.ruoyi.train.domain.TrainCourseSectionCourseware;
|
||||
import com.ruoyi.train.service.ITrainCourseSectionCoursewareService;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
|
||||
/**
|
||||
* 章节课件 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Service
|
||||
public class TrainCourseSectionCoursewareServiceImpl extends AbstractBaseServiceImpl<TrainCourseSectionCoursewareMapper,TrainCourseSectionCourseware> implements ITrainCourseSectionCoursewareService
|
||||
{
|
||||
@Autowired
|
||||
private TrainCourseSectionCoursewareMapper trainCourseSectionCoursewareMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询章节课件列表
|
||||
*
|
||||
* @param trainCourseSectionCourseware 章节课件信息
|
||||
* @return 章节课件集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseSectionCourseware> selectTrainCourseSectionCoursewareList(TrainCourseSectionCourseware trainCourseSectionCourseware)
|
||||
{
|
||||
return trainCourseSectionCoursewareMapper.selectTrainCourseSectionCoursewareList(trainCourseSectionCourseware);
|
||||
}
|
||||
/**
|
||||
* 查询章节课件分页列表
|
||||
*
|
||||
* @param trainCourseSectionCourseware 章节课件信息
|
||||
* @return 章节课件集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseSectionCourseware> selectTrainCourseSectionCoursewarePage(TrainCourseSectionCourseware trainCourseSectionCourseware)
|
||||
{
|
||||
startPage();
|
||||
return trainCourseSectionCoursewareMapper.selectTrainCourseSectionCoursewareList(trainCourseSectionCourseware);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.ruoyi.train.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.train.mapper.TrainCourseSectionMapper;
|
||||
import com.ruoyi.train.domain.TrainCourseSection;
|
||||
import com.ruoyi.train.service.ITrainCourseSectionService;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
|
||||
/**
|
||||
* 课程章节 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Service
|
||||
public class TrainCourseSectionServiceImpl extends AbstractBaseServiceImpl<TrainCourseSectionMapper,TrainCourseSection> implements ITrainCourseSectionService
|
||||
{
|
||||
@Autowired
|
||||
private TrainCourseSectionMapper trainCourseSectionMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询课程章节列表
|
||||
*
|
||||
* @param trainCourseSection 课程章节信息
|
||||
* @return 课程章节集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseSection> selectTrainCourseSectionList(TrainCourseSection trainCourseSection)
|
||||
{
|
||||
return trainCourseSectionMapper.selectTrainCourseSectionList(trainCourseSection);
|
||||
}
|
||||
/**
|
||||
* 查询课程章节分页列表
|
||||
*
|
||||
* @param trainCourseSection 课程章节信息
|
||||
* @return 课程章节集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseSection> selectTrainCourseSectionPage(TrainCourseSection trainCourseSection)
|
||||
{
|
||||
startPage();
|
||||
return trainCourseSectionMapper.selectTrainCourseSectionList(trainCourseSection);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.ruoyi.train.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.train.mapper.TrainCourseMapper;
|
||||
import com.ruoyi.train.domain.TrainCourse;
|
||||
import com.ruoyi.train.service.ITrainCourseService;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
|
||||
/**
|
||||
* 课程 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Service
|
||||
public class TrainCourseServiceImpl extends AbstractBaseServiceImpl<TrainCourseMapper,TrainCourse> implements ITrainCourseService
|
||||
{
|
||||
@Autowired
|
||||
private TrainCourseMapper trainCourseMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询课程列表
|
||||
*
|
||||
* @param trainCourse 课程信息
|
||||
* @return 课程集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourse> selectTrainCourseList(TrainCourse trainCourse)
|
||||
{
|
||||
return trainCourseMapper.selectTrainCourseList(trainCourse);
|
||||
}
|
||||
/**
|
||||
* 查询课程分页列表
|
||||
*
|
||||
* @param trainCourse 课程信息
|
||||
* @return 课程集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourse> selectTrainCoursePage(TrainCourse trainCourse)
|
||||
{
|
||||
startPage();
|
||||
return trainCourseMapper.selectTrainCourseList(trainCourse);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.ruoyi.train.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.train.mapper.TrainCourseUserMapper;
|
||||
import com.ruoyi.train.domain.TrainCourseUser;
|
||||
import com.ruoyi.train.service.ITrainCourseUserService;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
|
||||
/**
|
||||
* 课程使用对象 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Service
|
||||
public class TrainCourseUserServiceImpl extends AbstractBaseServiceImpl<TrainCourseUserMapper,TrainCourseUser> implements ITrainCourseUserService
|
||||
{
|
||||
@Autowired
|
||||
private TrainCourseUserMapper trainCourseUserMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询课程使用对象列表
|
||||
*
|
||||
* @param trainCourseUser 课程使用对象信息
|
||||
* @return 课程使用对象集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseUser> selectTrainCourseUserList(TrainCourseUser trainCourseUser)
|
||||
{
|
||||
return trainCourseUserMapper.selectTrainCourseUserList(trainCourseUser);
|
||||
}
|
||||
/**
|
||||
* 查询课程使用对象分页列表
|
||||
*
|
||||
* @param trainCourseUser 课程使用对象信息
|
||||
* @return 课程使用对象集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseUser> selectTrainCourseUserPage(TrainCourseUser trainCourseUser)
|
||||
{
|
||||
startPage();
|
||||
return trainCourseUserMapper.selectTrainCourseUserList(trainCourseUser);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ import java.util.Map;
|
|||
@Controller
|
||||
@RequestMapping("/train/courseware/category")
|
||||
public class TrainCoursewareCategoryController extends BaseController {
|
||||
private String prefix = "courseware/category";
|
||||
private String prefix = "train/courseware/category";
|
||||
|
||||
@Autowired
|
||||
private ITrainCoursewareCategoryService trainCoursewareCategoryService;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,133 @@
|
|||
package com.ruoyi.train.courseware.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.train.courseware.domain.TrainCourseware;
|
||||
import com.ruoyi.train.courseware.domain.TrainCoursewareCategory;
|
||||
import com.ruoyi.train.courseware.service.ITrainCoursewareCategoryService;
|
||||
import com.ruoyi.train.courseware.service.ITrainCoursewareService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.base.BaseController;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.common.base.AjaxResult;
|
||||
import com.ruoyi.common.utils.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 课件 信息操作处理
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/train/trainCourseware")
|
||||
public class TrainCoursewareController extends BaseController
|
||||
{
|
||||
private String prefix = "train/trainCourseware";
|
||||
|
||||
@Autowired
|
||||
private ITrainCoursewareService trainCoursewareService;
|
||||
|
||||
@Autowired
|
||||
private ITrainCoursewareCategoryService trainCoursewareCategoryService;
|
||||
@RequiresPermissions("train:trainCourseware:view")
|
||||
@GetMapping()
|
||||
public String trainCourseware()
|
||||
{
|
||||
return prefix + "/trainCourseware";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询课件列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseware:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TrainCourseware trainCourseware)
|
||||
{
|
||||
List<TrainCourseware> list = trainCoursewareService.selectTrainCoursewarePage(trainCourseware);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出课件列表
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseware:export")
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TrainCourseware trainCourseware)
|
||||
{
|
||||
List<TrainCourseware> list = trainCoursewareService.selectTrainCoursewareList(trainCourseware);
|
||||
ExcelUtil<TrainCourseware> util = new ExcelUtil<TrainCourseware>(TrainCourseware.class);
|
||||
return util.exportExcel(list, "trainCourseware");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增课件
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存课件
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseware:add")
|
||||
@Log(title = "课件", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TrainCourseware trainCourseware)
|
||||
{
|
||||
return toAjax(trainCoursewareService.insert(trainCourseware));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改课件
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
|
||||
{
|
||||
TrainCourseware trainCourseware = trainCoursewareService.selectById(id);
|
||||
TrainCoursewareCategory category = trainCoursewareCategoryService.selectCategoryById((long)trainCourseware.getTrainCoursewareCategoryId());
|
||||
mmap.put("trainCourseware", trainCourseware);
|
||||
mmap.put("category", category);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存课件
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseware:edit")
|
||||
@Log(title = "课件", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TrainCourseware trainCourseware)
|
||||
{
|
||||
return toAjax(trainCoursewareService.updateById(trainCourseware));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除课件
|
||||
*/
|
||||
@RequiresPermissions("train:trainCourseware:remove")
|
||||
@Log(title = "课件", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(trainCoursewareService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,236 @@
|
|||
package com.ruoyi.train.courseware.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import javax.persistence.Id;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 课件表 train_courseware
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public class TrainCourseware
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** */
|
||||
@Id
|
||||
private Integer id;
|
||||
/** 部门ID */
|
||||
private Integer deptId;
|
||||
/** 课件分类ID */
|
||||
private Integer trainCoursewareCategoryId;
|
||||
/** 部门名称 */
|
||||
private String name;
|
||||
/** 课件类型(1-文档,2-图文,3-视频,4-音频,5-图片,6-外部链接) */
|
||||
private String type;
|
||||
/** 学习时常(分钟) */
|
||||
private Integer learnTime;
|
||||
/** 是否公开(1-是,0-不是) */
|
||||
private String state;
|
||||
/** 地址 */
|
||||
private String url;
|
||||
/** 正文 */
|
||||
private String content;
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
/** 创建者 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
private Date createTime;
|
||||
/** 更新者 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
private Date updateTime;
|
||||
/** 备注 */
|
||||
private String remark;
|
||||
|
||||
/** 设置 */
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/** 获取 */
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
/** 设置部门ID */
|
||||
public void setDeptId(Integer deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
/** 获取部门ID */
|
||||
public Integer getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
/** 设置课件分类ID */
|
||||
public void setTrainCoursewareCategoryId(Integer trainCoursewareCategoryId)
|
||||
{
|
||||
this.trainCoursewareCategoryId = trainCoursewareCategoryId;
|
||||
}
|
||||
|
||||
/** 获取课件分类ID */
|
||||
public Integer getTrainCoursewareCategoryId()
|
||||
{
|
||||
return trainCoursewareCategoryId;
|
||||
}
|
||||
/** 设置部门名称 */
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/** 获取部门名称 */
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
/** 设置课件类型(1-文档,2-图文,3-视频,4-音频,5-图片,6-外部链接) */
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/** 获取课件类型(1-文档,2-图文,3-视频,4-音频,5-图片,6-外部链接) */
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
/** 设置学习时常(分钟) */
|
||||
public void setLearnTime(Integer learnTime)
|
||||
{
|
||||
this.learnTime = learnTime;
|
||||
}
|
||||
|
||||
/** 获取学习时常(分钟) */
|
||||
public Integer getLearnTime()
|
||||
{
|
||||
return learnTime;
|
||||
}
|
||||
/** 设置是否公开(1-是,0-不是) */
|
||||
public void setState(String state)
|
||||
{
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/** 获取是否公开(1-是,0-不是) */
|
||||
public String getState()
|
||||
{
|
||||
return state;
|
||||
}
|
||||
/** 设置地址 */
|
||||
public void setUrl(String url)
|
||||
{
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/** 获取地址 */
|
||||
public String getUrl()
|
||||
{
|
||||
return url;
|
||||
}
|
||||
/** 设置正文 */
|
||||
public void setContent(String content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/** 获取正文 */
|
||||
public String getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
/** 设置删除标志(0代表存在 2代表删除) */
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
/** 获取删除标志(0代表存在 2代表删除) */
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
/** 设置创建者 */
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
/** 获取创建者 */
|
||||
public String getCreateBy()
|
||||
{
|
||||
return createBy;
|
||||
}
|
||||
/** 设置创建时间 */
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/** 获取创建时间 */
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
/** 设置更新者 */
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
/** 获取更新者 */
|
||||
public String getUpdateBy()
|
||||
{
|
||||
return updateBy;
|
||||
}
|
||||
/** 设置更新时间 */
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/** 获取更新时间 */
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
/** 设置备注 */
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
/** 获取备注 */
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("trainCoursewareCategoryId", getTrainCoursewareCategoryId())
|
||||
.append("name", getName())
|
||||
.append("type", getType())
|
||||
.append("learnTime", getLearnTime())
|
||||
.append("state", getState())
|
||||
.append("url", getUrl())
|
||||
.append("content", getContent())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.ruoyi.train.courseware.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.MyMapper;
|
||||
import com.ruoyi.train.courseware.domain.TrainCourseware;
|
||||
|
||||
/**
|
||||
* 课件 数据层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface TrainCoursewareMapper extends MyMapper<TrainCourseware>
|
||||
{
|
||||
|
||||
/**
|
||||
* 查询课件列表
|
||||
*
|
||||
* @param trainCourseware 课件信息
|
||||
* @return 课件集合
|
||||
*/
|
||||
public List<TrainCourseware> selectTrainCoursewareList(TrainCourseware trainCourseware);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.ruoyi.train.courseware.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||
import com.ruoyi.train.courseware.domain.TrainCourseware;
|
||||
|
||||
/**
|
||||
* 课件 服务层
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
public interface ITrainCoursewareService extends AbstractBaseService<TrainCourseware>
|
||||
{
|
||||
/**
|
||||
* 查询课件分页列表
|
||||
*
|
||||
* @param trainCourseware 课件信息
|
||||
* @return 课件集合
|
||||
*/
|
||||
public List<TrainCourseware> selectTrainCoursewarePage(TrainCourseware trainCourseware);
|
||||
/**
|
||||
* 查询课件列表
|
||||
*
|
||||
* @param trainCourseware 课件信息
|
||||
* @return 课件集合
|
||||
*/
|
||||
public List<TrainCourseware> selectTrainCoursewareList(TrainCourseware trainCourseware);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.ruoyi.train.courseware.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.train.courseware.domain.TrainCourseware;
|
||||
import com.ruoyi.train.courseware.mapper.TrainCoursewareMapper;
|
||||
import com.ruoyi.train.courseware.service.ITrainCoursewareService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.common.support.Convert;
|
||||
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
|
||||
/**
|
||||
* 课件 服务层实现
|
||||
*
|
||||
* @author zhujj
|
||||
* @date 2018-12-23
|
||||
*/
|
||||
@Service
|
||||
public class TrainCoursewareServiceImpl extends AbstractBaseServiceImpl<TrainCoursewareMapper,TrainCourseware> implements ITrainCoursewareService
|
||||
{
|
||||
@Autowired
|
||||
private TrainCoursewareMapper trainCoursewareMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询课件列表
|
||||
*
|
||||
* @param trainCourseware 课件信息
|
||||
* @return 课件集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseware> selectTrainCoursewareList(TrainCourseware trainCourseware)
|
||||
{
|
||||
return trainCoursewareMapper.selectTrainCoursewareList(trainCourseware);
|
||||
}
|
||||
/**
|
||||
* 查询课件分页列表
|
||||
*
|
||||
* @param trainCourseware 课件信息
|
||||
* @return 课件集合
|
||||
*/
|
||||
@Override
|
||||
public List<TrainCourseware> selectTrainCoursewarePage(TrainCourseware trainCourseware)
|
||||
{
|
||||
startPage();
|
||||
return trainCoursewareMapper.selectTrainCoursewareList(trainCourseware);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.train.mapper.TrainCourseMapper">
|
||||
|
||||
<resultMap type="TrainCourse" id="TrainCourseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="trainCourseCategoryId" column="train_course_category_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="cover" column="cover" />
|
||||
<result property="description" column="description" />
|
||||
<result property="state" column="state" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrainCourseVo">
|
||||
id, dept_id, train_course_category_id, name, cover, description, state, del_flag, create_by, create_time, update_by, update_time, remark </sql>
|
||||
|
||||
<select id="selectTrainCourseList" parameterType="TrainCourse" resultMap="TrainCourseResult">
|
||||
select
|
||||
<include refid="selectTrainCourseVo"/>
|
||||
from train_course
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="trainCourseCategoryId != null "> and train_course_category_id = #{trainCourseCategoryId}</if>
|
||||
<if test="name != null and name != '' "> and name = #{name}</if>
|
||||
<if test="cover != null and cover != '' "> and cover = #{cover}</if>
|
||||
<if test="description != null and description != '' "> and description = #{description}</if>
|
||||
<if test="state != null and state != '' "> and state = #{state}</if>
|
||||
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != '' "> and remark = #{remark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.train.mapper.TrainCourseSectionCoursewareMapper">
|
||||
|
||||
<resultMap type="TrainCourseSectionCourseware" id="TrainCourseSectionCoursewareResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trainCourseSectionId" column="train_course_section_id" />
|
||||
<result property="trainCoursewareId" column="train_courseware_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrainCourseSectionCoursewareVo">
|
||||
id, train_course_section_id, train_courseware_id, order_num, del_flag, create_by, create_time, update_by, update_time, remark </sql>
|
||||
|
||||
<select id="selectTrainCourseSectionCoursewareList" parameterType="TrainCourseSectionCourseware" resultMap="TrainCourseSectionCoursewareResult">
|
||||
select
|
||||
<include refid="selectTrainCourseSectionCoursewareVo"/>
|
||||
from train_course_section_courseware
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="trainCourseSectionId != null "> and train_course_section_id = #{trainCourseSectionId}</if>
|
||||
<if test="trainCoursewareId != null "> and train_courseware_id = #{trainCoursewareId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != '' "> and remark = #{remark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.train.mapper.TrainCourseSectionMapper">
|
||||
|
||||
<resultMap type="TrainCourseSection" id="TrainCourseSectionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trainCourseId" column="train_course_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrainCourseSectionVo">
|
||||
id, train_course_id, name, order_num, del_flag, create_by, create_time, update_by, update_time, remark </sql>
|
||||
|
||||
<select id="selectTrainCourseSectionList" parameterType="TrainCourseSection" resultMap="TrainCourseSectionResult">
|
||||
select
|
||||
<include refid="selectTrainCourseSectionVo"/>
|
||||
from train_course_section
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="trainCourseId != null "> and train_course_id = #{trainCourseId}</if>
|
||||
<if test="name != null and name != '' "> and name = #{name}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != '' "> and remark = #{remark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.train.mapper.TrainCourseUserMapper">
|
||||
|
||||
<resultMap type="TrainCourseUser" id="TrainCourseUserResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="trainCourseId" column="train_course_id" />
|
||||
<result property="vipUserId" column="vip_user_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
<result property="remarks" column="remarks" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrainCourseUserVo">
|
||||
id, train_course_id, vip_user_id, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
|
||||
|
||||
<select id="selectTrainCourseUserList" parameterType="TrainCourseUser" resultMap="TrainCourseUserResult">
|
||||
select
|
||||
<include refid="selectTrainCourseUserVo"/>
|
||||
from train_course_user
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="trainCourseId != null "> and train_course_id = #{trainCourseId}</if>
|
||||
<if test="vipUserId != null "> and vip_user_id = #{vipUserId}</if>
|
||||
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
|
||||
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.train.courseware.mapper.TrainCoursewareMapper">
|
||||
|
||||
<resultMap type="TrainCourseware" id="TrainCoursewareResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="trainCoursewareCategoryId" column="train_courseware_category_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="learnTime" column="learn_time" />
|
||||
<result property="state" column="state" />
|
||||
<result property="url" column="url" />
|
||||
<result property="content" column="content" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTrainCoursewareVo">
|
||||
id, dept_id, train_courseware_category_id, name, type, learn_time, state, url, content, del_flag, create_by, create_time, update_by, update_time, remark </sql>
|
||||
|
||||
<select id="selectTrainCoursewareList" parameterType="TrainCourseware" resultMap="TrainCoursewareResult">
|
||||
select
|
||||
<include refid="selectTrainCoursewareVo"/>
|
||||
from train_courseware
|
||||
<where>
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="trainCoursewareCategoryId != null "> and train_courseware_category_id = #{trainCoursewareCategoryId}</if>
|
||||
<if test="name != null and name != '' "> and name = #{name}</if>
|
||||
<if test="type != null and type != '' "> and type = #{type}</if>
|
||||
<if test="learnTime != null "> and learn_time = #{learnTime}</if>
|
||||
<if test="state != null and state != '' "> and state = #{state}</if>
|
||||
<if test="url != null and url != '' "> and url = #{url}</if>
|
||||
<if test="content != null and content != '' "> and content = #{content}</if>
|
||||
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||
<if test="remark != null and remark != '' "> and remark = #{remark}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourse-add">
|
||||
<input name="trainCourseCategoryId" type="hidden" id="treeId"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程分类:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="treeName" onclick="selectCategoryTree()" readonly="true" id="treeName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="name" name="name" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程封面:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="cover" name="cover" class="form-control" type="hidden">
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn" id="test1">上传图片</button>
|
||||
<div class="layui-upload-list">
|
||||
<img class="layui-upload-img" id="demo1">
|
||||
<p id="demoText"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="description" name="description" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label" title="(默认 1-公开,2-不公开)">是否公开:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="state" name="state" th:with="type=${@dict.getType('train_open_state')}" class="form-control" >
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourse"
|
||||
$("#form-trainCourse-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-trainCourse-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
/*课程管理-新增-选择分类树*/
|
||||
function selectCategoryTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "train/course/category/selectCategoryTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
if ($.tree.notAllowParents(tree)) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('upload', function() {
|
||||
var $ = layui.jquery
|
||||
, upload = layui.upload;
|
||||
//普通图片上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#test1'
|
||||
,url: '/upload/files'
|
||||
,before: function(obj){
|
||||
//预读本地文件示例,不支持ie8
|
||||
obj.preview(function(index, file, result){
|
||||
$('#demo1').attr('src', result); //图片链接(base64)
|
||||
});
|
||||
}
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if(res.code !=200){
|
||||
return layer.msg('上传失败');
|
||||
}
|
||||
//上传成功
|
||||
if(res.code ==200){
|
||||
$("#cover").val(res.fileName)
|
||||
return layer.msg('上传成功');
|
||||
}
|
||||
}
|
||||
,error: function(){
|
||||
//演示失败状态,并实现重传
|
||||
var demoText = $('#demoText');
|
||||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
||||
demoText.find('.demo-reload').on('click', function(){
|
||||
uploadInst.upload();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourse-edit" th:object="${trainCourse}">
|
||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||
<input name="trainCourseCategoryId" th:field="*{trainCourseCategoryId}" type="hidden" id="treeId"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程分类:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="treeName" onclick="selectCategoryTree()" th:field="${category.name}" readonly="true" id="treeName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程封面:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="cover" name="cover" th:field="*{cover}" class="form-control" type="hidden">
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn" id="test1">上传图片</button>
|
||||
<div class="layui-upload-list">
|
||||
<img class="layui-upload-img" id="demo1" th:src="@{/profile/avatar/}+${trainCourse.cover}">
|
||||
<p id="demoText"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程简介:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="description" name="description" th:field="*{description}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label" title="(默认 1-公开,2-不公开)">是否公开:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="state" name="state" th:with="type=${@dict.getType('train_open_state')}" class="form-control" >
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{state}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourse"
|
||||
$("#form-trainCourse-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-trainCourse-edit').serialize());
|
||||
}
|
||||
}
|
||||
/*课程管理-新增-选择分类树*/
|
||||
function selectCategoryTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "train/course/category/selectCategoryTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
if ($.tree.notAllowParents(tree)) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
}
|
||||
|
||||
layui.use('upload', function() {
|
||||
var $ = layui.jquery
|
||||
, upload = layui.upload;
|
||||
//普通图片上传
|
||||
var uploadInst = upload.render({
|
||||
elem: '#test1'
|
||||
,url: '/upload/files'
|
||||
,before: function(obj){
|
||||
//预读本地文件示例,不支持ie8
|
||||
obj.preview(function(index, file, result){
|
||||
$('#demo1').attr('src', result); //图片链接(base64)
|
||||
});
|
||||
}
|
||||
,done: function(res){
|
||||
//如果上传失败
|
||||
if(res.code !=200){
|
||||
return layer.msg('上传失败');
|
||||
}
|
||||
//上传成功
|
||||
if(res.code ==200){
|
||||
$("#cover").val(res.fileName)
|
||||
return layer.msg('上传成功');
|
||||
}
|
||||
}
|
||||
,error: function(){
|
||||
//演示失败状态,并实现重传
|
||||
var demoText = $('#demoText');
|
||||
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
|
||||
demoText.find('.demo-reload').on('click', function(){
|
||||
uploadInst.upload();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<body class="gray-bg">
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> 课程分类
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a type="button" class="btn btn-box-tool menuItem" href="#" onclick="category()" title="管理分类"><i class="fa fa-edit"></i></a>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新分类"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-div ui-layout-center">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
课程名称:<input type="text" name="name"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="train:trainCourse:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="train:trainCourse:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourse:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="train:trainCourse:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
|
||||
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('train:trainCourse:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('train:trainCourse:remove')}]];
|
||||
var datasState = [[${@dict.getType('train_open_state')}]];
|
||||
var prefix = ctx + "train/trainCourse";
|
||||
|
||||
$(function() {
|
||||
$('body').layout({ west__size: 185 });
|
||||
queryCategoryTree()
|
||||
initTable();
|
||||
});
|
||||
|
||||
function initTable(){
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "课程",
|
||||
uniqueId:'id',
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'trainCourseCategoryId',
|
||||
title : '课程分类',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'name',
|
||||
title : '课程名称'
|
||||
},
|
||||
{
|
||||
field : 'description',
|
||||
title : '课程介绍'
|
||||
},
|
||||
{
|
||||
field : 'state',
|
||||
title : '是否公开',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datasState, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者',
|
||||
},
|
||||
{
|
||||
field : 'createTime',
|
||||
title : '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
}
|
||||
function queryCategoryTree()
|
||||
{
|
||||
var url = ctx + "train/course/category/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
$("#trainCoursewareCategoryId").val(treeNode.id);
|
||||
$("#parentId").val(treeNode.pId);
|
||||
$.table.search();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
$._tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
|
||||
$('#btnCollapse').click(function() {
|
||||
$._tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
|
||||
$('#btnRefresh').click(function() {
|
||||
queryCategoryTree();
|
||||
});
|
||||
/*用户管理-部门*/
|
||||
function category() {
|
||||
var url = ctx + "system/dept";
|
||||
createMenuItem(url, "部门管理");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseSection-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCourseId" name="trainCourseId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">章节名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="name" name="name" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="orderNum" name="orderNum" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志(0代表存在 2代表删除):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="delFlag" name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseSection"
|
||||
$("#form-trainCourseSection-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-trainCourseSection-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseSection-edit" th:object="${trainCourseSection}">
|
||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCourseId" name="trainCourseId" th:field="*{trainCourseId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">章节名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="orderNum" name="orderNum" th:field="*{orderNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志(0代表存在 2代表删除):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="delFlag" name="delFlag" th:field="*{delFlag}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" th:field="*{updateBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" th:field="*{updateTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseSection"
|
||||
$("#form-trainCourseSection-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-trainCourseSection-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
课程ID:<input type="text" name="trainCourseId"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
章节名称:<input type="text" name="name"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
显示顺序:<input type="text" name="orderNum"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
删除标志(0代表存在 2代表删除):<input type="text" name="delFlag"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建者:<input type="text" name="createBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建时间:<input type="text" name="createTime"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新者:<input type="text" name="updateBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新时间:<input type="text" name="updateTime"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
备注:<input type="text" name="remark"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="train:trainCourseSection:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="train:trainCourseSection:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourseSection:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="train:trainCourseSection:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('train:trainCourseSection:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('train:trainCourseSection:remove')}]];
|
||||
var prefix = ctx + "train/trainCourseSection";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "课程章节",
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'id',
|
||||
title : '章节id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field : 'trainCourseId',
|
||||
title : '课程ID',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'name',
|
||||
title : '章节名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'orderNum',
|
||||
title : '显示顺序',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'delFlag',
|
||||
title : '删除标志(0代表存在 2代表删除)',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createTime',
|
||||
title : '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateBy',
|
||||
title : '更新者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateTime',
|
||||
title : '更新时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'remark',
|
||||
title : '备注',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseSectionCourseware-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程章节ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCourseSectionId" name="trainCourseSectionId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课件ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCoursewareId" name="trainCoursewareId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="orderNum" name="orderNum" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志(0代表存在 2代表删除):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="delFlag" name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseSectionCourseware"
|
||||
$("#form-trainCourseSectionCourseware-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-trainCourseSectionCourseware-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseSectionCourseware-edit" th:object="${trainCourseSectionCourseware}">
|
||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课程章节ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCourseSectionId" name="trainCourseSectionId" th:field="*{trainCourseSectionId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课件ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCoursewareId" name="trainCoursewareId" th:field="*{trainCoursewareId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">显示顺序:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="orderNum" name="orderNum" th:field="*{orderNum}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志(0代表存在 2代表删除):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="delFlag" name="delFlag" th:field="*{delFlag}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createTime" name="createTime" th:field="*{createTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" th:field="*{updateBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateTime" name="updateTime" th:field="*{updateTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseSectionCourseware"
|
||||
$("#form-trainCourseSectionCourseware-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-trainCourseSectionCourseware-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
课程章节ID:<input type="text" name="trainCourseSectionId"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
课件ID:<input type="text" name="trainCoursewareId"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
显示顺序:<input type="text" name="orderNum"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
删除标志(0代表存在 2代表删除):<input type="text" name="delFlag"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建者:<input type="text" name="createBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建时间:<input type="text" name="createTime"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新者:<input type="text" name="updateBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新时间:<input type="text" name="updateTime"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
备注:<input type="text" name="remark"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="train:trainCourseSectionCourseware:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="train:trainCourseSectionCourseware:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourseSectionCourseware:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="train:trainCourseSectionCourseware:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('train:trainCourseSectionCourseware:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('train:trainCourseSectionCourseware:remove')}]];
|
||||
var prefix = ctx + "train/trainCourseSectionCourseware";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "章节课件",
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'id',
|
||||
title : '章节课件id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field : 'trainCourseSectionId',
|
||||
title : '课程章节ID',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'trainCoursewareId',
|
||||
title : '课件ID',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'orderNum',
|
||||
title : '显示顺序',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'delFlag',
|
||||
title : '删除标志(0代表存在 2代表删除)',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createTime',
|
||||
title : '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateBy',
|
||||
title : '更新者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateTime',
|
||||
title : '更新时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'remark',
|
||||
title : '备注',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseUser-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试代码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCourseId" name="trainCourseId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">会员代码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="vipUserId" name="vipUserId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createDate" name="createDate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateDate" name="updateDate" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remarks" name="remarks" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标记:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="delFlag" name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseUser"
|
||||
$("#form-trainCourseUser-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-trainCourseUser-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseUser-edit" th:object="${trainCourseUser}">
|
||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">考试代码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="trainCourseId" name="trainCourseId" th:field="*{trainCourseId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">会员代码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="vipUserId" name="vipUserId" th:field="*{vipUserId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">创建时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="createDate" name="createDate" th:field="*{createDate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新者:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateBy" name="updateBy" th:field="*{updateBy}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">更新时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="updateDate" name="updateDate" th:field="*{updateDate}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注信息:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remarks" name="remarks" th:field="*{remarks}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标记:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="delFlag" name="delFlag" th:field="*{delFlag}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseUser"
|
||||
$("#form-trainCourseUser-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-trainCourseUser-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="gray-bg">
|
||||
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
考试代码:<input type="text" name="trainCourseId"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
会员代码:<input type="text" name="vipUserId"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建者:<input type="text" name="createBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
创建时间:<input type="text" name="createDate"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新者:<input type="text" name="updateBy"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
更新时间:<input type="text" name="updateDate"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
备注信息:<input type="text" name="remarks"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
删除标记:<input type="text" name="delFlag"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="train:trainCourseUser:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="train:trainCourseUser:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourseUser:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="train:trainCourseUser:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('train:trainCourseUser:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('train:trainCourseUser:remove')}]];
|
||||
var prefix = ctx + "train/trainCourseUser";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "课程使用对象",
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'id',
|
||||
title : '考试对象',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field : 'trainCourseId',
|
||||
title : '考试代码',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'vipUserId',
|
||||
title : '会员代码',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'createDate',
|
||||
title : '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateBy',
|
||||
title : '更新者',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'updateDate',
|
||||
title : '更新时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'remarks',
|
||||
title : '备注信息',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'delFlag',
|
||||
title : '删除标记',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseware-add">
|
||||
<input name="trainCoursewareCategoryId" type="hidden" id="treeId"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课件分类:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="treeName" onclick="selectCategoryTree()" readonly="true" id="treeName">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课件名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="name" name="name" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label" title="(1-文档,2-图文,3-视频,4-音频,5-图片,6-外部链接)">课件类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="type" name="type" th:with="type=${@dict.getType('train_courseware_category')}" class="form-control" >
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">学习时常(分钟):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="learnTime" name="learnTime" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">是否公开:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="onoffswitch" title="(1-是,0-不是)">
|
||||
<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="state" name="state">
|
||||
<label class="onoffswitch-label" for="state">
|
||||
<span class="onoffswitch-inner"></span>
|
||||
<span class="onoffswitch-switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">上传:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择多文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr><th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr></thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--<button type="button" class="layui-btn" id="testListAction">开始上传</button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">正文:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="content" name="content" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseware"
|
||||
$("#form-trainCourseware-add").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
var formData=$('#form-trainCourseware-add').serializeObject();
|
||||
debugger
|
||||
formData.state= $("input[name='state']").is(':checked') == true ? 1 : 2;
|
||||
formData.url = fileList.join(",");
|
||||
$.operate.save(prefix + "/add", formData);
|
||||
}
|
||||
}
|
||||
/*课件管理-新增-选择分类树*/
|
||||
function selectCategoryTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "train/courseware/category/selectCategoryTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
if ($.tree.notAllowParents(tree)) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
}
|
||||
var fileList=new Array();
|
||||
layui.use('upload', function() {
|
||||
var $ = layui.jquery
|
||||
, upload = layui.upload;
|
||||
//多文件列表示例
|
||||
var demoListView = $('#demoList')
|
||||
,uploadListIns = upload.render({
|
||||
elem: '#testList'
|
||||
,url: '/upload/files'
|
||||
,accept: 'file'
|
||||
,multiple: true
|
||||
,auto: true
|
||||
// ,bindAction: '#testListAction'
|
||||
,choose: function(obj){
|
||||
var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
|
||||
//读取本地文件
|
||||
obj.preview(function(index, file, result){
|
||||
var tr = $(['<tr id="upload-'+ index +'">'
|
||||
,'<td>'+ file.name +'</td>'
|
||||
,'<td>'+ (file.size/1014).toFixed(1) +'kb</td>'
|
||||
,'<td>等待上传</td>'
|
||||
,'<td>'
|
||||
,'<button class="layui-btn layui-btn-xs demo-reload layui-hide">重传</button>'
|
||||
,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
|
||||
,'</td>'
|
||||
,'</tr>'].join(''));
|
||||
|
||||
//单个重传
|
||||
tr.find('.demo-reload').on('click', function(){
|
||||
obj.upload(index, file);
|
||||
});
|
||||
|
||||
//删除
|
||||
tr.find('.demo-delete').on('click', function(){
|
||||
delete files[index]; //删除对应的文件
|
||||
tr.remove();
|
||||
uploadListIns.config.elem.next()[0].value = ''; //清空 input file 值,以免删除后出现同名文件不可选
|
||||
});
|
||||
|
||||
demoListView.append(tr);
|
||||
});
|
||||
}
|
||||
,done: function(res, index, upload){
|
||||
if(res.code == 200){ //上传成功
|
||||
var tr = demoListView.find('tr#upload-'+ index)
|
||||
,tds = tr.children();
|
||||
tds.eq(2).html('<span style="color: #5FB878;">上传成功</span>');
|
||||
tds.eq(3).html(''); //清空操作
|
||||
fileList.push(res.fileName);
|
||||
return delete this.files[index]; //删除文件队列已经上传成功的文件
|
||||
}
|
||||
this.error(index, upload);
|
||||
}
|
||||
,error: function(index, upload){
|
||||
var tr = demoListView.find('tr#upload-'+ index)
|
||||
,tds = tr.children();
|
||||
tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
|
||||
tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-trainCourseware-edit" th:object="${trainCourseware}">
|
||||
<input id="id" name="id" th:field="*{id}" type="hidden">
|
||||
<input name="trainCoursewareCategoryId" type="hidden" id="treeId" th:field="*{trainCoursewareCategoryId}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课件分类:</label>
|
||||
<div class="col-sm-8">
|
||||
<input class="form-control" type="text" name="treeName" th:field="*{name}" onclick="selectCategoryTree()" readonly="true" id="treeName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">课件名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="name" name="name" th:field="*{name}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label" title="(1-文档,2-图文,3-视频,4-音频,5-图片,6-外部链接)">课件类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="type" name="type" th:with="type=${@dict.getType('train_courseware_category')}" class="form-control" >
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">学习时常(分钟):</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="learnTime" name="learnTime" th:field="*{learnTime}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label" title="(1-是,0-不是)">是否公开:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="onoffswitch">
|
||||
<input type="checkbox" th:checked="${trainCourseware.state == '1' ? true : false}" class="onoffswitch-checkbox" id="state" name="state">
|
||||
<label class="onoffswitch-label" for="state">
|
||||
<span class="onoffswitch-inner"></span>
|
||||
<span class="onoffswitch-switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="url" name="url" th:field="*{url}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">正文:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="content" name="content" th:field="*{content}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div th:include="include::footer"></div>
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "train/trainCourseware"
|
||||
$("#form-trainCourseware-edit").validate({
|
||||
rules:{
|
||||
xxxx:{
|
||||
required:true,
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
var formData=$('#form-trainCourseware-edit').serializeObject();
|
||||
formData.state= $("input[name='state']").is(':checked') == true ? 1 : 2;
|
||||
$.operate.save(prefix + "/edit",formData);
|
||||
}
|
||||
}
|
||||
|
||||
/*课件管理-新增-选择分类树*/
|
||||
function selectCategoryTree() {
|
||||
var treeId = $("#treeId").val();
|
||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
||||
var url = ctx + "train/courseware/category/selectCategoryTree/" + deptId;
|
||||
var options = {
|
||||
title: '选择部门',
|
||||
width: "380",
|
||||
url: url,
|
||||
callBack: doSubmit
|
||||
};
|
||||
$.modal.openOptions(options);
|
||||
}
|
||||
function doSubmit(index, layero){
|
||||
var tree = layero.find("iframe")[0].contentWindow.$._tree;
|
||||
if ($.tree.notAllowParents(tree)) {
|
||||
var body = layer.getChildFrame('body', index);
|
||||
$("#treeId").val(body.find('#treeId').val());
|
||||
$("#treeName").val(body.find('#treeName').val());
|
||||
layer.close(index);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<meta charset="utf-8">
|
||||
<head th:include="include :: header"></head>
|
||||
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/jquery-ztree/3.5/css/metro/zTreeStyle.css}" rel="stylesheet"/>
|
||||
<body class="gray-bg">
|
||||
<div class="ui-layout-west">
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa icon-grid"></i> 课件分类
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a type="button" class="btn btn-box-tool menuItem" href="#" onclick="category()" title="管理分类"><i class="fa fa-edit"></i></a>
|
||||
<button type="button" class="btn btn-box-tool" id="btnExpand" title="展开" style="display:none;"><i class="fa fa-chevron-up"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnCollapse" title="折叠"><i class="fa fa-chevron-down"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" id="btnRefresh" title="刷新分类"><i class="fa fa-refresh"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui-layout-content">
|
||||
<div id="tree" class="ztree"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-div ui-layout-center">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
|
||||
<input type="hidden" id="trainCoursewareCategoryId" name="trainCoursewareCategoryId">
|
||||
<input type="hidden" id="parentId" name="parentId">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
课件名称:<input type="text" name="name"/>
|
||||
</li>
|
||||
<li>
|
||||
课件类型:<!--(1-文档,2-图文,3-视频,4-音频,5-图片,6-外部链接)-->
|
||||
<select name="status" th:with="type=${@dict.getType('train_courseware_category')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm hidden-xs" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="train:trainCourseware:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="train:trainCourseware:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="train:trainCourseware:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="train:trainCourseware:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:include="include :: footer"></div>
|
||||
<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
|
||||
<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('train:trainCourseware:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('train:trainCourseware:remove')}]];
|
||||
var datas = [[${@dict.getType('train_courseware_category')}]];
|
||||
var datasState = [[${@dict.getType('train_open_state')}]];
|
||||
var prefix = ctx + "train/trainCourseware";
|
||||
|
||||
$(function() {
|
||||
$('body').layout({ west__size: 185 });
|
||||
queryCategoryTree();
|
||||
queryTrainCourseware();
|
||||
});
|
||||
function queryTrainCourseware() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "课件",
|
||||
uniqueId:'id',
|
||||
search: false,
|
||||
showExport: true,
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field : 'trainCoursewareCategoryId',
|
||||
title : '课件分类',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'name',
|
||||
title : '课件名称',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field : 'type',
|
||||
title : '课件类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field : 'learnTime',
|
||||
title : '学习时常(分钟)',
|
||||
},
|
||||
{
|
||||
field : 'state',
|
||||
title : '是否公开',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(datasState, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field : 'createBy',
|
||||
title : '创建者',
|
||||
},
|
||||
{
|
||||
field : 'createTime',
|
||||
title : '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
}
|
||||
|
||||
function queryCategoryTree()
|
||||
{
|
||||
var url = ctx + "train/courseware/category/treeData";
|
||||
var options = {
|
||||
url: url,
|
||||
expandLevel: 2,
|
||||
onClick : zOnClick
|
||||
};
|
||||
$.tree.init(options);
|
||||
|
||||
function zOnClick(event, treeId, treeNode) {
|
||||
$("#trainCoursewareCategoryId").val(treeNode.id);
|
||||
$("#parentId").val(treeNode.pId);
|
||||
$.table.search();
|
||||
}
|
||||
}
|
||||
|
||||
$('#btnExpand').click(function() {
|
||||
$._tree.expandAll(true);
|
||||
$(this).hide();
|
||||
$('#btnCollapse').show();
|
||||
});
|
||||
|
||||
$('#btnCollapse').click(function() {
|
||||
$._tree.expandAll(false);
|
||||
$(this).hide();
|
||||
$('#btnExpand').show();
|
||||
});
|
||||
|
||||
$('#btnRefresh').click(function() {
|
||||
queryCategoryTree();
|
||||
});
|
||||
/*用户管理-部门*/
|
||||
function category() {
|
||||
var url = ctx + "system/dept";
|
||||
createMenuItem(url, "部门管理");
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue