dlt-for-react 1.1.2 → 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 +9 -2
- package/lib/index.js +13 -1
- package/lib/layouts/LeftMenu/index.js +322 -296
- 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 +46 -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,92 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
/**
|
|
7
|
-
* 自定义校验
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// 正则表达式
|
|
11
|
-
var pattern = {
|
|
12
|
-
integer: /^[+]?[1-9]+\d*$/i,
|
|
13
|
-
phone: /^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/i,
|
|
14
|
-
english: /^[A-Za-z]+$/i,
|
|
15
|
-
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
16
|
-
url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'),
|
|
17
|
-
intOrFloat: /^\d+(\.\d+)?$/i
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// 验证信息提示
|
|
21
|
-
var message = {
|
|
22
|
-
integer: '请输入整数',
|
|
23
|
-
phone: '格式不正确,请使用下面格式:020-88888888',
|
|
24
|
-
english: '请输入英文',
|
|
25
|
-
email: '邮箱格式不正确',
|
|
26
|
-
url: 'url格式不正确',
|
|
27
|
-
intOrFloat: '请输入数字,并确保格式正确',
|
|
28
|
-
equalTo: '两次输入值不相等',
|
|
29
|
-
length: function length(min, max) {
|
|
30
|
-
return '\u8BF7\u8F93\u5165' + min + '~' + max + '\u4E2A\u5B57\u7B26';
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
var uiValidate = {
|
|
35
|
-
integer: function integer(rule, value, cb) {
|
|
36
|
-
if (value && !pattern.integer.test(value)) {
|
|
37
|
-
cb(message.integer);
|
|
38
|
-
} else {
|
|
39
|
-
cb();
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
phone: function phone(rule, value, cb) {
|
|
43
|
-
if (value && !pattern.phone.test(value)) {
|
|
44
|
-
cb(message.phone);
|
|
45
|
-
} else {
|
|
46
|
-
cb();
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
url: function url(rule, value, cb) {
|
|
50
|
-
if (value && !pattern.url.test(value)) {
|
|
51
|
-
cb(message.url);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
equalTo: function equalTo(rule, value, cb, param) {
|
|
55
|
-
if (value && value != param) {
|
|
56
|
-
cb(message.equalTo);
|
|
57
|
-
} else {
|
|
58
|
-
cb();
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
english: function english(rule, value, cb) {
|
|
62
|
-
if (value && !pattern.english.test(value)) {
|
|
63
|
-
cb(message.english);
|
|
64
|
-
} else {
|
|
65
|
-
cb();
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
length: function length(rule, value, cb, param) {
|
|
69
|
-
var min = param[0] * 1,
|
|
70
|
-
max = param[1] * 1;
|
|
71
|
-
if (value && (value.length < min || value.length > max)) {
|
|
72
|
-
cb(message.length(min, max));
|
|
73
|
-
} else {
|
|
74
|
-
cb();
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
email: function email(rule, value, cb) {
|
|
78
|
-
if (value && !pattern.email.test(value)) {
|
|
79
|
-
cb(message.email);
|
|
80
|
-
} else {
|
|
81
|
-
cb();
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
intOrFloat: function intOrFloat(rule, value, cb) {
|
|
85
|
-
if (value && !pattern.intOrFloat.test(value)) {
|
|
86
|
-
cb(message.intOrFloat);
|
|
87
|
-
} else {
|
|
88
|
-
cb();
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
exports.default = uiValidate;
|
|
@@ -1,413 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _listView = require('antd-mobile/lib/list-view');
|
|
8
|
-
|
|
9
|
-
var _listView2 = _interopRequireDefault(_listView);
|
|
10
|
-
|
|
11
|
-
var _toast = require('antd-mobile/lib/toast');
|
|
12
|
-
|
|
13
|
-
var _toast2 = _interopRequireDefault(_toast);
|
|
14
|
-
|
|
15
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
16
|
-
|
|
17
|
-
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; }; }();
|
|
18
|
-
|
|
19
|
-
require('antd-mobile/lib/list-view/style/css');
|
|
20
|
-
|
|
21
|
-
require('antd-mobile/lib/toast/style/css');
|
|
22
|
-
|
|
23
|
-
var _react = require('react');
|
|
24
|
-
|
|
25
|
-
var _react2 = _interopRequireDefault(_react);
|
|
26
|
-
|
|
27
|
-
var _propTypes = require('prop-types');
|
|
28
|
-
|
|
29
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
30
|
-
|
|
31
|
-
var _api = require('./config/api');
|
|
32
|
-
|
|
33
|
-
var _NHFetch = require('../../utils/NHFetch');
|
|
34
|
-
|
|
35
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
36
|
-
|
|
37
|
-
var _node = require('./node');
|
|
38
|
-
|
|
39
|
-
var _node2 = _interopRequireDefault(_node);
|
|
40
|
-
|
|
41
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
42
|
-
|
|
43
|
-
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
44
|
-
|
|
45
|
-
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
|
|
46
|
-
|
|
47
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
48
|
-
|
|
49
|
-
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; }
|
|
50
|
-
|
|
51
|
-
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; }
|
|
52
|
-
|
|
53
|
-
var NHAuditPanel = function (_React$Component) {
|
|
54
|
-
_inherits(NHAuditPanel, _React$Component);
|
|
55
|
-
|
|
56
|
-
function NHAuditPanel(props) {
|
|
57
|
-
var _this2 = this;
|
|
58
|
-
|
|
59
|
-
_classCallCheck(this, NHAuditPanel);
|
|
60
|
-
|
|
61
|
-
var _this = _possibleConstructorReturn(this, (NHAuditPanel.__proto__ || Object.getPrototypeOf(NHAuditPanel)).call(this, props));
|
|
62
|
-
|
|
63
|
-
_this.getProcessFormData = function () {
|
|
64
|
-
var _this$props$applyInfo = _this.props.applyInfo,
|
|
65
|
-
processId = _this$props$applyInfo.processId,
|
|
66
|
-
docUnid = _this$props$applyInfo.docUnid;
|
|
67
|
-
|
|
68
|
-
(0, _api.reqGetFormData)({ processId: processId, docUnid: docUnid }).then(function (res) {
|
|
69
|
-
var meta = res.meta,
|
|
70
|
-
data = res.data;
|
|
71
|
-
|
|
72
|
-
if (meta.success) {
|
|
73
|
-
if (data) {
|
|
74
|
-
_this.setState({
|
|
75
|
-
processFormData: data
|
|
76
|
-
}, _this.getSelectedNextNodeList);
|
|
77
|
-
_this.docUnid = data.docUnid;
|
|
78
|
-
}
|
|
79
|
-
} else {
|
|
80
|
-
_toast2.default.fail(meta.message);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
_this.getSelectedNextNodeList = function () {
|
|
86
|
-
var _this$state$processFo = _this.state.processFormData,
|
|
87
|
-
nextNodeConfig = _this$state$processFo.nextNodeConfig,
|
|
88
|
-
currentNodeId = _this$state$processFo.currentNodeId,
|
|
89
|
-
processId = _this$state$processFo.processId;
|
|
90
|
-
|
|
91
|
-
if (nextNodeConfig) {
|
|
92
|
-
var _nextNodeConfig = JSON.parse(nextNodeConfig);
|
|
93
|
-
var values = _nextNodeConfig.filter(function (item) {
|
|
94
|
-
return JSON.parse(item.GatewayType_DefaultChecked) || JSON.parse(item.GatewayType_Disabled) || item.initType === 'activity';
|
|
95
|
-
}).map(function (item) {
|
|
96
|
-
return item.NODEID;
|
|
97
|
-
});
|
|
98
|
-
_this.setState({ selectedNextNodeList: values });
|
|
99
|
-
var _iteratorNormalCompletion = true;
|
|
100
|
-
var _didIteratorError = false;
|
|
101
|
-
var _iteratorError = undefined;
|
|
102
|
-
|
|
103
|
-
try {
|
|
104
|
-
for (var _iterator = _nextNodeConfig[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
105
|
-
var item = _step.value;
|
|
106
|
-
|
|
107
|
-
if (item.initType !== "end") {
|
|
108
|
-
//如果下一个节点不是结束节点,则获取下一节点的审核人
|
|
109
|
-
_this.getNodeInfo(item.NODEID);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
} catch (err) {
|
|
113
|
-
_didIteratorError = true;
|
|
114
|
-
_iteratorError = err;
|
|
115
|
-
} finally {
|
|
116
|
-
try {
|
|
117
|
-
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
118
|
-
_iterator.return();
|
|
119
|
-
}
|
|
120
|
-
} finally {
|
|
121
|
-
if (_didIteratorError) {
|
|
122
|
-
throw _iteratorError;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
(0, _NHFetch2.default)("api/sm-bpm-expansion/flowSet/getNodeInfo", "GET", { lcid: processId, bpmjdid: currentNodeId }).then(function (res) {
|
|
128
|
-
if (res && res.code === 200) {
|
|
129
|
-
_this.setState({ jdInfo: res.data });
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
_this.getNodeInfo = function (nodeId) {
|
|
135
|
-
var processApplyInfo = {};
|
|
136
|
-
var processFormData = _this.state.processFormData;
|
|
137
|
-
var processId = processFormData.processId;
|
|
138
|
-
var params = {
|
|
139
|
-
lcid: processId,
|
|
140
|
-
bpmjdid: nodeId
|
|
141
|
-
};
|
|
142
|
-
(0, _NHFetch2.default)("api/sm-bpm-expansion/flowSet/getNodeInfo", "GET", params).then(function (res) {
|
|
143
|
-
if (res && res.code === 200) {
|
|
144
|
-
if (!res.data) {
|
|
145
|
-
_toast2.default.fail('获取节点信息失败');
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
if (res.data.shrhqfsdm === "01") {
|
|
149
|
-
_this.getZhxgShrList(nodeId);
|
|
150
|
-
} else if (res.data.shrhqfsdm === "03") {
|
|
151
|
-
var url = res.data.shrhqgz;
|
|
152
|
-
processApplyInfo.jdid = res.data.jdid;
|
|
153
|
-
processApplyInfo.bpmjdid = nodeId;
|
|
154
|
-
(0, _NHFetch2.default)(url, "GET", processApplyInfo).then(function (res) {
|
|
155
|
-
if (res) {
|
|
156
|
-
var allNodeAuditUsers = _extends({}, _this.state.allNodeAuditUsers);
|
|
157
|
-
allNodeAuditUsers['WF_' + nodeId] = res.data ? res.data : [];
|
|
158
|
-
_this.setState({ allNodeAuditUsers: allNodeAuditUsers });
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
_this.getZhxgShrList = function (nodeId) {
|
|
167
|
-
var processFormData = _this.state.processFormData;
|
|
168
|
-
var processId = processFormData.processId;
|
|
169
|
-
var sqdxid = _this.props.sqdxid;
|
|
170
|
-
var params = {
|
|
171
|
-
jdid: nodeId,
|
|
172
|
-
lcid: processId,
|
|
173
|
-
sqdxid: sqdxid
|
|
174
|
-
};
|
|
175
|
-
(0, _NHFetch2.default)("api/sm-bpm-expansion/processdefine/getNextNodeInfo", "GET", params).then(function (res) {
|
|
176
|
-
if (res && res.code === 200) {
|
|
177
|
-
var allNodeAuditUsers = _extends({}, _this.state.allNodeAuditUsers);
|
|
178
|
-
allNodeAuditUsers['WF_' + nodeId] = res.data ? res.data : [];
|
|
179
|
-
_this.setState({
|
|
180
|
-
allNodeAuditUsers: allNodeAuditUsers
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
_this.submit = function (bpmApplyInfo) {
|
|
187
|
-
//如果是学工的表单且是办理完成的操作,此时调用学工的保存方法进行保存
|
|
188
|
-
_toast2.default.loading('Loading...', 0);
|
|
189
|
-
var dynamicFormSaveFunc = _this.props.dynamicFormSaveFunc;
|
|
190
|
-
|
|
191
|
-
if (dynamicFormSaveFunc && typeof dynamicFormSaveFunc === 'function') {
|
|
192
|
-
dynamicFormSaveFunc(function () {
|
|
193
|
-
_this.saveInfo(bpmApplyInfo, _this.state.processFormData.isNewDocFlag, _this.state.processFormData.nextNodeConfig, function () {
|
|
194
|
-
_toast2.default.hide();
|
|
195
|
-
}, function () {
|
|
196
|
-
_toast2.default.hide();
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
} else {
|
|
200
|
-
|
|
201
|
-
_this.saveInfo(bpmApplyInfo, _this.state.processFormData.isNewDocFlag, _this.state.processFormData.nextNodeConfig, function () {
|
|
202
|
-
_toast2.default.hide();
|
|
203
|
-
}, function () {
|
|
204
|
-
_toast2.default.hide();
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
_this.saveInfo = function () {
|
|
210
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(bpmApplyInfo, isNewDocFlag, nextNodeConfig, successfunc, failfunc) {
|
|
211
|
-
var nextNodeId, nextNodeInfo, _this$props$applyInfo2, sqdxid, sqrid, sqdxdm, sqdxsszz, processId, docUnid, stsqzjid, pcid, processApplyInfo, params, res;
|
|
212
|
-
|
|
213
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
214
|
-
while (1) {
|
|
215
|
-
switch (_context.prev = _context.next) {
|
|
216
|
-
case 0:
|
|
217
|
-
//判断下一个节点是否是结束节点,如果是结束节点则需要保存
|
|
218
|
-
nextNodeId = bpmApplyInfo.nextNodeId; //下一个节点的ID
|
|
219
|
-
|
|
220
|
-
nextNodeInfo = _this.getNextNodeInfo(nextNodeId, nextNodeConfig);
|
|
221
|
-
_this$props$applyInfo2 = _this.props.applyInfo, sqdxid = _this$props$applyInfo2.sqdxid, sqrid = _this$props$applyInfo2.sqrid, sqdxdm = _this$props$applyInfo2.sqdxdm, sqdxsszz = _this$props$applyInfo2.sqdxsszz, processId = _this$props$applyInfo2.processId, docUnid = _this$props$applyInfo2.docUnid, stsqzjid = _this$props$applyInfo2.stsqzjid, pcid = _this$props$applyInfo2.pcid;
|
|
222
|
-
processApplyInfo = {
|
|
223
|
-
lcid: processId,
|
|
224
|
-
lcsqid: docUnid,
|
|
225
|
-
pcid: pcid,
|
|
226
|
-
sqdxdm: sqdxdm,
|
|
227
|
-
sqdxid: sqdxid,
|
|
228
|
-
sqdxsszz: sqdxsszz,
|
|
229
|
-
sqrid: sqrid,
|
|
230
|
-
stsqzjid: stsqzjid
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
bpmApplyInfo.remark = bpmApplyInfo.WF_Remark;
|
|
234
|
-
params = {
|
|
235
|
-
bpmApplyInfo: bpmApplyInfo,
|
|
236
|
-
processApplyInfo: processApplyInfo,
|
|
237
|
-
isNewDocFlag: isNewDocFlag,
|
|
238
|
-
initType: nextNodeInfo.initType,
|
|
239
|
-
spzt: nextNodeInfo.ENDBUSINESSID === '1' ? "2" : "3" //ENDBUSINESSID为1表示审核通过,否则表示审核不通过
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
if (bpmApplyInfo && bpmApplyInfo.actionId === 'GoToFirstNode') {
|
|
243
|
-
params.spzt = '1';
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
if (!(bpmApplyInfo.currentNodeId === 'T10001' && _this.state.jdInfo.fzbdsjjk)) {
|
|
247
|
-
_context.next = 16;
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
_context.next = 10;
|
|
252
|
-
return (0, _NHFetch2.default)(_this.state.jdInfo.fzbdsjjk, 'POST', _extends({}, processApplyInfo));
|
|
253
|
-
|
|
254
|
-
case 10:
|
|
255
|
-
res = _context.sent;
|
|
256
|
-
|
|
257
|
-
if (!(!res || res.code !== 200 || !res.data)) {
|
|
258
|
-
_context.next = 15;
|
|
259
|
-
break;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
_toast2.default.error('获取流程分支表单数据失败');
|
|
263
|
-
failfunc && failfunc();
|
|
264
|
-
return _context.abrupt('return');
|
|
265
|
-
|
|
266
|
-
case 15:
|
|
267
|
-
params.formData = res.data.formData;
|
|
268
|
-
|
|
269
|
-
case 16:
|
|
270
|
-
(0, _NHFetch2.default)('api/sm-bpm-expansion/processdefine/saveProcessInfo', 'POST', params).then(function (res) {
|
|
271
|
-
if (res && res.code === 200) {
|
|
272
|
-
if (res.data.code === 0) {
|
|
273
|
-
_toast2.default.hide();
|
|
274
|
-
_toast2.default.success(res.data.msg);
|
|
275
|
-
setTimeout(function () {
|
|
276
|
-
window.opener = null;
|
|
277
|
-
window.close();
|
|
278
|
-
}, 2000);
|
|
279
|
-
successfunc && successfunc();
|
|
280
|
-
} else {
|
|
281
|
-
_toast2.default.hide();
|
|
282
|
-
_toast2.default.fail(res.data.msg);
|
|
283
|
-
failfunc && failfunc();
|
|
284
|
-
}
|
|
285
|
-
} else {
|
|
286
|
-
failfunc && failfunc();
|
|
287
|
-
}
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
case 17:
|
|
291
|
-
case 'end':
|
|
292
|
-
return _context.stop();
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}, _callee, _this2);
|
|
296
|
-
}));
|
|
297
|
-
|
|
298
|
-
return function (_x, _x2, _x3, _x4, _x5) {
|
|
299
|
-
return _ref.apply(this, arguments);
|
|
300
|
-
};
|
|
301
|
-
}();
|
|
302
|
-
|
|
303
|
-
_this.getNextNodeInfo = function (nextNodeId, nextNodeConfig) {
|
|
304
|
-
var _nextNodeConfig = nextNodeConfig ? JSON.parse(nextNodeConfig) : []; // 后继节点
|
|
305
|
-
var nextNodeInfo = {};
|
|
306
|
-
_nextNodeConfig.map(function (item) {
|
|
307
|
-
if (item.NODEID === nextNodeId) {
|
|
308
|
-
nextNodeInfo = item;
|
|
309
|
-
}
|
|
310
|
-
return item;
|
|
311
|
-
});
|
|
312
|
-
return nextNodeInfo;
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
_this.searchSubmit = function (val) {
|
|
316
|
-
var params = {
|
|
317
|
-
selectType: '1',
|
|
318
|
-
pageNum: 1,
|
|
319
|
-
pageSize: 10,
|
|
320
|
-
keyword: val
|
|
321
|
-
};
|
|
322
|
-
_this.keyword = val;
|
|
323
|
-
_this.pageSize = 1;
|
|
324
|
-
(0, _api.reqGetUserList)(params).then(function (res) {
|
|
325
|
-
console.log(res);
|
|
326
|
-
if (res && res.meta && res.meta.success) {
|
|
327
|
-
_this.data = [].concat(_toConsumableArray(res.data.list));
|
|
328
|
-
_this.setState({ dataSource: _this.state.dataSource.cloneWithRows(_this.data) });
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
_this.handleEndReached = function () {
|
|
334
|
-
var params = {
|
|
335
|
-
selectType: '1',
|
|
336
|
-
pageNum: ++_this.pageSize,
|
|
337
|
-
pageSize: 10,
|
|
338
|
-
keyword: _this.keyword
|
|
339
|
-
};
|
|
340
|
-
(0, _api.reqGetUserList)(params).then(function (res) {
|
|
341
|
-
console.log(res);
|
|
342
|
-
if (res && res.meta && res.meta.success) {
|
|
343
|
-
_this.data = [].concat(_toConsumableArray(_this.data), _toConsumableArray(res.data.list));
|
|
344
|
-
_this.setState({ dataSource: _this.state.dataSource.cloneWithRows(_this.data) });
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
var getSectionData = function getSectionData(dataBlob, sectionID) {
|
|
350
|
-
return dataBlob[sectionID];
|
|
351
|
-
};
|
|
352
|
-
var getRowData = function getRowData(dataBlob, sectionID, rowID) {
|
|
353
|
-
return dataBlob[rowID];
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
var dataSource = new _listView2.default.DataSource({
|
|
357
|
-
// getRowData,
|
|
358
|
-
// getSectionHeaderData: getSectionData,
|
|
359
|
-
rowHasChanged: function rowHasChanged(row1, row2) {
|
|
360
|
-
return row1 !== row2;
|
|
361
|
-
}
|
|
362
|
-
// sectionHeaderHasChanged: (s1, s2) => s1 !== s2,
|
|
363
|
-
});
|
|
364
|
-
_this.state = {
|
|
365
|
-
processFormData: {},
|
|
366
|
-
selectedNextNodeList: [],
|
|
367
|
-
allNodeAuditUsers: {},
|
|
368
|
-
jdInfo: {},
|
|
369
|
-
dataSource: dataSource
|
|
370
|
-
};
|
|
371
|
-
_this.pageNum = 1;
|
|
372
|
-
_this.keyword = '';
|
|
373
|
-
_this.data = [];
|
|
374
|
-
return _this;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
_createClass(NHAuditPanel, [{
|
|
378
|
-
key: 'componentDidMount',
|
|
379
|
-
value: function componentDidMount() {
|
|
380
|
-
this.getProcessFormData();
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
//获取下一节点的信息
|
|
384
|
-
|
|
385
|
-
//获取综合学工的审核人列表
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
// 提交办理
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* 获取下一个节点的信息
|
|
392
|
-
*/
|
|
393
|
-
|
|
394
|
-
}, {
|
|
395
|
-
key: 'render',
|
|
396
|
-
value: function render() {
|
|
397
|
-
return _react2.default.createElement(
|
|
398
|
-
'div',
|
|
399
|
-
null,
|
|
400
|
-
_react2.default.createElement(_node2.default, _extends({}, this.state, this.props, { submit: this.submit }))
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
}]);
|
|
404
|
-
|
|
405
|
-
return NHAuditPanel;
|
|
406
|
-
}(_react2.default.Component);
|
|
407
|
-
|
|
408
|
-
NHAuditPanel.protoTypes = {
|
|
409
|
-
applyInfo: _propTypes2.default.object.isRequired, // 流程申请信息{sqdxid,sqrid,sqdxdm,sqdxsszz,processId,docUnid,stsqzjid,pcid}
|
|
410
|
-
dynamicFormSaveFunc: _propTypes2.default.func
|
|
411
|
-
};
|
|
412
|
-
|
|
413
|
-
exports.default = NHAuditPanel;
|