parent
dddfde2ed9
commit
02a27da72f
@ -0,0 +1,28 @@
|
|||||||
|
package com.tamguo.modules.tiku.model.condition;
|
||||||
|
|
||||||
|
public class ChapterCondition {
|
||||||
|
|
||||||
|
private String parentCode;
|
||||||
|
private String id;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getParentCode() {
|
||||||
|
return parentCode;
|
||||||
|
}
|
||||||
|
public void setParentCode(String parentCode) {
|
||||||
|
this.parentCode = parentCode;
|
||||||
|
}
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.tamguo.modules.tiku.web;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import com.tamguo.modules.tiku.model.ChapterEntity;
|
||||||
|
import com.tamguo.modules.tiku.model.condition.ChapterCondition;
|
||||||
|
import com.tamguo.modules.tiku.service.IChapterService;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping(path="tiku/chapter")
|
||||||
|
public class ChapterController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IChapterService iChapterService;
|
||||||
|
|
||||||
|
@RequestMapping(path="listData",method=RequestMethod.POST)
|
||||||
|
@ResponseBody
|
||||||
|
public List<ChapterEntity> listData(ChapterCondition condition) {
|
||||||
|
return iChapterService.listData(condition);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,226 @@
|
|||||||
|
<!DOCTYPE html><html><head><meta charset="utf-8"><meta content="webkit" name="renderer"/><meta http-equiv="X-UA-Compatible"
|
||||||
|
content="IE=edge"><meta name="keywords" content="PoweredByJeeSiteV4.0"/><meta http-equiv="Cache-Control"
|
||||||
|
content="no-cache, no-store, must-revalidate"/><meta name="description" content="PoweredByJeeSiteV4.0"/><meta
|
||||||
|
content="no-cache" http-equiv="Pragma"/><meta http-equiv="Expires" content="0"/><meta
|
||||||
|
content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
|
||||||
|
<title>书籍管理 - JeeSite Demo</title>
|
||||||
|
<script th:src="${setting.domain + 'global.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-1.12.4.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-migrate-1.4.1.min.js'}"></script>
|
||||||
|
<!--[if lt IE 9]><script src="/js/static/common/h5fix.min.js"></script><![endif]-->
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'fonts/font-icons.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'bootstrap/css/bootstrap.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'select2/4.0/select2.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'icheck/1.0/minimal/grey.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'adminlte/css/AdminLTE.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/jeesite.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/common.css'}">
|
||||||
|
</head><body class="hold-transition ">
|
||||||
|
<div class="wrapper"><div class="main-content">
|
||||||
|
<div class="box box-main">
|
||||||
|
<div class="box-header">
|
||||||
|
<div class="box-title">
|
||||||
|
<i class="fa icon-trophy"></i> 新增书籍
|
||||||
|
</div>
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form id="inputForm" th:action="${setting.domain + 'tiku/book/save'}" method="post" class="form-horizontal">
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="form-unit">基本信息</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 书籍名称:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="name" name="name" value="" maxlength="100" class="form-control required "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 出版社:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="publishingHouse" name="publishingHouse" value="" maxlength="64" class="form-control required"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required">*</span> 归属科目:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="input-group treeselect" id="companyDiv" data-url="tiku/course/treeData?">
|
||||||
|
<input id="courseId" type="hidden" name="courseId" value="" class="isReset"/>
|
||||||
|
<input id="courseName" type="text" name="courseName" value=""
|
||||||
|
class="form-control " readonly="readonly"
|
||||||
|
/><span class="input-group-btn"><a id="companyButton" href="javascript:"
|
||||||
|
class="btn btn-default "><i class="fa fa-search"></i></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$("#companyButton,#courseName").click(function(){
|
||||||
|
if ($("#companyButton").hasClass("disabled")){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
var options = {
|
||||||
|
type: 2,
|
||||||
|
maxmin: true,
|
||||||
|
shadeClose: true,
|
||||||
|
title: '公司选择',
|
||||||
|
area: ['300px', '400px'],
|
||||||
|
content: 'sys/treeselect',
|
||||||
|
contentFormData: {
|
||||||
|
url: $('#companyDiv').attr('data-url'),
|
||||||
|
checkbox: 'false',
|
||||||
|
expandLevel: '-1',
|
||||||
|
selectCodes: $("#courseId").val(),
|
||||||
|
isReturnValue: 'false'
|
||||||
|
},
|
||||||
|
success: function(layero, index){
|
||||||
|
if ($(js.layer.window).width() < 300
|
||||||
|
|| $(js.layer.window).height() < 400){
|
||||||
|
js.layer.full(index);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
btn: ['<i class="fa fa-check"></i> 确定'],
|
||||||
|
btn1: function(index, layero){
|
||||||
|
var win = js.layer.iframeWindow(index);
|
||||||
|
win.$('#keyword').val('').change(); var codes = [], names = [], nodes;
|
||||||
|
if ("false" == "true"){
|
||||||
|
nodes = win.tree.getCheckedNodes(true);
|
||||||
|
}else{
|
||||||
|
nodes = win.tree.getSelectedNodes();
|
||||||
|
}
|
||||||
|
for(var i=0; i<nodes.length; i++) {
|
||||||
|
if (nodes[i].level == 0 && nodes[i].isParent){
|
||||||
|
js.showMessage("不能选择根节点("+nodes[i].name+")请重新选择。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (nodes[i].isParent){
|
||||||
|
js.showMessage("不能选择父节点("+nodes[i].name+")请重新选择。");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var code = nodes[i]['false'=='true'?'value':'id'], name = nodes[i]['name'];
|
||||||
|
codes.push(code.replace(/^u_/g,''));
|
||||||
|
names.push(name.replace(/\([0-9]*\)/g,''));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(typeof treeselectCheck == 'function'){
|
||||||
|
if (!treeselectCheck('course', nodes)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$("#courseId").val(codes.join(',')).change();
|
||||||
|
$("#courseName").val(names.join(',')).change();
|
||||||
|
try { $('#courseId,#courseName').valid(); }catch(e){}
|
||||||
|
if(typeof treeselectCallback == 'function'){
|
||||||
|
treeselectCallback('course', 'ok', index, layero, nodes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
options.btn.push('<i class="fa fa-eraser"></i> 清除');
|
||||||
|
options['btn'+options.btn.length] = function(index, layero){
|
||||||
|
$("#courseId").val('').change();
|
||||||
|
$("#courseName").val('').change();
|
||||||
|
if(typeof treeselectCallback == 'function'){
|
||||||
|
treeselectCallback('course', 'clear', index, layero);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
options.btn.push('<i class="fa fa-close"></i> 关闭');
|
||||||
|
options['btn'+options.btn.length] = function(index, layero){
|
||||||
|
if(typeof treeselectCallback == 'function'){
|
||||||
|
treeselectCallback('course', 'cancel', index, layero);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
js.layer.open(options);
|
||||||
|
});
|
||||||
|
</script> </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 排序号:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="sort" name="sort" value="" maxlength="10" class="form-control digits"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 问题数量:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="questionNum" name="questionNum" value="" maxlength="64" class="form-control required abc"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 知识点数量:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<input type="text" id="pointNum" name="pointNum" value="" maxlength="10" class="form-control digits"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2" title="">
|
||||||
|
<span class="required hide">*</span> 备注信息:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<textarea id="remarks" name="remarks" rows="4" maxlength="500" class="form-control "></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
|
||||||
|
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="scroll-up" href="#" class="btn btn-sm"><i class="fa fa-angle-double-up"></i></a>
|
||||||
|
<script th:src="${setting.domain + 'bootstrap/js/bootstrap.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/select2.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'layer/3.1/layer.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'my97/WdatePicker.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-validation/1.16/jquery.validate.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-validation/1.16/localization/messages_zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-validation/1.16/jquery.validate.extend.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/jeesite.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/i18n/jeesite_zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/common.js'}"></script>
|
||||||
|
<script>
|
||||||
|
$("#inputForm").validate({
|
||||||
|
submitHandler: function(form){
|
||||||
|
js.ajaxSubmitForm($(form), function(data){
|
||||||
|
js.showMessage(data.message);
|
||||||
|
if(data.code == 0){
|
||||||
|
js.closeCurrentTabPage(function(contentWindow){
|
||||||
|
contentWindow.page();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, "json");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
@ -0,0 +1,108 @@
|
|||||||
|
<!DOCTYPE html><html><head><meta charset="utf-8"><meta content="webkit" name="renderer"/><meta http-equiv="X-UA-Compatible"
|
||||||
|
content="IE=edge"><meta name="keywords" content="PoweredByJeeSiteV4.0"/><meta http-equiv="Cache-Control"
|
||||||
|
content="no-cache, no-store, must-revalidate"/><meta name="description" content="PoweredByJeeSiteV4.0"/><meta
|
||||||
|
content="no-cache" http-equiv="Pragma"/><meta http-equiv="Expires" content="0"/><meta
|
||||||
|
content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
|
||||||
|
<title>章节管理 - JeeSite Demo</title>
|
||||||
|
<script th:src="${setting.domain + 'global.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-1.12.4.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-migrate-1.4.1.min.js'}"></script>
|
||||||
|
<!--[if lt IE 9]><script src="http://localhost/common/h5fix.min.js"></script><![endif]-->
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'fonts/font-icons.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'bootstrap/css/bootstrap.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'select2/4.0/select2.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'icheck/1.0/minimal/grey.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'jquery-ztree/3.5/css/metro/zTreeStyle.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'jquery-plugins/jquery.layout-latest.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'adminlte/css/AdminLTE.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/jeesite.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/common.css'}">
|
||||||
|
</head><body class="hold-transition ">
|
||||||
|
<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">
|
||||||
|
<button type="button" class="btn btn-box-tool addTabPage" data-href="sys/chapter/list" title="章节管理"><i class="fa fa-edit"></i></button>
|
||||||
|
<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="ui-layout-center">
|
||||||
|
<iframe id="mainFrame" name="mainFrame" class="ui-layout-content p0"
|
||||||
|
th:src="${setting.domain + 'tiku/chapter/list'}"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="scroll-up" href="#" class="btn btn-sm"><i class="fa fa-angle-double-up"></i></a>
|
||||||
|
<script th:src="${setting.domain + 'bootstrap/js/bootstrap.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/select2.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'layer/3.1/layer.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'my97/WdatePicker.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-ztree/3.5/js/jquery.ztree.all-3.5.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-ui-draggable-1.12.1.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-ui-effect-1.12.1.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery-plugins/jquery.layout-latest.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/jeesite.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/i18n/jeesite_zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/common.js'}"></script>
|
||||||
|
<script>
|
||||||
|
// 初始化布局
|
||||||
|
$('body').layout({
|
||||||
|
west__size: 180
|
||||||
|
});
|
||||||
|
// 主页框架
|
||||||
|
var win = $("#mainFrame")[0].contentWindow;
|
||||||
|
// 树结构初始化加载
|
||||||
|
var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData: {enable: true},key: {url:"nourl"}},
|
||||||
|
callback:{onClick:function(event, treeId, treeNode){
|
||||||
|
tree.expandNode(treeNode);
|
||||||
|
win.$('input[type=reset]').click();
|
||||||
|
win.$('#companyCode').val(treeNode.id);
|
||||||
|
win.$('#companyName').val(treeNode.name);
|
||||||
|
win.page();
|
||||||
|
}}
|
||||||
|
}, tree, loadTree = function(){
|
||||||
|
js.ajaxSubmit(ctx + "tiku/book/treeData?___t=" + new Date().getTime(), {ctrlPermi:'2'/*1拥有的权限 2管理的权限*/}, function(data){
|
||||||
|
tree = $.fn.zTree.init($("#tree"), setting, data);//.expandAll(true);
|
||||||
|
// 展开第一级节点
|
||||||
|
/* var nodes = tree.getNodesByParam("level", 0);
|
||||||
|
for(var i=0; i<nodes.length; i++) {
|
||||||
|
tree.expandNode(nodes[i], true, false, false);
|
||||||
|
} */
|
||||||
|
// 展开第二级节点
|
||||||
|
// nodes = tree.getNodesByParam("level", 1);
|
||||||
|
// for(var i=0; i<nodes.length; i++) {
|
||||||
|
// tree.expandNode(nodes[i], true, false, false);
|
||||||
|
// }
|
||||||
|
}, null, null, js.text('loading.message'));
|
||||||
|
};loadTree();
|
||||||
|
// 工具栏按钮绑定
|
||||||
|
$('#btnExpand').click(function(){
|
||||||
|
tree.expandAll(true);
|
||||||
|
$(this).hide();
|
||||||
|
$('#btnCollapse').show();
|
||||||
|
});
|
||||||
|
$('#btnCollapse').click(function(){
|
||||||
|
tree.expandAll(false);
|
||||||
|
$(this).hide();
|
||||||
|
$('#btnExpand').show();
|
||||||
|
});
|
||||||
|
$('#btnRefresh').click(function(){
|
||||||
|
loadTree();
|
||||||
|
});
|
||||||
|
//调用子页分页函数
|
||||||
|
function page(){
|
||||||
|
win.page();
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,115 @@
|
|||||||
|
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"><meta content="webkit" name="renderer"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible"
|
||||||
|
content="IE=edge"><meta name="keywords" content="PoweredByJeeSiteV4.0"/><meta http-equiv="Cache-Control"
|
||||||
|
content="no-cache, no-store, must-revalidate"/><meta name="description" content="PoweredByJeeSiteV4.0"/><meta
|
||||||
|
content="no-cache" http-equiv="Pragma"/><meta http-equiv="Expires" content="0"/><meta
|
||||||
|
content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
|
||||||
|
<title>章节管理 - JeeSite Demo</title>
|
||||||
|
<script th:src="${setting.domain + 'global.min.js?ctx=/js/a'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-1.12.4.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jquery/jquery-migrate-1.4.1.min.js'}"></script>
|
||||||
|
<!--[if lt IE 9]><script src="/js/static/common/h5fix.min.js"></script><![endif]-->
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'fonts/font-icons.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'bootstrap/css/bootstrap.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'select2/4.0/select2.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'icheck/1.0/minimal/grey.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'jqGrid/4.7/css/ui.jqgrid.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'adminlte/css/AdminLTE.min.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/jeesite.css'}">
|
||||||
|
<link rel="stylesheet" th:href="${setting.domain + 'common/common.css'}">
|
||||||
|
</head><body class="hold-transition ">
|
||||||
|
<div class="wrapper"><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 href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
|
||||||
|
<a href="#" class="btn btn-default" id="btnRefreshTree" title="刷新"><i class="fa fa-refresh"></i> 刷新</a>
|
||||||
|
<a href="#" class="btn btn-default" id="btnExpandTreeNode" title="展开一级"><i class="fa fa-angle-double-down"></i> 展开</a>
|
||||||
|
<a href="#" class="btn btn-default" id="btnCollapseTreeNode" title="折叠全部"><i class="fa fa-angle-double-up"></i> 折叠</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<form id="searchForm" th:action="${setting.domain + 'tiku/chapter/listData'}" method="post" class="form-inline hide" data-page-no="" data-page-size="" data-order-by="">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">章节代码:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<input type="text" id="id" name="id" value="" maxlength="100" class="form-control width-120"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">章节名称:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<input type="text" id="name" name="name" value="" maxlength="100" class="form-control width-120"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">状态:</label>
|
||||||
|
<div class="control-inline width-60">
|
||||||
|
<select id="status" name="status" class="form-control">
|
||||||
|
<option value=""> </option>
|
||||||
|
<option value="0">正常</option>
|
||||||
|
<option value="2">停用</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||||
|
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<table id="dataGrid"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a id="scroll-up" href="#" class="btn btn-sm"><i class="fa fa-angle-double-up"></i></a>
|
||||||
|
<script th:src="${setting.domain + 'bootstrap/js/bootstrap.min.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/select2.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'select2/4.0/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'layer/3.1/layer.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'my97/WdatePicker.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/jquery.jqGrid.extend.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'jqGrid/4.7/js/i18n/zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/jeesite.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/i18n/jeesite_zh_CN.js'}"></script>
|
||||||
|
<script th:src="${setting.domain + 'common/common.js'}"></script>
|
||||||
|
<script>
|
||||||
|
// 初始化DataGrid对象
|
||||||
|
$('#dataGrid').dataGrid({
|
||||||
|
searchForm: $("#searchForm"),
|
||||||
|
columnModel: [
|
||||||
|
{header:'章节名称', name:'name', index:'a.office_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||||
|
return '( '+row.id+' ) '+'<a href="sys/office/update?officeCode='+row.officeCode+'" class="btnList" data-title="编辑机构">'+(val||row.id)+'</a>';
|
||||||
|
}},
|
||||||
|
{header:'问题数量', name:'questionNum', index:'a.question_num', width:100, align:"center"},
|
||||||
|
{header:'知识点数量', name:'pointNum', index:'a.pointNum', width:100, align:"center"},
|
||||||
|
{header:'操作', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a href="sys/chapter/update?officeCode='+row.officeCode+'" class="btnList" title="编辑机构"><i class="fa fa-pencil"></i></a> ');
|
||||||
|
if (row.status == Global.STATUS_NORMAL){
|
||||||
|
actions.push('<a href="sys/chapter/disable?officeCode='+row.officeCode+'" class="btnList" title="停用机构" data-confirm="确认要停用该机构吗?"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||||
|
}
|
||||||
|
if (row.status == Global.STATUS_DISABLE){
|
||||||
|
actions.push('<a href="sys/chapter/enable?officeCode='+row.officeCode+'" class="btnList" title="启用机构" data-confirm="确认要启用该机构吗?"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||||
|
}
|
||||||
|
actions.push('<a href="sys/chapter/delete?officeCode='+row.officeCode+'" class="btnList" title="删除机构" data-confirm="确认要删除该机构及所有子机构吗?" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a> ');
|
||||||
|
actions.push('<a href="sys/chapter/add?parentCode='+row.id+'" class="btnList" title="新增下级机构"><i class="fa fa-plus-square"></i></a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}}
|
||||||
|
],
|
||||||
|
treeGrid: true, // 启用树结构表格
|
||||||
|
defaultExpandLevel: 0, // 默认展开的层次
|
||||||
|
expandNodeClearPostData: 'viewCode,officeName,fullName,officeType,', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据) // 加载成功后执行事件
|
||||||
|
ajaxSuccess: function(data){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Reference in new issue