1、线上课程页面调整

2、线上课程评论增加字段
3、页面无用代码注释
This commit is contained in:
xuhubin 2020-11-05 09:48:46 +08:00
parent 4cda333799
commit 4213107216
19 changed files with 575 additions and 250 deletions

View File

@ -1,4 +1,4 @@
package com.ruoyi.web.controller.front;
package com.ruoyi.front.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* 线上课程评价Controller
*
* @author ruoyi
* @date 2020-10-21
* @date 2020-11-05
*/
@Controller
@RequestMapping("/front/evaluate")

View File

@ -501,3 +501,47 @@ function uploadFile(async, fullPathId, fileNameId, absolutePAthId) {
return res;
}
//上传文件
function uploadMoreFile(async, fullPathId,formNameId, fileNameId, absolutePAthId) {
let res = -1;
var formData = new FormData();
if ($('#filePath')[0].files[0] == null) {
$.modal.alertWarning("请先选择文件路径");
return res;
}
formData.append('fileName', $("#fileName").val());
formData.append('file', $('#'+formNameId)[0].files[0]);
$.ajax({
url: "/common/upload",
type: 'post',
cache: false,
data: formData,
processData: false,
contentType: false,
dataType: "json",
async: async,
success: function(result) {
if (result.code == web_status.SUCCESS) {
if (fullPathId) {
$('#' + fullPathId).val(result.url);
}
if (fileNameId) {
$('#' + fileNameId).val(result.originalFilename);
}
if (absolutePAthId) {
$('#' + absolutePAthId).val(result.fileName);
}
} else {
$.modal.alertError(result.msg);
}
res = result.code;
},
error: function(error) {
$.modal.alertWarning("文件上传失败。");
}
});
return res;
}

View File

@ -1,5 +1,6 @@
package com.ruoyi.front.domain;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -9,7 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* 线上课程评价对象 online_courses_evaluate
*
* @author ruoyi
* @date 2020-10-21
* @date 2020-11-05
*/
public class OnlineCoursesEvaluate extends BaseEntity
{
@ -33,6 +34,18 @@ public class OnlineCoursesEvaluate extends BaseEntity
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 状态0:待审核1审核不通过2审核通过 */
@Excel(name = "状态", readConverterExp = "0=:待审核1审核不通过2审核通过")
private String auditStatus;
/** 审核者 */
@Excel(name = "审核者")
private String checkBy;
/** 审核时间 */
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date checkTime;
public void setId(Long id)
{
this.id = id;
@ -78,6 +91,33 @@ public class OnlineCoursesEvaluate extends BaseEntity
{
return delFlag;
}
public void setAuditStatus(String auditStatus)
{
this.auditStatus = auditStatus;
}
public String getAuditStatus()
{
return auditStatus;
}
public void setCheckBy(String checkBy)
{
this.checkBy = checkBy;
}
public String getCheckBy()
{
return checkBy;
}
public void setCheckTime(Date checkTime)
{
this.checkTime = checkTime;
}
public Date getCheckTime()
{
return checkTime;
}
@Override
public String toString() {
@ -91,6 +131,9 @@ public class OnlineCoursesEvaluate extends BaseEntity
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("auditStatus", getAuditStatus())
.append("checkBy", getCheckBy())
.append("checkTime", getCheckTime())
.toString();
}
}

View File

@ -7,7 +7,7 @@ import com.ruoyi.front.domain.OnlineCoursesEvaluate;
* 线上课程评价Mapper接口
*
* @author ruoyi
* @date 2020-10-21
* @date 2020-11-05
*/
public interface OnlineCoursesEvaluateMapper
{

View File

@ -7,7 +7,7 @@ import com.ruoyi.front.domain.OnlineCoursesEvaluate;
* 线上课程评价Service接口
*
* @author ruoyi
* @date 2020-10-21
* @date 2020-11-05
*/
public interface IOnlineCoursesEvaluateService
{

View File

@ -13,7 +13,7 @@ import com.ruoyi.common.core.text.Convert;
* 线上课程评价Service业务层处理
*
* @author ruoyi
* @date 2020-10-21
* @date 2020-11-05
*/
@Service
public class OnlineCoursesEvaluateServiceImpl implements IOnlineCoursesEvaluateService

View File

@ -14,10 +14,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="auditStatus" column="audit_status" />
<result property="checkBy" column="check_by" />
<result property="checkTime" column="check_time" />
</resultMap>
<sql id="selectOnlineCoursesEvaluateVo">
select id, online_courses_id, evaluate_content, anonymous_flag, del_flag, create_by, create_time, update_by, update_time from online_courses_evaluate
select id, online_courses_id, evaluate_content, anonymous_flag, del_flag, create_by, create_time, update_by, update_time, audit_status, check_by, check_time from online_courses_evaluate
</sql>
<select id="selectOnlineCoursesEvaluateList" parameterType="OnlineCoursesEvaluate" resultMap="OnlineCoursesEvaluateResult">
@ -26,6 +29,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="onlineCoursesId != null "> and online_courses_id = #{onlineCoursesId}</if>
<if test="evaluateContent != null and evaluateContent != ''"> and evaluate_content = #{evaluateContent}</if>
<if test="anonymousFlag != null and anonymousFlag != ''"> and anonymous_flag = #{anonymousFlag}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="checkBy != null and checkBy != ''"> and check_by = #{checkBy}</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
</where>
</select>
@ -45,6 +51,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="auditStatus != null">audit_status,</if>
<if test="checkBy != null">check_by,</if>
<if test="checkTime != null">check_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="onlineCoursesId != null">#{onlineCoursesId},</if>
@ -55,6 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="auditStatus != null">#{auditStatus},</if>
<if test="checkBy != null">#{checkBy},</if>
<if test="checkTime != null">#{checkTime},</if>
</trim>
</insert>
@ -69,6 +81,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="checkBy != null">check_by = #{checkBy},</if>
<if test="checkTime != null">check_time = #{checkTime},</if>
</trim>
where id = #{id}
</update>

View File

@ -41,40 +41,40 @@
}
}
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
});
// $(function() {
// $('.summernote').summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// });
</script>
</body>
</html>

