dlt-for-react 1.0.23 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/lib/components/Button/index.js +79 -0
- package/lib/components/HqSelector/HqLsrySelector/index.js +3 -5
- package/lib/components/HqSelector/HqRySelector/index.js +3 -5
- package/lib/components/HqSelector/HqWzSelector/index.js +3 -5
- package/lib/components/KyEditableTable/component.js +3 -5
- package/lib/components/KyEditableTable/index.js +7 -13
- package/lib/components/KyExcel/index.js +3 -5
- package/lib/components/KyInputPicker/render.js +13 -43
- package/lib/components/KyInputPicker/setting-checkbox.js +3 -5
- package/lib/components/KyInputPicker/setting-multiSelect.js +3 -5
- package/lib/components/KyInputPicker/setting-nhcascader.js +3 -5
- package/lib/components/KyInputPicker/setting-select.js +3 -5
- package/lib/components/KyInputPicker/setting-stu-selector.js +3 -5
- package/lib/components/KyInputPicker/setting-tea-selector.js +3 -5
- package/lib/components/KyTable/checkButtons.js +4 -7
- package/lib/components/KyTree/index.js +6 -16
- package/lib/components/KyUpload/index.js +13 -21
- package/lib/components/NHAuditPanel/config/Axios.js +263 -0
- package/lib/components/NHAuditPanel/config/api.js +479 -0
- package/lib/components/NHAuditPanel/config/data.js +156 -0
- package/lib/components/NHAuditPanel/config/typeMap.js +1234 -0
- package/lib/components/NHAuditPanel/config/uiValidate.js +92 -0
- package/lib/components/NHAuditPanel/index.js +413 -0
- package/lib/components/NHAuditPanel/node.js +619 -0
- package/lib/components/NHCascader/index.js +355 -0
- package/lib/components/NHCheckboxGroup/index.js +135 -0
- package/lib/components/NHDynamicFormShow/baseInfo/index.js +194 -0
- package/lib/components/NHDynamicFormShow/custom/index.js +553 -0
- package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +43 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +1113 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +263 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +880 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +171 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +865 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +571 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +147 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +474 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +139 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +506 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +143 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +1074 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +172 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +927 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +195 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +1064 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +183 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +763 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +137 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +819 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +137 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +700 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +162 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +743 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +177 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +848 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +777 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +161 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +706 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +413 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +1013 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +175 -0
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +1345 -0
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +274 -0
- package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +669 -0
- package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +134 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +378 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +120 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +638 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +965 -0
- package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +237 -0
- package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +823 -0
- package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +188 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +401 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +472 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +304 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +375 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +118 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +62 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +55 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +1238 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +375 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +554 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +542 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +575 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +563 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +745 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +164 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +587 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +143 -0
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +743 -0
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +172 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +1410 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +274 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +755 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +814 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +188 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +769 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +1004 -0
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +126 -0
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +503 -0
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +149 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +379 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +148 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +748 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +762 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +134 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +682 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +152 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +783 -0
- package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +764 -0
- package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +677 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +1173 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +242 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +862 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +201 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +196 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +167 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +1096 -0
- package/lib/components/NHDynamicFormShow/index.js +647 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +279 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +206 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/index.js +419 -0
- package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +401 -0
- package/lib/components/NHDynamicFormShow/oneOnOne/index.js +271 -0
- package/lib/components/NHImagePicker/index.js +554 -0
- package/lib/components/NHInputPicker/RadioGroup.js +118 -0
- package/lib/components/NHInputPicker/index.js +62 -0
- package/lib/components/NHInputPicker/input-const.js +55 -0
- package/lib/components/NHInputPicker/render.js +1271 -0
- package/lib/components/NHListView/index.js +374 -0
- package/lib/components/NHMapGeolocation/index.js +537 -0
- package/lib/components/NHMapGeolocation/initMap/initGdMap.js +104 -0
- package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +138 -0
- package/lib/components/NHMapGeolocation/style.js +51 -0
- package/lib/components/NHMultiSelect/index.js +272 -0
- package/lib/components/NHRadioGroup/index.js +118 -0
- package/lib/components/NHSelect/index.js +364 -0
- package/lib/components/NHTreeMenu/index.js +126 -0
- package/lib/components/NHTreeMenu/treeNode.js +164 -0
- package/lib/components/StuSelector/index.js +611 -0
- package/lib/index.js +161 -116
- package/lib/layouts/KyInputPicker/edit-page.js +585 -0
- package/lib/layouts/KyInputPicker/index.js +220 -0
- package/lib/layouts/KyInputPicker/input-const.js +134 -0
- package/lib/layouts/KyInputPicker/render.js +2477 -0
- package/lib/layouts/KyInputPicker/setting-checkbox.js +850 -0
- package/lib/layouts/KyInputPicker/setting-datepicker.js +430 -0
- package/lib/layouts/KyInputPicker/setting-datetimepicker.js +443 -0
- package/lib/layouts/KyInputPicker/setting-input.js +555 -0
- package/lib/layouts/KyInputPicker/setting-inputNumber.js +612 -0
- package/lib/layouts/KyInputPicker/setting-monthpicker.js +434 -0
- package/lib/layouts/KyInputPicker/setting-multiSelect.js +532 -0
- package/lib/layouts/KyInputPicker/setting-nhcascader.js +584 -0
- package/lib/layouts/KyInputPicker/setting-old-upload.js +428 -0
- package/lib/layouts/KyInputPicker/setting-radio.js +468 -0
- package/lib/layouts/KyInputPicker/setting-rangepicker.js +466 -0
- package/lib/layouts/KyInputPicker/setting-select.js +534 -0
- package/lib/layouts/KyInputPicker/setting-stu-selector.js +507 -0
- package/lib/layouts/KyInputPicker/setting-switch.js +274 -0
- package/lib/layouts/KyInputPicker/setting-tea-selector.js +507 -0
- package/lib/layouts/KyInputPicker/setting-textarea.js +619 -0
- package/lib/layouts/KyInputPicker/setting-timepicker.js +437 -0
- package/lib/layouts/KyInputPicker/setting-upload.js +766 -0
- package/lib/layouts/KyModal/buildTitle.js +81 -0
- package/lib/layouts/KyModal/dragM.js +127 -0
- package/lib/layouts/KyModal/index.js +321 -0
- package/lib/layouts/KyPreview/index.js +219 -0
- package/lib/layouts/KyUpload/index.js +1155 -0
- package/lib/layouts/LeftMenu/index.js +5 -11
- package/lib/layouts/NavigationBar/index.js +4 -10
- package/lib/layouts/Top/editPassWord.js +5 -7
- package/lib/layouts/Top/index.js +6 -20
- package/lib/layouts/TopMenu/index.js +11 -14
- package/lib/layouts/layout/index.js +7 -13
- package/lib/layouts/{Login → login}/index-pre.js +3 -5
- package/lib/layouts/{Login → login}/index.js +6 -8
- package/lib/layouts/{Login → login}/login.js +8 -17
- package/lib/layouts/mixTop/index.js +13 -28
- package/lib/layouts/settingDrawer/index.js +3 -5
- package/lib/routes/AuthorizedRoute.js +7 -13
- package/lib/utils/NHCore.js +46 -2
- package/lib/utils/base64.js +238 -0
- package/lib/utils/browserJudge.js +33 -0
- package/lib/utils/common.js +18 -20
- package/lib/utils/createUuid.js +11 -31
- package/lib/utils/device.js +44 -0
- package/lib/utils/dynamicLoadCss.js +14 -0
- package/lib/utils/dynamicLoadJs.js +21 -0
- package/lib/utils/getLoginUser.js +1 -1
- package/lib/utils/getSize.js +2 -11
- package/lib/utils/getStyle.js +26 -0
- package/lib/utils/getSuitHeight.js +49 -0
- package/lib/utils/hasAuth.js +11 -0
- package/lib/utils/index.js +1 -34
- package/lib/utils/loadJS.js +40 -0
- package/package.json +1 -1
- /package/lib/layouts/{Login → login}/lyPassword.js +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
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;
|
|
@@ -0,0 +1,413 @@
|
|
|
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;
|