diff --git a/assets/syspages/js/rbac/css/license.css b/assets/syspages/js/rbac/css/license.css
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/assets/syspages/js/rbac/css/license.css
diff --git a/assets/syspages/js/rbac/css/userManage.cssbak b/assets/syspages/js/rbac/css/userManage.cssbak
deleted file mode 100644
index b63c053..0000000
--- a/assets/syspages/js/rbac/css/userManage.cssbak
+++ /dev/null
@@ -1,392 +0,0 @@
-/*页面公用*/
-.data_title_l {
- display: inline-block;
- margin-left: 10px;
-}
-.select_search_btn{
- margin-left: 15px;
- padding-left: 20px;
- padding-right: 20px;
- border-radius: 20px !important;
-}
-/*右侧搜索样式*/
-.usermanage-parkinput78 {
- width: 78%;
- height: 34px;
- line-height: 34px;
-}
-
-/*右侧table样式*/
-.user_r_table_c{
- min-height: 400px;
- height: calc(100% - 88px);
- height: -webkit-calc(100% - 88px);
- height: -moz-calc(100% - 88px);
- height: -o-calc(100% - 88px);
- height: -ms-calc(100% - 88px);
- overflow-y: scroll;
-}
-.operate_btn_color:first-of-type{
- padding: 4px 6px;
- background: #3fc9d5;
- margin-right: 3px;
-}
-.operate_btn_color:nth-of-type(2){
- padding: 4px 6px;
- background: #f1c40f;
- margin-right: 3px;
-}
-.operate_btn_color:nth-of-type(3){
- padding: 4px 6px;
- background: #659be0;
- margin-right: 3px;
-}
-/*右侧分页样式*/
-.user_r_page_c{
- height: 24px;
- background: #32c5d2;
-}
-
-.user_operate_list {
- margin: 12px 0 12px 12px;
- height: 32px;
- line-height: 32px;
-}
-.user_operate_list li .icon-user{
- color: #e7505a;
-}
-.user_operate_list li:nth-of-type(1) span {
- padding-left: 4px;
- font-weight: 600;
- color: #e7505a;
- font-size: 16px;
-}
-.user_operate_s {
- padding: 7px 8px;
- cursor: pointer;
- margin-left: 16px;
- border-radius: 20px !important;
- background: #e7505a;
- color: #fff;
-}
-
-
-.table-striped .datepicker table tr td,
-.table-striped .datepicker table tr th {
- background-color: transparent; }
-.table_wrap1{
- height:calc(100% - 112px) ;
- height:-webkit-calc(100% - 112px) ;
- height:-moz-calc(100% - 112px) ;
- height:-mos-calc(100% - 112px) ;
- height:-o-calc(100% - 112px) ;
-}
-/*弹窗样式*/
-.role_alert_con{
- display: none;
-}
-.role_alert_con{
- width:712px;
- /*height: 512px;*/
- left:50%;
- top:50%;
- margin-left: -356px;
- /*margin-top: -256px;*/
- transform: translateY(-50%);
- background: #fff;
-}
-.role_alert_con_t{
- line-height: 60px;
- height: 60px;
- padding: 0 15px 0 24px;
- border-bottom: 1px solid #EFEFEF;
-
-}
-.role_alert_error{
- height: 20px;
- line-height: 20px;
- /*background-color: #fddbdb;*/
- color: red;
- font-size: 12px;
- text-align: center;
-}
-.role_alert_feed{
- /*padding-left:16px;*/
- /*margin-bottom: 8px;*/
- height: 35px;
- line-height: 35px;
-}
-.role_alert_feed_l{
- display: inline-block;
- width:82px;
- text-align: right;
- margin-right: 12px;
-}
-em{
- color: #d4333f;
- margin-right: 8px;
- vertical-align: middle;
-}
-.role_alert_feed input{
- width:244px;
- height: 26px;
- border: 1px solid #e1e4e6;
- padding-left: 8px;
- color:#676869;
-}
-.role_alert_feed textarea{
- width: 244px;
- height: 66px;
- border: 1px solid #e1e4e6;
- vertical-align: top;
- color:#676869;
- padding-left: 8px;
-}
-.role_alert_btn{
- text-align: center;
- margin-top: 16px;
- margin-bottom: 24px;
- height: 60px;
-}
-.role_alert_btn span{
- border-radius: 4px!important;
- cursor: pointer;
- width: 72px;
- height: 32px;
- line-height: 32px;
- text-align: center;
- font-size: 14px;
- color: #fff;
- display: inline-block;
- margin-left: 5px;
-}
-#choice_input_con{
- width:161px;
-}
-#choice_btn{
- cursor: pointer;
- display: inline-block;
- background: #32c5d2;
- height: 28px;
- line-height: 28px;
- color: #fff;
- width: 80px;
- text-align: center;
- border-radius: 2px;
-}
-.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
- width: 254px;
-}
-.departmentAlert,.departmentrolerAlert{
- display: none;
- width: 100%;
- height: 100%;
- position: fixed;
- z-index: 100001;
- }
-.roler-checkable-con{
- width:712px;
- height: 500px;
- left:50%;
- top:50%;
- margin-left: -356px;
- margin-top:-250px;
- background: #fff;
- position: relative;
-}
-.treeview-checkable-con{
- background: #fff;
- width:380px;
- height: 500px;
- position: relative;
- left:50%;
- top:50%;
- margin-left: -190px;
- margin-top:-250px;
-}
-#treeview-checkable{
- background: #fff;
- width:350px;
- height: 400px;
- overflow-y: scroll;
- overflow-x: scroll;
-}
-#treeview-checkable .list-group{
- margin-bottom: 0;
-}
-.departmentAlert_t,.departmentrolerAlert_t{
- line-height: 60px;
- height: 60px;
- padding: 0 15px 0 24px;
- border-bottom: 1px solid #EFEFEF;
-}
-/*.departmentAlert_t span,.departmentrolerAlert_t span{
- padding-left: 16px;
-}*/
-/*.departmentAlert_t img,.departmentrolerAlert_t img{
- margin-right:16px;
- margin-top: 16px;
-}*/
-
-.departmentAlert_b,.departmentrolerAlert_b{
- text-align: center;
- margin-top: 16px;
- margin-bottom: 24px;
- height: 60px;
-}
-
-.departmentAlert_btn,.departmentrolerAlert_btn{
- border-radius: 4px!important;
- cursor: pointer;
- width: 72px;
- height: 32px;
- line-height: 32px;
- text-align: center;
- font-size: 14px;
- color: #fff;
- display: inline-block;
- margin-left: 5px;
-}
-.departmentrolercancel_btn,.departmentAlertcancel_btn{
- border-radius: 4px!important;
- cursor: pointer;
- width: 72px;
- height: 32px;
- line-height: 32px;
- text-align: center;
- font-size: 14px;
- color: #fff;
- display: inline-block;
- margin-left: 5px;
-}
-/*角色*/
-.allRoler{
- width: 100%;
- height: 375px;
- padding-top: 20px;
-}
-.roler-conten{
- width: 38%;
- height: 100%;
- float: left;
- cursor: pointer;
- border: 1px solid #d8e2e5;
- margin-left: 2%;
- overflow: auto;
- /*padding-left: 10px;*/
-}
-.roler-mes-active{
- background: #e1e4e6;
-}
-.roler-conten-opt li{
- margin-bottom: 20px;
- height: 35px;
- line-height: 35px;
- background: #1E95CD;
- text-align: center;
- border-radius: 20px !important;
- color: #fff;
-}
-.roler-conten-opt{
- width: 16%;
- float: left;
- cursor: pointer;
- margin-left: 2%;
- padding-top: 40px;
-}
-.allRoler .addroler-content{
- width: 38%;
- height: 100%;
- float: right;
- cursor: pointer;
- border: 1px solid #d8e2e5;
- margin-right: 2%;
- overflow: auto;
- /*padding-left: 10px;*/
-}
-.marl25{
- margin-left: 25%;
-}
-.allRoler .roler-conten li,.allRoler .addroler-content li{
- width: 100%;
- height: 30px;
- line-height: 30px;
- font-size: 14px;
- white-space :nowrap;
- text-indent: 8px;
-}
-.reset_pwd_div{
- line-height: 28px;
- height: 28px;
- margin-bottom: 8px;
-}
-.reset_pwd_div:nth-child(1) {
- color:#32c5d2;
- margin-top: 18px;
-}
-.reset_pwd_div:nth-child(3) {
- margin-bottom: 28px;
-}
-.reset_pwd_r{
- width:252px;
- padding-left: 8px;
- height: 26px;
- line-height: 26px;
- border:1px solid #e1e4e6;
-}
-.reset_pwd_l{
- width:83px;
- display: inline-block;
-}
-.diy_select_sex{
- width: 180px;
- display: inline-block;
- vertical-align: middle;
-}
-.select-text_sex{
- width: 180px;
-}
-.diy_select_txt_sex{
- width: 145px;
-}
-.treeview-checkable_org{
- background: #fff;
- width: 365px;
- height: 375px;
- overflow: auto;
- padding-left: 24px;
-}
-.fixed-table-container{
- height: calc(100% - 42px);
- height: -webkit-calc(100% - 42px);
- height: -mos-calc(100% - 42px);
- height: -moz-calc(100% - 42px);
- height: -o-calc(100% - 42px);
-}
-#example-getting-con .multiselect-container input{
- opacity: 0;
-}
- .multiselect-container{
- width:250px;
-}
-
-#example-getting-con .multiselect {
- width: 244px;
- margin-left: -3px;
-}
-td{
- white-space:nowrap !important;
-}
-.popOk{
- margin-left: 15px;
-}
-/*
-td a:first-of-type{
- color: #32c5d2;
-}
-td a:nth-of-type(2){
- color: red;
-}
-td a:last-of-type{
- color:black;
-}*/
diff --git a/assets/syspages/js/rbac/pages/userManage.htmlbak b/assets/syspages/js/rbac/pages/userManage.htmlbak
deleted file mode 100644
index 69b7c42..0000000
--- a/assets/syspages/js/rbac/pages/userManage.htmlbak
+++ /dev/null
@@ -1,226 +0,0 @@
-
-
-
-
-
-
-
-
-
-
用户管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ×
-
-
报错信息
-
-
-
-
-
- 姓名*
-
-
-
-
- 邮箱*
-
-
-
-
- 密码
- 默认密码为123qwe
-
-
-
-
- 取消
- 保存
-
-
-
-
-
-
-
-
-
-
-
- ×
-
-
-
- - 测试员1测试员测试员测试员测试员测试员测试员测试员
- - 测试员2
- - 测试员3
- - 信息维护
- - 测试员4
- - 审核员
-
-
- - 添加>
- - <删除
- - 添加全部>>
- - <<删除全部
-
-
-
-
- 取消
- 保存
-
-
-
-
-
-
-
-
-
-
-
- ×
-
-
-
-
- 取消
- 保存
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/assets/syspages/js/rbac/userManage.jsbak b/assets/syspages/js/rbac/userManage.jsbak
deleted file mode 100644
index 9b5563d..0000000
--- a/assets/syspages/js/rbac/userManage.jsbak
+++ /dev/null
@@ -1,1359 +0,0 @@
-/**
- * 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 =''+text+'';
- $('#addroler-content').append(roles);
- }else{
- $(this).remove();
- }
- }else{
- $(this).remove();
- var roles =''+text+'';
- $('#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 =''+text+'';
- $('#addroler-content').append(roles);
- }else{
- $(this).remove();
- }
- }else{
- $(this).remove();
- var roles =''+text+'';
- $('#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 =''+text+'';
- $('#roler-conten').append(roles);
- }else{
- $(this).remove();
-
- }
- }else{
- $(this).remove();
- var roles =''+text+'';
- $('#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 =''+text+'';
- $('#roler-conten').append(roles);
- }else{
- $(this).remove();
- }
- }else{
- $(this).remove();
- var roles =''+text+'';
- $('#roler-conten').append(roles);
- }
- }
- })
- });
- //初始化table
- userfun.initTable();
- //如果data为空的时候处理
- $('.no-records-found td').append('暂无信息,可使用 “添加用户” 按钮为系统添加用户信息')
- //条件查询
- 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: '账号', width: '10%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
- {field: 'opName', title: '姓名', width: '8%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
- {field: 'sex', title: '性别', width: '5%', align: 'left',formatter:commonObj.sexFormatter,cellStyle:commonObj.formatTableUnit},
- {field: 'age', title: '年龄', width: '5%', align: 'left',formatter:commonObj.replacenull,cellStyle:commonObj.formatTableUnit},
- {field: 'telephone', title: '手机号', width: '10%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
- {field: 'email', title: '邮箱', width: '5%', align: 'left',cellStyle:commonObj.formatTableUnit,formatter:commonObj.replacenull},
- {field: 'dataState', title: '状态', width: '5%', align: 'left',formatter:userfun.dataStateFormatter,cellStyle:commonObj.formatTableUnit},
- // {field: 'createEmpid', title: '创建人', width: '10%', align: 'left',cellStyle:commonObj.formatTableUnit},
- {field: 'createDate', title: '创建时间', width: '15%', align: 'left',formatter:commonObj.timeFormatter,cellStyle:commonObj.formatTableUnit},
- {field: 'sysCode', title: '系统名称', width: '2%', align: 'left',formatter:userfun.sysCodeFormatter,cellStyle:commonObj.formatTableUnit},
- {field: 'oper', title: '操作', 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="";
- /*var checkStr=''+
- ''+
- '
';*/
- return checkStr;
- },
- //操作显示
- operFormatter:function(value,row,index){
- var operStr ='修改'+
- '重置密码'+
- '删除';
- 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 = $('确定要删除用户('+loginCode+')吗?');
- 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 +=''+row.roleName+'';
- });
- $('#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 +=''+row.roleName+'';
- });
- $('#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:$('确定要重置选中的用户密码吗?'),
- buttons:[
- {
- type:'popOk',
- text:'保存',
- callback:function(){
- pwdAlert.close();
- var resetAlert = new Pop({
- width:'400px',
- header:'信息提示',
- content:$('新密码 :
重复新密码 :
'),
- 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:$(''+res.msg+''),
- 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');
-
-};
-
-
-
-
-
-
-
-
-