View File

@ -34,44 +34,44 @@
$.operate.save(prefix + "/edit", $('#form-carousel-edit').serialize());
}
}
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
var content = $("input[name='" + this.id + "']").val();
$('#' + this.id).summernote('code', content);
})
});
// $(function() {
// $('.summernote').each(function(i) {
// $('#' + this.id).summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// var content = $("input[name='" + this.id + "']").val();
// $('#' + this.id).summernote('code', content);
// })
// });
</script>
</body>
</html>

View File

@ -73,40 +73,40 @@
}
}
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
});
// $(function() {
// $('.summernote').summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// });
</script>
</body>
</html>

View File

@ -74,44 +74,44 @@
}
}
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
var content = $("input[name='" + this.id + "']").val();
$('#' + this.id).summernote('code', content);
})
});
// $(function() {
// $('.summernote').each(function(i) {
// $('#' + this.id).summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// var content = $("input[name='" + this.id + "']").val();
// $('#' + this.id).summernote('code', content);
// })
// });
</script>
</body>
</html>

View File

@ -18,12 +18,12 @@
<input name="introduction" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<!--<div class="form-group">
<label class="col-sm-3 control-label">点击量:</label>
<div class="col-sm-8">
<input name="hits" class="form-control" type="text">
</div>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">针对人群:</label>
<div class="col-sm-8">
@ -43,18 +43,20 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">图片地址</label>
<label class="col-sm-3 control-label is-required">图片:</label>
<div class="col-sm-8">
<textarea name="pictureUrl" class="form-control" required></textarea>
<input id="filePath" name="filePath" class="form-control" type="file">
<input id="pictureUrl" name="pictureUrl" type="text" hidden>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">视频地址</label>
<label class="col-sm-3 control-label is-required">视频信息</label>
<div class="col-sm-8">
<textarea name="videoUrl" class="form-control" required></textarea>
<input id="videoFilePath" name="videoFilePath" class="form-control" type="file" multiple data-min-file-count="1" data-theme="fas">
<input id="videoUrl" name="videoUrl" type="text" hidden>
</div>
</div>
<div class="form-group">
<!--<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="radio-box">
@ -63,13 +65,22 @@
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label">删除标志:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text">
</div>
</div>
</div>-->
</form>
</div>
<th:block th:include="include :: footer" />
@ -81,9 +92,51 @@
function submitHandler() {
if ($.validate.form()) {
let result = uploadFile(false, "pictureUrl");
if (result != web_status.SUCCESS) {
return;
}
let result2 = uploadMoreFile(false, "videoUrl","videoFilePath");
if (result2 != web_status.SUCCESS) {
return;
}
$.operate.save(prefix + "/add", $('#form-courses-add').serialize());
}
}
// $(function() {
// $('.summernote').summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// });
</script>
</body>
</html>

