-
- {php}
- $school = schlist('区级','部级');
- {/php}
-
-
-
- {foreach $school as $key=>$vo }
-
- {/foreach}
-
-
-
-
- {php}$category = getCategory(114);{/php}
-
-
-
- {foreach $category as $key=>$vo }
-
- {/foreach}
-
-
-
+{block name="nav"}
+
+ 荣誉管理
+ 荣誉册
+
+{/block}
+{block name="search"}
+
{/block}
-{block name="tables"}
-
-
-
+{block name="table"}
+
{/block}
{block name="myjs"}
-
+
+
+
+
{/block}
\ No newline at end of file
diff --git a/application/rongyu/view/js_rongyu_info/create.html b/application/rongyu/view/js_rongyu_info/create.html
index ac1bffe2..fd8c9571 100644
--- a/application/rongyu/view/js_rongyu_info/create.html
+++ b/application/rongyu/view/js_rongyu_info/create.html
@@ -1,366 +1,84 @@
{extend name="common@create" /}
-{block name="mycss"}
-{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.css" /}
+{block name="jscss"}
{/block}
-{block name="formaa"}
-
-
+{block name="form"}
+
{/block}
-{block name="yanzheng"}
-{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.js"}
-
+{/block}
-
- // 上传文件
- $(function(){
- $('.skin-minimal input').iCheck({
- checkboxClass: 'icheckbox-blue',
- radioClass: 'iradio-blue',
- increaseArea: '20%'
- });
-
- $list = $("#fileList"),
- $btn = $("#btn-star"),
- state = "pending",
- uploader;
-
- var uploader = WebUploader.create({
- auto: false,
- swf: '/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/Uploader.swf',
-
- // 文件接收服务端。
- server: '{:url("upload")}',
-
- // 选择文件的按钮。可选。
- // 内部根据当前运行是创建,可能是input元素,也可能是flash.
- pick: '#filePicker',
-
- // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
- resize: false,
- //上传时提交自身需要的字段并传递到后台。
- formData: {
- rongyuce : $('#rongyuce').val(),
- },
- // 只允许选择图片文件。
- accept: {
- title: 'Images',
- extensions: 'gif,jpg,jpeg,bmp,png',
- // mimeTypes: 'application/excel,application/vnd.ms-excel,application/x-excel,application/x-msexcel'
- mimeTypes: 'image/*'
- },
-
- fileNumLimit: 1, // 上传文件数
- fileSizeLimit:2*1024*1024,
- });
- uploader.on( 'fileQueued', function( file ) {
- var $li = $(
- '
' +
- '
'+
- '
' + file.name + '
' +
- '
等待上传...
'+
- '
'
- ),
- $img = $li.find('img');
- $list.append( $li );
-
- // 创建缩略图
- // 如果为非图片文件,可以不用调用此方法。
- // thumbnailWidth x thumbnailHeight 为 100 x 100
- uploader.makeThumb( file, function( error, src ) {
- if ( error ) {
- $img.replaceWith('
不能预览');
- return;
- }
-
- $img.attr( 'src', src );
- }, thumbnailWidth, thumbnailHeight );
- });
- // 文件上传过程中创建进度条实时显示。
- uploader.on( 'uploadProgress', function( file, percentage ) {
- var $li = $( '#'+file.id ),
- $percent = $li.find('.progress-box .sr-only');
-
- // 避免重复创建
- if ( !$percent.length ) {
- $percent = $('
').appendTo( $li ).find('.sr-only');
- }
- $li.find(".state").text("上传中");
- $percent.css( 'width', percentage * 100 + '%' );
- });
-
- // 文件上传成功,给item添加成功class, 用样式标记上传成功。
- uploader.on( 'uploadSuccess', function( file ) {
- $( '#'+file.id ).addClass('upload-state-success').find(".state").text("已上传");
- });
-
- uploader.on( 'uploadAccept', function( file, response ) {
- $('#pic').val(response.url);
- $('#id').val(response.ryid);
- $('#form-member-add').attr('action','/jsryinfo/'+response.ryid);
- $('#form-member-add').attr('method','PUT');
- mytype = 'PUT';
- });
-
- // 文件上传失败,显示上传出错。
- uploader.on( 'uploadError', function( file ) {
- $( '#'+file.id ).addClass('upload-state-error').find(".state").text("上传出错");
- });
-
- // 完成上传完了,成功或者失败,先删除进度条。
- uploader.on( 'uploadComplete', function( file ) {
- $( '#'+file.id ).find('.progress-box').fadeOut();
- });
- uploader.on('all', function (type) {
- if (type === 'startUpload') {
- state = 'uploading';
- } else if (type === 'stopUpload') {
- state = 'paused';
- } else if (type === 'uploadFinished') {
- state = 'done';
- }
-
- if (state === 'uploading') {
- $btn.text('暂停上传');
- } else {
- $btn.text('开始上传');
- }
- });
-
- $btn.on('click', function () {
- if (state === 'uploading') {
- uploader.stop();
- } else {
- uploader.upload();
- }
- });
-
- });
-
-
- // 获取获奖教师列表
- function hjSelect(obj)
- {
- $('#hjSelect').empty();
- $('#cySelect').empty();
- var str = "";
- str = $('#hjteacher').val();
- if(str.length<=0)
- {
- return "";
- }
- $.post(
- "{:Url::build('renshi/index/srcTeacher')}",
- {
- "str":str,
- },
- function(data,status){
- $('#hjSelect').empty();
- $('#cySelect').empty();
- if($.isEmptyObject(data))
- {
- return true;
- }
- for (var i = data.length - 1; i >= 0; i--) {
- var myhtml = "";
- myhtml = "
";
- $('#hjSelect').append(myhtml);
- }
-
- }
- );
- }
-
- // 添加参与人
- function addHj(obj,teacherId)
- {
- $('#hjteacher').val('');
- $('#cyteacher').val('');
- $(obj).attr('class','btn btn-warning radius mr-5 size-MINI');
- $(obj).attr('onclick','delCy(this)');
- var myhtml = "";
- myhtml = "
";
- $('#addHj').append(myhtml);
- $('#addHj').children("span").last().append(obj);
- }
-
-
- // 获取参与教师列表
- function cySelect(obj)
- {
- $('#hjSelect').empty();
- $('#cySelect').empty();
- var str = "";
- str = $('#cyteacher').val();
- if(str.length<=0)
- {
- return "";
- }
- $.post(
- "{:Url::build('renshi/index/srcTeacher')}",
- {
- "str":str,
- },
- function(data,status){
- $('#hjSelect').empty();
- $('#cySelect').empty();
- if($.isEmptyObject(data))
- {
- return true;
- }
- for (var i = data.length - 1; i >= 0; i--) {
- var myhtml = "";
- myhtml = "
";
- $('#cySelect').append(myhtml);
- }
-
- }
- );
- }
-
-
- // 添加参与人
- function addCy(obj,teacherId)
- {
- $('#hjteacher').val('');
- $('#cyteacher').val('');
- $(obj).attr('class','btn btn-warning radius mr-5 size-MINI');
- $(obj).attr('onclick','delCy(this)');
- var myhtml = "";
- myhtml = "
";
- $('#addCy').append(myhtml);
- $('#addCy').children("span").last().append(obj);
- }
-
- // 删除参与人
- function delCy(obj)
- {
- $(obj).parent().remove();
- }
-
- // 匹配用户名
- $.validator.addMethod("zh",function(value,element){
- var tel = /^[\u4e00-\u9fa5]*$/;
- return this.optional(element) || tel.test(value);
- }, "请输入中文");
-
-
-
-
-
-{/block}
\ No newline at end of file
diff --git a/application/rongyu/view/js_rongyu_info/create_all.html b/application/rongyu/view/js_rongyu_info/create_all.html
new file mode 100644
index 00000000..89e053ae
--- /dev/null
+++ b/application/rongyu/view/js_rongyu_info/create_all.html
@@ -0,0 +1,43 @@
+{extend name="common@create" /}
+
+{block name="form"}
+
+
+
+{/block}
+
+{block name="myjs"}
+
+{/block}
+
diff --git a/application/rongyu/view/js_rongyu_info/createall.html b/application/rongyu/view/js_rongyu_info/createall.html
deleted file mode 100644
index 3c714976..00000000
--- a/application/rongyu/view/js_rongyu_info/createall.html
+++ /dev/null
@@ -1,603 +0,0 @@
-{extend name="common@create" /}
-{block name="mycss"}
-{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.css" /}
-{/block}
-{block name="formaa"}
-
-{/block}
-{block name="yanzheng"}
-{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.js"}
-
-{/block}
\ No newline at end of file
diff --git a/application/rongyu/view/js_rongyu_info/edit.html b/application/rongyu/view/js_rongyu_info/edit.html
deleted file mode 100644
index cab8ff86..00000000
--- a/application/rongyu/view/js_rongyu_info/edit.html
+++ /dev/null
@@ -1,363 +0,0 @@
-{extend name="common@create" /}
-{block name="mycss"}
-{css href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.css" /}
-{/block}
-{block name="formaa"}
-
-

-
-
-{/block}
-{block name="yanzheng"}
-{js href="/static/H-ui.admin_v3.1.3.1/H-ui.admin/lib/webuploader/0.1.5/webuploader.js"}
-
-{/block}
\ No newline at end of file
diff --git a/application/rongyu/view/js_rongyu_info/index.html b/application/rongyu/view/js_rongyu_info/index.html
index 4d894aa3..83f07b60 100644
--- a/application/rongyu/view/js_rongyu_info/index.html
+++ b/application/rongyu/view/js_rongyu_info/index.html
@@ -1,227 +1,184 @@
+
{extend name="common@list" /}
-{block name="topnav"}
-
+{block name="jsset"}
+
{/block}
-{block name="bouttons"}
-
-
-
-
-
- {php}
- $school = schlist('校级','区级');
- {/php}
-
-
-
- {foreach $school as $key=>$vo }
-
- {/foreach}
-
-
-
-
- {php}
- $school = schlist('区级','部级');
- {/php}
-
-
-
- {foreach $school as $key=>$vo }
-
- {/foreach}
-
-
-
-
- {php}$category = getCategory(114);{/php}
-
-
-
- {foreach $category as $key=>$vo }
-
- {/foreach}
-
-
-
+{block name="nav"}
+
+ 荣誉管理
+ 荣誉列表
+
+{/block}
+{block name="search"}
+
{/block}
-{block name="tables"}
-
-
-
+{block name="table"}
+
{/block}
{block name="myjs"}
-
+
+
+
+
{/block}
\ No newline at end of file
diff --git a/application/rongyu/view/js_rongyu_info/rongyu_list.html b/application/rongyu/view/js_rongyu_info/rongyu_list.html
index 9a8f2c5a..e2d21a72 100644
--- a/application/rongyu/view/js_rongyu_info/rongyu_list.html
+++ b/application/rongyu/view/js_rongyu_info/rongyu_list.html
@@ -1,142 +1,167 @@
+
{extend name="common@list" /}
-{block name="topnav"}
-
+{block name="jsset"}
+
{/block}
-{block name="bouttons"}
-
-
-
-
-
- 批量删除
-
-
-
-
- 添加教师荣誉信息
-
-
-
-
- 下载荣誉信息
-
-
-
- 共有数据:{$list.count} 条
-
+{block name="nav"}
+
+ 荣誉管理
+ 荣誉册
+ 荣誉列表
+
+{/block}
+{block name="search"}
+
{/block}
-{block name="tables"}
-
-
-
+{block name="table"}
+
{/block}
{block name="myjs"}
-
+
+
+
+
{/block}
\ No newline at end of file
diff --git a/application/system/controller/School.php b/application/system/controller/School.php
index f1ccd847..7235f5e3 100644
--- a/application/system/controller/School.php
+++ b/application/system/controller/School.php
@@ -31,7 +31,7 @@ class School extends Base
->only([
'page'=>'1',
'limit'=>'10',
- 'field'=>'update_time',
+ 'field'=>'paixu',
'order'=>'asc',
'xingzhi'=>array(),
'searchval'=>''
diff --git a/application/system/view/category/index.html b/application/system/view/category/index.html
index 2168c471..a574224b 100644
--- a/application/system/view/category/index.html
+++ b/application/system/view/category/index.html
@@ -76,6 +76,7 @@ layui.use(['table','laypage','form','cjgl'], function(){
defaultToolbar:'',
cols: [[ //表头
{type:'checkbox', fixed: 'left'},
+ {field: 'id', title: 'ID',sort: true},
{field: 'title', title: '名称',sort: true, minWidth:240},
{field: "pid",title: '父级类别',sort: true,templet:function(d){
var str='';
diff --git a/database/seeds/Rule.php b/database/seeds/Rule.php
index b5d77f29..d26a51d5 100644
--- a/database/seeds/Rule.php
+++ b/database/seeds/Rule.php
@@ -182,7 +182,7 @@ class Rule extends Seeder
['title'=>'编辑','name'=>'rongyu/DwRongyu/edit','paixu'=>3,'pid'=>801,],
['title'=>'查看','name'=>'rongyu/DwRongyu/read','paixu'=>4,'pid'=>801,],
['title'=>'状态','name'=>'rongyu/DwRongyu/setStatus','paixu'=>5,'pid'=>801],
- // ['title'=>'批量上传','name'=>'rongyu/DwRongyu/createAll','paixu'=>6,'pid'=>801],
+ ['title'=>'批量上传','name'=>'rongyu/DwRongyu/createAllSave','paixu'=>6,'pid'=>801],
// 教师荣誉册管理
['title'=>'添加','name'=>'rongyu/JsRongyu/create','paixu' =>1,'pid'=>802],
['title'=>'删除','name'=>'rongyu/JsRongyu/delete','paixu'=>2,'pid'=>802],
diff --git a/public/static/xadmin/js/cjgl.js b/public/static/xadmin/js/cjgl.js
index cc45965c..cf869344 100644
--- a/public/static/xadmin/js/cjgl.js
+++ b/public/static/xadmin/js/cjgl.js
@@ -188,8 +188,9 @@ layui.define(['table'],function(exports){ //提示:模块也可以依赖其它
{
return true;
}
+
for (var i = data.length - 1; i >= 0; i--) {
- mydl.append('
'+data[i].xingming+'');
+ mydl.append('
'+data[i].xingming+' '+data[i].js_danwei.jiancheng+' '+data[i].shengri+'');
}
}
@@ -197,22 +198,22 @@ layui.define(['table'],function(exports){ //提示:模块也可以依赖其它
},
- // Select失去焦点
- selectOnblur:function(selectID){
- var srcDiv = $('#' + selectID).next();
- $(srcDiv).remove();
- },
+ // 添加教师
addTeacher:function(myobj){
var myId = $(myobj).attr('id')
- ,myTitle = $(myobj).text();
- var myList = $(myobj).parent().parent()
- var myBut = $(myList).parent().parent();
+ ,teachername = $(myobj).attr('teachername')
+ ,myTitle = $(myobj).text()
+ ,myList = $(myobj).parent().parent()
+ ,myBut = $(myList).parent().parent();
- $(myBut).append('
');
+ if(myId){
+ $(myBut).append('
');
+ }
$(myList).prev().val('');
$(myList).remove();
},
+ // 删除教师
delTeacher:function(myobj){
$(myobj).parent().remove();
}
diff --git a/route/rongyu.php b/route/rongyu.php
index aecbd099..828827f2 100644
--- a/route/rongyu.php
+++ b/route/rongyu.php
@@ -13,10 +13,11 @@
Route::resource('dwry','rongyu/DwRongyu');
Route::resource('jsry','rongyu/JsRongyu');
Route::resource('jsryinfo','rongyu/JsRongyuInfo');
-Route::get('dwry/createall','rongyu/DwRongyu/createall');
+Route::get('dwry/createall','rongyu/DwRongyu/createAll');
+Route::post('dwry/createall','rongyu/DwRongyu/createAllSave');
// 荣誉册中荣誉信息列表
-Route::get('rylist/:id','rongyu/JsRongyuInfo/rongyuList');
+Route::get('rylist/:id/:title','rongyu/JsRongyuInfo/rongyuList');
Route::get('ryout/:id','rongyu/JsRongyuInfo/outXlsx');
Route::get('jsryinfoadd/:id','rongyu/JsRongyuInfo/create');
-Route::get('jsryinfoaddall/:id','rongyu/JsRongyuInfo/createall');
\ No newline at end of file
+Route::get('jsryinfoaddall/:id','rongyu/JsRongyuInfo/createAll');
\ No newline at end of file