_decodeProperties($_smarty_tpl, array ( 'version' => '3.1.30', 'unifunc' => 'content_5aef28c4ccb558_18860172', 'has_nocache_code' => false, 'file_dependency' => array ( '0d93173ac57df4a879953c01eab3fdb07f84d96d' => array ( 0 => 'D:\\phpStudy\\WWW\\workorder\\application\\views\\templates\\user\\index.html', 1 => 1524911886, 2 => 'file', ), ), 'includes' => array ( ), ),false)) { function content_5aef28c4ccb558_18860172 (Smarty_Internal_Template $_smarty_tpl) { if (!is_callable('smarty_modifier_date_format')) require_once 'D:\\phpStudy\\WWW\\workorder\\application\\libraries\\smarty\\plugins\\modifier.date_format.php'; ?> <?php echo $_smarty_tpl->tpl_vars['sys_name']->value;?> language="javascript" type="text/javascript"> var SITE_URL = "/"; >
smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['user_list']->value, 'val', false, 'k'); if ($_from !== null) { foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['val']->value) { ?> smarty->ext->_foreach->restore($_smarty_tpl); ?> tpl_vars['count']->value) {?>
type="text/javascript" charset="utf-8" src="static/js/jquery.js"> > type="text/javascript" charset="utf-8" src="static/js/bootstrap.js"> > type="text/javascript" charset="utf-8" src="static/js/bootstrap-table.min.js"> > type="text/javascript" charset="utf-8" src="static/js/bootstrap-table-zh-CN.min.js"> > type="text/javascript" charset="utf-8" src="static/js/icheck.min.js"> > type="text/javascript" charset="utf-8" src="static/js/select2.full.min.js"> > type="text/javascript" charset="utf-8" src="static/js/layer/layer.js"> > language="javascript" type="text/javascript"> var disabled_btn = ""; $(".panel-body button:disabled").each(function () { disabled_btn +="#"+$(this).attr("id")+","; }) disabled_btn = disabled_btn.substr(0,disabled_btn.length-1); $(function(){ $("table").show(); $('input').iCheck({ cursor : true, checkboxClass : 'icheckbox_square-blue' }); layer.config({ extend: 'myskin/style.css', //加载新皮肤 }); $("#keyword").on('input',function () { $('#data_table').bootstrapTable('resetSearch', $(this).val()); $('input').iCheck({ cursor : true, checkboxClass : 'icheckbox_square-blue' }); }); $("select").select2({minimumResultsForSearch: -1}); $("#add_user").click(function () { parent.$('#mainFrameTabs').bTabsAdd("tab11","新增用户","user/add"); }) $(".bootstrap-table").on('click',".delete",function () { var id = $(this).data("id"); layer.confirm("确定要删除该用户吗?删除后该用户相关的工单也将被删除!", {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){ if(id != "" && id != undefined) { $.post( "user/delete/" + id, function (data) { layer.msg(data.msg, {icon: data.icon,time: 3000}, function () { window.location.reload(); }) } ) }else{ layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'}); } layer.close(index); }) }) $(".bootstrap-table").on('click',".stop_use",function () { var id = $(this).data("id"); layer.confirm("确定要停用该用户吗?停用后该用户将不能登录!", {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){ if(id != "" && id != undefined) { $.post( "user/stopuse/" + id, function (data) { layer.msg(data.msg, {icon: data.icon,time: 3000}, function () { window.location.reload(); }) } ) }else{ layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'}); } layer.close(index); }) }) $(".bootstrap-table").on('click',".restore",function () { var id = $(this).data("id"); if(id != "" && id != undefined) { $.post( "user/restore/" + id, function (data) { layer.msg(data.msg, {icon: data.icon,time: 3000}, function () { window.location.reload(); }) } ) }else{ layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'}); } }) $(".bootstrap-table").on('click',".view_info",function(){ var id = $(this).data("id"); if(id != "" && id != undefined) { layer.open({ type: 2, title: "用户详情", offset: 'auto', shade: [0.3], area: ['900px','400px'], anim: 0, shadeClose:false, content: 'user/view/'+id, end: function(){ window.location.reload(); } }); }else{ layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'}); } }) $(".bootstrap-table").on('click',".change_password",function(){ var id = $(this).data("id"); if(id != "" && id != undefined) { layer.open({ type: 2, title: "修改密码", offset: 'auto', shade: [0.3], area: ['500px','320px'], anim: 0, shadeClose:false, content: 'user/changepassword/'+id, }); }else{ layer.alert("参数错误,请刷新后重试!",{skin: 'layer-ext-myskin',icon: 5, title:'错误提示'}); } }) $("#page_size").change(function () { var page_size = $(this).val(); window.location.href = "user/index?page_size="+page_size; }) $(".bootstrap-table").on('ifChecked','.check_all',function () { $("input:checkbox").not(':disabled').iCheck('check'); }).on('ifUnchecked','.check_all',function () { $("input:checkbox").not(':disabled').iCheck('uncheck'); }); $(".bootstrap-table").on('ifChanged','input:checkbox',function(){ var ids =""; $("input:checkbox").each(function () { if($(this).not(":disabled").prop("checked")){ ids += $(this).val()+","; } }); if(ids != "" && ids != undefined){ $(disabled_btn).removeAttr("disabled"); }else{ $(disabled_btn).attr("disabled","disabled"); } }) $(".form-inline select").on("change",function(e) { if($(this).attr("id") != "page_size") { $(".form-inline").submit(); } }) $("#delete_user").click(function () { var ids = ""; $("input:checkbox").each(function () { if($(this).not(":disabled").prop("checked")){ ids += $(this).val()+","; } }) if(ids == ""){ layer.alert("请选择要删除的用户!",{skin: 'layer-ext-myskin',icon: 3, title:'提示'}); }else{ layer.confirm('确定要删除选择的用户吗?', {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){ $.post( "user/deleteall",{'ids':ids}, function (data) { layer.msg(data.msg, {icon: data.icon,time: 3000}, function () { window.location.reload(); }) } ) layer.close(index); }) } }) $("#disable_user").click(function () { var ids = ""; $("input:checkbox").each(function () { if($(this).not(":disabled").prop("checked")){ ids += $(this).val()+","; } }) if(ids == ""){ layer.alert("请选择要禁用的用户!",{skin: 'layer-ext-myskin',icon: 3, title:'提示'}); }else{ layer.confirm('确定要禁用选择的用户吗?', {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){ $.post( "user/disableall",{'ids':ids}, function (data) { layer.msg(data.msg, {icon: data.icon,time: 3000}, function () { window.location.reload(); }) } ) layer.close(index); }) } }) $("#enable_user").click(function () { var ids = ""; $("input:checkbox").each(function () { if($(this).not(":disabled").prop("checked")){ ids += $(this).val()+","; } }) if(ids == ""){ layer.alert("请选择要启用的用户!",{skin: 'layer-ext-myskin',icon: 3, title:'提示'}); }else{ layer.confirm('确定要启用选择的用户吗?', {skin: 'layer-ext-myskin',icon: 3, title:'提示'}, function(index){ $.post( "user/enableall",{'ids':ids}, function (data) { layer.msg(data.msg, {icon: data.icon,time: 3000}, function () { window.location.reload(); }) } ) layer.close(index); }) } }) }) >