View File

@ -18,10 +18,10 @@
<label>简介:</label>
<input type="text" name="introduction"/>
</li>
<li>
<!--<li>
<label>点击量:</label>
<input type="text" name="hits"/>
</li>
</li>-->
<li>
<label>针对人群:</label>
<input type="text" name="targetPeople"/>
@ -35,10 +35,15 @@
<input type="text" name="coursesLevel"/>
</li>
<li>
<label>状态:</label>
<!--<label>状态:</label>
<select name="status">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>-->
<label>状态:</label>
<select name="status" th:with="type=${@dict.getType('sys_normal_disable')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
@ -54,15 +59,19 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="front:courses:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="front:courses:edit">
<!--<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="front:courses:edit">
<i class="fa fa-edit"></i> 修改
</a>
</a>-->
<!--actions.push('<a class="btn btn-success btn-xs ' + evaluateFlag + '" href="javascript:void(0)" onclick="toEvaluateList(\'' + row.id + '\')"><i class="fa fa-edit"></i>管理评论</a>');-->
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="front:courses:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="front:courses:export">
<i class="fa fa-download"></i> 导出
<a class="btn btn-success" onclick="toEvaluateList()" shiro:hasPermission="front:evaluate:view">
<i class="fa fa-edit"></i> 评论管理
</a>
<!--<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="front:courses:export">
<i class="fa fa-download"></i> 导出
</a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
@ -74,8 +83,12 @@
var editFlag = [[${@permission.hasPermi('front:courses:edit')}]];
var removeFlag = [[${@permission.hasPermi('front:courses:remove')}]];
var prefix = ctx + "front/courses";
function toEvaluateList() {
var url = ctx +"front/evaluate";
$.modal.openTab("评价管理" ,url );
}
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
@ -117,7 +130,10 @@
},
{
field: 'pictureUrl',
title: '图片地址'
title: '图片地址',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'videoUrl',
@ -140,6 +156,7 @@
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -19,12 +19,12 @@
<input name="introduction" th:field="*{introduction}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<!--<div class="form-group">
<label class="col-sm-3 control-label">点击量:</label>
<div class="col-sm-8">
<input name="hits" th:field="*{hits}" class="form-control" type="text">
</div>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">针对人群:</label>
<div class="col-sm-8">
@ -44,18 +44,23 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">图片地址</label>
<label class="col-sm-3 control-label is-required">图片:</label>
<div class="col-sm-8">
<textarea name="pictureUrl" class="form-control" required>[[*{pictureUrl}]]</textarea>
<input id="filePath" name="filePath" class="form-control" type="file">
<input id="pictureUrl" name="pictureUrl" th:field="*{pictureUrl}" type="text" hidden>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">视频地址</label>
<div class="col-sm-8">
<label class="col-sm-3 control-label is-required">视频信息</label>
<!--<div class="col-sm-8">
<textarea name="videoUrl" class="form-control" required>[[*{videoUrl}]]</textarea>
</div>-->
<div class="col-sm-8">
<input id="videoFilePath" name="videoFilePath" class="form-control" type="file" multiple data-min-file-count="1" data-theme="fas">
<input id="videoUrl" name="videoUrl" th:field="*{videoUrl}" type="text" hidden>
</div>
</div>
<div class="form-group">
<!--<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="radio-box">
@ -64,11 +69,21 @@
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">状态:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_normal_disable')}">
<input type="radio" th:id="${dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "front/courses";
$("#form-courses-edit").validate({
focusCleanup: true
@ -76,9 +91,52 @@
function submitHandler() {
if ($.validate.form()) {
let result = uploadFile(false, "pictureUrl");
if (result != web_status.SUCCESS) {
return;
}
let result2 = uploadMoreFile(false, "videoUrl","videoFilePath");
if (result2 != web_status.SUCCESS) {
return;
}
$.operate.save(prefix + "/edit", $('#form-courses-edit').serialize());
}
}
// $(function() {
// $('.summernote').summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// });
</script>
</body>
</html>

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增线上课程评价')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
@ -32,9 +33,35 @@
<input 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">
<div class="radio-box">
<input type="radio" name="auditStatus" value="">
<label th:for="auditStatus" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核者:</label>
<div class="col-sm-8">
<input name="checkBy" 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="input-group date">
<input name="checkTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "front/evaluate"
@ -48,6 +75,12 @@
}
}
$("input[name='checkTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',

View File

@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改线上课程评价')" />
<th:block th:include="include :: datetimepicker-css" />
<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
@ -27,9 +28,35 @@
<input name="anonymousFlag" th:field="*{anonymousFlag}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">状态:</label>
<div class="col-sm-8">
<div class="radio-box">
<input type="radio" name="auditStatus" value="">
<label th:for="auditStatus" th:text="未知"></label>
</div>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">审核者:</label>
<div class="col-sm-8">
<input name="checkBy" th:field="*{checkBy}" 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="input-group date">
<input name="checkTime" th:value="${#dates.format(onlineCoursesEvaluate.checkTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript">
var prefix = ctx + "front/evaluate";
@ -43,6 +70,12 @@
}
}
$("input[name='checkTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({

View File

@ -14,9 +14,26 @@
<label>线上课程ID</label>
<input type="text" name="onlineCoursesId"/>
</li>
<!--<li>-->
<!--<label>匿名标志:</label>-->
<!--<input type="text" name="anonymousFlag"/>-->
<!--</li>-->
<li>
<label>匿名标志:</label>
<input type="text" name="anonymousFlag"/>
<label>状态:</label>
<select name="auditStatus">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<label>审核者:</label>
<input type="text" name="checkBy"/>
</li>
<li class="select-time">
<label>审核时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCheckTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCheckTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -80,6 +97,18 @@
field: 'anonymousFlag',
title: '匿名标志'
},
{
field: 'auditStatus',
title: '状态'
},
{
field: 'checkBy',
title: '审核者'
},
{
field: 'checkTime',
title: '审核时间'
},
{
title: '操作',
align: 'center',

View File

@ -69,40 +69,40 @@
$.operate.save(prefix + "/add", $('#form-recruitment-add').serialize());
}
}
$(function() {
$('.summernote').summernote({
lang: 'zh-CN',
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
});
// $(function() {
// $('.summernote').summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// });
</script>
</body>
</html>

View File

@ -70,44 +70,44 @@
$.operate.save(prefix + "/edit", $('#form-recruitment-edit').serialize());
}
}
$(function() {
$('.summernote').each(function(i) {
$('#' + this.id).summernote({
lang: 'zh-CN',
callbacks: {
onChange: function(contents, $edittable) {
$("input[name='" + this.id + "']").val(contents);
},
onImageUpload: function(files) {
var obj = this;
var data = new FormData();
data.append("file", files[0]);
$.ajax({
type: "post",
url: ctx + "common/upload",
data: data,
cache: false,
contentType: false,
processData: false,
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
$('#' + obj.id).summernote('insertImage', result.url);
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertWarning("图片上传失败。");
}
});
}
}
});
var content = $("input[name='" + this.id + "']").val();
$('#' + this.id).summernote('code', content);
})
});
// $(function() {
// $('.summernote').each(function(i) {
// $('#' + this.id).summernote({
// lang: 'zh-CN',
// callbacks: {
// onChange: function(contents, $edittable) {
// $("input[name='" + this.id + "']").val(contents);
// },
// onImageUpload: function(files) {
// var obj = this;
// var data = new FormData();
// data.append("file", files[0]);
// $.ajax({
// type: "post",
// url: ctx + "common/upload",
// data: data,
// cache: false,
// contentType: false,
// processData: false,
// dataType: 'json',
// success: function(result) {
// if (result.code == web_status.SUCCESS) {
// $('#' + obj.id).summernote('insertImage', result.url);
// } else {
// $.modal.alertError(result.msg);
// }
// },
// error: function(error) {
// $.modal.alertWarning("图片上传失败。");
// }
// });
// }
// }
// });
// var content = $("input[name='" + this.id + "']").val();
// $('#' + this.id).summernote('code', content);
// })
// });
</script>
</body>
</html>