This commit is contained in:
zhujunjieit 2018-12-25 23:43:27 +08:00
parent e62bd05ceb
commit 2db66566af
11 changed files with 283 additions and 155 deletions

View File

@ -87,7 +87,7 @@ public class TrainCourseSectionController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult addSave(TrainCourseSection trainCourseSection) public AjaxResult addSave(TrainCourseSection trainCourseSection)
{ {
return toAjax(trainCourseSectionService.insert(trainCourseSection)); return toAjax(trainCourseSectionService.insertSelective(trainCourseSection));
} }
/** /**

View File

@ -4,6 +4,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.base.BaseEntity; import com.ruoyi.common.base.BaseEntity;
import javax.persistence.Id; import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
/** /**
@ -32,6 +33,10 @@ public class TrainCourse {
* 课程名称 * 课程名称
*/ */
private String name; private String name;
/**
* 价格
*/
private BigDecimal price;
/** /**
* 课程封面 * 课程封面
*/ */
@ -123,6 +128,14 @@ public class TrainCourse {
return name; return name;
} }
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
/** /**
* 设置课程封面 * 设置课程封面
*/ */

View File

@ -2,8 +2,8 @@ package com.ruoyi.train.course.domain;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.base.BaseEntity; import com.ruoyi.common.base.BaseEntity;
import javax.persistence.Id; import javax.persistence.Id;
import java.util.Date; import java.util.Date;
/** /**
* 课程章节表 train_course_section * 课程章节表 train_course_section
@ -13,153 +13,164 @@ import com.ruoyi.common.base.BaseEntity;
*/ */
public class TrainCourseSection public class TrainCourseSection
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 章节id */ /** 章节id */
@Id @Id
private Integer id; private Integer id;
/** 课程ID */ /** 课程ID */
private Integer trainCourseId; private Integer trainCourseId;
/** 章节名称 */ /** 章节名称 */
private String name; private String name;
/** 显示顺序 */ /** 显示顺序 */
private Integer orderNum; private Integer orderNum;
/** 删除标志0代表存在 2代表删除 */ /** 课件 */
private String delFlag; private String courseware;
/** 创建者 */ /** 删除标志0代表存在 2代表删除 */
private String createBy; private String delFlag;
/** 创建时间 */ /** 创建者 */
private Date createTime; private String createBy;
/** 更新者 */ /** 创建时间 */
private String updateBy; private Date createTime;
/** 更新时间 */ /** 更新者 */
private Date updateTime; private String updateBy;
/** 备注 */ /** 更新时间 */
private String remark; private Date updateTime;
/** 备注 */
private String remark;
/** 设置章节id */ /** 设置章节id */
public void setId(Integer id) public void setId(Integer id)
{ {
this.id = id; this.id = id;
} }
/** 获取章节id */ /** 获取章节id */
public Integer getId() public Integer getId()
{ {
return id; return id;
} }
/** 设置课程ID */ /** 设置课程ID */
public void setTrainCourseId(Integer trainCourseId) public void setTrainCourseId(Integer trainCourseId)
{ {
this.trainCourseId = trainCourseId; this.trainCourseId = trainCourseId;
} }
/** 获取课程ID */ /** 获取课程ID */
public Integer getTrainCourseId() public Integer getTrainCourseId()
{ {
return trainCourseId; return trainCourseId;
} }
/** 设置章节名称 */ /** 设置章节名称 */
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name;
} }
public String getCourseware() {
return courseware;
}
public void setCourseware(String courseware) {
this.courseware = courseware;
}
/** 获取章节名称 */ /** 获取章节名称 */
public String getName() public String getName()
{ {
return name; return name;
} }
/** 设置显示顺序 */ /** 设置显示顺序 */
public void setOrderNum(Integer orderNum) public void setOrderNum(Integer orderNum)
{ {
this.orderNum = orderNum; this.orderNum = orderNum;
} }
/** 获取显示顺序 */ /** 获取显示顺序 */
public Integer getOrderNum() public Integer getOrderNum()
{ {
return orderNum; return orderNum;
} }
/** 设置删除标志0代表存在 2代表删除 */ /** 设置删除标志0代表存在 2代表删除 */
public void setDelFlag(String delFlag) public void setDelFlag(String delFlag)
{ {
this.delFlag = delFlag; this.delFlag = delFlag;
} }
/** 获取删除标志0代表存在 2代表删除 */ /** 获取删除标志0代表存在 2代表删除 */
public String getDelFlag() public String getDelFlag()
{ {
return delFlag; return delFlag;
} }
/** 设置创建者 */ /** 设置创建者 */
public void setCreateBy(String createBy) public void setCreateBy(String createBy)
{ {
this.createBy = createBy; this.createBy = createBy;
} }
/** 获取创建者 */ /** 获取创建者 */
public String getCreateBy() public String getCreateBy()
{ {
return createBy; return createBy;
} }
/** 设置创建时间 */ /** 设置创建时间 */
public void setCreateTime(Date createTime) public void setCreateTime(Date createTime)
{ {
this.createTime = createTime; this.createTime = createTime;
} }
/** 获取创建时间 */ /** 获取创建时间 */
public Date getCreateTime() public Date getCreateTime()
{ {
return createTime; return createTime;
} }
/** 设置更新者 */ /** 设置更新者 */
public void setUpdateBy(String updateBy) public void setUpdateBy(String updateBy)
{ {
this.updateBy = updateBy; this.updateBy = updateBy;
} }
/** 获取更新者 */ /** 获取更新者 */
public String getUpdateBy() public String getUpdateBy()
{ {
return updateBy; return updateBy;
} }
/** 设置更新时间 */ /** 设置更新时间 */
public void setUpdateTime(Date updateTime) public void setUpdateTime(Date updateTime)
{ {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
/** 获取更新时间 */ /** 获取更新时间 */
public Date getUpdateTime() public Date getUpdateTime()
{ {
return updateTime; return updateTime;
} }
/** 设置备注 */ /** 设置备注 */
public void setRemark(String remark) public void setRemark(String remark)
{ {
this.remark = remark; this.remark = remark;
} }
/** 获取备注 */ /** 获取备注 */
public String getRemark() public String getRemark()
{ {
return remark; return remark;
} }
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("trainCourseId", getTrainCourseId()) .append("trainCourseId", getTrainCourseId())
.append("name", getName()) .append("name", getName())
.append("orderNum", getOrderNum()) .append("courseware", getCourseware())
.append("delFlag", getDelFlag()) .append("orderNum", getOrderNum())
.append("createBy", getCreateBy()) .append("delFlag", getDelFlag())
.append("createTime", getCreateTime()) .append("createBy", getCreateBy())
.append("updateBy", getUpdateBy()) .append("createTime", getCreateTime())
.append("updateTime", getUpdateTime()) .append("updateBy", getUpdateBy())
.append("remark", getRemark()) .append("updateTime", getUpdateTime())
.toString(); .append("remark", getRemark())
} .toString();
} }
}

