userManage.jsbak 54.1 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359
/**
 * Created by chenbiao on 18/10/30.
 */

//添加用户
//定义全局变量
var sysCode=null;
var sysName=null;
var loginCode=null;
var loginName=null;
var loginPhone=null;
(function () {

    var userfun = {
        getSysCodeAndSysName:function(){
            sysCode=sessionStorage.getItem("sysCode");
            sysName=sessionStorage.getItem("sysName");
            //alert(sysCode+sysName);
            if(sysCode == undefined || sysName ==undefined){
                swal({title:"提示",text:"获取权限失败",type:"warning",timer:3000,allowOutsideClick:true});
            }
        },
        init:function(){
            //alert(sessionStorage.getItem("sysCode")+","+sessionStorage.getItem("sysName"));
            //close弹窗
            documentBindFunc.on('click','.user_close_alert',function () {
                userfun.close_alert();
            });
            documentBindFunc.on('click','.user_close_alert_org',function () {
                userfun.user_close_alert_org();
            });
            documentBindFunc.on('click','.roler_close_alert_org',function () {
                userfun.roler_close_alert_org();
            });
            documentBindFunc.on('click','.departmentrolercancel_btn',function () {
                userfun.roler_cancel();
            });
            documentBindFunc.on('click','.departmentAlertcancel_btn',function () {
                userfun.user_close_alert_org();
            });

            //cancel弹窗
            documentBindFunc.on('click','#user_alert_cancel',function () {
                // fun.close_alert();
                $('#id').val('');
                $('#user_roleIds').selectpicker('val', '');
                userfun.alert_cancel();
            });
            //alert_ok弹窗
            documentBindFunc.on('click','#user_alert_ok',function () {
                userfun.alert_ok();
            });


            //分配角色内容
            $('#roler-conten li').live('click',function () {
                $(this).addClass('roler-mes-active').siblings('li').removeClass('roler-mes-active')
            });
            $('#addroler-content li').live('click',function () {

                $(this).addClass('roler-mes-active').siblings('li').removeClass('roler-mes-active')
            });
            //添加按钮
            documentBindFunc.on('click','#add_opt',function () {
                var _that = $(this);
                $.each($('#roler-conten li'),function () {

                    if($(this).hasClass('roler-mes-active')){
                        var text = $(this).text();
                        var id = $(this).attr('data-value');
                        //判断右侧是否已经存在了
                        var getli = $("#addroler-content").find('li');
                        if(getli != null && getli.length > 0){
                            var existId= false;
                            $.each(getli, function(index,rows) {
                                var getId = $(this).attr('data-value');
                                if(getId == id){
                                    existId =true;
                                }
                            });
                            if(!existId){
                                $(this).remove();
                                var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                                $('#addroler-content').append(roles);
                            }else{
                                $(this).remove();
                            }
                        }else{
                            $(this).remove();
                            var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                            $('#addroler-content').append(roles);
                        }


                    }
                })
            });
            //添加所有
            documentBindFunc.on('click','#addall_opt',function () {
                $.each($('#roler-conten li'),function () {
                    var text = $(this).text();
                    var id = $(this).attr('data-value');
                    //判断右侧是否已经存在了
                    var getli = $("#addroler-content").find('li');
                    if(getli != null && getli.length > 0){
                        var existId= false;
                        $.each(getli, function(index,rows) {
                            var getId = $(this).attr('data-value');
                            if(getId == id){
                                existId =true;
                            }
                        });
                        if(!existId){
                            $(this).remove();
                            var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                            $('#addroler-content').append(roles);
                        }else{
                            $(this).remove();
                        }
                    }else{
                        $(this).remove();
                        var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                        $('#addroler-content').append(roles);
                    }
                });
            });
            //删除所有
            documentBindFunc.on('click','#removeall_opt',function () {
                $.each($('#addroler-content li'),function () {
                    var text = $(this).text();
                    var id = $(this).attr('data-value');
                    //判断左侧
                    var getli = $("#roler-conten").find('li');
                    if(getli != null && getli.length > 0){
                        var existId= false;
                        $.each(getli,function(index,row){
                            var getId = $(this).attr('data-value');
                            if(getId == id){
                                existId =true;
                            }
                        });
                        if(!existId){
                            $(this).remove();
                            var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                            $('#roler-conten').append(roles);
                        }else{
                            $(this).remove();

                        }
                    }else{
                        $(this).remove();
                        var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                        $('#roler-conten').append(roles);
                    }
                })
            });
            //删除
            documentBindFunc.on('click','#remove_opt',function () {
                var _that = $(this);
                $.each($('#addroler-content li'),function () {
                    if($(this).hasClass('roler-mes-active')){
                        var text = $(this).text();
                        var id = $(this).attr('data-value');
                        //判断左侧
                        var getli = $("#roler-conten").find('li');
                        if(getli != null && getli.length > 0){
                            var existId= false;
                            $.each(getli,function(index,row){
                                var getId = $(this).attr('data-value');
                                if(getId == id){
                                    existId =true;
                                }
                            });
                            if(!existId){
                                $(this).remove();
                                var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                                $('#roler-conten').append(roles);
                            }else{
                                $(this).remove();
                            }
                        }else{
                            $(this).remove();
                            var roles ='<li class="roler-mes" data-value='+id+'>'+text+'</li>';
                            $('#roler-conten').append(roles);
                        }
                    }
                })
            });
            //初始化table
            userfun.initTable();
            //如果data为空的时候处理
            $('.no-records-found td').append('<span >暂无信息,可使用 <a class="_user_operate_s">“添加用户”</a> 按钮为系统添加用户信息</span>')
            //条件查询
            documentBindFunc.on('click','#select_page_user',function(){
                loginCode = $('#select_page_user_number').val();
                loginName = $('#select_page_user_name').val();
                loginPhone = $('#select_page_user_phone').val();
                // beginTime=$('#prev_date').val();
                // endTime=$('#next_date').val();
                //orgId=$('#user_id_display_org').find('span').text();
                //roleId=$('#user_id_display_role').find('span').text();
                userfun.initTable();
            });
            //删除用户
            documentBindFunc.on('click','[deleteUser]',function(){
                userfun.deleteUser(this);
            });
            //修改用户
            documentBindFunc.on('click','[modifyUser]',function(){
                //fun.initComboboxUser_role();
                userfun.modifyUser(this);
                //隐藏密码
                document.getElementById("use_resetPwd").style.display="none";

            });

            //添加用户
            documentBindFunc.on('click','._user_operate_s',function(){
                //fun.initComboboxUser_role();
                userfun.addUser();
            });
            //重置密码
            documentBindFunc.on('click','[resetUser]',function(){
                userfun.resetPassword(this);
            });
            //分配组织确认
            $('#departmentAlert_btn').on('click',function () {

                var ids=Tree.getCheckedNodesId(true); // 获取选中的id
                if(ids== null || ids.length<1 ){
                    swal({title:"提示",text:"请选择组织!",type:"error",timer:3000,allowOutsideClick:true});
                    return false;
                }
                var     userId = $('#userTable input:radio:checked').attr("data-value");
                var req= {
                    baseRequest:{
                        pageNum:1,
                        pageSize:0
                    },
                    sysOpId:userId,
                    sysCode:sysCode,
                    sysOrgIdList:ids
                };
                sysAjax({
                    method: 'POST',
                    url: dataUrl.util.saveSysOpAndSysOrgRelation(),
                    data: JSON.stringify(req),
                    dataType:'json',
                    async:false,
                    success: function (res) {
                        if(res != null && res.data != null){
                            var data=res.data;
                            if(data){
                                //将选择的二级节点id到用户表组织id中
                                var orgId = Tree.getCheckedNodesIdForOrgLevel(true,2);
                                if(orgId != "" || orgId != null){
                                    var reqUpdataOrg={
                                        opId:userId,
                                        orgId:orgId,
                                        sysCode:sysCode
                                    }
                                    sysAjax({
                                        method:'POST',
                                        url: dataUrl.util.updateSysOpOrgIdByOpId(),
                                        data: JSON.stringify(reqUpdataOrg),
                                        dataType:'json',
                                        async:false,
                                        success: function(res){
                                            if(res.code='8888'){
                                                if(!res.data){
                                                    swal({title:"提示",text:"更新用户组织ID失败!",type:"error",timer:3000,allowOutsideClick:true});
                                                    return false;
                                                }
                                            }else{
                                                swal({title:"提示",text:"系统错误!",type:"error",timer:3000,allowOutsideClick:true});
                                                return false;
                                            }
                                        }
                                    });
                                }

                                $('#userTable input:radio:checked').attr("checked",false);
                                $('#departmentAlert,#alert_over').hide();
                                sweetAlert({
                                    title: "提示",
                                    text: "保存成功!",
                                    type: "success",
                                    showCancelButton: false,
                                    confirmButtonColor: "#32c5d2",
                                    closeOnConfirm: false,
                                    timer:3000
                                });
                            }else{
                                sweetAlert("提示", "保存用户组织关系失败", "error");
                                return false;
                            }

                        }else{
                            sweetAlert("提示", "系统异常", "error");
                            return false;
                        }

                    }
                });


            });
            //分配部门
            documentBindFunc.on('click','#add_section',function () {
                userfun.departmentAlert();
            });
            //分配角色
            documentBindFunc.on('click','#add_roler',function () {
                userfun.departmentrolerAlert();
            });

            //保存角色
            documentBindFunc.on('click','#departmentrolerAlert_btn',function () {
                userfun.saveUserRole();
            });

        },
        //关闭二级弹窗
        cancelPark:function () {
            $('#addOrg_over,#addOrg_alert_con').hide();
            $('#role_alert_con,#alert_over').show();
        },
        //保存用户角色信息
        saveUserRole:function(){
            //1.获取用户id
            var userId = $('#userTable input:radio:checked').attr("data-value");
            //var sysCode = $('#sysCodeHidde').val();
            var sysRoleIdList = new Array();
            //查找右侧所有选择的角色id
            var li =$('#addroler-content').find('li');
            $.each(li, function(index,row) {
                var roleId=$(this).attr('data-value');
                if(roleId != null){
                    sysRoleIdList[index] = roleId;
                }
            });
            if(sysRoleIdList != null && sysRoleIdList.length >1){
                swal({title:"提示",text:'用户只能选择一个角色',type:"warning",timer:6000,allowOutsideClick:true});
                return false;
            }
            var req={
                "sysOpId": userId,
                "sysCode":sysCode,
                "sysRoleIdList":sysRoleIdList
            };
            sysAjax({
                method: 'POST',
                url: dataUrl.util.saveUserRoles(),
                data: JSON.stringify(req),
                dataType:'json',
                async:false,
                success: function (res) {
                    if(res != null && res.data != null){
                        var data=res.data;
                        if(data){
                            $('#example-getting-started').multiselect('select', '');
                            $('#departmentrolerAlert,#alertroler_over').hide();
                            //刷新表格
                            var opt = {
                                url: dataUrl.util.getQueryUsersList(),
                                silent: true,
                                query:{
                                    baseRequest:{
                                        pageNum:1,
                                        pageSize:10
                                    },
                                    sysCode:sysCode,
                                    loginCode:loginCode,
                                    opName:loginName,
                                    telephone:loginPhone
                                }
                            };
                            $("#userTable").bootstrapTable('refresh');
                            swal({title:"提示",text:"保存成功",type:"success",timer:3000,allowOutsideClick:true});

                        }else{
                            $("#userTable").bootstrapTable('refresh');
                            swal({title:"提示",text:"保存失败,请重新添加",type:"error",timer:3000,allowOutsideClick:true});
                        }

                    }

                }
            });
        },
        //初始化表格数据
        initTable:function(){
            $('#userTable').bootstrapTable('destroy').bootstrapTable({
                striped:true,//表格显示条纹
                pagination: true, //启动分页
                pageNumber:1, //当前第几页
                pageSize: 10,  //每页显示的记录数
                pageList: [10,15,20],  //记录数可选列表
                sidePagination: 'server',//表示服务端分页
                queryParamsType: 'limit',
                method:'POST',//请求方法
                paginationPreText: '<',
                paginationNextText: '>',
                ajax:tableLoadRequest,//自定义ajax加载数据
                uniqueId:'id',
                columns: [
                    {field: 'state', title: ' ',width: '2%',  align: 'left',formatter:userfun.checkedFormatter},
                    {field: 'id', title: 'ID', visible: false, align: 'left'},
                    {field: 'remark', title: '用户描述', visible: false, align: 'left'},
                    {field: 'loginCode', title: '<span class="type-icon"></span>账号', width: '10%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
                    {field: 'opName', title: '<span class="person-icon"></span>姓名', width: '8%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
                    {field: 'sex', title: '<span class="sex-icon"></span>性别',  width: '5%', align: 'left',formatter:commonObj.sexFormatter,cellStyle:commonObj.formatTableUnit},
                    {field: 'age', title: '<span class="agelonge-icon"></span>年龄',  width: '5%', align: 'left',formatter:commonObj.replacenull,cellStyle:commonObj.formatTableUnit},
                    {field: 'telephone', title: '<span class="mobile-icon"></span>手机号', width: '10%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
                    {field: 'email', title: '<span class="personemail-icon"></span>邮箱', width: '5%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
                    {field: 'dataState', title: '<span class="status-icon"></span>状态', width: '5%', align: 'left',formatter:userfun.dataStateFormatter,cellStyle:commonObj.formatTableUnit},
                    // {field: 'createEmpid', title: '创建人', width: '10%', align: 'left',cellStyle:commonObj.formatTableUnit},
                    {field: 'createDate', title: '<span class="time-icon"></span>创建时间', width: '15%', align: 'left',formatter:commonObj.timeFormatter,cellStyle:commonObj.formatTableUnit},
                    {field: 'sysCode', title: '<span class="system-icon"></span>系统名称', width: '2%', align: 'left',formatter:userfun.sysCodeFormatter,cellStyle:commonObj.formatTableUnit},
                    {field: 'oper', title: '<span class="opration-icon"></span>操作', width: '23%', align: 'left',formatter:userfun.operFormatter,cellStyle:commonObj.formatTableUnit}
                ],
                onClickRow: function (row,$element) {
                    var id=row.id;
                    $('#userTable input:radio[data-value="'+id+'"]').attr("checked","checked");
                }
            });
        },
        checkedFormatter:function (value,row,index) {
            var checkStr="<input type='radio' name='checkTr' class='radio radio-danger'  data-value='"+row.id+"'/>";
            /*var checkStr='<div class="radio checkbox-circle">'+
                '<input type="radio" name="name" />'+
            '</div>';*/
            return checkStr;
        },
        //操作显示
        operFormatter:function(value,row,index){
            var operStr ='<span style="margin-right: 3px;" class="ITD-status-blue" modifyUser data-value="'+row.id+'">修改</span>'+
                '<span style="margin-right: 3px;" class="ITD-oper-orange" resetUser loginCode="'+row.loginCode+'" data-value="'+row.id+'">重置密码</span>'+
                '<span deleteUser class="ITD-status-abnormal" loginCode="'+row.loginCode+'" data-value= "'+row.id+'">删除</span>';
            return operStr;
        },
        dataStateFormatter:function(value,row,index){
            if(1==value){
                return "开通";
            }else{
                return "锁定";
            }
        },
        sysCodeFormatter:function(value,row,index){
            if(sysName==null ||sysName=='' ||sysName==undefined){
                return "";
            }else{
                return sysName;
            }
        },

        //添加用户
        addUser:function(){
            $('#user_alert_ok').html('保存');
            // document.getElementById("user_dataState_display").style.display="none";
            $('#role_alert_error').text('');
            $('#sysName').val(sysName);
            //$('input').val('');
            $('#loginCode').val('');
            $('#opName').val('');
            $('#sex_value').val('');
            $('#remark').val('');
            $('#telephone').val('');
            $('#userage').val('');
            $('#userEmail').val('');

            //Tree.checkAllNodes(false);
            $('#alert_over').append($('#user_llw_alert_con'));
            $('#role_alert_title').html('添加用户');
            $('#user_alert_ok').attr('oper','saveUser');
            $('#alert_over,#user_llw_alert_con').show();
        },
        //修改角色
        modifyUser:function(element){
            $('#user_alert_ok').html('保存');

            // document.getElementById("user_dataState_display").style.display="";
            $('#role_alert_error').text('');
            $('select').val('');
            //设置值
            var id = $(element).attr('data-value');
            //根据唯一值获取行数据
            var modifyRow = $('#userTable').bootstrapTable('getRowByUniqueId', id);
            $('#id').val(id);
            $('#sysName').val(sysName);
            $('#loginCode').val(modifyRow.loginCode);
            $('#opName').val(modifyRow.opName);
            $('#user_sex').val(modifyRow.sex);
            if(modifyRow.sex==1){
                $('#user_sex').text("男");
            }else{
                $('#user_sex').text("女");
            }

            if(modifyRow.dataState==1){
                $('#user_dataState').text("正常");

            }else{
                $('#user_dataState').text("锁定");
            }

            $('#remark').val(modifyRow.remark);
            $('#telephone').val(modifyRow.telephone);
            //filter-option pull-left
            $('#userage').val(modifyRow.age);
            $('#userEmail').val(modifyRow.email);

            $('#alert_over').append($('#user_llw_alert_con'));
            $('#role_alert_title').html('修改用户');
            $('#user_alert_ok').attr('oper','updateUser');
            $('#alert_over,#user_llw_alert_con').show();

        },
        //删除用户
        deleteUser:function(element){
            $('.popMask').remove();
            var loginCode = $(element).attr('loginCode');
            var id= $(element).attr('data-value');
            var content = $('<span class="common_span">确定要删除用户('+loginCode+')吗?</span>');
            var popAlert = new Pop({
                header:'信息提示',
                content:content,
                buttons:[
                    {
                        type:'popCancle',
                        text:'取消'
                    },
                    {
                        type:'popOk',
                        text:'确定',
                        callback:function(){
                            //删除用户
                            var req= {
                                sysCode:sysCode,
                                id:id
                            };
                            var easyUIOps = {
                                method: "post",
                                url: dataUrl.util.deleteUser,
                                data: JSON.stringify(req),
                                contentType: 'application/json; charset=utf-8',
                                dataType:'json',
                                success: function(res){
                                    console.log(res)
                                    if(isError(res)){
                                        return false;
                                    }
                                    $('#id').val('');
                                    $('#userTable').bootstrapTable('refresh', {silent: true});
                                }
                            };
                            sysAjax(easyUIOps);
                            popAlert.close();
                            $('#id').val('');
                            //刷新table


                        }
                    },

                ]
            });

        },

        //show
        show_alert:function () {
            $('#alert_over').append($('#user_llw_alert_con'));
            $('#alert_over,#user_llw_alert_con').show();
        },
        //clsoe
        close_alert:function () {
            $('#example-getting-started').multiselect('select', '');
            $('#alert_over,#user_llw_alert_con').hide();
        },
        user_close_alert_org:function () {
            $('#example-getting-started').multiselect('select', '');
            $('#departmentAlert,#alert_over').hide();
        },
        roler_close_alert_org:function () {
            $('#example-getting-started').multiselect('select', '');
            $('#departmentrolerAlert,#alertroler_over').hide();
        },
        roler_cancel:function () {
            $('#example-getting-started').multiselect('select', '');
            $('#departmentrolerAlert,#alertroler_over').hide();
        },
        //cancel
        alert_cancel:function () {
            $('#example-getting-started').multiselect('select', '');
            $('#alert_over,#user_llw_alert_con').hide();
        },

        //分配部门
        departmentAlert:function () {
            $('#alert_over').find('#user_llw_alert_con').hide();
            $('#alert_over').append($('#departmentAlert'));
            //1.判断是否选中
            var isChecked= $('#userTable input:radio:checked').attr("checked");
            var userId="";
            if(!isChecked){
                swal({title:"提示",text:"请选择一行用户记录",type:"warning",timer:300000,allowOutsideClick:true});
                return false;
            }else{
                userId = $('#userTable input:radio:checked').attr("data-value");
                //var  sysCodeS=$('#sysCodeHidde').val();
                //初始化tree
                Tree.initTree();
                //获取用户已拥有的组织
                var ids = new Array();
                ids[0] =userId;
                var req= {
                    baseRequest:{
                        pageNum:1,
                        pageSize:0
                    },
                    sysCode:sysCode,
                    ids:ids
                };
                sysAjax({
                    method: 'POST',
                    url: dataUrl.util.queryOrgIdsByOpIds(),
                    data: JSON.stringify(req),
                    dataType:'json',
                    async:false,
                    success: function (res) {
                        if(res != null && res.data != null){
                            var data=res.data;
                            Tree.updateNodesForChecked(data);
                            $('#departmentAlert').show();
                            $('#alert_over').show();
                        }else{
                            sweetAlert("提示", "系统异常", "error");
                            return false;
                        }

                    }
                });

            }

        },
        //分配角色
        departmentrolerAlert:function () {
            //1.判断是否选中
            //var isChecked= $('#userTable input:radio:checked').attr("checked");
            var isChecked= $("#userTable input[type='radio']:checked").val();
            var userId="";
            if(isChecked == undefined || isChecked == null || isChecked !='on'){
                //sweetAlert("提示", "请选择一行用户记录", "warning");
                swal({title:"提示",text:"请选择一行用户记录",type:"warning",timer:3000,allowOutsideClick:true});
                return false;
            }else{
                userId = $('#userTable input:radio:checked').attr("data-value");
                //2.获取所有角色信息
                //var  sysCodeS=$('#sysCodeHidde').val();
                sysAjax({
                    method: 'POST',
                    url: dataUrl.util.queryRoleBysysCode(),
                    data:{"sysCode":sysCode},
                    contentType: 'application/x-www-form-urlencoded',
                    dataType:'json',
                    async:false,
                    success: function (res) {
                        if(res != null && res.data != null){
                            var data=res.data;
                            $('#roler-conten').empty();
                            var roles = '';
                            $.each(data, function(index,row) {
                                roles +='<li class="roler-mes" data-value='+row.id+'>'+row.roleName+'</li>';
                            });
                            $('#roler-conten').html(roles);
                            $('#alertroler_over,#departmentrolerAlert').show();
                        }

                    }
                });
                //3.通过用户id查询该用户的角色

                var req= {
                    baseRequest:{
                        pageNum:1,
                        pageSize:0
                    },
                    sysCode:sysCode,
                    id:userId
                };
                sysAjax({
                    method: 'POST',
                    url: dataUrl.util.queryRolesByUserId(),
                    data: JSON.stringify(req),
                    dataType:'json',
                    async:false,
                    success: function (res) {
                        if(res != null && res.data != null){
                            var data=res.data;
                            $('#addroler-content').empty();
                            var roles = '';
                            $.each(data, function(index,row) {
                                roles +='<li class="roler-mes" data-value='+row.id+'>'+row.roleName+'</li>';
                            });
                            $('#addroler-content').html(roles);

                        }

                    }
                });
            }


        },
        //alert_ok
        alert_ok:function () {
            //验证参数
            userfun.validateUser();
            var errmsg = $('#role_alert_error').text();
            if(errmsg !=''){
                return false;
            }
            //拼接请求参数
            var url = '';
            if($('#user_alert_ok').attr("oper")=='saveUser'){
                url = dataUrl.util.saveUser;
            }else if($('#user_alert_ok').attr("oper")=='updateUser'){
                url = dataUrl.util.updateUser;
            }


            var createEmpid=StrUtil.isEmpty(fn.getUserId()) ? '-1' : fn.getUserId();
            var dataState=$('#user_dataState').find('span').text();
            var req= {
                "id": $('#id').val(),
                "loginCode": $('#loginCode').val(),
                "opName": $('#opName').val(),
                "telephone": $('#telephone').val(),
                "sex":$('#user_sex').find('span').text(),
                "remark":$('#remark').val(),
                "dataState":dataState,
                "email":$('#userEmail').val(),
                //不能为空的字段
                "opCode":"222",
                "createEmpid":createEmpid,
                "age":$('#userage').val(),
                "sysCode":sysCode
            };
            var easyUIOps = {
                method:'POST',
                url: url,
                data: JSON.stringify(req),
                success: function(){
                    $('#alert_over,#user_llw_alert_con').hide();
                    $('#id').val('');
                    //alert("成功");
                    //刷新table
                    if($('#user_alert_ok').attr("oper")=='saveUser'){
                        userfun.initTable();
                    }else{
                        $('#userTable').bootstrapTable('refresh');
                    }
                }
            };
            sysAjax(easyUIOps);
        },
        //验证参数
        validateUser:function(){

            var checkFlg =true;
            var userVal = $('#loginCode').val();
            var errorIfo = $('#role_alert_error');
            //姓名
            var opName = $('#opName').val();
            //年龄
            var age= $('#userage').val();
            //联系电话
            var telephone = $('#telephone').val();
            //邮箱
            var userEmail=$('#userEmail').val();
            //性别
            var sex = $('#user_sex').find('span').text();
            //用户描述
            var userDescription = $('#remark').val();

            var regular = /^([^\`\+\~\!\#\$\%\^\&\*\(\)\|\}\{\=\"\'\!\¥\……\(\)\——]*[\+\~\!\#\$\%\^\&\*\(\)\|\}\{\=\"\'\`\!\?\:\<\>\•\“\”\;\‘\‘\〈\ 〉\¥\……\(\)\——\{\}\【\】\\\/\;\:\?\《\》\。\,\、\[\]\,]+.*)$/;


            //用户名字
            if(StrUtil.isEmpty(userVal)){
                errorIfo.text('请填写账号');
                return false;
            }else if(userVal.indexOf(' ')>=0||regular.test(userVal)){
                errorIfo.text('账号不能包含空格或者标点符号');
                return false;
            }else if(!(/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/).test(userVal)){
                errorIfo.text('账号必填且格式必须是邮箱形式');
                return false;
            }else if(userVal.length>31){
                errorIfo.text('账号不能超过32位');
                return false;
            }else{
                if($('#user_alert_ok').attr("oper")=='saveUser'){
                    var req= {
                        "loginCode": ($('#loginCode').val()).trim(),
                        "sysCode":sysCode
                    };
                    var easyUIOps = {
                        async:false,
                        method:'POST',
                        url: dataUrl.util.queryLoginCodeIsUsed,
                        data: JSON.stringify(req),
                        success: function(res){
                            console.log(res)
                            if(!res.data){
                                checkFlg=false;

                            }
                        }
                    };
                    sysAjax(easyUIOps);
                    errorIfo.text('');
                }
                /* if(checkFlg){
                     errorIfo.text('该账号已经存在,请勿重复添加!');
                     return false;
                 }*/

            };

            //姓名
            if(StrUtil.isEmpty(opName)){
                errorIfo.text('请输入姓名');
                return false;
            }else if(opName.length>31){
                errorIfo.text('姓名不能超过32位');
                return false;
            }else{
                errorIfo.text('');
            };
            if(StrUtil.isEmpty(age)){
                errorIfo.text('请输入年龄');
                return false;
            }else if(!(/^\+?[1-9][0-9]*$/).test(age)){
                errorIfo.text('年龄必须是正整数');
                return false;
            }else if(age>120){
                errorIfo.text('年龄不能超过120岁');
                return false;
            }else{
                errorIfo.text('');
            };
            //联系电话
            if(StrUtil.isEmpty(telephone)){
                errorIfo.text('请输入联系电话');
                return false;
            }else if(!(/^1[34578]\d{9}$/.test(telephone))){
                errorIfo.text('请输入正确联系电话');
                return false;
            }else{
                errorIfo.text('');
            };

            if(StrUtil.isEmpty(userEmail)){
                errorIfo.text('请输入邮箱');
                return false;
            }else if(!(/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/).test(userEmail)){
                errorIfo.text('请输入正确的邮箱');
                return false;
            }else{
                errorIfo.text('');
            };

            //用户描述
            if(StrUtil.isEmpty(userDescription)){
                errorIfo.text('请输入用户描述');
                return false;
            }else if(userDescription.length>64){
                errorIfo.text('用户描述不能超过64位');
                return false;
            }else{
                errorIfo.text('');
            };



        },
        //重置密码
        resetPassword:function (element) {
            $('.popMask').remove();
            var loginCode = $(element).attr('loginCode');
            var id= $(element).attr('data-value');
            var pwdAlert = new Pop({
                header:'信息提示',
                content:$('<span class="common_span">确定要重置选中的用户密码吗?</span>'),
                buttons:[
                    {
                        type:'popOk',
                        text:'保存',
                        callback:function(){
                            pwdAlert.close();
                            var resetAlert = new Pop({
                                width:'400px',
                                header:'信息提示',
                                content:$('<div id="reset_pwd_ifo" class="reset_pwd_div f12"></div><div  class="reset_pwd_div"><span class="reset_pwd_l">新密码&nbsp;:</span><input type="password" class="reset_pwd_r" id="reset_newpwd"/></div><div  class="reset_pwd_div"><span class="reset_pwd_l">重复新密码&nbsp;:</span><input type="password" class="reset_pwd_r" id="reset_confirmpwd"/></div>'),
                                buttons:[
                                    {
                                        type:'popOk',
                                        text:'保存',
                                        callback:function(){
                                            var newPwd = $('#reset_newpwd').val();
                                            var confirmPwd = $('#reset_confirmpwd').val();
                                            if(StrUtil.isEmpty(newPwd)||StrUtil.isEmpty(confirmPwd)){
                                                $('#reset_pwd_ifo').text('请输入密码');
                                                return false;
                                            }else{
                                                $('#reset_pwd_ifo').text('');
                                            };
                                            //密码输入规则
                                            if (7 < newPwd.length < 17 && newPwd.indexOf(' ') < 0 && checkPass(newPwd)>=2) {
                                                $('#reset_pwd_ifo').text('');
                                            } else {
                                                $('#reset_pwd_ifo').text('密码由8-16个字符组成,必须包含数字及字母,不能包含空格');
                                                return false;
                                            };
                                            //密码两次是否相同
                                            if (newPwd == confirmPwd) {
                                                $('#reset_pwd_ifo').text('');
                                            } else {
                                                $('#reset_pwd_ifo').text('两次输入密码不一致');
                                                return false;
                                            };
                                            //然后可以请求ajax了 。成功了把下面两行代码复制进去
                                            //拼接请求参数
                                            var req= {
                                                "id": id,
                                                "loginPassword":newPwd,
                                                "sysCode":sysCode
                                            };
                                            var easyUIOps = {
                                                method:'POST',
                                                url: dataUrl.util.resetUserPwd,
                                                data: JSON.stringify(req),
                                                success: function(){
                                                    $('#alert_over,#user_llw_alert_con').hide();
                                                    $('#id').val('');
                                                    //alert("成功");
                                                    //刷新table
                                                    $('#userTable').bootstrapTable('refresh', {silent: true});
                                                    //fun.initTable();
                                                    pwdAlert.close();
                                                    resetAlert.close();
                                                }
                                            };
                                            sysAjax(easyUIOps);


                                        }
                                    },
                                    {
                                        type:'popCancle',
                                        text:'取消'
                                    }
                                ]
                            });
                        }
                    },
                    {
                        type:'popCancle',
                        text:'取消'
                    }
                ]
            });
        },


    };


//构建树
    var Tree = {
        //初始化树
        initTree: function () {
            $.fn.zTree.init($("#user_org_tree"), Tree.setting, Tree.getTreeData());
            //展开全部
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            treeObj.expandAll(false);
            //Tree.setChkDisabled(treeObj);
        },
        setting: {
            view: {
                selectedMulti: false  //静止多选
            },
            check: {
                enable: true, //显示多选框
                chkStyle: "radio",
                radioType:"all"
            },
            data: {
                simpleData: {
                    enable: true, //使用简单模式加载
                    idKey: "id",
                    pIdKey: "pId",
                    rootPId: 0
                }


            },
            edit: {
                enable: false

            }
        },
        //禁止选择非末级节点
        setChkDisabled: function(treeObj){
            var node = treeObj.getNodes();
            var nodes = treeObj.transformToArray(node);
            for (var i=0, l=nodes.length; i < l; i++) {
                if(nodes[i].isParent){
                    treeObj.setChkDisabled(nodes[i], true,true,false);

                }

            }
        },
        //展开某一个选中节点
        expandNode:function(ids){
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");

            for (var i = 0; i < ids.length; i++) {
                var node = Tree.getNodeById(ids[i]);
                treeObj.expandNode(node, true, true, true);
            }



        },
        //添加节点
        addNodes: function (newNodes) {
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            newNodes = treeObj.addNodes(null, newNodes);
        },
        //勾选 或 取消勾选 全部节点
        checkAllNodes: function (checked) {
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            treeObj.checkAllNodes(checked);
        },
        //更新节点
        updateNodes: function (treeNode, checkTypeFlag) {
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            treeObj.updateNode(treeNode);
        },
        //根据id集合更新节点变为选中
        updateNodesForChecked: function (ids) {
            var nodes = Tree.getNodesByIds(ids);
            for (var i = 0; i < ids.length; i++) {
                var node = nodes[i];
                if(node==null){
                    continue;
                }
                node.checked = true;
                Tree.updateNodes(node);
            }
        },
        //删除节点
        removeNode: function (id) {
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            var treeNode = Tree.getNodeById(id);
            treeObj.removeNode(treeNode);
        },
        //通过id获取某个节点
        getNodeById: function (id) {
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            var node = treeObj.getNodeByParam("id", id, null);
            return node;
        },
        //通过id获取某个节点
        getNodeByIdAndorgLevel: function (id,orgLevel) {
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            var node = treeObj.getNodeByParam("id", id, null);
            if(node != null && node.orgLevel != null && node.orgLevel != orgLevel){
                node= Tree.getNodeByIdAndorgLevel(node.pId,orgLevel);
            }
            return node;
        },
        //通过id集合获取节点集合
        getNodesByIds: function (ids) {
            var nodes = [];
            for (var i = 0; i < ids.length; i++) {
                nodes[i] = Tree.getNodeById(ids[i]);
            }
            return nodes;
        },
        //获取输入框被勾选 或 未勾选的节点ID集合
        getCheckedNodesId: function (checked) {
            var ids = [];
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            var nodes = treeObj.getCheckedNodes(true);
            var index=0;
            for (var i = 0; i < nodes.length; i++) {
                if(!nodes[i].isParent){
                    ids[index++] = nodes[i].id
                }

            }
            return ids;
        },
        //获取输入框被勾选 或 未勾选的组织级别节点ID集合
        getCheckedNodesIdForOrgLevel: function (checked,orgLevel) {
            ;
            var ids = "";
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            var nodes = treeObj.getCheckedNodes(checked);

            for (var i = 0; i < nodes.length; i++) {
                if(orgLevel ==nodes[i].orgLevel){
                    ids= nodes[i].id
                }else{
                    if(nodes[i].orgLevel =="1"){
                        ids="-1";
                    }else{
                        var nodesParent = Tree.getNodeByIdAndorgLevel(nodes[i].pId,orgLevel);
                        if(nodesParent != null){
                            ids=nodesParent.id;
                        }

                    }

                }

            }
            return ids;
        },
        //获取输入框被勾选 或 未勾选的节点name集合
        getCheckedNodesName: function (checked) {
            var names= "";
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            var nodes = treeObj.getCheckedNodes(true);
            for (var i = 0; i < nodes.length; i++) {
                names = names+","+nodes[i].name;
            }
            return names;
        },
        //获取选中的节点集合
        getSelectedNodes: function () {
            var treeObj = $.fn.zTree.getZTreeObj("user_org_tree");
            var nodes = treeObj.getSelectedNodes();
            return nodes;
        },
        //获取树
        getTreeData:function() {
            //var sysCodeHidde = $('#sysCodeHidde').val();
            var zNodes = [];
            var req= {
                baseRequest:{
                    pageNum:1,
                    pageSize:0
                },
                sysCode:sysCode
            };
            sysAjax({
                method:'POST',
                url: dataUrl.util.getOrgTreeBySysCode(),
                data: JSON.stringify(req),
                dataType:'json',
                async:false,
                success: function(res){
                    if(isError(res)){
                        return false;
                    }
                    zNodes =res.data;
                }
            });
            //增加一个公告根节点
//          zNodes[zNodes.length] = {name:'根节点',id:0,checked:true};
            return zNodes;
        }
    }
//获取sysCode 和sysName
    userfun.getSysCodeAndSysName();
    //初始执行
    userfun.init();


    /**
     * 处理错误信息
     * @param {Object} res
     */
    function isError(res){
        if(res == null || res == undefined){
            return true;
        }
        if(res.code!='8888'){
            var errorPop = new Pop({
                header:'错误提示',
                content:$('<span class="common_span">'+res.msg+'</span>'),
                buttons:[{
                    type:'popOk',
                    text:'保存'
                }]
            });
            return true;
        }else{
            return false;
        }
    }

    /**
     * 自定义table AJAX请求
     * @param {Object} params
     */
    function tableLoadRequest(params){
        //设置请求参数
        var pageNum = (params.data.offset/params.data.limit)+1;
        //条件查询
        var req= {
            baseRequest:{
                pageNum:pageNum,
                pageSize:params.data.limit
            },
            sysCode:sysCode,
            loginCode:loginCode,
            opName:loginName,
            telephone:loginPhone

        };
        var easyUIOps = {
            method: params.type,
            url: dataUrl.util.getQueryUsersList(),
            data: JSON.stringify(req),
            contentType: 'application/json; charset=utf-8',
            dataType:'json',
            success: function(res){
                console.log(res)
                if(res.code == '8888'){
                    params.success(res.data);
                }else{

                }
            }
        };
        sysAjax(easyUIOps);
    }
})();

var TTDiy_select = new diy_select({ //参数可选
    TTContainer: 'diy_select', //控件的class
    TTDiy_select_input: 'diy_select_input', //用于提交表单的class
    TTDiy_select_txt: 'diy_select_txt', //diy_select用于显示当前选中内容的容器class
    TTDiy_select_btn: 'diy_select_btn', //diy_select的打开按钮
    TTDiv_select_list: 'diy_select_list', //要显示的下拉框内容列表class
    TTFcous: 'focus' //得到焦点时的class
}); //如同时使用多个时请保持各class一致.

//日历
;(function($){
    $.fn.fdatepicker.dates['zh-CN'] = {
        days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
        daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
        daysMin: ["日", "一", "二", "三", "四", "五", "六"],
        months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
        monthsShort: ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二"],
        // today: '今天'
    };
}(jQuery));
//设置前一个月显示默认时间
function showpretime(){
    var mydate = new Date();
    var month = mydate.getMonth();
    var data = mydate.getDate();
    if(data<10){
        data='0'+data;
    };
    if(month=='0'){
        month='12';
    }
    if(month<10){
        month = '0'+month;
    };


    var str = "" + mydate.getFullYear() + "-";
    str += month + "-";
    str += data ;
    return str;
};
function shownowtime(){
    var mydate = new Date();
    var month = mydate.getMonth()+1;
    var data = mydate.getDate();
    if(data<10){
        data='0'+data;
    };
    if(month<10){
        month = '0'+month;
    };

    var str = "" + mydate.getFullYear() + "-";
    str += month + "-";
    str += data ;
    return str;
}
$('#prev_date').val(showpretime());
$('#next_date').val(shownowtime());
$('#prev_date').fdatepicker({
    format: 'yyyy-mm-dd',
    defaultDate: '-1M',
});
$('#next_date').fdatepicker({
    format: 'yyyy-mm-dd',
    defaultDate:  +7,
    // endDate:'+1',

});
//检测必须有字母和数字
function checkPass(pass) {
    var ls=0;
    if (pass.match(/[a-zA-Z]+/)) {
        ls++;
    }
    if (pass.match(/([0-9])+/)) {
        ls++;
    }
    if (pass.match(/[^a-zA-Z0-9]+/)) {
        ls++;
    }
    return ls;
};

//刷新表格
function refreshTabel(){
    var opt = {
        url: dataUrl.util.getQueryUsersList(),
        silent: true,
        query:{
            baseRequest:{
                pageNum:1,
                pageSize:10
            },
            sysCode:sysCode,
            loginCode:loginCode,
            opName:loginName,
            telephone:loginPhone
        }
    };
    $("#userTable").bootstrapTable('refresh');

};