dlt-for-react 1.1.3 → 1.1.4
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 +4 -0
- package/lib/index.js +7 -1
- package/lib/layouts/Top/index.js +1 -1
- package/lib/layouts/layout/index.js +77 -31
- package/lib/layouts/mixTop/index.js +3 -3
- package/lib/utils/createUuid.js +31 -11
- package/lib/utils/getLoginUser.js +1 -1
- package/lib/utils/getSize.js +11 -2
- package/lib/utils/index.js +35 -2
- package/package.json +1 -1
- package/lib/components/Button/index.js +0 -79
- package/lib/components/NHAuditPanel/config/Axios.js +0 -263
- package/lib/components/NHAuditPanel/config/api.js +0 -479
- package/lib/components/NHAuditPanel/config/data.js +0 -156
- package/lib/components/NHAuditPanel/config/typeMap.js +0 -1234
- package/lib/components/NHAuditPanel/config/uiValidate.js +0 -92
- package/lib/components/NHAuditPanel/index.js +0 -413
- package/lib/components/NHAuditPanel/node.js +0 -619
- package/lib/components/NHCascader/index.js +0 -355
- package/lib/components/NHCheckboxGroup/index.js +0 -135
- package/lib/components/NHDynamicFormShow/baseInfo/index.js +0 -194
- package/lib/components/NHDynamicFormShow/custom/index.js +0 -553
- package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +0 -43
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +0 -1113
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +0 -263
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +0 -880
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +0 -171
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +0 -865
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +0 -138
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +0 -571
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +0 -147
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +0 -474
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +0 -139
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +0 -506
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +0 -143
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +0 -1074
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +0 -172
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +0 -927
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +0 -195
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +0 -1064
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +0 -183
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +0 -763
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +0 -137
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +0 -819
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +0 -137
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +0 -700
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +0 -162
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +0 -743
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +0 -177
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +0 -848
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +0 -138
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +0 -777
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +0 -161
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +0 -706
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +0 -130
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +0 -413
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +0 -135
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +0 -1013
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +0 -175
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +0 -1345
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +0 -274
- package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +0 -669
- package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +0 -134
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +0 -378
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +0 -120
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +0 -638
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +0 -133
- package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +0 -965
- package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +0 -237
- package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +0 -823
- package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +0 -188
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +0 -401
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +0 -472
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +0 -304
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +0 -375
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +0 -118
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +0 -62
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +0 -55
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +0 -1238
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +0 -375
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +0 -554
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +0 -130
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +0 -542
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +0 -133
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +0 -575
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +0 -130
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +0 -563
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +0 -133
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +0 -745
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +0 -164
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +0 -587
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +0 -143
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +0 -743
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +0 -172
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +0 -1410
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +0 -274
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +0 -755
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +0 -130
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +0 -814
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +0 -188
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +0 -769
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +0 -130
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +0 -1004
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +0 -126
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +0 -503
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +0 -149
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +0 -379
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +0 -148
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +0 -748
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +0 -135
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +0 -762
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +0 -134
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +0 -682
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +0 -135
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +0 -152
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +0 -783
- package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +0 -764
- package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +0 -138
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +0 -677
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +0 -138
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +0 -1173
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +0 -242
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +0 -862
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +0 -201
- package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +0 -196
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +0 -167
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +0 -1096
- package/lib/components/NHDynamicFormShow/index.js +0 -647
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +0 -279
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +0 -206
- package/lib/components/NHDynamicFormShow/oneOnMany/index.js +0 -419
- package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +0 -401
- package/lib/components/NHDynamicFormShow/oneOnOne/index.js +0 -271
- package/lib/components/NHImagePicker/index.js +0 -554
- package/lib/components/NHInputPicker/RadioGroup.js +0 -118
- package/lib/components/NHInputPicker/index.js +0 -62
- package/lib/components/NHInputPicker/input-const.js +0 -55
- package/lib/components/NHInputPicker/render.js +0 -1271
- package/lib/components/NHListView/index.js +0 -374
- package/lib/components/NHMapGeolocation/index.js +0 -537
- package/lib/components/NHMapGeolocation/initMap/initGdMap.js +0 -104
- package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +0 -138
- package/lib/components/NHMapGeolocation/style.js +0 -51
- package/lib/components/NHMultiSelect/index.js +0 -272
- package/lib/components/NHRadioGroup/index.js +0 -118
- package/lib/components/NHSelect/index.js +0 -364
- package/lib/components/NHTreeMenu/index.js +0 -126
- package/lib/components/NHTreeMenu/treeNode.js +0 -164
- package/lib/components/StuSelector/index.js +0 -611
- package/lib/layouts/KyInputPicker/edit-page.js +0 -585
- package/lib/layouts/KyInputPicker/index.js +0 -220
- package/lib/layouts/KyInputPicker/input-const.js +0 -134
- package/lib/layouts/KyInputPicker/render.js +0 -2477
- package/lib/layouts/KyInputPicker/setting-checkbox.js +0 -850
- package/lib/layouts/KyInputPicker/setting-datepicker.js +0 -430
- package/lib/layouts/KyInputPicker/setting-datetimepicker.js +0 -443
- package/lib/layouts/KyInputPicker/setting-input.js +0 -555
- package/lib/layouts/KyInputPicker/setting-inputNumber.js +0 -612
- package/lib/layouts/KyInputPicker/setting-monthpicker.js +0 -434
- package/lib/layouts/KyInputPicker/setting-multiSelect.js +0 -532
- package/lib/layouts/KyInputPicker/setting-nhcascader.js +0 -584
- package/lib/layouts/KyInputPicker/setting-old-upload.js +0 -428
- package/lib/layouts/KyInputPicker/setting-radio.js +0 -468
- package/lib/layouts/KyInputPicker/setting-rangepicker.js +0 -466
- package/lib/layouts/KyInputPicker/setting-select.js +0 -534
- package/lib/layouts/KyInputPicker/setting-stu-selector.js +0 -507
- package/lib/layouts/KyInputPicker/setting-switch.js +0 -274
- package/lib/layouts/KyInputPicker/setting-tea-selector.js +0 -507
- package/lib/layouts/KyInputPicker/setting-textarea.js +0 -619
- package/lib/layouts/KyInputPicker/setting-timepicker.js +0 -437
- package/lib/layouts/KyInputPicker/setting-upload.js +0 -766
- package/lib/layouts/KyModal/buildTitle.js +0 -81
- package/lib/layouts/KyModal/dragM.js +0 -127
- package/lib/layouts/KyModal/index.js +0 -321
- package/lib/layouts/KyPreview/index.js +0 -219
- package/lib/layouts/KyUpload/index.js +0 -1155
- package/lib/utils/browserJudge.js +0 -33
- package/lib/utils/dynamicLoadCss.js +0 -14
- package/lib/utils/dynamicLoadJs.js +0 -21
- package/lib/utils/getStyle.js +0 -26
- package/lib/utils/getSuitHeight.js +0 -49
- package/lib/utils/hasAuth.js +0 -11
- package/lib/utils/loadJS.js +0 -40
- /package/lib/layouts/{login → Login}/index-pre.js +0 -0
- /package/lib/layouts/{login → Login}/index.js +0 -0
- /package/lib/layouts/{login → Login}/login.js +0 -0
- /package/lib/layouts/{login → Login}/lyPassword.js +0 -0
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.containTxCircle = exports.initTencentMap = exports.initTencentJS = undefined;
|
|
7
|
-
|
|
8
|
-
var _fetchJsonp = require('fetch-jsonp');
|
|
9
|
-
|
|
10
|
-
var _fetchJsonp2 = _interopRequireDefault(_fetchJsonp);
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
var mapUrl = 'https://apis.map.qq.com/ws/geocoder/v1/?output=jsonp&'; /**
|
|
15
|
-
* 腾讯地图
|
|
16
|
-
* 更多参数可参考:https://lbs.qq.com/service/webService/webServiceGuide/webServiceGcoder
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
var js1 = 'https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js';
|
|
20
|
-
var js2 = 'https://map.qq.com/api/js?v=2.exp&key=VPABZ-2XTKO-IGNWX-S2NEF-CCEAZ-SKFYU';
|
|
21
|
-
|
|
22
|
-
//加载js
|
|
23
|
-
var initTencentJS = exports.initTencentJS = function initTencentJS(key) {
|
|
24
|
-
var gimgSript = document.createElement('script');
|
|
25
|
-
gimgSript.type = 'text/javascript';
|
|
26
|
-
gimgSript.src = 'https://map.qq.com/api/js?v=2.exp&key=' + key;
|
|
27
|
-
document.getElementById('root').appendChild(gimgSript);
|
|
28
|
-
return js1;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
var initTencentMap = exports.initTencentMap = function initTencentMap() {
|
|
32
|
-
var mapSecret = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
33
|
-
var fn = arguments[1];
|
|
34
|
-
|
|
35
|
-
//初始化腾讯地图定位
|
|
36
|
-
var geolocation = new qq.maps.Geolocation(mapSecret, 'ly-sm-mobile-ui');
|
|
37
|
-
var options = { timeout: 8000 };
|
|
38
|
-
console.log('开始定位');
|
|
39
|
-
geolocation.getLocation(function (position) {
|
|
40
|
-
onComplete(mapSecret, position, fn);
|
|
41
|
-
}, function (position) {
|
|
42
|
-
onError(position, fn);
|
|
43
|
-
}, options);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 解析定位是否在某范围中
|
|
48
|
-
* @param {当前获取定位位置} targetLat
|
|
49
|
-
* @param {设定好的目标位置} sourceLat
|
|
50
|
-
* @param {半径} radius
|
|
51
|
-
*/
|
|
52
|
-
var containTxCircle = exports.containTxCircle = function containTxCircle(targetLat, sourceLat, radius) {
|
|
53
|
-
var isContain = true;
|
|
54
|
-
return isContain;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
//解析定位结果
|
|
58
|
-
function onComplete(mapSecret, position, fn) {
|
|
59
|
-
console.log('position', position);
|
|
60
|
-
//稍微修正腾讯地图的经纬度偏差
|
|
61
|
-
var latitude = position.lat + 0.00134;
|
|
62
|
-
var longitude = position.lng + 0.01191;
|
|
63
|
-
var url = mapUrl + 'location=' + latitude + ',' + longitude + '&key=' + mapSecret + '&get_poi=1';
|
|
64
|
-
(0, _fetchJsonp2.default)(url) //跨域请求的路径
|
|
65
|
-
.then(function (response) {
|
|
66
|
-
return response.json();
|
|
67
|
-
}).then(function (data) {
|
|
68
|
-
// 在此处写获取数据之后的处理逻辑
|
|
69
|
-
if (data && data.result) {
|
|
70
|
-
var result = data.result;
|
|
71
|
-
var status = result.status;
|
|
72
|
-
|
|
73
|
-
var msg = validate(status, msg);
|
|
74
|
-
var ret = {};
|
|
75
|
-
// 经过腾讯地图优化过的描述方式
|
|
76
|
-
buildData(result, ret, msg);
|
|
77
|
-
if (fn) {
|
|
78
|
-
fn(ret);
|
|
79
|
-
}
|
|
80
|
-
} else {
|
|
81
|
-
onError(position, fn);
|
|
82
|
-
}
|
|
83
|
-
}).catch(function () {
|
|
84
|
-
onError(position, fn);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
//装载数据
|
|
88
|
-
function buildData(result, ret, msg) {
|
|
89
|
-
var dataMap = {};
|
|
90
|
-
var recommendAddress = '' + result.address + result.formatted_addresses.recommend || '';
|
|
91
|
-
ret.status = 'complete';
|
|
92
|
-
dataMap.msg = msg;
|
|
93
|
-
dataMap.formattedAddress = recommendAddress;
|
|
94
|
-
dataMap.data = result;
|
|
95
|
-
dataMap.position = position;
|
|
96
|
-
ret.data = dataMap;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
//校验
|
|
100
|
-
function validate(status, msg) {
|
|
101
|
-
switch (status) {
|
|
102
|
-
// case "0": // 0为正常
|
|
103
|
-
// // 返回逆解析成功的JSON地址信息
|
|
104
|
-
// return response;
|
|
105
|
-
case "310":
|
|
106
|
-
// 请求参数信息有误
|
|
107
|
-
msg = "请求参数信息有误";
|
|
108
|
-
break;
|
|
109
|
-
case "311":
|
|
110
|
-
// Key格式错误
|
|
111
|
-
msg = "Key格式错误";
|
|
112
|
-
break;
|
|
113
|
-
case "110":
|
|
114
|
-
// 请求来源未被授权
|
|
115
|
-
msg = "请求来源未被授权";
|
|
116
|
-
break;
|
|
117
|
-
case "306":
|
|
118
|
-
// 请求有护持信息请检查字符串
|
|
119
|
-
msg = "请求有护持信息请检查字符串";
|
|
120
|
-
break;
|
|
121
|
-
default:
|
|
122
|
-
msg = '';
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
return msg;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
//解析定位错误信息
|
|
130
|
-
function onError(position, fn) {
|
|
131
|
-
var ret = {};
|
|
132
|
-
var data = {};
|
|
133
|
-
ret.data = data;
|
|
134
|
-
ret.status = 'error';
|
|
135
|
-
if (fn) {
|
|
136
|
-
fn(ret);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var startBox_style = exports.startBox_style = {
|
|
7
|
-
width: '92%',
|
|
8
|
-
marginLeft: '4%',
|
|
9
|
-
height: '350px',
|
|
10
|
-
background: 'rgba(255, 255, 255, 1)',
|
|
11
|
-
borderRadius: '5px',
|
|
12
|
-
marginTop: '12px',
|
|
13
|
-
padding: '18.5px 15px 27.5px 15px'
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var clockBotton_style = exports.clockBotton_style = {
|
|
17
|
-
width: '140px',
|
|
18
|
-
height: '140px',
|
|
19
|
-
background: 'radial-gradient(circle, rgba(24, 144, 255, 1), rgba(88, 175, 255, 1))',
|
|
20
|
-
boxShadow: '0px 2px 15px 0px rgba(24, 144, 255, 0.26)',
|
|
21
|
-
borderRadius: '50%',
|
|
22
|
-
fontSize: '19px',
|
|
23
|
-
fontWeight: '500',
|
|
24
|
-
color: 'rgba(255, 255, 255, 1)',
|
|
25
|
-
textAlign: 'center',
|
|
26
|
-
paddingTop: '60px',
|
|
27
|
-
marginLeft: '50%',
|
|
28
|
-
transform: 'translateX(-50%)',
|
|
29
|
-
marginTop: '76px'
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var lcoationbBox_style = exports.lcoationbBox_style = {
|
|
33
|
-
// display: 'flex',
|
|
34
|
-
// alignItems: 'center',
|
|
35
|
-
// marginLeft: '50%',
|
|
36
|
-
// transform: 'translateX(-50%)',
|
|
37
|
-
// marginTop: '20px',
|
|
38
|
-
width: 'fit-content',
|
|
39
|
-
// height: '28px',
|
|
40
|
-
background: 'rgba(240, 242, 245, 1)',
|
|
41
|
-
borderRadius: '14px',
|
|
42
|
-
fontSize: '14px',
|
|
43
|
-
fontWeight: '400',
|
|
44
|
-
color: 'rgba(128, 128, 128, 1)',
|
|
45
|
-
textAlign: 'center',
|
|
46
|
-
padding: '5px 11.5px',
|
|
47
|
-
// whiteSpace: 'nowrap',
|
|
48
|
-
margin: '0 auto',
|
|
49
|
-
marginTop: '20px'
|
|
50
|
-
|
|
51
|
-
};
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
8
|
-
|
|
9
|
-
var _react = require('react');
|
|
10
|
-
|
|
11
|
-
var _react2 = _interopRequireDefault(_react);
|
|
12
|
-
|
|
13
|
-
var _reactSelect = require('react-select');
|
|
14
|
-
|
|
15
|
-
var _reactSelect2 = _interopRequireDefault(_reactSelect);
|
|
16
|
-
|
|
17
|
-
var _propTypes = require('prop-types');
|
|
18
|
-
|
|
19
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
20
|
-
|
|
21
|
-
var _NHFetch = require('../../utils/NHFetch');
|
|
22
|
-
|
|
23
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
24
|
-
|
|
25
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
|
-
|
|
27
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
28
|
-
|
|
29
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
30
|
-
|
|
31
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 基于react-select封装
|
|
35
|
-
* react-select文档:https://react-select.com/
|
|
36
|
-
*/
|
|
37
|
-
var NHMultiSelect = function (_React$Component) {
|
|
38
|
-
_inherits(NHMultiSelect, _React$Component);
|
|
39
|
-
|
|
40
|
-
function NHMultiSelect(props) {
|
|
41
|
-
_classCallCheck(this, NHMultiSelect);
|
|
42
|
-
|
|
43
|
-
var _this = _possibleConstructorReturn(this, (NHMultiSelect.__proto__ || Object.getPrototypeOf(NHMultiSelect)).call(this, props));
|
|
44
|
-
|
|
45
|
-
_initialiseProps.call(_this);
|
|
46
|
-
|
|
47
|
-
var value = _this.props.value || [];
|
|
48
|
-
_this.state = {
|
|
49
|
-
data: [],
|
|
50
|
-
value: value || []
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
return _this;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
_createClass(NHMultiSelect, [{
|
|
57
|
-
key: 'componentDidMount',
|
|
58
|
-
value: function componentDidMount() {
|
|
59
|
-
var _props = this.props,
|
|
60
|
-
sign = _props.sign,
|
|
61
|
-
dataSource = _props.dataSource;
|
|
62
|
-
|
|
63
|
-
//如果是使用数据源标识,则优先加载远程数据
|
|
64
|
-
|
|
65
|
-
if (sign && sign != '') {
|
|
66
|
-
this.loadRemoteData(sign);
|
|
67
|
-
} else if (dataSource) {
|
|
68
|
-
//如果没有使用远程数据,则加载本地数据
|
|
69
|
-
this.parseData(dataSource);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}, {
|
|
73
|
-
key: 'componentWillReceiveProps',
|
|
74
|
-
value: function componentWillReceiveProps(nextProps) {
|
|
75
|
-
if ('value' in nextProps) {
|
|
76
|
-
var value = nextProps.value;
|
|
77
|
-
var data = this.state.data || [];
|
|
78
|
-
var vals = data.filter(function (item) {
|
|
79
|
-
return value.includes(item.value);
|
|
80
|
-
});
|
|
81
|
-
this.setState({ value: vals });
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
//为了防止在使用本地数据源的时候,在上级组件使用异步请求,导致在componentDidMount阶段未能获取到返回的dataSource
|
|
85
|
-
if ('dataSource' in nextProps) {
|
|
86
|
-
var dataSource = nextProps.dataSource;
|
|
87
|
-
this.setState({ data: dataSource });
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
//加载远程数据
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
//解析数据
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
//下拉选择器input value值变化时回调
|
|
98
|
-
|
|
99
|
-
}, {
|
|
100
|
-
key: 'render',
|
|
101
|
-
value: function render() {
|
|
102
|
-
var _props2 = this.props,
|
|
103
|
-
style = _props2.style,
|
|
104
|
-
placeholder = _props2.placeholder,
|
|
105
|
-
disabled = _props2.disabled,
|
|
106
|
-
filterData = _props2.filterData;
|
|
107
|
-
var _state = this.state,
|
|
108
|
-
value = _state.value,
|
|
109
|
-
data = _state.data;
|
|
110
|
-
|
|
111
|
-
var options = [];
|
|
112
|
-
//如果有过滤条件
|
|
113
|
-
if (filterData) {
|
|
114
|
-
var type = filterData.type,
|
|
115
|
-
_filterData$filterkey = filterData.filterkeys,
|
|
116
|
-
filterkeys = _filterData$filterkey === undefined ? [] : _filterData$filterkey;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
switch (type) {
|
|
120
|
-
//过滤掉指定key值
|
|
121
|
-
case 'remove':
|
|
122
|
-
{
|
|
123
|
-
var _options = data.filter(function (item) {
|
|
124
|
-
if (filterkeys.find(function (key) {
|
|
125
|
-
return (item.VALUE || item.value) == key;
|
|
126
|
-
})) {
|
|
127
|
-
return false;
|
|
128
|
-
} else {
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
break;
|
|
133
|
-
}
|
|
134
|
-
//保留指定key值
|
|
135
|
-
case 'save':
|
|
136
|
-
{
|
|
137
|
-
var _options2 = data.filter(function (item) {
|
|
138
|
-
if (filterkeys.find(function (key) {
|
|
139
|
-
return (item.VALUE || item.value) == key;
|
|
140
|
-
})) {
|
|
141
|
-
return true;
|
|
142
|
-
} else {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
//未找到指定过滤类型,则不做过滤
|
|
149
|
-
default:
|
|
150
|
-
{
|
|
151
|
-
options = data;
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
} else {
|
|
156
|
-
|
|
157
|
-
options = data.map(function (option) {
|
|
158
|
-
var item = {};
|
|
159
|
-
for (var name in option) {
|
|
160
|
-
item[name.toLocaleLowerCase()] = option[name];
|
|
161
|
-
}
|
|
162
|
-
return item;
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
return _react2.default.createElement(
|
|
166
|
-
'div',
|
|
167
|
-
null,
|
|
168
|
-
_react2.default.createElement(_reactSelect2.default, {
|
|
169
|
-
style: style,
|
|
170
|
-
value: value,
|
|
171
|
-
onChange: this.handleChange,
|
|
172
|
-
placeholder: placeholder,
|
|
173
|
-
noOptionsMessage: function noOptionsMessage() {
|
|
174
|
-
return "无数据";
|
|
175
|
-
},
|
|
176
|
-
isDisabled: disabled,
|
|
177
|
-
options: options,
|
|
178
|
-
isMulti: true
|
|
179
|
-
})
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
}]);
|
|
183
|
-
|
|
184
|
-
return NHMultiSelect;
|
|
185
|
-
}(_react2.default.Component);
|
|
186
|
-
|
|
187
|
-
//属性默认值
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
var _initialiseProps = function _initialiseProps() {
|
|
191
|
-
var _this2 = this;
|
|
192
|
-
|
|
193
|
-
this.loadRemoteData = function (sign) {
|
|
194
|
-
var baseUrl = _this2.props.baseUrl;
|
|
195
|
-
(0, _NHFetch2.default)((baseUrl === undefined ? "" : baseUrl) + "/proData/selectDataList", 'GET', { sign: sign, t: new Date().getTime() }).then(function (res) {
|
|
196
|
-
if (res) {
|
|
197
|
-
_this2.parseData(res.data);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
this.dataToLowerCase = function (data) {
|
|
203
|
-
return data.map(function (option) {
|
|
204
|
-
var item = {};
|
|
205
|
-
for (var name in option) {
|
|
206
|
-
item[name.toLocaleLowerCase()] = option[name];
|
|
207
|
-
}
|
|
208
|
-
return item;
|
|
209
|
-
});
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
this.parseData = function (data) {
|
|
213
|
-
if (data) {
|
|
214
|
-
var options = _this2.dataToLowerCase(data);
|
|
215
|
-
if ('value' in _this2.props) {
|
|
216
|
-
var value = _this2.props.value;
|
|
217
|
-
var vals = options.filter(function (item) {
|
|
218
|
-
return value.includes(item.value);
|
|
219
|
-
});
|
|
220
|
-
_this2.setState({ value: vals, data: options });
|
|
221
|
-
} else {
|
|
222
|
-
_this2.setState({ data: options });
|
|
223
|
-
}
|
|
224
|
-
} else if (_this2.props.dataSource) {
|
|
225
|
-
//如果远程数据为空,则尝试加载本地数据源
|
|
226
|
-
_this2.parseData(_this2.props.dataSource);
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
this.handleChange = function (value, action) {
|
|
231
|
-
if (!('value' in _this2.props)) {
|
|
232
|
-
_this2.setState({
|
|
233
|
-
value: value
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
var onChange = _this2.props.onChange;
|
|
237
|
-
if (onChange && typeof onChange === 'function') {
|
|
238
|
-
var vals = [];
|
|
239
|
-
if (value) {
|
|
240
|
-
vals = value.map(function (item) {
|
|
241
|
-
return item.value;
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
onChange(vals, action);
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
NHMultiSelect.defaultProps = {
|
|
250
|
-
placeholder: '请选择...',
|
|
251
|
-
disabled: false
|
|
252
|
-
|
|
253
|
-
//属性检查
|
|
254
|
-
};NHMultiSelect.propTypes = {
|
|
255
|
-
sign: _propTypes2.default.string, //数据源标识
|
|
256
|
-
dataSource: _propTypes2.default.arrayOf(_propTypes2.default.shape({
|
|
257
|
-
value: _propTypes2.default.string,
|
|
258
|
-
label: _propTypes2.default.node
|
|
259
|
-
})), //本地数据源
|
|
260
|
-
style: _propTypes2.default.object, //样式
|
|
261
|
-
placeholder: _propTypes2.default.string, //下拉提示
|
|
262
|
-
disabled: _propTypes2.default.bool, //是否禁用
|
|
263
|
-
value: _propTypes2.default.arrayOf(_propTypes2.default.string), //初始值
|
|
264
|
-
filterData: _propTypes2.default.shape({
|
|
265
|
-
type: _propTypes2.default.oneOf(['remove', 'save']), //是保留还是过滤掉
|
|
266
|
-
filterkeys: _propTypes2.default.array //保留或过滤的key值
|
|
267
|
-
}), //要过滤掉的Key值
|
|
268
|
-
onChange: _propTypes2.default.func, //多选框值变化时回调
|
|
269
|
-
baseUrl: _propTypes2.default.string //请求路径的前缀,可通过改参数控制访问的后端服务,如果不设置,则会去访问当前前端服务对应的后端服务,例如:api/sm-bpm-expansion
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
exports.default = NHMultiSelect;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _list = require('antd-mobile/lib/list');
|
|
8
|
-
|
|
9
|
-
var _list2 = _interopRequireDefault(_list);
|
|
10
|
-
|
|
11
|
-
var _radio = require('antd-mobile/lib/radio');
|
|
12
|
-
|
|
13
|
-
var _radio2 = _interopRequireDefault(_radio);
|
|
14
|
-
|
|
15
|
-
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
16
|
-
|
|
17
|
-
require('antd-mobile/lib/list/style/css');
|
|
18
|
-
|
|
19
|
-
require('antd-mobile/lib/radio/style/css');
|
|
20
|
-
|
|
21
|
-
var _react = require('react');
|
|
22
|
-
|
|
23
|
-
var _react2 = _interopRequireDefault(_react);
|
|
24
|
-
|
|
25
|
-
var _propTypes = require('prop-types');
|
|
26
|
-
|
|
27
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
28
|
-
|
|
29
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
-
|
|
31
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
32
|
-
|
|
33
|
-
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
34
|
-
|
|
35
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /*
|
|
36
|
-
* @Description:移动端RadioGroup,方便对一组Radio进行处理
|
|
37
|
-
* @Author: zengweijin
|
|
38
|
-
* @Date: 2019-07-12 11:50:25
|
|
39
|
-
* @LastEditors : zengweijin
|
|
40
|
-
* @LastEditTime : 2020-01-16 17:07:29
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var RadioGroup = function (_React$Component) {
|
|
45
|
-
_inherits(RadioGroup, _React$Component);
|
|
46
|
-
|
|
47
|
-
function RadioGroup(props) {
|
|
48
|
-
_classCallCheck(this, RadioGroup);
|
|
49
|
-
|
|
50
|
-
var _this = _possibleConstructorReturn(this, (RadioGroup.__proto__ || Object.getPrototypeOf(RadioGroup)).call(this, props));
|
|
51
|
-
|
|
52
|
-
_this.state = {
|
|
53
|
-
value: props.value || props.defaultValue || ''
|
|
54
|
-
};
|
|
55
|
-
return _this;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
_createClass(RadioGroup, [{
|
|
59
|
-
key: 'render',
|
|
60
|
-
value: function render() {
|
|
61
|
-
var _this2 = this;
|
|
62
|
-
|
|
63
|
-
var _props = this.props,
|
|
64
|
-
options = _props.options,
|
|
65
|
-
disabled = _props.disabled,
|
|
66
|
-
defaultValue = _props.defaultValue,
|
|
67
|
-
value = _props.value,
|
|
68
|
-
_onChange = _props.onChange,
|
|
69
|
-
label = _props.label;
|
|
70
|
-
|
|
71
|
-
var RadioItem = _radio2.default.RadioItem;
|
|
72
|
-
return _react2.default.createElement(
|
|
73
|
-
'div',
|
|
74
|
-
null,
|
|
75
|
-
_react2.default.createElement(
|
|
76
|
-
_list2.default,
|
|
77
|
-
{ renderHeader: function renderHeader() {
|
|
78
|
-
return label;
|
|
79
|
-
} },
|
|
80
|
-
options.map(function (item) {
|
|
81
|
-
return _react2.default.createElement(
|
|
82
|
-
RadioItem,
|
|
83
|
-
{
|
|
84
|
-
key: item.value,
|
|
85
|
-
defaultChecked: item.value === defaultValue,
|
|
86
|
-
checked: item.value === (value || _this2.state.value),
|
|
87
|
-
disabled: disabled || item.disabled,
|
|
88
|
-
onChange: function onChange(e) {
|
|
89
|
-
if (!('value' in _this2.props)) {
|
|
90
|
-
_this2.setState({ value: item.value });
|
|
91
|
-
}
|
|
92
|
-
if (_onChange) {
|
|
93
|
-
_onChange(item.value, item.label, e);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
item.label
|
|
98
|
-
);
|
|
99
|
-
})
|
|
100
|
-
)
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
}]);
|
|
104
|
-
|
|
105
|
-
return RadioGroup;
|
|
106
|
-
}(_react2.default.Component);
|
|
107
|
-
|
|
108
|
-
//属性检查
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
exports.default = RadioGroup;
|
|
112
|
-
RadioGroup.propTypes = {
|
|
113
|
-
disabled: _propTypes2.default.bool, //是否禁用
|
|
114
|
-
defaultValue: _propTypes2.default.any, //默认选中项
|
|
115
|
-
value: _propTypes2.default.any, //初始值
|
|
116
|
-
onChange: _propTypes2.default.func, //选择完成后的回调
|
|
117
|
-
options: _propTypes2.default.arrayOf(_propTypes2.default.object) // radio数组Array<{ label: string value: string disabled?: boolean }>
|
|
118
|
-
};
|