View File

@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="trainCourseCategoryId" column="train_course_category_id" /> <result property="trainCourseCategoryId" column="train_course_category_id" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="price" column="price" />
<result property="cover" column="cover" /> <result property="cover" column="cover" />
<result property="description" column="description" /> <result property="description" column="description" />
<result property="state" column="state" /> <result property="state" column="state" />
@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTrainCourseVo"> <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> id, dept_id, train_course_category_id, name,price, cover, description, state, del_flag, create_by, create_time, update_by, update_time, remark </sql>
<select id="selectTrainCourseList" parameterType="TrainCourse" resultMap="TrainCourseResult"> <select id="selectTrainCourseList" parameterType="TrainCourse" resultMap="TrainCourseResult">
select select

View File

@ -8,6 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" /> <result property="id" column="id" />
<result property="trainCourseId" column="train_course_id" /> <result property="trainCourseId" column="train_course_id" />
<result property="name" column="name" /> <result property="name" column="name" />
<result property="courseware" column="courseware" />
<result property="orderNum" column="order_num" /> <result property="orderNum" column="order_num" />
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
@ -18,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTrainCourseSectionVo"> <sql id="selectTrainCourseSectionVo">
id, train_course_id, name, order_num, del_flag, create_by, create_time, update_by, update_time, remark </sql> id, train_course_id, name,courseware, order_num, del_flag, create_by, create_time, update_by, update_time, remark </sql>
<select id="selectTrainCourseSectionList" parameterType="TrainCourseSection" resultMap="TrainCourseSectionResult"> <select id="selectTrainCourseSectionList" parameterType="TrainCourseSection" resultMap="TrainCourseSectionResult">
select select

