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,419 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _whiteSpace = require('antd-mobile/lib/white-space');
|
|
8
|
-
|
|
9
|
-
var _whiteSpace2 = _interopRequireDefault(_whiteSpace);
|
|
10
|
-
|
|
11
|
-
var _card = require('antd-mobile/lib/card');
|
|
12
|
-
|
|
13
|
-
var _card2 = _interopRequireDefault(_card);
|
|
14
|
-
|
|
15
|
-
var _toast = require('antd-mobile/lib/toast');
|
|
16
|
-
|
|
17
|
-
var _toast2 = _interopRequireDefault(_toast);
|
|
18
|
-
|
|
19
|
-
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; }; }();
|
|
20
|
-
|
|
21
|
-
require('antd-mobile/lib/white-space/style/css');
|
|
22
|
-
|
|
23
|
-
require('antd-mobile/lib/card/style/css');
|
|
24
|
-
|
|
25
|
-
require('antd-mobile/lib/toast/style/css');
|
|
26
|
-
|
|
27
|
-
var _react = require('react');
|
|
28
|
-
|
|
29
|
-
var _react2 = _interopRequireDefault(_react);
|
|
30
|
-
|
|
31
|
-
var _index = require('./cardForm/index');
|
|
32
|
-
|
|
33
|
-
var _index2 = _interopRequireDefault(_index);
|
|
34
|
-
|
|
35
|
-
var _NHFetch = require('../../../utils/NHFetch');
|
|
36
|
-
|
|
37
|
-
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
38
|
-
|
|
39
|
-
var _createUuid = require('../../../utils/createUuid');
|
|
40
|
-
|
|
41
|
-
var _createUuid2 = _interopRequireDefault(_createUuid);
|
|
42
|
-
|
|
43
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
44
|
-
|
|
45
|
-
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); } }
|
|
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 _ = require('lodash');
|
|
54
|
-
|
|
55
|
-
var OneOnMany = function (_React$Component) {
|
|
56
|
-
_inherits(OneOnMany, _React$Component);
|
|
57
|
-
|
|
58
|
-
function OneOnMany(props) {
|
|
59
|
-
_classCallCheck(this, OneOnMany);
|
|
60
|
-
|
|
61
|
-
var _this = _possibleConstructorReturn(this, (OneOnMany.__proto__ || Object.getPrototypeOf(OneOnMany)).call(this, props));
|
|
62
|
-
|
|
63
|
-
_this.initialOneOnManyInfo = function () {
|
|
64
|
-
var params = {
|
|
65
|
-
id: _this.props.objId,
|
|
66
|
-
bdid: _this.props.formId,
|
|
67
|
-
type: _this.props.model === "view" ? "1" : "2",
|
|
68
|
-
zdflid: _this.props.flid,
|
|
69
|
-
businessId: _this.props.pkid
|
|
70
|
-
};
|
|
71
|
-
if (_this.props.processId !== undefined) {
|
|
72
|
-
params.lcId = _this.props.processId;
|
|
73
|
-
}
|
|
74
|
-
if (_this.props.processApplyId !== undefined) {
|
|
75
|
-
params.lcsqid = _this.props.processApplyId; // 流程申请id
|
|
76
|
-
}
|
|
77
|
-
if (_this.props.rwid) {
|
|
78
|
-
params.rwid = _this.props.rwid; // 任务id
|
|
79
|
-
}
|
|
80
|
-
params.clientType = 'mobile';
|
|
81
|
-
(0, _NHFetch2.default)("api/sm-dynamic-form/dynamicShow/queryBdzdInfoOneMany", "GET", params).then(function (res) {
|
|
82
|
-
if (res && res.code === 200) {
|
|
83
|
-
var _OneOnMany = res.data || {};
|
|
84
|
-
//把通过接口方式获取值的功能实现
|
|
85
|
-
var titleList = _OneOnMany.titleList || [];
|
|
86
|
-
var dataList = _OneOnMany.dataList || [];
|
|
87
|
-
// 如果没有可以编辑的字段,则不显示新增按钮
|
|
88
|
-
var index = titleList.findIndex(function (item) {
|
|
89
|
-
return item.sfbj === '1';
|
|
90
|
-
});
|
|
91
|
-
var isEdit = false;
|
|
92
|
-
if (index > -1) {
|
|
93
|
-
isEdit = true;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// 判断字段是否存在必填项
|
|
97
|
-
var btIndex = titleList.findIndex(function (item) {
|
|
98
|
-
return item.sfbt === '1';
|
|
99
|
-
});
|
|
100
|
-
// 若是编辑状态 且存在必填的字段 且最小条数限制大于0 且初始数据为空 时,datalist增加n(最小条数)条空的数据,方便用户操作
|
|
101
|
-
if (isEdit && btIndex > -1 && _this.props.data.tsxzzxz > 0 && dataList.length === 0 && _this.props.model !== 'editCheck') {
|
|
102
|
-
for (var i = 0; i < _this.props.data.tsxzzxz; i++) {
|
|
103
|
-
dataList.push({
|
|
104
|
-
seq: dataList.length + 1,
|
|
105
|
-
fieldPrefix: (0, _createUuid2.default)()
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
_this.props.handlOneOnManyDataList({ flid: _this.props.flid, dataList: [].concat(_toConsumableArray(dataList)) });
|
|
111
|
-
_this.setState({
|
|
112
|
-
bm: titleList.length > 0 ? titleList[0].bm : "",
|
|
113
|
-
zsbm: titleList.length > 0 ? titleList[0].zsbm : "",
|
|
114
|
-
titleList: titleList,
|
|
115
|
-
dataList: dataList,
|
|
116
|
-
cacheDataList: _.cloneDeep(dataList),
|
|
117
|
-
isEdit: _this.state.isEdit && isEdit,
|
|
118
|
-
loading: false
|
|
119
|
-
}, function () {
|
|
120
|
-
var isAllNoEdit = true;
|
|
121
|
-
titleList.forEach(function (item) {
|
|
122
|
-
if (item.sfbj === '1') {
|
|
123
|
-
isAllNoEdit = false;
|
|
124
|
-
}
|
|
125
|
-
if (item.jkUrl !== null) {
|
|
126
|
-
var url = item.jkUrl;
|
|
127
|
-
(0, _NHFetch2.default)(url, "GET", params).then(function (res) {
|
|
128
|
-
if (res && res.code === 200) {
|
|
129
|
-
var result = res.data;
|
|
130
|
-
var zzd = item.zzd; //要获取的值字段名称
|
|
131
|
-
var wbzd = item.wbzd; //要获取的文本字段名称
|
|
132
|
-
var fieldName = item.fieldName; //接口获取的对应的字段
|
|
133
|
-
//遍历值集合替换里面的值
|
|
134
|
-
var list = _this.state.dataList.map(function (item) {
|
|
135
|
-
var valmap = {};
|
|
136
|
-
valmap = item[fieldName];
|
|
137
|
-
valmap.text = result[wbzd];
|
|
138
|
-
valmap.inittext = result[wbzd];
|
|
139
|
-
valmap.value = result[zzd];
|
|
140
|
-
valmap.initValue = result[zzd];
|
|
141
|
-
item[fieldName] = valmap;
|
|
142
|
-
return item;
|
|
143
|
-
});
|
|
144
|
-
_this.setState({
|
|
145
|
-
dataList: list,
|
|
146
|
-
cacheDataList: _.cloneDeep(list)
|
|
147
|
-
});
|
|
148
|
-
_this.props.handlOneOnManyDataList({ flid: _this.props.flid, dataList: [].concat(_toConsumableArray(list)) });
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
_this.setState({ isAllNoEdit: isAllNoEdit });
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
}).catch(function (e) {
|
|
157
|
-
console.log(e);_toast2.default.info("网络错误");
|
|
158
|
-
});
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
_this.setDataList = function (dataList, deleteId, deleList) {
|
|
162
|
-
var deleteIdList = [].concat(_toConsumableArray(_this.state.deleteIdList));
|
|
163
|
-
var deleteList = [].concat(_toConsumableArray(_this.state.deleteList));
|
|
164
|
-
if (deleteId === undefined) {
|
|
165
|
-
_this.setState({
|
|
166
|
-
dataList: dataList
|
|
167
|
-
});
|
|
168
|
-
} else {
|
|
169
|
-
deleteList.push(deleList);
|
|
170
|
-
deleteIdList.push(deleteId);
|
|
171
|
-
_this.setState({
|
|
172
|
-
dataList: dataList,
|
|
173
|
-
deleteIdList: deleteIdList,
|
|
174
|
-
deleteList: deleteList
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
var manyDetail = {
|
|
178
|
-
id: _this.props.objId,
|
|
179
|
-
sjkyh: _this.props.sjkyh,
|
|
180
|
-
dataList: [].concat(_toConsumableArray(dataList)),
|
|
181
|
-
deList: [].concat(_toConsumableArray(deleteIdList)),
|
|
182
|
-
bm: _this.state.bm,
|
|
183
|
-
zsbm: _this.state.zsbm,
|
|
184
|
-
flid: _this.props.flid,
|
|
185
|
-
baseUrl: _this.props.baseUrl,
|
|
186
|
-
flstdm: _this.props.flstdm,
|
|
187
|
-
titleList: [].concat(_toConsumableArray(_this.state.titleList)),
|
|
188
|
-
deletList: [].concat(_toConsumableArray(deleteList)),
|
|
189
|
-
businessId: _this.props.pkid,
|
|
190
|
-
rwid: _this.props.rwid,
|
|
191
|
-
userId: _this.props.objId
|
|
192
|
-
};
|
|
193
|
-
var _this$props = _this.props,
|
|
194
|
-
handlOneOnManyDetail = _this$props.handlOneOnManyDetail,
|
|
195
|
-
handlOneOnManyDataList = _this$props.handlOneOnManyDataList;
|
|
196
|
-
|
|
197
|
-
typeof handlOneOnManyDetail === 'function' && handlOneOnManyDetail(manyDetail, _this.state.cacheDataList);
|
|
198
|
-
typeof handlOneOnManyDataList === 'function' && handlOneOnManyDataList({ flid: _this.props.flid, dataList: dataList });
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
_this.validate = function (func) {
|
|
202
|
-
if (_this.nhEditForm) {
|
|
203
|
-
_this.nhEditForm.validateFields(function (err) {
|
|
204
|
-
var flag = true;
|
|
205
|
-
if (err) {
|
|
206
|
-
flag = false;
|
|
207
|
-
}
|
|
208
|
-
func(flag);
|
|
209
|
-
});
|
|
210
|
-
} else {
|
|
211
|
-
func(true);
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
_this.onEdit = function () {
|
|
216
|
-
_this.setState({
|
|
217
|
-
isEdit: true,
|
|
218
|
-
cacheDataList: _.cloneDeep(_this.state.dataList)
|
|
219
|
-
}, function () {
|
|
220
|
-
_this.props.editCheckShow && _this.props.editCheckShow();
|
|
221
|
-
});
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
_this.onEditClose = function () {
|
|
225
|
-
_this.setState({
|
|
226
|
-
isEdit: false
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
_this.onCacheBack = function () {
|
|
231
|
-
var dataList = _.cloneDeep(_this.state.cacheDataList);
|
|
232
|
-
var deleteIdList = [];
|
|
233
|
-
var deleteList = [];
|
|
234
|
-
_this.setState({
|
|
235
|
-
isEdit: false,
|
|
236
|
-
dataList: dataList,
|
|
237
|
-
deleteIdList: deleteIdList,
|
|
238
|
-
deleteList: deleteList
|
|
239
|
-
});
|
|
240
|
-
var manyDetail = {
|
|
241
|
-
id: _this.props.objId,
|
|
242
|
-
sjkyh: _this.props.sjkyh,
|
|
243
|
-
dataList: [].concat(_toConsumableArray(dataList)),
|
|
244
|
-
deList: [].concat(deleteIdList),
|
|
245
|
-
bm: _this.state.bm,
|
|
246
|
-
zsbm: _this.state.zsbm,
|
|
247
|
-
flid: _this.props.flid,
|
|
248
|
-
baseUrl: _this.props.baseUrl,
|
|
249
|
-
flstdm: _this.props.flstdm,
|
|
250
|
-
titleList: [].concat(_toConsumableArray(_this.state.titleList)),
|
|
251
|
-
deletList: [].concat(deleteList),
|
|
252
|
-
businessId: _this.props.pkid,
|
|
253
|
-
rwid: _this.props.rwid,
|
|
254
|
-
userId: _this.props.objId
|
|
255
|
-
};
|
|
256
|
-
var _this$props2 = _this.props,
|
|
257
|
-
handlOneOnManyDetail = _this$props2.handlOneOnManyDetail,
|
|
258
|
-
handlOneOnManyDataList = _this$props2.handlOneOnManyDataList;
|
|
259
|
-
|
|
260
|
-
typeof handlOneOnManyDetail === 'function' && handlOneOnManyDetail(manyDetail, _this.state.cacheDataList);
|
|
261
|
-
typeof handlOneOnManyDataList === 'function' && handlOneOnManyDataList({ flid: _this.props.flid, dataList: dataList });
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
_this.renderEdit = function () {
|
|
265
|
-
var _this$props3 = _this.props,
|
|
266
|
-
data = _this$props3.data,
|
|
267
|
-
showTitle = _this$props3.showTitle,
|
|
268
|
-
showHeader = _this$props3.showHeader,
|
|
269
|
-
model = _this$props3.model;
|
|
270
|
-
var _this$state = _this.state,
|
|
271
|
-
isEdit = _this$state.isEdit,
|
|
272
|
-
titleList = _this$state.titleList,
|
|
273
|
-
dataList = _this$state.dataList;
|
|
274
|
-
|
|
275
|
-
return _react2.default.createElement(
|
|
276
|
-
'div',
|
|
277
|
-
null,
|
|
278
|
-
_react2.default.createElement(
|
|
279
|
-
_card2.default,
|
|
280
|
-
{ full: true, className: 'editTypeCard' },
|
|
281
|
-
_react2.default.createElement(_card2.default.Header, {
|
|
282
|
-
title: showHeader && showTitle ? _react2.default.createElement(
|
|
283
|
-
'div',
|
|
284
|
-
{ style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
|
|
285
|
-
data.flmc
|
|
286
|
-
) : null
|
|
287
|
-
}),
|
|
288
|
-
_react2.default.createElement(
|
|
289
|
-
_card2.default.Body,
|
|
290
|
-
null,
|
|
291
|
-
_react2.default.createElement(_index2.default, {
|
|
292
|
-
ref: function ref(form) {
|
|
293
|
-
_this.nhEditForm = form;
|
|
294
|
-
},
|
|
295
|
-
isEdit: isEdit,
|
|
296
|
-
titleList: titleList,
|
|
297
|
-
tsxzzdz: data.tsxzzdz // 条数限制最大值
|
|
298
|
-
, dataList: dataList,
|
|
299
|
-
setDataList: _this.setDataList,
|
|
300
|
-
model: model,
|
|
301
|
-
onEditClose: _this.onEditClose,
|
|
302
|
-
onCacheBack: _this.onCacheBack
|
|
303
|
-
})
|
|
304
|
-
)
|
|
305
|
-
)
|
|
306
|
-
);
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
_this.renderView = function () {
|
|
310
|
-
var _this$props4 = _this.props,
|
|
311
|
-
data = _this$props4.data,
|
|
312
|
-
model = _this$props4.model;
|
|
313
|
-
var _this$state2 = _this.state,
|
|
314
|
-
titleList = _this$state2.titleList,
|
|
315
|
-
dataList = _this$state2.dataList;
|
|
316
|
-
// 该分类是否存在可编辑的纠错字段
|
|
317
|
-
|
|
318
|
-
var hasJczd = titleList.filter(function (item) {
|
|
319
|
-
return item.sfkfjc === '1' && item.sfbj === '1' && item.sfxs === '1';
|
|
320
|
-
}).length > 0;
|
|
321
|
-
var cardExtra = model === 'editCheck' && hasJczd ? _react2.default.createElement('img', { src: require('../../../../assets/NHDynamicFormShow/edit.svg'), style: { width: "0.4rem", height: "0.4rem", margin: "0px 5px" },
|
|
322
|
-
onClick: _this.onEdit }) : null;
|
|
323
|
-
return _react2.default.createElement(
|
|
324
|
-
_card2.default,
|
|
325
|
-
{ full: true },
|
|
326
|
-
_react2.default.createElement(_card2.default.Header, {
|
|
327
|
-
title: _react2.default.createElement(
|
|
328
|
-
'div',
|
|
329
|
-
{ style: { borderLeft: '3px solid #1890ff', paddingLeft: '10px' } },
|
|
330
|
-
data.flmc
|
|
331
|
-
),
|
|
332
|
-
extra: cardExtra
|
|
333
|
-
}),
|
|
334
|
-
dataList.length > 0 ? dataList.map(function (dataItem) {
|
|
335
|
-
return _react2.default.createElement(
|
|
336
|
-
_card2.default.Body,
|
|
337
|
-
{ key: dataItem.fieldPrefix },
|
|
338
|
-
titleList.map(function (titleItem) {
|
|
339
|
-
var dataMap = dataItem[titleItem.fieldName] || {};
|
|
340
|
-
return _react2.default.createElement(
|
|
341
|
-
'div',
|
|
342
|
-
{ key: titleItem.id },
|
|
343
|
-
_react2.default.createElement(
|
|
344
|
-
'font',
|
|
345
|
-
{ color: 'grey' },
|
|
346
|
-
titleItem.title
|
|
347
|
-
),
|
|
348
|
-
'\uFF1A',
|
|
349
|
-
dataMap.text
|
|
350
|
-
);
|
|
351
|
-
})
|
|
352
|
-
);
|
|
353
|
-
}) : _react2.default.createElement(
|
|
354
|
-
_card2.default.Body,
|
|
355
|
-
null,
|
|
356
|
-
'\u6682\u65E0\u6570\u636E'
|
|
357
|
-
)
|
|
358
|
-
);
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
_this.state = {
|
|
362
|
-
isEdit: props.model === "edit" && props.data.isEdit === "1" ? true : false, //当时编辑模式模式时,直接自动进入编辑模式
|
|
363
|
-
deleteIdList: [], //删除的id数据
|
|
364
|
-
cacheDataList: [], //缓存数据
|
|
365
|
-
cacheDeleteIdList: [], //缓存删除的id数据
|
|
366
|
-
deleteList: [],
|
|
367
|
-
OneOnManyList: {}, //后台数据查询到的数据集合
|
|
368
|
-
bm: "", //表名
|
|
369
|
-
loading: true,
|
|
370
|
-
isAllNoEdit: false,
|
|
371
|
-
titleList: [],
|
|
372
|
-
dataList: []
|
|
373
|
-
};
|
|
374
|
-
return _this;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
_createClass(OneOnMany, [{
|
|
378
|
-
key: 'componentDidMount',
|
|
379
|
-
value: function componentDidMount() {
|
|
380
|
-
this.initialOneOnManyInfo();
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
/**
|
|
384
|
-
* 校验该分类表单是否全部填写完成
|
|
385
|
-
*/
|
|
386
|
-
|
|
387
|
-
/** editCheck模式 打开编辑模式 将dataList缓存到cacheDataList中 */
|
|
388
|
-
|
|
389
|
-
/** editCheck模式 关闭编辑模式 */
|
|
390
|
-
|
|
391
|
-
/** editCheck模式 取消按钮后将原本缓存的数据 赋值给 dataList, 取消删除的数据*/
|
|
392
|
-
|
|
393
|
-
}, {
|
|
394
|
-
key: 'render',
|
|
395
|
-
value: function render() {
|
|
396
|
-
var isEdit = this.state.isEdit;
|
|
397
|
-
|
|
398
|
-
return _react2.default.createElement(
|
|
399
|
-
'div',
|
|
400
|
-
null,
|
|
401
|
-
isEdit ? this.renderEdit() : this.renderView(),
|
|
402
|
-
_react2.default.createElement(_whiteSpace2.default, { size: 'lg' }),
|
|
403
|
-
_react2.default.createElement(
|
|
404
|
-
'style',
|
|
405
|
-
{ global: 'true', jsx: 'true' },
|
|
406
|
-
'\n .editTypeCard .am-card-body{\n padding: 0 !important;\n }\n .editTypeCard .am-card-body .nh-inputrender .am-list-item.am-list-item-middle .am-list-line{\n border-bottom: 1px solid #ddd;\n }\n '
|
|
407
|
-
)
|
|
408
|
-
);
|
|
409
|
-
}
|
|
410
|
-
}]);
|
|
411
|
-
|
|
412
|
-
return OneOnMany;
|
|
413
|
-
}(_react2.default.Component);
|
|
414
|
-
|
|
415
|
-
OneOnMany.defaultProps = {
|
|
416
|
-
showHeader: true,
|
|
417
|
-
showTitle: true
|
|
418
|
-
};
|
|
419
|
-
exports.default = OneOnMany;
|