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,472 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _toast = require("antd-mobile/lib/toast");
|
|
8
|
-
|
|
9
|
-
var _toast2 = _interopRequireDefault(_toast);
|
|
10
|
-
|
|
11
|
-
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; }; }();
|
|
12
|
-
|
|
13
|
-
require("antd-mobile/lib/toast/style/css");
|
|
14
|
-
|
|
15
|
-
var _react = require("react");
|
|
16
|
-
|
|
17
|
-
var _react2 = _interopRequireDefault(_react);
|
|
18
|
-
|
|
19
|
-
var _NHFetch = require("../../../../../utils/NHFetch");
|
|
20
|
-
|
|
21
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
22
|
-
|
|
23
|
-
var _EditForm = require("./EditForm");
|
|
24
|
-
|
|
25
|
-
var _EditForm2 = _interopRequireDefault(_EditForm);
|
|
26
|
-
|
|
27
|
-
var _propTypes = require("prop-types");
|
|
28
|
-
|
|
29
|
-
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
30
|
-
|
|
31
|
-
var _createUuid = require("../../../../../utils/createUuid");
|
|
32
|
-
|
|
33
|
-
var _createUuid2 = _interopRequireDefault(_createUuid);
|
|
34
|
-
|
|
35
|
-
var _moment = require("moment");
|
|
36
|
-
|
|
37
|
-
var _moment2 = _interopRequireDefault(_moment);
|
|
38
|
-
|
|
39
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
40
|
-
|
|
41
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
42
|
-
|
|
43
|
-
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; }
|
|
44
|
-
|
|
45
|
-
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; }
|
|
46
|
-
|
|
47
|
-
var InfoItem = function (_React$Component) {
|
|
48
|
-
_inherits(InfoItem, _React$Component);
|
|
49
|
-
|
|
50
|
-
function InfoItem(props) {
|
|
51
|
-
_classCallCheck(this, InfoItem);
|
|
52
|
-
|
|
53
|
-
var _this = _possibleConstructorReturn(this, (InfoItem.__proto__ || Object.getPrototypeOf(InfoItem)).call(this, props));
|
|
54
|
-
|
|
55
|
-
_this.InitialOneOnOneInfo = function () {
|
|
56
|
-
var params = {
|
|
57
|
-
id: _this.props.objId,
|
|
58
|
-
bdid: _this.props.formId,
|
|
59
|
-
type: '2', //this.props.model === "view" ? "1" : "2", 如果查看模式需要根据控件类型占不同的列,此处只能为'2'
|
|
60
|
-
zdflid: _this.props.flid,
|
|
61
|
-
clientType: "mobile"
|
|
62
|
-
};
|
|
63
|
-
if (_this.props.processId !== undefined) {
|
|
64
|
-
params.lcId = _this.props.processId;
|
|
65
|
-
}
|
|
66
|
-
if (_this.props.processApplyId !== undefined) {
|
|
67
|
-
params.lcsqid = _this.props.processApplyId;
|
|
68
|
-
}
|
|
69
|
-
if (_this.props.pkid !== undefined) {
|
|
70
|
-
params.pkid = _this.props.pkid;
|
|
71
|
-
}
|
|
72
|
-
if (_this.props.rwid) {
|
|
73
|
-
params.rwid = _this.props.rwid; // 任务id
|
|
74
|
-
}
|
|
75
|
-
(0, _NHFetch2.default)("api/sm-dynamic-form/dynamicShow/queryBdzdInfo", "GET", params).then(function (res) {
|
|
76
|
-
if (res) {
|
|
77
|
-
//把通过接口方式获取的功能实现
|
|
78
|
-
var listInfo = [];
|
|
79
|
-
if (res.data != null && res.data != "" && res.data != undefined) {
|
|
80
|
-
listInfo = res.data;
|
|
81
|
-
}
|
|
82
|
-
_this.setState({
|
|
83
|
-
list: listInfo,
|
|
84
|
-
cacheList: _.cloneDeep(listInfo),
|
|
85
|
-
loading: false
|
|
86
|
-
}, function () {
|
|
87
|
-
_this.state.list.map(function (item) {
|
|
88
|
-
if (item.jkUrl !== "" && item.jkUrl !== undefined && item.jkUrl !== null) {
|
|
89
|
-
var url = item.jkUrl;
|
|
90
|
-
(0, _NHFetch2.default)(url, "GET", params).then(function (res) {
|
|
91
|
-
if (res) {
|
|
92
|
-
var maps = {};
|
|
93
|
-
maps = res.data;
|
|
94
|
-
var zzd = item.zzd; //要获取的值字段名称
|
|
95
|
-
var wbzd = item.wbzd; //要获取的文本字段名称
|
|
96
|
-
item.text = maps[wbzd];
|
|
97
|
-
item.inittext = maps[wbzd];
|
|
98
|
-
item.value = maps[zzd];
|
|
99
|
-
item.initValue = maps[zzd];
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
_this.setState({
|
|
103
|
-
list: _this.state.list,
|
|
104
|
-
cacheList: _.cloneDeep(_this.state.list)
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
return item;
|
|
109
|
-
});
|
|
110
|
-
_this.getJqlssq(_this.props.pkid);
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
_this.getJqlssq = function (pkid) {
|
|
117
|
-
var list = _this.state.list;
|
|
118
|
-
_this.setInit(list);
|
|
119
|
-
_this.setState({ list: list });
|
|
120
|
-
(0, _NHFetch2.default)('api/zhxg-gyrcgl/openapi/getJqlssq/' + pkid, 'GET').then(function (res) {
|
|
121
|
-
if (res && res.data) {
|
|
122
|
-
for (var i = 0; i < list.length; i++) {
|
|
123
|
-
var item = list[i];
|
|
124
|
-
if (item.id === _this.state.columns.kssj) {
|
|
125
|
-
list[i].text = list[i].initText = res.data.kssj;
|
|
126
|
-
list[i].value = list[i].initValue = res.data.kssj;
|
|
127
|
-
}
|
|
128
|
-
if (item.id === _this.state.columns.jssj) {
|
|
129
|
-
list[i].text = list[i].initText = res.data.jssj;
|
|
130
|
-
list[i].value = list[i].initValue = res.data.jssj;
|
|
131
|
-
}
|
|
132
|
-
if (item.id === _this.state.columns.sqyy) {
|
|
133
|
-
list[i].text = list[i].initText = res.data.sqyy;
|
|
134
|
-
list[i].value = list[i].initValue = res.data.sqyy;
|
|
135
|
-
}
|
|
136
|
-
if (item.id === _this.state.columns.lxfs) {
|
|
137
|
-
list[i].text = list[i].initText = res.data.lxfs;
|
|
138
|
-
list[i].value = list[i].initValue = res.data.lxfs;
|
|
139
|
-
}
|
|
140
|
-
if (item.id === _this.state.columns.fdylxfs) {
|
|
141
|
-
list[i].text = list[i].initText = res.data.fdylxfs;
|
|
142
|
-
list[i].value = list[i].initValue = res.data.fdylxfs;
|
|
143
|
-
}
|
|
144
|
-
if (item.id === _this.state.columns.lscw && res.data.cwid && res.data.cwxx) {
|
|
145
|
-
var cw = res.data.cwxx.xqmc + '/' + res.data.cwxx.ldmc + '/' + res.data.cwxx.fjmc + '/' + res.data.cwxx.cwh;
|
|
146
|
-
list[i].text = list[i].initText = cw;
|
|
147
|
-
list[i].value = list[i].initValue = res.data.cwid;
|
|
148
|
-
}
|
|
149
|
-
if (item.id === _this.state.columns.fdy) {
|
|
150
|
-
list[i].text = list[i].initText = res.data.fdyGh;
|
|
151
|
-
list[i].value = list[i].initValue = res.data.fdy;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
_this.setState({ list: list }, function () {
|
|
155
|
-
return console.log("插入数据后的list", _this.state.list);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
_this.save = function (func, failCallback) {
|
|
162
|
-
var _this$props = _this.props,
|
|
163
|
-
processApplyId = _this$props.processApplyId,
|
|
164
|
-
objId = _this$props.objId,
|
|
165
|
-
pkid = _this$props.pkid,
|
|
166
|
-
fieldMap = _this$props.fieldMap;
|
|
167
|
-
var formData = _this.state.formData;
|
|
168
|
-
// console.log("props:", this.props)
|
|
169
|
-
// console.log("state", this.state)
|
|
170
|
-
|
|
171
|
-
var param = {};
|
|
172
|
-
param.pkid = pkid;
|
|
173
|
-
// param.gzfbid = params.pcid,
|
|
174
|
-
param.xsid = objId;
|
|
175
|
-
param.lcslid = processApplyId;
|
|
176
|
-
for (var i = 0; i < _this.state.list.length; i++) {
|
|
177
|
-
var item = _this.state.list[i];
|
|
178
|
-
if (item.id === _this.state.columns.kssj) {
|
|
179
|
-
param.kssj = item.value;
|
|
180
|
-
}
|
|
181
|
-
if (item.id === _this.state.columns.jssj) {
|
|
182
|
-
param.jssj = item.value;
|
|
183
|
-
}
|
|
184
|
-
if (item.id === _this.state.columns.sqyy) {
|
|
185
|
-
param.sqyy = item.value;
|
|
186
|
-
}
|
|
187
|
-
if (item.id === _this.state.columns.lxfs) {
|
|
188
|
-
param.lxfs = item.value;
|
|
189
|
-
}
|
|
190
|
-
if (item.id === _this.state.columns.fdylxfs) {
|
|
191
|
-
param.fdylxfs = item.value;
|
|
192
|
-
}
|
|
193
|
-
if (item.id === _this.state.columns.lscw) {
|
|
194
|
-
param.cwid = item.value;
|
|
195
|
-
}
|
|
196
|
-
if (item.id === _this.state.columns.fdy) {
|
|
197
|
-
param.fdy = item.value;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
// 转换时间格式
|
|
201
|
-
param.kssj = param.kssj ? (0, _moment2.default)(param.kssj).format("YYYY-MM-DD") : '';
|
|
202
|
-
param.jssj = param.jssj ? (0, _moment2.default)(param.jssj).format("YYYY-MM-DD") : '';
|
|
203
|
-
console.log("提交参数", param);
|
|
204
|
-
var list = [param.fjid];
|
|
205
|
-
(0, _NHFetch2.default)('front/zhxg-unauth/dynamic/save', 'POST', list).then(function (res) {
|
|
206
|
-
if (res && res.code === 200) {
|
|
207
|
-
(0, _NHFetch2.default)('api/zhxg-gyrcgl/openapi/saveJqlssq', 'POST', param).then(function (res) {
|
|
208
|
-
if (res && res.code === 200) {
|
|
209
|
-
func();
|
|
210
|
-
} else {
|
|
211
|
-
failCallback && failCallback();
|
|
212
|
-
_toast2.default.fail("表单保存失败,请联系管理员!");
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
} else {
|
|
216
|
-
_toast2.default.fail("保存失败");
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
_this.onChange = function (seq, value, text, isChange) {
|
|
222
|
-
var list = _this.state.list;
|
|
223
|
-
if (list[seq - 1] !== undefined) {
|
|
224
|
-
list[seq - 1].text = text;
|
|
225
|
-
list[seq - 1].value = value;
|
|
226
|
-
//判断值是否有改变
|
|
227
|
-
if (isChange !== "" && isChange !== undefined) {
|
|
228
|
-
list[seq - 1].isChange = isChange;
|
|
229
|
-
} else {
|
|
230
|
-
if (list[seq - 1].value === list[seq - 1].initValue || !value && list[seq - 1].initValue === '') {
|
|
231
|
-
list[seq - 1].isChange = false;
|
|
232
|
-
} else {
|
|
233
|
-
list[seq - 1].isChange = true;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
_this.setState({
|
|
237
|
-
list: list
|
|
238
|
-
});
|
|
239
|
-
var oneONOneInfo = {
|
|
240
|
-
id: _this.props.objId,
|
|
241
|
-
sjkyh: _this.props.sjkyh,
|
|
242
|
-
dto: _this.state.list,
|
|
243
|
-
flid: _this.props.flid,
|
|
244
|
-
baseUrl: _this.props.baseUrl,
|
|
245
|
-
flstdm: _this.props.flstdm,
|
|
246
|
-
pkid: _this.props.pkid === undefined ? null : _this.props.pkid,
|
|
247
|
-
lcslid: _this.props.processApplyId
|
|
248
|
-
};
|
|
249
|
-
_this.props.handlOneOnDetail(oneONOneInfo, _.cloneDeep(_this.state.cacheList));
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
_this.validate = function (func) {
|
|
254
|
-
if (_this.nhEditForm) {
|
|
255
|
-
_this.nhEditForm.validateFields(function (err, formData) {
|
|
256
|
-
if (err) {
|
|
257
|
-
func(false);
|
|
258
|
-
}
|
|
259
|
-
// console.log('校验formdata',formData)
|
|
260
|
-
//检查时间
|
|
261
|
-
var kssj = formData[_this.state.columns.kssj];
|
|
262
|
-
var jssj = formData[_this.state.columns.jssj];
|
|
263
|
-
if (kssj && jssj && kssj > jssj) {
|
|
264
|
-
func(false);
|
|
265
|
-
_toast2.default.fail('结束时间不能比开始时间更早');
|
|
266
|
-
} else {
|
|
267
|
-
func(true);
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
} else {
|
|
271
|
-
func(true);
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
_this.onEditClose = function () {
|
|
276
|
-
_this.setState({
|
|
277
|
-
isEdit: false
|
|
278
|
-
// cacheList: _.cloneDeep(this.state.list)
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
_this.onEdit = function () {
|
|
283
|
-
_this.setState({
|
|
284
|
-
isEdit: true,
|
|
285
|
-
preEditCacheList: _.cloneDeep(_this.state.list)
|
|
286
|
-
}, function () {
|
|
287
|
-
_this.props.editCheckShow && _this.props.editCheckShow();
|
|
288
|
-
});
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
_this.onCacheBack = function () {
|
|
292
|
-
_this.setState({
|
|
293
|
-
list: _.cloneDeep(_this.state.preEditCacheList),
|
|
294
|
-
isEdit: false
|
|
295
|
-
});
|
|
296
|
-
var oneONOneInfo = {
|
|
297
|
-
id: _this.props.objId,
|
|
298
|
-
sjkyh: _this.props.sjkyh,
|
|
299
|
-
dto: _.cloneDeep(_this.state.preEditCacheList),
|
|
300
|
-
flid: _this.props.flid,
|
|
301
|
-
baseUrl: _this.props.baseUrl,
|
|
302
|
-
flstdm: _this.props.flstdm,
|
|
303
|
-
pkid: _this.props.pkid === undefined ? null : _this.props.pkid,
|
|
304
|
-
lcslid: _this.props.processApplyId
|
|
305
|
-
};
|
|
306
|
-
_this.props.handlOneOnDetail(oneONOneInfo, _.cloneDeep(_this.state.cacheList));
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
_this.state = {
|
|
310
|
-
isEdit: props.model === "edit" ? true : false, //当时编辑模式模式时,直接自动进入编辑模式
|
|
311
|
-
list: [
|
|
312
|
-
//该分类的所有的数据
|
|
313
|
-
// 标题 显示的文本 控件的值 控件初始化的值 数据采集方式 表单控件参数
|
|
314
|
-
// {seq:1,id:'1',title:'姓名',text:'百里屠苏',value:'百里屠苏',initValue:'百里屠苏',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
|
|
315
|
-
// //接口url 值字段 文本字段 是否显示 是否编辑 是否必填 字段最小值 字段最大值
|
|
316
|
-
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
|
|
317
|
-
// {seq:2,id:'2',title:'性别',text:'是',value:'1',initValue:'1',sjcjfsdm:'01',bdkjcs:'{"type":"switch","checkedText":"是","uncheckedText":"否","defaultChecked":false}'
|
|
318
|
-
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'0',zszxz:'',zszdz:'',isChange:false,bdkjlx:'switch'},
|
|
319
|
-
// {seq:3,id:'3',title:'年龄',text:'23',value:'23',initValue:'23',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
|
|
320
|
-
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
|
|
321
|
-
// {seq:4,id:'4',title:'籍贯',text:'湖南',value:'湖南',initValue:'湖南',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
|
|
322
|
-
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
|
|
323
|
-
],
|
|
324
|
-
cacheList: [], //缓存数据 备份初始数据 用于比较字段是否有修改过
|
|
325
|
-
preEditCacheList: [], //editCheck模式下 上次点击保存的数据,取消后回退到当前数据,而不是初始缓存的cacheList的数据
|
|
326
|
-
columns: {
|
|
327
|
-
kssj: '87075a74-44bc-4faa-9c0c-e435325c9ad3', //留宿开始时间(公寓办填写)
|
|
328
|
-
jssj: '12ab512a-2e18-4d95-8241-e99228eaa2ee', //留宿结束时间(公寓办填写)
|
|
329
|
-
sqyy: '9c33b200-e25b-46ed-96bb-1c618f68795c', //申请原因
|
|
330
|
-
lxfs: 'b2403e23-9858-4b51-9e3a-6451718578c0', //联系方式
|
|
331
|
-
fdylxfs: 'd761c06e-f5c7-4640-973f-86f2539a2bfa', //辅导员联系方式
|
|
332
|
-
lscw: 'ecdaab64-09ce-4839-8276-b2ce02325cd0', //留宿床位(公寓办填写)
|
|
333
|
-
fdy: 'f60fb933-b193-461e-9d7f-dcefad376dc1'
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
return _this;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
_createClass(InfoItem, [{
|
|
340
|
-
key: "UNSAFE_componentWillMount",
|
|
341
|
-
value: function UNSAFE_componentWillMount() {
|
|
342
|
-
this.InitialOneOnOneInfo();
|
|
343
|
-
}
|
|
344
|
-
}, {
|
|
345
|
-
key: "setInit",
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
//当自定义表单的字段被重新配置时,所有属性将丢失,重写所有组件相关属性
|
|
349
|
-
value: function setInit(list) {
|
|
350
|
-
console.log(list);
|
|
351
|
-
for (var i = 0; i < list.length; i++) {
|
|
352
|
-
var item = list[i];
|
|
353
|
-
if (item.id === this.state.columns.kssj) {
|
|
354
|
-
list[i].bdkjcs = '{"name":"日期控件","type":"datepicker","widthType":"default","widthStr":"","required":true,"defaultValue":"","format":"YYYY-MM-DD","validationValueType":"object"}';
|
|
355
|
-
list[i].bdkjlx = "datepicker";
|
|
356
|
-
list[i].blm = "KSSJ";
|
|
357
|
-
list[i].bm = "ZHXG_GY_RCGL_JQLSJL";
|
|
358
|
-
list[i].sjcjfsdm = "01";
|
|
359
|
-
}
|
|
360
|
-
if (item.id === this.state.columns.jssj) {
|
|
361
|
-
list[i].bdkjcs = '{"name":"日期控件","type":"datepicker","widthType":"default","widthStr":"","required":true,"defaultValue":"","format":"YYYY-MM-DD","validationValueType":"object"}';
|
|
362
|
-
list[i].bdkjlx = "datepicker";
|
|
363
|
-
list[i].blm = "JSSJ";
|
|
364
|
-
list[i].bm = "ZHXG_GY_RCGL_JQLSJL";
|
|
365
|
-
list[i].sjcjfsdm = "01";
|
|
366
|
-
}
|
|
367
|
-
if (item.id === this.state.columns.sqyy) {
|
|
368
|
-
list[i].bdkjcs = '{"name":"多行文本输入组件","type":"textarea","widthType":"default","widthStr":"","patternTag":"","placeholder":"请说明申请原因","required":false,"defaultValue":"","validationValueType":"string","maxRows":1000,"minRows":1,"maxLength":""}';
|
|
369
|
-
list[i].bdkjlx = "textarea";
|
|
370
|
-
list[i].blm = "SQYY";
|
|
371
|
-
list[i].bm = "ZHXG_GY_RCGL_JQLSJL";
|
|
372
|
-
list[i].sjcjfsdm = "01";
|
|
373
|
-
}
|
|
374
|
-
if (item.id === this.state.columns.lxfs) {
|
|
375
|
-
list[i].bdkjcs = '{"name":"单行文本输入组件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":false,"defaultValue":"","validationValueType":"string"}';
|
|
376
|
-
list[i].bdkjlx = "input";
|
|
377
|
-
list[i].blm = "LXFS";
|
|
378
|
-
list[i].bm = "ZHXG_GY_RCGL_JQLSJL";
|
|
379
|
-
list[i].sjcjfsdm = "01";
|
|
380
|
-
}
|
|
381
|
-
if (item.id === this.state.columns.fdylxfs) {
|
|
382
|
-
list[i].bdkjcs = '{"name":"单行文本输入组件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":false,"defaultValue":"","validationValueType":"string"}';
|
|
383
|
-
list[i].bdkjlx = "input";
|
|
384
|
-
list[i].blm = "FDYLXFS";
|
|
385
|
-
list[i].bm = "ZHXG_GY_RCGL_JQLSJL";
|
|
386
|
-
list[i].sjcjfsdm = "01";
|
|
387
|
-
}
|
|
388
|
-
if (item.id === this.state.columns.lscw) {
|
|
389
|
-
list[i].bdkjcs = '{"name":"级联下拉选择器组件","type":"nhcascader","widthType":"default","widthStr":"","dataTag":"zhxg_gy_lszscwcx","required":false,"defaultValue":[],"validationValueType":"array","baseUrl":"api/zhxg-gyrcgl",' + '"flexibleUrl":"/openapi/getCwCascader","changeOnSelect":false,"params":{"xsid":"' + this.props.objId + '"}}';
|
|
390
|
-
list[i].bdkjlx = "nhcascader";
|
|
391
|
-
list[i].blm = "CWID";
|
|
392
|
-
list[i].bm = "ZHXG_GY_RCGL_JQLSJL";
|
|
393
|
-
list[i].sjcjfsdm = "01";
|
|
394
|
-
}
|
|
395
|
-
if (item.id === this.state.columns.fdy) {
|
|
396
|
-
list[i].bdkjcs = '{"name":"下拉选择器组件","type":"select","widthType":"default","widthStr":"","dataTag":"DMK_XSXX_JKZKM","required":false,"defaultValue":"","validationValueType":"string","baseUrl":"api/zhxg-gyrcgl","flexibleUrl":"/openapi/getXYFDY","params":{"xsid":"' + this.props.objId + '"}}';
|
|
397
|
-
list[i].bdkjlx = "select";
|
|
398
|
-
list[i].blm = "FDY";
|
|
399
|
-
list[i].bm = "ZHXG_GY_RCGL_JQLSJL";
|
|
400
|
-
list[i].sjcjfsdm = "01";
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* 保存方法,该方法必须存在
|
|
407
|
-
* 改分类的信息保存成功后,调用func方法进行后续信息的保存
|
|
408
|
-
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
/**
|
|
412
|
-
* 值改变事件
|
|
413
|
-
*/
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* 校验该分类表单是否全部填写完成
|
|
418
|
-
*/
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
/** editCheck模式下 关闭编辑 */
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
/** editCheck模式下 开启编辑 */
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
/** editCheck模式下 取消编辑 将上次编辑保存备份数据preEditCacheList赋值给list */
|
|
428
|
-
|
|
429
|
-
}, {
|
|
430
|
-
key: "render",
|
|
431
|
-
value: function render() {
|
|
432
|
-
var _this2 = this;
|
|
433
|
-
|
|
434
|
-
var _props = this.props,
|
|
435
|
-
data = _props.data,
|
|
436
|
-
showTitle = _props.showTitle,
|
|
437
|
-
showHeader = _props.showHeader,
|
|
438
|
-
model = _props.model; //data 是这一条分类的信息
|
|
439
|
-
|
|
440
|
-
var isEdit = this.state.isEdit;
|
|
441
|
-
|
|
442
|
-
var title = showHeader && showTitle ? data.flmc : "";
|
|
443
|
-
return _react2.default.createElement(_EditForm2.default, {
|
|
444
|
-
ref: function ref(form) {
|
|
445
|
-
_this2.nhEditForm = form;
|
|
446
|
-
},
|
|
447
|
-
isEdit: isEdit,
|
|
448
|
-
list: this.state.list,
|
|
449
|
-
onChange: this.onChange,
|
|
450
|
-
onEdit: this.onEdit,
|
|
451
|
-
onClose: this.onEditClose,
|
|
452
|
-
onCacheBack: this.onCacheBack,
|
|
453
|
-
title: title,
|
|
454
|
-
model: model
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
}]);
|
|
458
|
-
|
|
459
|
-
return InfoItem;
|
|
460
|
-
}(_react2.default.Component);
|
|
461
|
-
|
|
462
|
-
InfoItem.propTypes = {
|
|
463
|
-
title: _propTypes2.default.string,
|
|
464
|
-
showTitle: _propTypes2.default.bool,
|
|
465
|
-
showHeader: _propTypes2.default.bool
|
|
466
|
-
};
|
|
467
|
-
InfoItem.defaultProps = {
|
|
468
|
-
title: "Title", // 标题
|
|
469
|
-
showTitle: true,
|
|
470
|
-
showHeader: true
|
|
471
|
-
};
|
|
472
|
-
exports.default = InfoItem;
|