View File

@ -3,6 +3,12 @@
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/> <link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/>
<style>
.layui-upload-img{
width:80px;
height: 80px;
}
</style>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-trainCourse-add"> <form class="form-horizontal m" id="form-trainCourse-add">
@ -19,6 +25,12 @@
<input id="name" name="name" class="form-control" type="text"> <input id="name" name="name" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">课程价格:</label>
<div class="col-sm-8">
<input id="price" name="price" class="form-control" type="number">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">课程封面:</label> <label class="col-sm-3 control-label">课程封面:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -32,12 +44,6 @@
</div> </div>
</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"> <div class="form-group">
<label class="col-sm-3 control-label" title="(默认 1-公开2-不公开)">是否公开:</label> <label class="col-sm-3 control-label" title="(默认 1-公开2-不公开)">是否公开:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -46,6 +52,12 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">课程简介:</label>
<div class="col-sm-8">
<textarea id="description" name="description" placeholder="请输入章节介绍" class="layui-textarea"></textarea>
</div>
</div>
</form> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>

View File

@ -3,6 +3,12 @@
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/> <link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/>
<style>
.layui-upload-img{
width:80px;
height: 80px;
}
</style>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-trainCourse-edit" th:object="${trainCourse}"> <form class="form-horizontal m" id="form-trainCourse-edit" th:object="${trainCourse}">
@ -11,7 +17,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">课程分类:</label> <label class="col-sm-3 control-label">课程分类:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="text" name="treeName" onclick="selectCategoryTree()" th:field="${category.name}" readonly="true" id="treeName"> <input class="form-control" type="text" name="treeName" onclick="selectCategoryTree()" th:value="${category.name}" readonly="true" id="treeName">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -20,6 +26,12 @@
<input id="name" name="name" th:field="*{name}" class="form-control" type="text"> <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">课程价格:</label>
<div class="col-sm-8">
<input id="price" name="price" th:field="*{price}" class="form-control" type="number">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">课程封面:</label> <label class="col-sm-3 control-label">课程封面:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -34,12 +46,6 @@
</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"> <div class="form-group">
<label class="col-sm-3 control-label" title="(默认 1-公开2-不公开)">是否公开:</label> <label class="col-sm-3 control-label" title="(默认 1-公开2-不公开)">是否公开:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -48,6 +54,12 @@
</select> </select>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">课程简介:</label>
<div class="col-sm-8">
<textarea id="description" name="description" th:field="*{description}" placeholder="请输入章节介绍" class="layui-textarea"></textarea>
</div>
</div>
</form> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>

View File

