dlt-for-react 1.0.24 → 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 +10 -20
- 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 +156 -120
- 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/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,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
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* 获取某个对象的属性值
|
|
8
|
+
*/
|
|
9
|
+
var getStyle = function getStyle(element, attr) {
|
|
10
|
+
return getDomStyle(element, attr);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function getDomStyle(curEle, attr) {
|
|
14
|
+
if ("getComputedStyle" in window) {
|
|
15
|
+
return window.getComputedStyle(curEle, null)[attr];
|
|
16
|
+
} else {
|
|
17
|
+
if (attr === "opacity") {
|
|
18
|
+
var val = curEle.currentStyle["filter"];
|
|
19
|
+
var reg = /^alpha\(opacity=(\d+(?:\.\d+)?)\)$/i;
|
|
20
|
+
return reg.test(val) ? reg.exec(val)[1] / 100 : 1;
|
|
21
|
+
} else {
|
|
22
|
+
return curEle.currentStyle[attr];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = getStyle;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var getSuitHeight = function getSuitHeight(node) {
|
|
7
|
+
var height = SuitHeight(node) - 2; //设置合适高度的时候减去两个边框的高度,可以保证紧密镶嵌式不会因为上下边框产生滚动条
|
|
8
|
+
return height;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
function SuitHeight(node) {
|
|
12
|
+
var parentObj = node.parentNode;
|
|
13
|
+
//获得parentObj所有直接非grid子节点
|
|
14
|
+
var childrenObj = parentObj.childNodes;
|
|
15
|
+
var elseChildrenHeight = 0;
|
|
16
|
+
for (var i = 0; i < childrenObj.length; i++) {
|
|
17
|
+
if (childrenObj[i].nodeName === "#text" && !/\s/.test(childrenObj.nodeValue)) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (childrenObj[i] !== node && childrenObj[i].tagName !== "SCRIPT" && childrenObj[i].tagName !== "STYLE" && childrenObj[i].style.display !== "none" && childrenObj[i].style.position !== "absolute") {
|
|
21
|
+
//吧script的高度也排除掉
|
|
22
|
+
var marginTop = getDomStyle(childrenObj[i], "marginTop") ? parseInt(getDomStyle(childrenObj[i], "marginTop"), 10) : 0;
|
|
23
|
+
var marginBottom = getDomStyle(childrenObj[i], "marginBottom") ? parseInt(getDomStyle(childrenObj[i], "marginBottom"), 10) : 0;
|
|
24
|
+
if (childrenObj[i].offsetHeight && childrenObj[i].offsetHeight > 0) {
|
|
25
|
+
//获得所有非本元素的其他父类子元素的margin的值
|
|
26
|
+
elseChildrenHeight += childrenObj[i].offsetHeight + marginTop + marginBottom;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//父级对象的高度-其他对象的高度
|
|
31
|
+
var gridSuitHeight = parentObj.clientHeight - elseChildrenHeight;
|
|
32
|
+
return gridSuitHeight;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function getDomStyle(curEle, attr) {
|
|
36
|
+
if ("getComputedStyle" in window) {
|
|
37
|
+
return window.getComputedStyle(curEle, null)[attr];
|
|
38
|
+
} else {
|
|
39
|
+
if (attr === "opacity") {
|
|
40
|
+
var val = curEle.currentStyle["filter"];
|
|
41
|
+
var reg = /^alpha\(opacity=(\d+(?:\.\d+)?)\)$/i;
|
|
42
|
+
return reg.test(val) ? reg.exec(val)[1] / 100 : 1;
|
|
43
|
+
} else {
|
|
44
|
+
return curEle.currentStyle[attr];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
exports.default = getSuitHeight;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var hasAuth = function hasAuth(auth) {
|
|
7
|
+
var initState = sessionStorage.getItem('userLogin') ? JSON.parse(sessionStorage.getItem('userLogin')) : {};
|
|
8
|
+
var auths = initState.authorization ? initState.authorization : {};
|
|
9
|
+
return auths[auth] !== undefined;
|
|
10
|
+
};
|
|
11
|
+
exports.default = hasAuth;
|
package/lib/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.randomNumEnum = exports.getStyle = exports.getValueFromArray = exports.getLabelValueTree = exports.createUuid = exports.createScript = exports.getBase64 = exports.compatibleAnimationFrame = exports.cutArray = exports.arrayMove = exports.arrayMoveMutate = exports.checkPassword = exports.matchParamsPath = exports.urlToList = exports.getHashParam = exports.isUrl = exports.getRouterAuthority = exports.transformDate = exports.getStrLength = exports.DateUtil = exports._utf8_encode = exports.encode = exports.decode = exports.getSize = exports.getOffset = undefined;
|
|
7
7
|
|
|
8
8
|
var _stringify = require('babel-runtime/core-js/json/stringify');
|
|
9
9
|
|
|
@@ -803,37 +803,4 @@ var randomNumEnum = exports.randomNumEnum = function randomNumEnum(array, num) {
|
|
|
803
803
|
shuffled[i] = temp;
|
|
804
804
|
}
|
|
805
805
|
return shuffled.slice(min);
|
|
806
|
-
};
|
|
807
|
-
|
|
808
|
-
/*******
|
|
809
|
-
* @description: 检测移动端-PC端
|
|
810
|
-
* @author: 琴时
|
|
811
|
-
* @param {*} [无]
|
|
812
|
-
* @return {*} [移动端:true - PC端:false]
|
|
813
|
-
*/
|
|
814
|
-
var ua = navigator.userAgent; // 获取设备信息
|
|
815
|
-
var isMobile = exports.isMobile = function isMobile() {
|
|
816
|
-
return Boolean(ua.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i));
|
|
817
|
-
};
|
|
818
|
-
|
|
819
|
-
/*******
|
|
820
|
-
* @description: android终端-ios终端
|
|
821
|
-
* @author: 琴时
|
|
822
|
-
* @return {Boolean}
|
|
823
|
-
*/
|
|
824
|
-
var isAndroid = exports.isAndroid = function isAndroid() {
|
|
825
|
-
return ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1;
|
|
826
|
-
};
|
|
827
|
-
|
|
828
|
-
var isIOS = exports.isIOS = function isIOS() {
|
|
829
|
-
return Boolean(ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/));
|
|
830
|
-
};
|
|
831
|
-
|
|
832
|
-
/*******
|
|
833
|
-
* @description: 是否微信环境
|
|
834
|
-
* @author: 琴时
|
|
835
|
-
* @return {Boolean}
|
|
836
|
-
*/
|
|
837
|
-
var isWeiXn = exports.isWeiXn = function isWeiXn() {
|
|
838
|
-
return ua.toLowerCase().includes('micromessenger');
|
|
839
806
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* @author qianzhiwei
|
|
8
|
+
* @description 动态创建script来加载
|
|
9
|
+
* @param {*} url 脚本链接
|
|
10
|
+
* @param {*} callback 回调函数
|
|
11
|
+
*
|
|
12
|
+
* @template 用法
|
|
13
|
+
* loadJS('file.js',function(){alert(1);});
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
var loadJS = function loadJS(url, callback) {
|
|
17
|
+
var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'root';
|
|
18
|
+
|
|
19
|
+
var script = document.createElement('script');
|
|
20
|
+
var fn = callback || function () {};
|
|
21
|
+
script.type = 'text/javascript';
|
|
22
|
+
//IE
|
|
23
|
+
if (script.readyState) {
|
|
24
|
+
script.onreadystatechange = function () {
|
|
25
|
+
if (script.readyState == 'loaded' || script.readyState == 'complete') {
|
|
26
|
+
script.onreadystatechange = null;
|
|
27
|
+
fn();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
} else {
|
|
31
|
+
//其他浏览器
|
|
32
|
+
script.onload = function () {
|
|
33
|
+
fn();
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
script.src = url;
|
|
37
|
+
document.getElementById(id).appendChild(script);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
exports.default = loadJS;
|
package/package.json
CHANGED
|
File without changes
|