dlt-for-react 1.0.23 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/lib/components/Button/index.js +79 -0
- package/lib/components/HqSelector/HqLsrySelector/index.js +3 -5
- package/lib/components/HqSelector/HqRySelector/index.js +3 -5
- package/lib/components/HqSelector/HqWzSelector/index.js +3 -5
- package/lib/components/KyEditableTable/component.js +3 -5
- package/lib/components/KyEditableTable/index.js +7 -13
- package/lib/components/KyExcel/index.js +3 -5
- package/lib/components/KyInputPicker/render.js +13 -43
- package/lib/components/KyInputPicker/setting-checkbox.js +3 -5
- package/lib/components/KyInputPicker/setting-multiSelect.js +3 -5
- package/lib/components/KyInputPicker/setting-nhcascader.js +3 -5
- package/lib/components/KyInputPicker/setting-select.js +3 -5
- package/lib/components/KyInputPicker/setting-stu-selector.js +3 -5
- package/lib/components/KyInputPicker/setting-tea-selector.js +3 -5
- package/lib/components/KyTable/checkButtons.js +4 -7
- package/lib/components/KyTree/index.js +6 -16
- package/lib/components/KyUpload/index.js +13 -21
- package/lib/components/NHAuditPanel/config/Axios.js +263 -0
- package/lib/components/NHAuditPanel/config/api.js +479 -0
- package/lib/components/NHAuditPanel/config/data.js +156 -0
- package/lib/components/NHAuditPanel/config/typeMap.js +1234 -0
- package/lib/components/NHAuditPanel/config/uiValidate.js +92 -0
- package/lib/components/NHAuditPanel/index.js +413 -0
- package/lib/components/NHAuditPanel/node.js +619 -0
- package/lib/components/NHCascader/index.js +355 -0
- package/lib/components/NHCheckboxGroup/index.js +135 -0
- package/lib/components/NHDynamicFormShow/baseInfo/index.js +194 -0
- package/lib/components/NHDynamicFormShow/custom/index.js +553 -0
- package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +43 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +1113 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +263 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +880 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +171 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +865 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +571 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +147 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +474 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +139 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +506 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +143 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +1074 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +172 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +927 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +195 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +1064 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +183 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +763 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +137 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +819 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +137 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +700 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +162 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +743 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +177 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +848 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +777 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +161 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +706 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +413 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +1013 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +175 -0
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +1345 -0
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +274 -0
- package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +669 -0
- package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +134 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +378 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +120 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +638 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +965 -0
- package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +237 -0
- package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +823 -0
- package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +188 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +401 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +472 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +304 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +375 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +118 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +62 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +55 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +1238 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +375 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +554 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +542 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +575 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +563 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +745 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +164 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +587 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +143 -0
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +743 -0
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +172 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +1410 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +274 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +755 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +814 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +188 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +769 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +1004 -0
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +126 -0
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +503 -0
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +149 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +379 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +148 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +748 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +762 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +134 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +682 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +152 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +783 -0
- package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +764 -0
- package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +677 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +1173 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +242 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +862 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +201 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +196 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +167 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +1096 -0
- package/lib/components/NHDynamicFormShow/index.js +647 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +279 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +206 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/index.js +419 -0
- package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +401 -0
- package/lib/components/NHDynamicFormShow/oneOnOne/index.js +271 -0
- package/lib/components/NHImagePicker/index.js +554 -0
- package/lib/components/NHInputPicker/RadioGroup.js +118 -0
- package/lib/components/NHInputPicker/index.js +62 -0
- package/lib/components/NHInputPicker/input-const.js +55 -0
- package/lib/components/NHInputPicker/render.js +1271 -0
- package/lib/components/NHListView/index.js +374 -0
- package/lib/components/NHMapGeolocation/index.js +537 -0
- package/lib/components/NHMapGeolocation/initMap/initGdMap.js +104 -0
- package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +138 -0
- package/lib/components/NHMapGeolocation/style.js +51 -0
- package/lib/components/NHMultiSelect/index.js +272 -0
- package/lib/components/NHRadioGroup/index.js +118 -0
- package/lib/components/NHSelect/index.js +364 -0
- package/lib/components/NHTreeMenu/index.js +126 -0
- package/lib/components/NHTreeMenu/treeNode.js +164 -0
- package/lib/components/StuSelector/index.js +611 -0
- package/lib/index.js +161 -116
- package/lib/layouts/KyInputPicker/edit-page.js +585 -0
- package/lib/layouts/KyInputPicker/index.js +220 -0
- package/lib/layouts/KyInputPicker/input-const.js +134 -0
- package/lib/layouts/KyInputPicker/render.js +2477 -0
- package/lib/layouts/KyInputPicker/setting-checkbox.js +850 -0
- package/lib/layouts/KyInputPicker/setting-datepicker.js +430 -0
- package/lib/layouts/KyInputPicker/setting-datetimepicker.js +443 -0
- package/lib/layouts/KyInputPicker/setting-input.js +555 -0
- package/lib/layouts/KyInputPicker/setting-inputNumber.js +612 -0
- package/lib/layouts/KyInputPicker/setting-monthpicker.js +434 -0
- package/lib/layouts/KyInputPicker/setting-multiSelect.js +532 -0
- package/lib/layouts/KyInputPicker/setting-nhcascader.js +584 -0
- package/lib/layouts/KyInputPicker/setting-old-upload.js +428 -0
- package/lib/layouts/KyInputPicker/setting-radio.js +468 -0
- package/lib/layouts/KyInputPicker/setting-rangepicker.js +466 -0
- package/lib/layouts/KyInputPicker/setting-select.js +534 -0
- package/lib/layouts/KyInputPicker/setting-stu-selector.js +507 -0
- package/lib/layouts/KyInputPicker/setting-switch.js +274 -0
- package/lib/layouts/KyInputPicker/setting-tea-selector.js +507 -0
- package/lib/layouts/KyInputPicker/setting-textarea.js +619 -0
- package/lib/layouts/KyInputPicker/setting-timepicker.js +437 -0
- package/lib/layouts/KyInputPicker/setting-upload.js +766 -0
- package/lib/layouts/KyModal/buildTitle.js +81 -0
- package/lib/layouts/KyModal/dragM.js +127 -0
- package/lib/layouts/KyModal/index.js +321 -0
- package/lib/layouts/KyPreview/index.js +219 -0
- package/lib/layouts/KyUpload/index.js +1155 -0
- package/lib/layouts/LeftMenu/index.js +5 -11
- package/lib/layouts/NavigationBar/index.js +4 -10
- package/lib/layouts/Top/editPassWord.js +5 -7
- package/lib/layouts/Top/index.js +6 -20
- package/lib/layouts/TopMenu/index.js +11 -14
- package/lib/layouts/layout/index.js +7 -13
- package/lib/layouts/{Login → login}/index-pre.js +3 -5
- package/lib/layouts/{Login → login}/index.js +6 -8
- package/lib/layouts/{Login → login}/login.js +8 -17
- package/lib/layouts/mixTop/index.js +13 -28
- package/lib/layouts/settingDrawer/index.js +3 -5
- package/lib/routes/AuthorizedRoute.js +7 -13
- package/lib/utils/NHCore.js +46 -2
- package/lib/utils/base64.js +238 -0
- package/lib/utils/browserJudge.js +33 -0
- package/lib/utils/common.js +18 -20
- package/lib/utils/createUuid.js +11 -31
- package/lib/utils/device.js +44 -0
- package/lib/utils/dynamicLoadCss.js +14 -0
- package/lib/utils/dynamicLoadJs.js +21 -0
- package/lib/utils/getLoginUser.js +1 -1
- package/lib/utils/getSize.js +2 -11
- package/lib/utils/getStyle.js +26 -0
- package/lib/utils/getSuitHeight.js +49 -0
- package/lib/utils/hasAuth.js +11 -0
- package/lib/utils/index.js +1 -34
- package/lib/utils/loadJS.js +40 -0
- package/package.json +1 -1
- /package/lib/layouts/{Login → login}/lyPassword.js +0 -0
|
@@ -12,14 +12,6 @@ var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProp
|
|
|
12
12
|
|
|
13
13
|
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
|
14
14
|
|
|
15
|
-
var _hasAuth2 = require('xgui-for-react/lib/utils/hasAuth');
|
|
16
|
-
|
|
17
|
-
var _hasAuth3 = _interopRequireDefault(_hasAuth2);
|
|
18
|
-
|
|
19
|
-
var _getLoginUser2 = require('xgui-for-react/lib/utils/getLoginUser');
|
|
20
|
-
|
|
21
|
-
var _getLoginUser3 = _interopRequireDefault(_getLoginUser2);
|
|
22
|
-
|
|
23
15
|
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
|
24
16
|
|
|
25
17
|
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
|
@@ -46,6 +38,8 @@ var _react2 = _interopRequireDefault(_react);
|
|
|
46
38
|
|
|
47
39
|
var _router = require('dva/router');
|
|
48
40
|
|
|
41
|
+
var _xguiForReact = require('xgui-for-react');
|
|
42
|
+
|
|
49
43
|
var _createHashHistory = require('history/createHashHistory');
|
|
50
44
|
|
|
51
45
|
var _createHashHistory2 = _interopRequireDefault(_createHashHistory);
|
|
@@ -129,7 +123,7 @@ var AuthorizedRoute = function (_React$Component) {
|
|
|
129
123
|
|
|
130
124
|
_this.getAuthPageUrl = function () {
|
|
131
125
|
var authPageUrlList = ["/", "/login", "/403", "/404", "/500"]; // 初始化可访问页面
|
|
132
|
-
var menus = (0,
|
|
126
|
+
var menus = (0, _xguiForReact.getLoginUser)().menus ? (0, _xguiForReact.getLoginUser)().menus : [];
|
|
133
127
|
var fullPageUrl = sessionStorage.getItem('fullPageUrl') ? JSON.parse(sessionStorage.getItem('fullPageUrl')) : [];
|
|
134
128
|
|
|
135
129
|
// 添加菜单页面地址
|
|
@@ -139,7 +133,7 @@ var AuthorizedRoute = function (_React$Component) {
|
|
|
139
133
|
for (var i = 0; i < fullPageUrl.length; i++) {
|
|
140
134
|
var url = fullPageUrl[i].url;
|
|
141
135
|
//判断是是否满足权限,或者是不需要设置权限
|
|
142
|
-
if (fullPageUrl[i].auth && (0,
|
|
136
|
+
if (fullPageUrl[i].auth && (0, _xguiForReact.hasAuth)(fullPageUrl[i].auth) || !fullPageUrl[i].auth) {
|
|
143
137
|
authPageUrlList.push(url);
|
|
144
138
|
}
|
|
145
139
|
}
|
|
@@ -166,8 +160,8 @@ var AuthorizedRoute = function (_React$Component) {
|
|
|
166
160
|
Component = _props.component,
|
|
167
161
|
rest = (0, _objectWithoutProperties3.default)(_props, ['component']);
|
|
168
162
|
|
|
169
|
-
var isLogin = (0,
|
|
170
|
-
var menus = (0,
|
|
163
|
+
var isLogin = (0, _xguiForReact.getLoginUser)().userId ? true : false;
|
|
164
|
+
var menus = (0, _xguiForReact.getLoginUser)().menus ? (0, _xguiForReact.getLoginUser)().menus : [];
|
|
171
165
|
var fullPageUrl = sessionStorage.getItem('fullPageUrl') ? JSON.parse(sessionStorage.getItem('fullPageUrl')) : [];
|
|
172
166
|
var curUrl = window.location.href.split('#')[1] + "/";
|
|
173
167
|
|
|
@@ -180,7 +174,7 @@ var AuthorizedRoute = function (_React$Component) {
|
|
|
180
174
|
if (this.compareUrl(curUrl, url)) {
|
|
181
175
|
isFullUrl = true;
|
|
182
176
|
//判断是是否满足权限,或者是不需要设置权限
|
|
183
|
-
if (fullPageUrl[i].auth && (0,
|
|
177
|
+
if (fullPageUrl[i].auth && (0, _xguiForReact.hasAuth)(fullPageUrl[i].auth) || !fullPageUrl[i].auth) {
|
|
184
178
|
//判断是否是必须登录才能访问且没有登录,此时跳转到登录界面
|
|
185
179
|
if (fullPageUrl[i].isLogin !== false && !isLogin) {
|
|
186
180
|
//跳转到登登录界面
|
package/lib/utils/NHCore.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.validateCode = exports.getOffset = exports.computeFontSize = exports.browserJudge = exports.getLoginUser = exports.hasAuthList = exports.hasAuth = exports.getStyle = exports.createUuid = exports.getSuitHeight = undefined;
|
|
6
|
+
exports.setCookie = exports.getCookie = exports.validateCode = exports.getOffset = exports.computeFontSize = exports.browserJudge = exports.getLoginUser = exports.hasAuthList = exports.hasAuth = exports.getStyle = exports.createUuid = exports.getSuitHeight = exports.getSize = undefined;
|
|
7
7
|
|
|
8
8
|
var _regenerator = require('babel-runtime/regenerator');
|
|
9
9
|
|
|
@@ -19,6 +19,27 @@ var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2);
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
+
var getSize = exports.getSize = function getSize() {
|
|
23
|
+
var setting = sessionStorage.getItem('setting');
|
|
24
|
+
var breadcrumbHeight = 0; //面包屑高度
|
|
25
|
+
if (setting) {
|
|
26
|
+
// 存在布局配置
|
|
27
|
+
var _JSON$parse = JSON.parse(setting),
|
|
28
|
+
layout = _JSON$parse.layout;
|
|
29
|
+
|
|
30
|
+
breadcrumbHeight = layout === 'mixmenu' ? 40 : 0; //若是混合布局 contentH高度需要减去面包屑高度
|
|
31
|
+
}
|
|
32
|
+
var windowW = void 0,
|
|
33
|
+
windowH = void 0,
|
|
34
|
+
contentH = void 0,
|
|
35
|
+
scrollT = void 0;
|
|
36
|
+
windowH = window.innerHeight;
|
|
37
|
+
windowW = window.innerWidth;
|
|
38
|
+
scrollT = document.documentElement.scrollTop || document.body.scrollTop;
|
|
39
|
+
contentH = windowH - 65 - breadcrumbHeight;
|
|
40
|
+
return { windowW: windowW, windowH: windowH, contentH: contentH, scrollT: scrollT };
|
|
41
|
+
};
|
|
42
|
+
|
|
22
43
|
//获取高度
|
|
23
44
|
var getSuitHeight = exports.getSuitHeight = function getSuitHeight(node) {
|
|
24
45
|
var height = SuitHeight(node) - 2; //设置合适高度的时候减去两个边框的高度,可以保证紧密镶嵌式不会因为上下边框产生滚动条
|
|
@@ -280,4 +301,27 @@ var validateCode = exports.validateCode = function () {
|
|
|
280
301
|
return function validateCode(_x3, _x4, _x5) {
|
|
281
302
|
return _ref.apply(this, arguments);
|
|
282
303
|
};
|
|
283
|
-
}();
|
|
304
|
+
}();
|
|
305
|
+
|
|
306
|
+
/** 获取cookie */
|
|
307
|
+
var getCookie = exports.getCookie = function getCookie(key) {
|
|
308
|
+
var name = key + '=';
|
|
309
|
+
var ca = document.cookie.split(';');
|
|
310
|
+
for (var i = 0; i < ca.length; i++) {
|
|
311
|
+
var c = ca[i].trim();
|
|
312
|
+
if (c.indexOf(name) === 0) {
|
|
313
|
+
return c.substring(name.length, c.length);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
return '';
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
/** 设置cookie */
|
|
320
|
+
var setCookie = exports.setCookie = function setCookie(key, value) {
|
|
321
|
+
var day = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 7;
|
|
322
|
+
|
|
323
|
+
var d = new Date();
|
|
324
|
+
d.setTime(d.getTime() + day * 24 * 60 * 60 * 1000);
|
|
325
|
+
var expires = 'expires=' + d.toGMTString();
|
|
326
|
+
document.cookie = key + '=' + value + '; ' + expires;
|
|
327
|
+
};
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof2 = require("babel-runtime/helpers/typeof");
|
|
4
|
+
|
|
5
|
+
var _typeof3 = _interopRequireDefault(_typeof2);
|
|
6
|
+
|
|
7
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Created by SLICE_30_K on 2017/5/22.
|
|
11
|
+
*
|
|
12
|
+
* 支持一般Base64的编码和解码
|
|
13
|
+
* 支持符合RFC_4648标准中"URL and Filename Safe Alphabet"的URL安全Base64编解码
|
|
14
|
+
* 支持中文字符的编解码(Unicode编码)
|
|
15
|
+
*/
|
|
16
|
+
(function (root, factory) {
|
|
17
|
+
if ((typeof exports === "undefined" ? "undefined" : (0, _typeof3.default)(exports)) === "object") {
|
|
18
|
+
// CommonJS
|
|
19
|
+
module.exports = exports = factory();
|
|
20
|
+
} else if (typeof define === "function" && define.amd) {
|
|
21
|
+
// AMD
|
|
22
|
+
define(factory);
|
|
23
|
+
} else {
|
|
24
|
+
// Global (browser)
|
|
25
|
+
window.BASE64 = factory();
|
|
26
|
+
}
|
|
27
|
+
})(undefined, function () {
|
|
28
|
+
var BASE64_MAPPING = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
29
|
+
var URLSAFE_BASE64_MAPPING = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", "_"];
|
|
30
|
+
|
|
31
|
+
var _toBinary = function _toBinary(ascii) {
|
|
32
|
+
var binary = [];
|
|
33
|
+
while (ascii > 0) {
|
|
34
|
+
var b = ascii % 2;
|
|
35
|
+
ascii = Math.floor(ascii / 2);
|
|
36
|
+
binary.push(b);
|
|
37
|
+
}
|
|
38
|
+
binary.reverse();
|
|
39
|
+
return binary;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _toDecimal = function _toDecimal(binary) {
|
|
43
|
+
var dec = 0;
|
|
44
|
+
var p = 0;
|
|
45
|
+
for (var i = binary.length - 1; i >= 0; --i) {
|
|
46
|
+
var b = binary[i];
|
|
47
|
+
if (b == 1) {
|
|
48
|
+
dec += Math.pow(2, p);
|
|
49
|
+
}
|
|
50
|
+
++p;
|
|
51
|
+
}
|
|
52
|
+
return dec;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
var _toUTF8Binary = function _toUTF8Binary(c, binaryArray) {
|
|
56
|
+
var mustLen = 8 - (c + 1) + (c - 1) * 6;
|
|
57
|
+
var fatLen = binaryArray.length;
|
|
58
|
+
var diff = mustLen - fatLen;
|
|
59
|
+
while (--diff >= 0) {
|
|
60
|
+
binaryArray.unshift(0);
|
|
61
|
+
}
|
|
62
|
+
var binary = [];
|
|
63
|
+
var _c = c;
|
|
64
|
+
while (--_c >= 0) {
|
|
65
|
+
binary.push(1);
|
|
66
|
+
}
|
|
67
|
+
binary.push(0);
|
|
68
|
+
var i = 0,
|
|
69
|
+
len = 8 - (c + 1);
|
|
70
|
+
for (; i < len; ++i) {
|
|
71
|
+
binary.push(binaryArray[i]);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
for (var j = 0; j < c - 1; ++j) {
|
|
75
|
+
binary.push(1);
|
|
76
|
+
binary.push(0);
|
|
77
|
+
var sum = 6;
|
|
78
|
+
while (--sum >= 0) {
|
|
79
|
+
binary.push(binaryArray[i++]);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return binary;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
var _toBinaryArray = function _toBinaryArray(str) {
|
|
86
|
+
var binaryArray = [];
|
|
87
|
+
for (var i = 0, len = str.length; i < len; ++i) {
|
|
88
|
+
var unicode = str.charCodeAt(i);
|
|
89
|
+
var _tmpBinary = _toBinary(unicode);
|
|
90
|
+
if (unicode < 0x80) {
|
|
91
|
+
var _tmpdiff = 8 - _tmpBinary.length;
|
|
92
|
+
while (--_tmpdiff >= 0) {
|
|
93
|
+
_tmpBinary.unshift(0);
|
|
94
|
+
}
|
|
95
|
+
binaryArray = binaryArray.concat(_tmpBinary);
|
|
96
|
+
} else if (unicode >= 0x80 && unicode <= 0x7ff) {
|
|
97
|
+
binaryArray = binaryArray.concat(_toUTF8Binary(2, _tmpBinary));
|
|
98
|
+
} else if (unicode >= 0x800 && unicode <= 0xffff) {
|
|
99
|
+
//UTF-8 3byte
|
|
100
|
+
binaryArray = binaryArray.concat(_toUTF8Binary(3, _tmpBinary));
|
|
101
|
+
} else if (unicode >= 0x10000 && unicode <= 0x1fffff) {
|
|
102
|
+
//UTF-8 4byte
|
|
103
|
+
binaryArray = binaryArray.concat(_toUTF8Binary(4, _tmpBinary));
|
|
104
|
+
} else if (unicode >= 0x200000 && unicode <= 0x3ffffff) {
|
|
105
|
+
//UTF-8 5byte
|
|
106
|
+
binaryArray = binaryArray.concat(_toUTF8Binary(5, _tmpBinary));
|
|
107
|
+
} else if (unicode >= 4000000 && unicode <= 0x7fffffff) {
|
|
108
|
+
//UTF-8 6byte
|
|
109
|
+
binaryArray = binaryArray.concat(_toUTF8Binary(6, _tmpBinary));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return binaryArray;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
var _toUnicodeStr = function _toUnicodeStr(binaryArray) {
|
|
116
|
+
var unicode;
|
|
117
|
+
var unicodeBinary = [];
|
|
118
|
+
var str = "";
|
|
119
|
+
for (var i = 0, len = binaryArray.length; i < len;) {
|
|
120
|
+
if (binaryArray[i] == 0) {
|
|
121
|
+
unicode = _toDecimal(binaryArray.slice(i, i + 8));
|
|
122
|
+
str += String.fromCharCode(unicode);
|
|
123
|
+
i += 8;
|
|
124
|
+
} else {
|
|
125
|
+
var sum = 0;
|
|
126
|
+
while (i < len) {
|
|
127
|
+
if (binaryArray[i] == 1) {
|
|
128
|
+
++sum;
|
|
129
|
+
} else {
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
++i;
|
|
133
|
+
}
|
|
134
|
+
unicodeBinary = unicodeBinary.concat(binaryArray.slice(i + 1, i + 8 - sum));
|
|
135
|
+
i += 8 - sum;
|
|
136
|
+
while (sum > 1) {
|
|
137
|
+
unicodeBinary = unicodeBinary.concat(binaryArray.slice(i + 2, i + 8));
|
|
138
|
+
i += 8;
|
|
139
|
+
--sum;
|
|
140
|
+
}
|
|
141
|
+
unicode = _toDecimal(unicodeBinary);
|
|
142
|
+
str += String.fromCharCode(unicode);
|
|
143
|
+
unicodeBinary = [];
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return str;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
var _encode = function _encode(str, url_safe) {
|
|
150
|
+
var base64_Index = [];
|
|
151
|
+
var binaryArray = _toBinaryArray(str);
|
|
152
|
+
var dictionary = url_safe ? URLSAFE_BASE64_MAPPING : BASE64_MAPPING;
|
|
153
|
+
|
|
154
|
+
var extra_Zero_Count = 0;
|
|
155
|
+
for (var i = 0, len = binaryArray.length; i < len; i += 6) {
|
|
156
|
+
var diff = i + 6 - len;
|
|
157
|
+
if (diff == 2) {
|
|
158
|
+
extra_Zero_Count = 2;
|
|
159
|
+
} else if (diff == 4) {
|
|
160
|
+
extra_Zero_Count = 4;
|
|
161
|
+
}
|
|
162
|
+
var _tmpExtra_Zero_Count = extra_Zero_Count;
|
|
163
|
+
while (--_tmpExtra_Zero_Count >= 0) {
|
|
164
|
+
binaryArray.push(0);
|
|
165
|
+
}
|
|
166
|
+
base64_Index.push(_toDecimal(binaryArray.slice(i, i + 6)));
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
var base64 = "";
|
|
170
|
+
for (var i = 0, len = base64_Index.length; i < len; ++i) {
|
|
171
|
+
base64 += dictionary[base64_Index[i]];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
for (var i = 0, len = extra_Zero_Count / 2; i < len; ++i) {
|
|
175
|
+
base64 += "=";
|
|
176
|
+
}
|
|
177
|
+
return base64;
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
var _decode = function _decode(_base64Str, url_safe) {
|
|
181
|
+
var _len = _base64Str.length;
|
|
182
|
+
var extra_Zero_Count = 0;
|
|
183
|
+
var dictionary = url_safe ? URLSAFE_BASE64_MAPPING : BASE64_MAPPING;
|
|
184
|
+
|
|
185
|
+
if (_base64Str.charAt(_len - 1) == "=") {
|
|
186
|
+
if (_base64Str.charAt(_len - 2) == "=") {
|
|
187
|
+
//两个等号说明补了4个0
|
|
188
|
+
extra_Zero_Count = 4;
|
|
189
|
+
_base64Str = _base64Str.substring(0, _len - 2);
|
|
190
|
+
} else {
|
|
191
|
+
//一个等号说明补了2个0
|
|
192
|
+
extra_Zero_Count = 2;
|
|
193
|
+
_base64Str = _base64Str.substring(0, _len - 1);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
var binaryArray = [];
|
|
198
|
+
for (var i = 0, len = _base64Str.length; i < len; ++i) {
|
|
199
|
+
var c = _base64Str.charAt(i);
|
|
200
|
+
for (var j = 0, size = dictionary.length; j < size; ++j) {
|
|
201
|
+
if (c == dictionary[j]) {
|
|
202
|
+
var _tmp = _toBinary(j);
|
|
203
|
+
/*不足6位的补0*/
|
|
204
|
+
var _tmpLen = _tmp.length;
|
|
205
|
+
if (6 - _tmpLen > 0) {
|
|
206
|
+
for (var k = 6 - _tmpLen; k > 0; --k) {
|
|
207
|
+
_tmp.unshift(0);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
binaryArray = binaryArray.concat(_tmp);
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (extra_Zero_Count > 0) {
|
|
216
|
+
binaryArray = binaryArray.slice(0, binaryArray.length - extra_Zero_Count);
|
|
217
|
+
}
|
|
218
|
+
var str = _toUnicodeStr(binaryArray);
|
|
219
|
+
return str;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
var __BASE64 = {
|
|
223
|
+
encode: function encode(str) {
|
|
224
|
+
return _encode(str, false);
|
|
225
|
+
},
|
|
226
|
+
decode: function decode(base64Str) {
|
|
227
|
+
return _decode(base64Str, false);
|
|
228
|
+
},
|
|
229
|
+
urlsafe_encode: function urlsafe_encode(str) {
|
|
230
|
+
return _encode(str, true);
|
|
231
|
+
},
|
|
232
|
+
urlsafe_decode: function urlsafe_decode(base64Str) {
|
|
233
|
+
return _decode(base64Str, true);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
return __BASE64;
|
|
238
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* 判断浏览器是否是IE内核,如果是IE内核就不让访问
|
|
8
|
+
* 增加IE11还是可以访问的
|
|
9
|
+
*/
|
|
10
|
+
function isIE() {
|
|
11
|
+
if (!!window.ActiveXObject || "ActiveXObject" in window) {
|
|
12
|
+
//是IE浏览器
|
|
13
|
+
//需要能够支持IE11
|
|
14
|
+
if (window.navigator.userAgent.indexOf("MSIE") <= -1) {
|
|
15
|
+
//是IE11
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
} else {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var browserJudge = function browserJudge(func) {
|
|
25
|
+
if (isIE()) {
|
|
26
|
+
var str = "<font size='5'>你的浏览器版本过低,无法完整的体验本系统的所有功能!</font>";
|
|
27
|
+
var str2 = "推荐使用:<a href='https://www.baidu.com/s?ie=UTF-8&wd=%E8%B0%B7%E6%AD%8C%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>谷歌</a>," + "<a href='https://www.baidu.com/s?ie=UTF-8&wd=%E7%81%AB%E7%8B%90%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>火狐</a>," + "<a href='https://www.baidu.com/s?ie=UTF-8&wd=%E7%8C%8E%E8%B1%B9%E6%B5%8F%E8%A7%88%E5%99%A8' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>猎豹</a>," + "<a href='https://www.baidu.com/s?ie=UTF-8&wd=360%E6%B5%8F%E8%A7%88%E5%99%A8%0A' target='_blank' style='color:#cc0;font-size:15px;font-weight:600;'>360浏览器</a>等双核急速模式";
|
|
28
|
+
document.getElementById("root").innerHTML = "<table style='width:100%;height:100%;background-color:#fff;z-index:99999;position:absolute;'><tr><td align='center'>" + "<div style='text-align:center; width:800px;border:1px solid #0099CC;background-color:#99CCFF;top:0;left:0;z-index:1234;border-radius:5px;padding:2px;'>" + "<div align='left' style='padding:2px;padding: 8px;font-size: 15px;font-weight:700;border-radius: 5px 5px 0px 0px;color:#fff;'>Web项目体验性研究提示:</div>" + "<div style='background-color:#fff;height:300px;border-radius:0px 0px 5px 5px;border:1px solid #0099CC'><h2 style='padding-top:80px;margin:0'><strong>" + str + "<br/></strong></h2><p>" + str2 + "</p><h2 style='margin:0'><strong>如果你的使用的是双核浏览器,请切换到极速模式访问<br/></strong></h2></div></div></td></tr></table>";
|
|
29
|
+
} else {
|
|
30
|
+
func && func();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.default = browserJudge;
|
package/lib/utils/common.js
CHANGED
|
@@ -29,22 +29,21 @@ var _select = require('antd/lib/select');
|
|
|
29
29
|
|
|
30
30
|
var _select2 = _interopRequireDefault(_select);
|
|
31
31
|
|
|
32
|
-
var _arguments = arguments;
|
|
33
|
-
* @Description:
|
|
34
|
-
* @Author: jiangzhongxin
|
|
35
|
-
* @Date: 2022-04-29 14:03:50
|
|
36
|
-
* @LastEditors: jiangzhongxin
|
|
37
|
-
* @LastEditTime: 2023-09-28 16:31:07
|
|
38
|
-
*/
|
|
32
|
+
var _arguments = arguments;
|
|
39
33
|
|
|
40
34
|
require('antd/lib/message/style');
|
|
41
35
|
|
|
42
36
|
require('antd/lib/select/style');
|
|
43
37
|
|
|
44
|
-
var _NHCore = require('./NHCore');
|
|
45
|
-
|
|
46
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
47
39
|
|
|
40
|
+
/*
|
|
41
|
+
* @Description:
|
|
42
|
+
* @Author: jiangzhongxin
|
|
43
|
+
* @Date: 2022-04-29 14:03:50
|
|
44
|
+
* @LastEditors: jiangzhongxin
|
|
45
|
+
* @LastEditTime: 2023-09-28 16:31:07
|
|
46
|
+
*/
|
|
48
47
|
var phoneRegExp = exports.phoneRegExp = new RegExp('^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$'
|
|
49
48
|
// '(\\d{11})|^((\\d{7,8})|(\\d{4}|\\d{3})-(\\d{7,8})|(\\d{4}|\\d{3})-(\\d{7,8})-(\\d{4}|\\d{3}|\\d{2}|\\d{1})|(\\d{7,8})-(\\d{4}|\\d{3}|\\d{2}|\\d{1}))$'
|
|
50
49
|
);
|
|
@@ -269,12 +268,12 @@ var exactAdd = exports.exactAdd = function exactAdd(arg1, arg2) {
|
|
|
269
268
|
arg2 = Number(arg2);
|
|
270
269
|
var r1, r2, m, c;
|
|
271
270
|
try {
|
|
272
|
-
r1 = arg1.toString().split(
|
|
271
|
+
r1 = arg1.toString().split('.')[1].length;
|
|
273
272
|
} catch (e) {
|
|
274
273
|
r1 = 0;
|
|
275
274
|
}
|
|
276
275
|
try {
|
|
277
|
-
r2 = arg2.toString().split(
|
|
276
|
+
r2 = arg2.toString().split('.')[1].length;
|
|
278
277
|
} catch (e) {
|
|
279
278
|
r2 = 0;
|
|
280
279
|
}
|
|
@@ -283,15 +282,15 @@ var exactAdd = exports.exactAdd = function exactAdd(arg1, arg2) {
|
|
|
283
282
|
if (c > 0) {
|
|
284
283
|
var cm = Math.pow(10, c);
|
|
285
284
|
if (r1 > r2) {
|
|
286
|
-
arg1 = Number(arg1.toString().replace(
|
|
287
|
-
arg2 = Number(arg2.toString().replace(
|
|
285
|
+
arg1 = Number(arg1.toString().replace('.', ''));
|
|
286
|
+
arg2 = Number(arg2.toString().replace('.', '')) * cm;
|
|
288
287
|
} else {
|
|
289
|
-
arg1 = Number(arg1.toString().replace(
|
|
290
|
-
arg2 = Number(arg2.toString().replace(
|
|
288
|
+
arg1 = Number(arg1.toString().replace('.', '')) * cm;
|
|
289
|
+
arg2 = Number(arg2.toString().replace('.', ''));
|
|
291
290
|
}
|
|
292
291
|
} else {
|
|
293
|
-
arg1 = Number(arg1.toString().replace(
|
|
294
|
-
arg2 = Number(arg2.toString().replace(
|
|
292
|
+
arg1 = Number(arg1.toString().replace('.', ''));
|
|
293
|
+
arg2 = Number(arg2.toString().replace('.', ''));
|
|
295
294
|
}
|
|
296
295
|
return (arg1 + arg2) / m;
|
|
297
296
|
};
|
|
@@ -467,10 +466,9 @@ var specialParams = exports.specialParams = {
|
|
|
467
466
|
specialFunc: function specialFunc(dataIndex, record) {
|
|
468
467
|
return record.authorType === '1' && ['workCompany', 'title', 'degree'].includes(dataIndex);
|
|
469
468
|
}
|
|
470
|
-
};
|
|
471
469
|
|
|
472
|
-
// 下载成绩单
|
|
473
|
-
var download = exports.download = function download(res) {
|
|
470
|
+
// 下载成绩单
|
|
471
|
+
};var download = exports.download = function download(res) {
|
|
474
472
|
var blob = new Blob([res.data]);
|
|
475
473
|
// 提取文件名
|
|
476
474
|
var contentDisposition = '';
|
package/lib/utils/createUuid.js
CHANGED
|
@@ -1,40 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
//获取UUID
|
|
7
7
|
var createUuid = function createUuid() {
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var uuid = [],
|
|
13
|
-
i;
|
|
14
|
-
radix = radix || chars.length;
|
|
15
|
-
|
|
16
|
-
if (len) {
|
|
17
|
-
// Compact form
|
|
18
|
-
for (i = 0; i < len; i++) {
|
|
19
|
-
uuid[i] = chars[0 | Math.random() * radix];
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
// rfc4122, version 4 form
|
|
23
|
-
var r;
|
|
24
|
-
|
|
25
|
-
// rfc4122 requires these characters
|
|
26
|
-
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
|
|
27
|
-
uuid[14] = '4';
|
|
28
|
-
|
|
29
|
-
// Fill in random data. At i==19 set the high bits of clock sequence as
|
|
30
|
-
// per rfc4122, sec. 4.1.5
|
|
31
|
-
for (i = 0; i < 36; i++) {
|
|
32
|
-
if (!uuid[i]) {
|
|
33
|
-
r = 0 | Math.random() * 16;
|
|
34
|
-
uuid[i] = chars[i == 19 ? r & 0x3 | 0x8 : r];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
8
|
+
var s = [];
|
|
9
|
+
var hexDigits = "0123456789abcdef";
|
|
10
|
+
for (var i = 0; i < 36; i++) {
|
|
11
|
+
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
|
|
37
12
|
}
|
|
38
|
-
|
|
13
|
+
s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
|
|
14
|
+
s[19] = hexDigits.substr(s[19] & 0x3 | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
|
|
15
|
+
s[8] = s[13] = s[18] = s[23] = "-";
|
|
16
|
+
|
|
17
|
+
var uuid = s.join("");
|
|
18
|
+
return uuid;
|
|
39
19
|
};
|
|
40
20
|
exports.default = createUuid;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
/*******
|
|
7
|
+
* @description: 设备判断工具类
|
|
8
|
+
* @author: 琴时
|
|
9
|
+
* @return {*}
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
var ua = navigator.userAgent; // 获取设备信息
|
|
13
|
+
|
|
14
|
+
/*******
|
|
15
|
+
* @description: 检测移动端/PC端
|
|
16
|
+
* @author: 琴时
|
|
17
|
+
* @return {*} [移动端:true - PC端:false]
|
|
18
|
+
*/
|
|
19
|
+
var isMobile = exports.isMobile = Boolean(ua.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i));
|
|
20
|
+
|
|
21
|
+
/*******
|
|
22
|
+
* @description: android终端
|
|
23
|
+
*/
|
|
24
|
+
var isAndroid = exports.isAndroid = ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1;
|
|
25
|
+
|
|
26
|
+
/*******
|
|
27
|
+
* @description: ios终端
|
|
28
|
+
*/
|
|
29
|
+
var isIOS = exports.isIOS = Boolean(ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/));
|
|
30
|
+
|
|
31
|
+
/*******
|
|
32
|
+
* @description: 是否微信环境
|
|
33
|
+
*/
|
|
34
|
+
var isWeiXn = exports.isWeiXn = ua.toLowerCase().includes('micromessenger');
|
|
35
|
+
|
|
36
|
+
/*******
|
|
37
|
+
* @description: 是否钉钉环境
|
|
38
|
+
*/
|
|
39
|
+
var isDingTalk = exports.isDingTalk = ua.toLowerCase().includes('dingtalk');
|
|
40
|
+
|
|
41
|
+
/*******
|
|
42
|
+
* @description: 是否微博环境
|
|
43
|
+
*/
|
|
44
|
+
var isWeiBo = exports.isWeiBo = ua.toLowerCase().includes('weibo');
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var dynamicLoadCss = function dynamicLoadCss(url) {
|
|
7
|
+
var head = document.getElementsByTagName('head')[0];
|
|
8
|
+
var link = document.createElement('link');
|
|
9
|
+
link.type = 'text/css';
|
|
10
|
+
link.rel = 'stylesheet';
|
|
11
|
+
link.href = url;
|
|
12
|
+
head.appendChild(link);
|
|
13
|
+
};
|
|
14
|
+
exports.default = dynamicLoadCss;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var dynamicLoadJs = function dynamicLoadJs(url, callback) {
|
|
7
|
+
var head = document.getElementsByTagName('head')[0];
|
|
8
|
+
var script = document.createElement('script');
|
|
9
|
+
script.type = 'text/javascript';
|
|
10
|
+
script.src = url;
|
|
11
|
+
if (typeof callback === 'function') {
|
|
12
|
+
script.onload = script.onreadystatechange = function () {
|
|
13
|
+
if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") {
|
|
14
|
+
callback();
|
|
15
|
+
script.onload = script.onreadystatechange = null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
head.appendChild(script);
|
|
20
|
+
};
|
|
21
|
+
exports.default = dynamicLoadJs;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var getLoginUser = function getLoginUser(auth) {
|
|
7
|
-
var loginUser = sessionStorage.getItem('
|
|
7
|
+
var loginUser = sessionStorage.getItem('currentUser') ? JSON.parse(sessionStorage.getItem('currentUser')) : { authorization: {}, menus: [] };
|
|
8
8
|
return loginUser;
|
|
9
9
|
};
|
|
10
10
|
exports.default = getLoginUser;
|
package/lib/utils/getSize.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var getSize = function getSize() {
|
|
7
|
-
var setting = sessionStorage.getItem('setting');
|
|
8
|
-
var breadcrumbHeight = 0; //面包屑高度
|
|
9
|
-
if (setting) {
|
|
10
|
-
// 存在布局配置
|
|
11
|
-
var _JSON$parse = JSON.parse(setting),
|
|
12
|
-
layout = _JSON$parse.layout;
|
|
13
|
-
|
|
14
|
-
breadcrumbHeight = layout === 'mixmenu' ? 40 : 0; //若是混合布局 contentH高度需要减去面包屑高度
|
|
15
|
-
}
|
|
16
7
|
var windowW = void 0,
|
|
17
8
|
windowH = void 0,
|
|
18
9
|
contentH = void 0,
|
|
@@ -20,7 +11,7 @@ var getSize = function getSize() {
|
|
|
20
11
|
windowH = window.innerHeight;
|
|
21
12
|
windowW = window.innerWidth;
|
|
22
13
|
scrollT = document.documentElement.scrollTop || document.body.scrollTop;
|
|
23
|
-
contentH = windowH - 65
|
|
14
|
+
contentH = windowH - 65;
|
|
24
15
|
return { windowW: windowW, windowH: windowH, contentH: contentH, scrollT: scrollT };
|
|
25
16
|
};
|
|
26
17
|
|