Commit d4144fa92e6e87c3716dfc6188e493abcc5dd71e
1 parent
4b2469e0
add license 页面
Showing
3 changed files
with
358 additions
and
2 deletions
admin/SubMenus/license.html
0 → 100644
| 1 | +<!DOCTYPE html> | |
| 2 | + | |
| 3 | +<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> | |
| 4 | +<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> | |
| 5 | +<!--[if !IE]><!--> | |
| 6 | +<html lang="en"> | |
| 7 | +<!--<![endif]--> | |
| 8 | +<!-- BEGIN HEAD --> | |
| 9 | +<head> | |
| 10 | + <meta charset="utf-8" /> | |
| 11 | + <title>License授权码</title> | |
| 12 | + <meta name="google" value="notranslate"><!-- 禁止Chrome 浏览器中自动提示翻译 --> | |
| 13 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"><!--IE=edge:保持使用最高级别模式显示内容--> | |
| 14 | + <meta name="renderer" content="webkit"><!--360浏览器--> | |
| 15 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> | |
| 16 | + <!--<meta content="width=device-width, initial-scale=1" name="viewport" />--> | |
| 17 | + <meta content="" name="description" /> | |
| 18 | + <meta content="" name="author" /> | |
| 19 | + <meta http-equiv="Pragma" content="no-cache"> | |
| 20 | + <meta http-equiv="Cache-Control" content="no-cache"> | |
| 21 | + <meta http-equiv="Expires" content="0"> | |
| 22 | + <!-- BEGIN GLOBAL MANDATORY STYLES --> | |
| 23 | + | |
| 24 | + <link href="../../assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> | |
| 25 | + <link href="../../assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" /> | |
| 26 | + <link href="../../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
| 27 | + <!--新增 sta--> | |
| 28 | + <link href="../../assets/global/plugins/bootstrap-switch/bootstrap-switch.css" rel="stylesheet" type="text/css"> | |
| 29 | + <!--新增 end--> | |
| 30 | + <link href="../../assets/global/plugins/uniform/css/uniform.default.min.css" rel="stylesheet" type="text/css" /> | |
| 31 | + <!-- END GLOBAL MANDATORY STYLES --> | |
| 32 | + <!-- BEGIN THEME GLOBAL STYLES --> | |
| 33 | + <link href="../../assets/global/plugins/bootstrap-select/css/bootstrap-select.min.css" rel="stylesheet" type="text/css" /> | |
| 34 | + <link href="../../assets/global/css/bootstrap-table.min.css" rel="stylesheet"> | |
| 35 | + <link href="../../assets/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css" /> | |
| 36 | + <!--<link href="../assets/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css" />--> | |
| 37 | + <link href="../../assets/global/css/plugins.min.css" rel="stylesheet" type="text/css" /> | |
| 38 | + <link href="../../assets/global/plugins/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css"> | |
| 39 | + <link href="../../assets/global/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.css" rel="stylesheet" | |
| 40 | + type="text/css"/> | |
| 41 | + <!-- END THEME GLOBAL STYLES --> | |
| 42 | + <!-- BEGIN THEME LAYOUT STYLES --> | |
| 43 | + <link href="../../assets/layouts/layout/css/layout.min.css" rel="stylesheet" type="text/css" /> | |
| 44 | + <link href="../../assets/layouts/layout/css/themes/blue.css" rel="stylesheet" type="text/css" id="style_color" /> | |
| 45 | + <link href="../../assets/syspages/css/bootstrap-multiselect.css" type="text/css" rel="stylesheet"> | |
| 46 | + <link href="../../assets/syspages/css/ztree-v3.5.28/metroStyle/metroStyle.css" type="text/css" rel="stylesheet"> | |
| 47 | + <script src="../../assets/global/plugins/jquery.min.js" type="text/javascript"></script> | |
| 48 | + <script src="../../assets/pages/config/config.js"></script> | |
| 49 | + <link rel="stylesheet" type="text/css" href="../../assets/pages/css/commonsetcss/commonsetcss.css?a=1"/> | |
| 50 | + <link rel="stylesheet" href="../../assets/syspages/css/reset.css"> | |
| 51 | + <!--<link rel="stylesheet" href="../../assets/global/css/reset.css">--> | |
| 52 | + <link rel="stylesheet" href="../../assets/syspages/css/common.css"> | |
| 53 | + <link href="../../assets/global/plugins/sweetalert/css/sweetalert2.min.css?v=1.0" rel="stylesheet" type="text/css" > | |
| 54 | + <link rel="stylesheet" href="../../assets/syspages/js/rbac/css/license.css?a=3"> | |
| 55 | + <!-- END THEME LAYOUT STYLES --> | |
| 56 | + <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" /></head> | |
| 57 | +<!-- END HEAD --> | |
| 58 | + | |
| 59 | +<body class="page-header-fixed page-sidebar-closed-hide-logo page-container-bg-solid"> | |
| 60 | +<!-- BEGIN HEADER --> | |
| 61 | +<div class="page-header navbar navbar-fixed-top" id="header"> | |
| 62 | +</div> | |
| 63 | +<!-- END HEADER --> | |
| 64 | +<!-- BEGIN HEADER & CONTENT DIVIDER --> | |
| 65 | +<div class="clearfix"> </div> | |
| 66 | +<!-- END HEADER & CONTENT DIVIDER --> | |
| 67 | + | |
| 68 | +<!-- BEGIN --> | |
| 69 | +<div class="page-container"> | |
| 70 | + <!-- 左侧菜单栏 sta --> | |
| 71 | + <div class="page-sidebar-wrapper"> | |
| 72 | + <!-- BEGIN SIDEBAR --> | |
| 73 | + <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing --> | |
| 74 | + <!-- DOC: Change data-auto-speed="200" to adjust the sub menu slide up/down speed --> | |
| 75 | + <div class="page-sidebar navbar-collapse collapse" id="navbar_left"> | |
| 76 | + | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + <!-- 左侧菜单栏 end --> | |
| 80 | + <!-- 右侧账单内容 sta --> | |
| 81 | + <div class="page-content-wrapper"> | |
| 82 | + <div class="page-content clearfix" > | |
| 83 | + <div class="ITD-directory-name ITD-common-fontsize16 ITD-common-color"><span>License授权码</span></div> | |
| 84 | + <!--记录 sta --> | |
| 85 | + <div class="row margin-top-24"> | |
| 86 | + <div class="col-md-12 ITD-padding-common"> | |
| 87 | + <div class="ITD-box-shadow ITD-border-radius padding0-20"> | |
| 88 | + <div class="ITD-common-title pos-rel ITD-common-color070"> | |
| 89 | + <span >详细记录</span> | |
| 90 | + <div class="btn-actions pos-abs"> | |
| 91 | + <div class="btn-export float-left margin-right-10"> | |
| 92 | + <button class="btn ITD-panelbtn-icon ITD-panelbtn-icon-gray " id="licenseAddbtn"> | |
| 93 | + <i class="fa ITD-panelicon-add"></i>新增 | |
| 94 | + </button> | |
| 95 | + </div> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 98 | + <div class="portlet-body padding20-0"> | |
| 99 | + <table id="licenseTable" class="ITD-fix-table common-tableh47"></table> | |
| 100 | + </div> | |
| 101 | + | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + <!--记录 end --> | |
| 106 | + </div> | |
| 107 | + </div> | |
| 108 | + <!-- 右侧账单内容 end --> | |
| 109 | +</div> | |
| 110 | +<div class="modal fade in" id="license_addmodel" style="display: none;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
| 111 | + <div class="ITD-modal-dialog blue-modal"> | |
| 112 | + <div class="modal-content ITD-common-color070"> | |
| 113 | + <div class="modal-header ITD-model-header"> | |
| 114 | + <button type="button" class="close ITD-model-close" data-dismiss="modal" aria-hidden="true">×</button> | |
| 115 | + <span class="ITD-common-fontsize16 colorbig ITD-ztree-headername">License授权码</span> | |
| 116 | + </div> | |
| 117 | + <div class="modal-body" style="padding:15px;padding-top: 0"> | |
| 118 | + <!--错误提示 sta--> | |
| 119 | + <div id="login_error" class="ITD-model-errormsg display-none"></div> | |
| 120 | + <!--错误提示 end--> | |
| 121 | + <div class="margin-top-15"> | |
| 122 | + <textarea name="" id="login-licenseMsg" cols="46" rows="5" class="licenseMsg ITD-input-bordercolor" placeholder="请输入License授权码"></textarea> | |
| 123 | + </div> | |
| 124 | + <!--底部 sta--> | |
| 125 | + <div class="modal-footer ITD-model-footer"> | |
| 126 | + <button type="button" class="btn ITD-model-btn ITD-bgcolor-c2cad8" data-dismiss="modal" style="line-height: 0">取消</button> | |
| 127 | + <button type="button" class="btn ITD-model-btn ITD-bgcolor-green textTrue" style="line-height: 0" id="addsubmit">确定</button> | |
| 128 | + </div> | |
| 129 | + <!--底部 end--> | |
| 130 | + </div> | |
| 131 | + | |
| 132 | + </div> | |
| 133 | + </div> | |
| 134 | +</div> | |
| 135 | + | |
| 136 | +<!--[if lt IE 9]> | |
| 137 | +<script src="../../assets/global/plugins/respond.min.js"></script> | |
| 138 | +<script src="../../assets/global/plugins/excanvas.min.js"></script> | |
| 139 | +<![endif]--> | |
| 140 | +<!-- scritp BEGIN --> | |
| 141 | +<script src="../../assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> | |
| 142 | +<script src="../../assets/global/plugins/js.cookie.min.js" type="text/javascript"></script> | |
| 143 | +<script src="../../assets/global/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script> | |
| 144 | +<script src="../../assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script> | |
| 145 | +<script src="../../assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script> | |
| 146 | +<script src="../../assets/global/plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script> | |
| 147 | +<!-- END CORE PLUGINS --> | |
| 148 | +<!-- BEGIN THEME GLOBAL SCRIPTS --> | |
| 149 | +<script src="../../assets/global/plugins/bootstrap-select/js/bootstrap-select.min.js" type="text/javascript"></script> | |
| 150 | +<script src="../../assets/global/scripts/bootstrap-table.min.js"></script> | |
| 151 | +<script src="../../assets/pages/config/config.js?a=2" type="text/javascript"></script> | |
| 152 | +<script src="../../assets/global/plugins/bootstrap-table-zh-CN.js" type="text/javascript"></script> | |
| 153 | +<script src="../../assets/global/scripts/app.min.js" type="text/javascript"></script> | |
| 154 | +<script src="../../assets/pages/scripts/components-bootstrap-select.min.js" type="text/javascript"></script> | |
| 155 | +<!-- END THEME GLOBAL SCRIPTS --> | |
| 156 | +<!-- BEGIN THEME LAYOUT SCRIPTS --> | |
| 157 | +<!--新增 sta--> | |
| 158 | +<script src="../../assets/global/plugins/bootstrap-switch/bootstrap-switch.js" type="text/javascript"></script> | |
| 159 | +<!--新增 end--> | |
| 160 | +<script src="../../assets/layouts/layout/scripts/layout.min.js" type="text/javascript"></script> | |
| 161 | +<script src="../../assets/layouts/layout/scripts/demo.js" type="text/javascript"></script> | |
| 162 | +<script src="../../assets/global/plugins/quick-sidebar.min.js" type="text/javascript"></script> | |
| 163 | +<script src="../../assets/pages/scripts/public/unit.js" type="text/javascript"></script> | |
| 164 | +<script src="../../assets/global/plugins/bootstrap-daterangepicker/moment.js" type="text/javascript"></script> | |
| 165 | +<script src="../../assets/global/plugins/bootstrap-daterangepicker/daterangepicker.js" type="text/javascript"></script> | |
| 166 | +<script src="../../assets/global/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.js" | |
| 167 | + type="text/javascript"></script> | |
| 168 | +<script src="../../assets/global/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.zh-CN.js" | |
| 169 | + type="text/javascript"></script> | |
| 170 | +<script src="../../assets/syspages/js/lib/jquery-migrate-1.2.1.js"></script> | |
| 171 | + | |
| 172 | +<script src="../../assets/syspages/js/lib/DateUtils.js"></script> | |
| 173 | +<script src="../../assets/syspages/js/lib/niceSelect.js"></script> | |
| 174 | +<script src="../../assets/syspages/js/common.js"></script> | |
| 175 | +<script src="../../assets/syspages/js/lib/bootstrap-multiselect.js"></script> | |
| 176 | +<script src="../../assets/syspages/js/lib/ztree-v3.5.28/jquery.ztree.core.js"></script> | |
| 177 | +<script src="../../assets/syspages/js/lib/ztree-v3.5.28/jquery.ztree.excheck.js"></script> | |
| 178 | +<script src="../../assets/syspages/js/lib/ztree-v3.5.28/jquery.ztree.exedit.js"></script> | |
| 179 | + | |
| 180 | +<script src="../../assets/pages/scripts/public/header-navbar.js" type="text/javascript"></script> | |
| 181 | +<script src="../../assets/global/plugins/sweetalert/js/sweetalert2.min.js?v=1.0"></script> | |
| 182 | +<script src="../../assets/global/plugins/sweetalert/js/es6-promise.min.js?v=1.0"></script> | |
| 183 | +<script type="text/javascript"> | |
| 184 | + | |
| 185 | + document.write("<s" + "cript type='text/javascript' src='../../assets/syspages/js/rbac/license.js?ver" + Math.random() + "'></s" + "cript>"); | |
| 186 | + | |
| 187 | +</script> | |
| 188 | +<!--<script src="../../assets/syspages/js/frameworkManage.js"></script>--> | |
| 189 | +<!-- END THEME LAYOUT SCRIPTS --> | |
| 190 | +</body> | |
| 191 | + | |
| 192 | +</html> | ... | ... |
assets/pages/scripts/home/index.js
| ... | ... | @@ -808,8 +808,11 @@ function updateSysLicense() { |
| 808 | 808 | success: function (res) { |
| 809 | 809 | if (res.code == '8888') { |
| 810 | 810 | var ext=res.data.ext |
| 811 | - licensepopInit("提示",ext); | |
| 812 | - $('#pop_div').fadeIn(400); | |
| 811 | + if(res.data.noteFlag){ | |
| 812 | + licensepopInit("提示",ext); | |
| 813 | + $('#pop_div').fadeIn(400); | |
| 814 | + } | |
| 815 | + | |
| 813 | 816 | } else { |
| 814 | 817 | console.log(res); |
| 815 | 818 | } | ... | ... |
assets/syspages/js/rbac/license.js
0 → 100644
| 1 | + | |
| 2 | +var liFun={ | |
| 3 | + init:function () { | |
| 4 | + liFun.initTable(); | |
| 5 | + }, | |
| 6 | + initTable:function(){ | |
| 7 | + $('#licenseTable').bootstrapTable('destroy').bootstrapTable({ | |
| 8 | + striped:true,//表格显示条纹 | |
| 9 | + pagination: false, //启动分页 | |
| 10 | + pageNumber:1, //当前第几页 | |
| 11 | + pageSize: 1, //每页显示的记录数 | |
| 12 | + pageList: [1], //记录数可选列表 | |
| 13 | + sidePagination: 'server',//表示服务端分页 | |
| 14 | + queryParamsType: 'limit', | |
| 15 | + method:'POST',//请求方法 | |
| 16 | + paginationPreText: '<', | |
| 17 | + paginationNextText: '>', | |
| 18 | + ajax:tableLoadRequest,//自定义ajax加载数据 | |
| 19 | + uniqueId:'id', | |
| 20 | + columns: [ | |
| 21 | + { | |
| 22 | + field: 'issCompany', | |
| 23 | + title: '<span class="person-icon"> </span>授权码发行公司', | |
| 24 | + width: '15%', | |
| 25 | + align: "left", | |
| 26 | + formatter:commonObj.replacenull | |
| 27 | + }, | |
| 28 | + { | |
| 29 | + field: 'grantType', | |
| 30 | + title: '<span class="type-icon"> </span>授权类型', | |
| 31 | + width: '10%', | |
| 32 | + align: "left", | |
| 33 | + formatter:commonObj.replacenull | |
| 34 | + }, | |
| 35 | + { | |
| 36 | + field: 'grantComName', | |
| 37 | + title: '<span class="person-icon"> </span>授权公司', | |
| 38 | + width: '10%', | |
| 39 | + align: "left", | |
| 40 | + formatter:commonObj.replacenull | |
| 41 | + }, | |
| 42 | + { | |
| 43 | + field: 'license', | |
| 44 | + title: '<span class="id-icon"> </span>License授权码', | |
| 45 | + width: '20%', | |
| 46 | + align: "left", | |
| 47 | + formatter:function(value,row,index){ | |
| 48 | + var operStr ='<div style="max-width: 200px; color:#1E95CD" class="ITD-cursor-pointer ITD-hidden-nowrap LicesePop" data-toggle="tooltip" title="'+value+'"> '+value+'</div>'; | |
| 49 | + return operStr; | |
| 50 | + }, | |
| 51 | + }, | |
| 52 | + { | |
| 53 | + field: 'iat', | |
| 54 | + title: '<span class="time-icon"> </span>创建时间', | |
| 55 | + width: '15%', | |
| 56 | + align: "left", | |
| 57 | + formatter:commonObj.replacenull | |
| 58 | + }, | |
| 59 | + { | |
| 60 | + field: 'ext', | |
| 61 | + title: '<span class="time-icon"> </span>过期时间', | |
| 62 | + width: '15%', | |
| 63 | + align: "left", | |
| 64 | + formatter:commonObj.replacenull | |
| 65 | + }, | |
| 66 | + ], | |
| 67 | + formatTableUnit:function(value,row,index){ | |
| 68 | + return { | |
| 69 | + css: { | |
| 70 | + "white-space":"nowrap" | |
| 71 | + } | |
| 72 | + } | |
| 73 | + }, | |
| 74 | + formatLoadingMessage:function(){ | |
| 75 | + return "数据正在加载中..."; | |
| 76 | + }, | |
| 77 | + | |
| 78 | + }); | |
| 79 | + }, | |
| 80 | + | |
| 81 | +}; | |
| 82 | +liFun.init(); | |
| 83 | + | |
| 84 | +documentBindFunc.on('click','#licenseAddbtn',function () { | |
| 85 | + $('#login_error').addClass('display-none').text(''); | |
| 86 | + $('#login-licenseMsg').val(''); | |
| 87 | + $('#license_addmodel').modal('show'); | |
| 88 | +}); | |
| 89 | + | |
| 90 | +//确定 事件 (上报license 授权码) | |
| 91 | +documentBindFunc.on('click','#addsubmit',function () { | |
| 92 | + updateSysLicense(); | |
| 93 | +}); | |
| 94 | +//上报license 授权码 | |
| 95 | +function updateSysLicense() { | |
| 96 | + var licenseID=$('#login-licenseMsg').val(); | |
| 97 | + if(licenseID==null||licenseID==''||licenseID==undefined){ | |
| 98 | + $('#login_error').removeClass('display-none').text('License授权码不能为空'); | |
| 99 | + return; | |
| 100 | + } | |
| 101 | + var req = { | |
| 102 | + sysCode:sysComm.sysCode, | |
| 103 | + orgId: fn.getOrgId(), | |
| 104 | + license: licenseID | |
| 105 | + }; | |
| 106 | + var licenseAjax = { | |
| 107 | + method: "post", | |
| 108 | + url: dataUrl.util.updateSysLicenseByOrgId(), | |
| 109 | + data: JSON.stringify(req), | |
| 110 | + contentType: 'application/json; charset=utf-8', | |
| 111 | + dataType: 'json', | |
| 112 | + success: function (res) { | |
| 113 | + if (res.code == '8888') { | |
| 114 | + $('#login-licenseMsg').val(''); | |
| 115 | + $('#license_addmodel').modal('hide'); | |
| 116 | + liFun.initTable(); | |
| 117 | + } else { | |
| 118 | + console.log(res); | |
| 119 | + } | |
| 120 | + } | |
| 121 | + }; | |
| 122 | + sysAjax(licenseAjax); | |
| 123 | +}; | |
| 124 | +/** | |
| 125 | + * 自定义table AJAX请求 | |
| 126 | + * @param {Object} params | |
| 127 | + */ | |
| 128 | +function tableLoadRequest(params){ | |
| 129 | + //设置请求参数 | |
| 130 | + var pageNum = 1; | |
| 131 | + var req= { | |
| 132 | + baseRequest:{ | |
| 133 | + pageNum:pageNum, | |
| 134 | + pageSize:params.data.limit | |
| 135 | + }, | |
| 136 | + // sysCode:sysCode, | |
| 137 | + orgId: fn.getOrgId(), | |
| 138 | + }; | |
| 139 | + var easyUIOps = { | |
| 140 | + method: params.type, | |
| 141 | + url: dataUrl.util.querySysLicense(), | |
| 142 | + data: JSON.stringify(req), | |
| 143 | + contentType: 'application/json; charset=utf-8', | |
| 144 | + dataType:'json', | |
| 145 | + success: function(res){ | |
| 146 | + if(res.code == '8888'){ | |
| 147 | + console.log(res.data) | |
| 148 | + params.success(res.data); | |
| 149 | + $('#licenseTable').bootstrapTable('insertRow',{index:1,row:{issCompany:res.data.issCompany,grantType:res.data.grantType,grantComName:res.data.grantComName,license:res.data.license,iat:res.data.iat,ext:res.data.ext}}); | |
| 150 | + /*$("[data-toggle='tooltip']").tooltip({ | |
| 151 | + delay: {show: 500, hide: 100}, | |
| 152 | + });*/ | |
| 153 | + | |
| 154 | + | |
| 155 | + }else{ | |
| 156 | + console.log(res); | |
| 157 | + } | |
| 158 | + } | |
| 159 | + }; | |
| 160 | + sysAjax(easyUIOps); | |
| 161 | +} | ... | ... |