班级列表完成
This commit is contained in:
1 parent
ab45474cb3
commit
1f7b1fe81f
4 files changed
+15
-22
No files matched your search
@@ -55,7 +55,7 @@
|
||||
},
|
||||
error:function(xhr,status,error) {
|
||||
layer.msg('数据处理错误',{
|
||||
icon: 1,
|
||||
icon: 2,
|
||||
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -279,9 +279,9 @@ class Banji extends Base
|
||||
$bj = new BJ();
|
||||
// 更新数据
|
||||
$data = $bj->saveAll($bjinfo);
|
||||
$data ? $data = ['msg'=>'移动成功','val'=>true] : $data = ['msg'=>'数据处理错误','val'=>false];
|
||||
$data ? $data = ['msg'=>'移动成功','val'=>1] : $data = ['msg'=>'数据处理错误','val'=>0];
|
||||
}else{
|
||||
$data = ['msg'=>'已经到头啦~','val'=>false];
|
||||
$data = ['msg'=>'已经到头啦~','val'=>0];
|
||||
}
|
||||
|
||||
// 返回处理结果
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
</script>
|
||||
<!-- 记录操作按钮模板 -->
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn-xs" lay-event="befo" title="前移">i class="layui-icon"></i></a>
|
||||
<a class="layui-btn-xs" lay-event="end" title="后移">i class="layui-icon"></i></a>
|
||||
<a class="layui-btn-xs" lay-event="befo" title="前移"><i class="layui-icon"></i></a>
|
||||
<a class="layui-btn-xs" lay-event="end" title="后移"><i class="layui-icon"></i></a>
|
||||
<a class="layui-btn-xs" lay-event="status" title="{{ d.status == 1 ? '禁用' : '启用' }}">
|
||||
<i class="layui-icon {{ d.status == 1 ? 'layui-icon-close' : 'layui-icon-ok' }}"></i>
|
||||
</a>
|
||||
@@ -120,7 +120,7 @@ layui.use(['table','laypage','form','cjgl'], function(){
|
||||
return str;
|
||||
}},
|
||||
{field: 'status', title: '状态',templet:'#status', sort: true},
|
||||
{field: 'id', title: '操作',toolbar: '#barDemo',minWidth:140}
|
||||
{field: 'id', title: '操作',toolbar: '#barDemo',minWidth:160}
|
||||
]],
|
||||
});
|
||||
|
||||
@@ -176,10 +176,10 @@ layui.use(['table','laypage','form','cjgl'], function(){
|
||||
layer.msg('查看' + data.id);
|
||||
break;
|
||||
case 'befo':// 前移
|
||||
yidong(this,"/banji/'+row.id+'/yidong",1);
|
||||
yidong(this,'/banji/'+data.id+'/yidong',-1);
|
||||
break;
|
||||
case 'end':// 后移
|
||||
yidong(this,"/banji/'+row.id+'/yidong",1);
|
||||
yidong(this,'/banji/'+data.id+'/yidong',1);
|
||||
break;
|
||||
case 'del':// 删除
|
||||
cjgl.del(obj,"/banji");
|
||||
@@ -204,21 +204,13 @@ layui.use(['table','laypage','form','cjgl'], function(){
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
|
||||
if(data.val == false){
|
||||
layer.alert(data.msg);
|
||||
return true;
|
||||
}
|
||||
var yd = $(obj).parents("tr").html();
|
||||
if( caozuo === 1)
|
||||
{
|
||||
$(obj).parents("tr").prev().bofore('<tr role="row">' + yd + '</tr>');
|
||||
|
||||
} else {
|
||||
$(obj).parents("tr").next().after('<tr role="row">' + yd + '</tr>');
|
||||
}
|
||||
$(obj).parents("tr").remove();
|
||||
|
||||
layer.alert(data.msg);
|
||||
|
||||
if(data.val == 1){
|
||||
cjgl.reLoadTable('#search','mytable',{});
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
error:function(data) {
|
||||
|
||||
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user