@ -29,6 +29,8 @@
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
<form id="formId"> <form id="formId">
<input type="hidden" id="trainCourseCategoryId" name="trainCourseCategoryId">
<input type="hidden" id="parentId" name="parentId">
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
@ -100,6 +102,10 @@
field : 'name', field : 'name',
title : '课程名称' title : '课程名称'
}, },
{
field : 'price',
title : '课程价格'
},
{ {
field : 'description', field : 'description',
title : '课程介绍' title : '课程介绍'
@ -145,7 +151,7 @@
$.tree.init(options); $.tree.init(options);
function zOnClick(event, treeId, treeNode) { function zOnClick(event, treeId, treeNode) {
$("#trainCoursewareCategoryId").val(treeNode.id); $("#trainCourseCategoryId").val(treeNode.id);
$("#parentId").val(treeNode.pId); $("#parentId").val(treeNode.pId);
$.table.search(); $.table.search();
} }
@ -171,6 +177,7 @@
var url ="/train/course/category"; var url ="/train/course/category";
createMenuItem(url, "分类管理"); createMenuItem(url, "分类管理");
} }
/**跳转到课程章节*/
function courseSection(id) { function courseSection(id) {
var url = "/train/trainCourseSection?trainCourseId="+id; var url = "/train/trainCourseSection?trainCourseId="+id;
createMenuItem(url, "课程内容"); createMenuItem(url, "课程内容");

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> <html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-trainCourseSection-add"> <form class="form-horizontal m" id="form-trainCourseSection-add">
@ -17,6 +18,27 @@
<input id="name" name="name" class="form-control" type="text"> <input id="name" name="name" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">上传课件:</label>
<div class="col-sm-8">
<input id="courseware" name="courseware" class="form-control" type="hidden">
<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"> <div class="form-group">
<label class="col-sm-3 control-label">显示顺序:</label> <label class="col-sm-3 control-label">显示顺序:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -26,12 +48,13 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">章节介绍:</label> <label class="col-sm-3 control-label">章节介绍:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input id="remark" name="remark" class="form-control" type="text"> <textarea id="remark" name="remark" placeholder="请输入章节介绍" class="layui-textarea"></textarea>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
<div th:include="include::footer"></div> <div th:include="include::footer"></div>
<script th:src="@{/ajax/libs/layui/layui.js}"></script>
<script type="text/javascript"> <script type="text/javascript">
var prefix = ctx + "train/trainCourseSection" var prefix = ctx + "train/trainCourseSection"
$("#form-trainCourseSection-add").validate({ $("#form-trainCourseSection-add").validate({
@ -44,9 +67,73 @@
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-trainCourseSection-add').serialize()); $("#courseware").val(fileList.join(","));
var formData=$('#form-trainCourseSection-add').serialize();
$.operate.save(prefix + "/add",formData );
} }
} }
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'
,data:{module:"train/courseware"}//文件存放路径
,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> </script>
</body> </body>
</html> </html>

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> <html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/layui/css/layui.css}" rel="stylesheet"/>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-trainCourseSection-edit" th:object="${trainCourseSection}"> <form class="form-horizontal m" id="form-trainCourseSection-edit" th:object="${trainCourseSection}">
@ -18,6 +19,12 @@
<input id="name" name="name" th:field="*{name}" class="form-control" type="text"> <input id="name" name="name" th:field="*{name}" class="form-control" type="text">
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-3 control-label">课件:</label>
<div class="col-sm-8">
<input id="courseware" name="courseware" th:field="*{courseware}" class="form-control" type="text">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">显示顺序:</label> <label class="col-sm-3 control-label">显示顺序:</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -27,7 +34,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">章节介绍:</label> <label class="col-sm-3 control-label">章节介绍:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> <textarea id="remark" name="remark" th:field="*{remark}" placeholder="请输入章节介绍" class="layui-textarea"></textarea>
</div> </div>
</div> </div>
</form> </form>

View File

@ -2,28 +2,6 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<link th:href="@{/ajax/libs/jquery-layout/jquery.layout-latest.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="container-div ui-layout-center">
<div class="row"> <div class="row">
<div class="col-sm-12 search-collapse"> <div class="col-sm-12 search-collapse">
@ -62,13 +40,11 @@
</div> </div>
</div> </div>
<div th:include="include :: footer"></div> <div th:include="include :: footer"></div>
<script th:src="@{/ajax/libs/jquery-layout/jquery.layout-latest.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('train:trainCourseSection:edit')}]]; var editFlag = [[${@permission.hasPermi('train:trainCourseSection:edit')}]];
var removeFlag = [[${@permission.hasPermi('train:trainCourseSection:remove')}]]; var removeFlag = [[${@permission.hasPermi('train:trainCourseSection:remove')}]];
var prefix = ctx + "train/trainCourseSection"; var prefix = ctx + "train/trainCourseSection";
$(function() { $(function() {
$('body').layout({ west__size: 185 });
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", createUrl: prefix + "/add",