dlt-for-react 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +9 -2
  2. package/lib/index.js +13 -1
  3. package/lib/layouts/LeftMenu/index.js +322 -296
  4. package/lib/layouts/Top/index.js +1 -1
  5. package/lib/layouts/layout/index.js +77 -31
  6. package/lib/layouts/mixTop/index.js +3 -3
  7. package/lib/utils/createUuid.js +31 -11
  8. package/lib/utils/getLoginUser.js +1 -1
  9. package/lib/utils/getSize.js +11 -2
  10. package/lib/utils/index.js +46 -2
  11. package/package.json +1 -1
  12. package/lib/components/Button/index.js +0 -79
  13. package/lib/components/NHAuditPanel/config/Axios.js +0 -263
  14. package/lib/components/NHAuditPanel/config/api.js +0 -479
  15. package/lib/components/NHAuditPanel/config/data.js +0 -156
  16. package/lib/components/NHAuditPanel/config/typeMap.js +0 -1234
  17. package/lib/components/NHAuditPanel/config/uiValidate.js +0 -92
  18. package/lib/components/NHAuditPanel/index.js +0 -413
  19. package/lib/components/NHAuditPanel/node.js +0 -619
  20. package/lib/components/NHCascader/index.js +0 -355
  21. package/lib/components/NHCheckboxGroup/index.js +0 -135
  22. package/lib/components/NHDynamicFormShow/baseInfo/index.js +0 -194
  23. package/lib/components/NHDynamicFormShow/custom/index.js +0 -553
  24. package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +0 -43
  25. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +0 -1113
  26. package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +0 -263
  27. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +0 -880
  28. package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +0 -171
  29. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +0 -865
  30. package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +0 -138
  31. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +0 -571
  32. package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +0 -147
  33. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +0 -474
  34. package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +0 -139
  35. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +0 -506
  36. package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +0 -143
  37. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +0 -1074
  38. package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +0 -172
  39. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +0 -927
  40. package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +0 -195
  41. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +0 -1064
  42. package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +0 -183
  43. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +0 -763
  44. package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +0 -137
  45. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +0 -819
  46. package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +0 -137
  47. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +0 -700
  48. package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +0 -162
  49. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +0 -743
  50. package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +0 -177
  51. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +0 -848
  52. package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +0 -138
  53. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +0 -777
  54. package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +0 -161
  55. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +0 -706
  56. package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +0 -130
  57. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +0 -413
  58. package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +0 -135
  59. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +0 -1013
  60. package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +0 -175
  61. package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +0 -1345
  62. package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +0 -274
  63. package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +0 -669
  64. package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +0 -134
  65. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +0 -378
  66. package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +0 -120
  67. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +0 -638
  68. package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +0 -133
  69. package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +0 -965
  70. package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +0 -237
  71. package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +0 -823
  72. package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +0 -188
  73. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +0 -401
  74. package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +0 -472
  75. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +0 -304
  76. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +0 -375
  77. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +0 -118
  78. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +0 -62
  79. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +0 -55
  80. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +0 -1238
  81. package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +0 -375
  82. package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +0 -554
  83. package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +0 -130
  84. package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +0 -542
  85. package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +0 -133
  86. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +0 -575
  87. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +0 -130
  88. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +0 -563
  89. package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +0 -133
  90. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +0 -745
  91. package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +0 -164
  92. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +0 -587
  93. package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +0 -143
  94. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +0 -743
  95. package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +0 -172
  96. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +0 -1410
  97. package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +0 -274
  98. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +0 -755
  99. package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +0 -130
  100. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +0 -814
  101. package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +0 -188
  102. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +0 -769
  103. package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +0 -130
  104. package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +0 -1004
  105. package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +0 -126
  106. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +0 -503
  107. package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +0 -149
  108. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +0 -379
  109. package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +0 -148
  110. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +0 -748
  111. package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +0 -135
  112. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +0 -762
  113. package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +0 -134
  114. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +0 -682
  115. package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +0 -135
  116. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +0 -152
  117. package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +0 -783
  118. package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +0 -764
  119. package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +0 -138
  120. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +0 -677
  121. package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +0 -138
  122. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +0 -1173
  123. package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +0 -242
  124. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +0 -862
  125. package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +0 -201
  126. package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +0 -196
  127. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +0 -167
  128. package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +0 -1096
  129. package/lib/components/NHDynamicFormShow/index.js +0 -647
  130. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +0 -279
  131. package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +0 -206
  132. package/lib/components/NHDynamicFormShow/oneOnMany/index.js +0 -419
  133. package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +0 -401
  134. package/lib/components/NHDynamicFormShow/oneOnOne/index.js +0 -271
  135. package/lib/components/NHImagePicker/index.js +0 -554
  136. package/lib/components/NHInputPicker/RadioGroup.js +0 -118
  137. package/lib/components/NHInputPicker/index.js +0 -62
  138. package/lib/components/NHInputPicker/input-const.js +0 -55
  139. package/lib/components/NHInputPicker/render.js +0 -1271
  140. package/lib/components/NHListView/index.js +0 -374
  141. package/lib/components/NHMapGeolocation/index.js +0 -537
  142. package/lib/components/NHMapGeolocation/initMap/initGdMap.js +0 -104
  143. package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +0 -138
  144. package/lib/components/NHMapGeolocation/style.js +0 -51
  145. package/lib/components/NHMultiSelect/index.js +0 -272
  146. package/lib/components/NHRadioGroup/index.js +0 -118
  147. package/lib/components/NHSelect/index.js +0 -364
  148. package/lib/components/NHTreeMenu/index.js +0 -126
  149. package/lib/components/NHTreeMenu/treeNode.js +0 -164
  150. package/lib/components/StuSelector/index.js +0 -611
  151. package/lib/layouts/KyInputPicker/edit-page.js +0 -585
  152. package/lib/layouts/KyInputPicker/index.js +0 -220
  153. package/lib/layouts/KyInputPicker/input-const.js +0 -134
  154. package/lib/layouts/KyInputPicker/render.js +0 -2477
  155. package/lib/layouts/KyInputPicker/setting-checkbox.js +0 -850
  156. package/lib/layouts/KyInputPicker/setting-datepicker.js +0 -430
  157. package/lib/layouts/KyInputPicker/setting-datetimepicker.js +0 -443
  158. package/lib/layouts/KyInputPicker/setting-input.js +0 -555
  159. package/lib/layouts/KyInputPicker/setting-inputNumber.js +0 -612
  160. package/lib/layouts/KyInputPicker/setting-monthpicker.js +0 -434
  161. package/lib/layouts/KyInputPicker/setting-multiSelect.js +0 -532
  162. package/lib/layouts/KyInputPicker/setting-nhcascader.js +0 -584
  163. package/lib/layouts/KyInputPicker/setting-old-upload.js +0 -428
  164. package/lib/layouts/KyInputPicker/setting-radio.js +0 -468
  165. package/lib/layouts/KyInputPicker/setting-rangepicker.js +0 -466
  166. package/lib/layouts/KyInputPicker/setting-select.js +0 -534
  167. package/lib/layouts/KyInputPicker/setting-stu-selector.js +0 -507
  168. package/lib/layouts/KyInputPicker/setting-switch.js +0 -274
  169. package/lib/layouts/KyInputPicker/setting-tea-selector.js +0 -507
  170. package/lib/layouts/KyInputPicker/setting-textarea.js +0 -619
  171. package/lib/layouts/KyInputPicker/setting-timepicker.js +0 -437
  172. package/lib/layouts/KyInputPicker/setting-upload.js +0 -766
  173. package/lib/layouts/KyModal/buildTitle.js +0 -81
  174. package/lib/layouts/KyModal/dragM.js +0 -127
  175. package/lib/layouts/KyModal/index.js +0 -321
  176. package/lib/layouts/KyPreview/index.js +0 -219
  177. package/lib/layouts/KyUpload/index.js +0 -1155
  178. package/lib/utils/browserJudge.js +0 -33
  179. package/lib/utils/dynamicLoadCss.js +0 -14
  180. package/lib/utils/dynamicLoadJs.js +0 -21
  181. package/lib/utils/getStyle.js +0 -26
  182. package/lib/utils/getSuitHeight.js +0 -49
  183. package/lib/utils/hasAuth.js +0 -11
  184. package/lib/utils/loadJS.js +0 -40
  185. /package/lib/layouts/{login → Login}/index-pre.js +0 -0
  186. /package/lib/layouts/{login → Login}/index.js +0 -0
  187. /package/lib/layouts/{login → Login}/login.js +0 -0
  188. /package/lib/layouts/{login → Login}/lyPassword.js +0 -0
@@ -1,279 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _button = require('antd-mobile/lib/button');
8
-
9
- var _button2 = _interopRequireDefault(_button);
10
-
11
- var _list = require('antd-mobile/lib/list');
12
-
13
- var _list2 = _interopRequireDefault(_list);
14
-
15
- var _toast = require('antd-mobile/lib/toast');
16
-
17
- var _toast2 = _interopRequireDefault(_toast);
18
-
19
- 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; };
20
-
21
- 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; }; }();
22
-
23
- require('antd-mobile/lib/button/style/css');
24
-
25
- require('antd-mobile/lib/list/style/css');
26
-
27
- require('antd-mobile/lib/toast/style/css');
28
-
29
- var _react = require('react');
30
-
31
- var _react2 = _interopRequireDefault(_react);
32
-
33
- var _propTypes = require('prop-types');
34
-
35
- var _propTypes2 = _interopRequireDefault(_propTypes);
36
-
37
- var _render = require('../../../../NHInputPicker/render');
38
-
39
- var _render2 = _interopRequireDefault(_render);
40
-
41
- var _moment = require('moment');
42
-
43
- var _moment2 = _interopRequireDefault(_moment);
44
-
45
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 CardItem = function (_React$Component) {
54
- _inherits(CardItem, _React$Component);
55
-
56
- function CardItem() {
57
- var _ref;
58
-
59
- var _temp, _this, _ret;
60
-
61
- _classCallCheck(this, CardItem);
62
-
63
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
64
- args[_key] = arguments[_key];
65
- }
66
-
67
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CardItem.__proto__ || Object.getPrototypeOf(CardItem)).call.apply(_ref, [this].concat(args))), _this), _this.onDelete = function (seq, id, data) {
68
- if (_this.props.onDelete) {
69
- _this.props.onDelete(seq, id, data);
70
- }
71
- }, _this.getDataList = function (titleList, data) {
72
- var dataList = [];
73
- if (titleList == null) {
74
- titleList = [];
75
- }
76
- var totalSpan = 0; // 到目前为止的所有列数
77
- var hasUseSpan = void 0; // 当前行已使用的列数
78
- titleList.map(function (item) {
79
- //此处只展示sfxs为1(显示)的字段
80
- if (item.sfxs === '1') {
81
- var span = 1;
82
- var required = item.sfbt === '1' ? true : false;
83
- var render = undefined;
84
-
85
- //表单控件类型bdkjlx为upload时span为3列
86
- if (item.bdkjlx === 'upload') {
87
- span = 3;
88
- // 以下操作是为了保证在剩余列数不为3列的情况下换行,
89
- hasUseSpan = totalSpan % 3;
90
- if (3 - hasUseSpan < span) {
91
- if (dataList.length > 0) {
92
- dataList[dataList.length - 1].span += 3 - hasUseSpan;
93
- totalSpan += 3 - hasUseSpan;
94
- }
95
- }
96
- }
97
- //表单控件类型bdkjlx为textarea时span为3列
98
- if (item.bdkjlx === 'textarea') {
99
- span = 3;
100
- // 以下操作是为了保证在剩余列数不为3列的情况下换行,
101
- hasUseSpan = totalSpan % 3;
102
- if (3 - hasUseSpan < span) {
103
- if (dataList.length > 0) {
104
- dataList[dataList.length - 1].span += 3 - hasUseSpan;
105
- totalSpan += 3 - hasUseSpan;
106
- }
107
- }
108
- }
109
- //表单控件类型bdkjlx为级联nhcascader、多选下拉框时span为2列
110
- if (item.bdkjlx === 'nhcascader' || item.bdkjlx === 'multiselect') {
111
- span = 2;
112
- // 以下操作是为了保证在一行剩余列数不为2列的情况下换行,
113
- hasUseSpan = totalSpan % 3;
114
- if (3 - hasUseSpan < span) {
115
- if (dataList.length > 0) {
116
- dataList[dataList.length - 1].span += 3 - hasUseSpan;
117
- totalSpan += 3 - hasUseSpan;
118
- }
119
- }
120
- }
121
- totalSpan += span;
122
-
123
- var dataMap = data[item.fieldName] !== undefined ? data[item.fieldName] : {};
124
- var deV = undefined;
125
- if (item.bdkjcs && item.bdkjcs !== "" && item.bdkjcs !== undefined) {
126
- var parameter = JSON.parse(item.bdkjcs);
127
- deV = parameter.defaultValue;
128
- }
129
- var value = dataMap.value ? dataMap.value : deV;
130
- //如果是日期(datepicker),初始化的值需要做处理
131
- if (item.bdkjlx === 'datepicker') {
132
- value = value ? (0, _moment2.default)(value, 'YYYY-MM-DD').toDate() : undefined;
133
- }
134
- //如果是日期时间(datetimepicker),初始化的值需要做处理
135
- if (item.bdkjlx === 'datetimepicker') {
136
- value = value ? (0, _moment2.default)(value, 'YYYY-MM-DD HH:mm:ss').toDate() : undefined;
137
- }
138
- if (item.bdkjlx === 'timepicker') {
139
- value = value ? (0, _moment2.default)(value, 'HH:mm:ss').toDate() : undefined;
140
- }
141
- //如果是日期范围(rangepicker),暂时不支持
142
- if (item.bdkjlx === 'rangepicker') {
143
- _toast2.default.error("表单不支持日期范围控件");
144
- }
145
-
146
- var otherParams = {};
147
- if (item.parentfieldid) {
148
- var row = titleList.find(function (row) {
149
- return row.id === item.parentfieldid;
150
- });
151
- if (row) {
152
- otherParams.parentValue = row.value;
153
- }
154
- }
155
-
156
- var formItemLayout = { wrapperCol: { span: 24 } };
157
- // let isEdit = this.props.isEdit && item.sfbj === '1' ? true : false;
158
- //let disabled = false;
159
- // 纠错编辑模式下 需要开放纠错编辑才显示可编辑
160
- var isEdit = true;
161
- if (_this.props.model == 'editCheck') {
162
- isEdit = item.sfkfjc === '1' ? true : false;
163
- };
164
- //是采集方式为表单控件,且是可编辑的状态
165
- if (item.sjcjfsdm === '01') {
166
- //disabled=!(item.sfbj == '1' );
167
- if (item.sfbj == '1' && isEdit) {
168
- render = function render() {
169
- return _react2.default.createElement(_render2.default, _extends({
170
- key: item.id,
171
- id: item.fieldName + data.fieldPrefix,
172
- label: item.title,
173
- value: value,
174
- form: _this.props.form,
175
- feature: item.bdkjcs,
176
- required: required,
177
- hideLabel: true,
178
- formItemLayout: formItemLayout
179
- //disabled={disabled}
180
- }, otherParams, {
181
- onChange: function onChange(value, text) {
182
- _this.props.onChange(data.seq, item.fieldName, value, text, item);
183
- }
184
- }));
185
- };
186
- } else {
187
- render = function render() {
188
- return _react2.default.createElement(
189
- _list2.default.Item,
190
- { extra: item.text, key: item.id, wrap: true, multipleLine: true },
191
- item.title
192
- );
193
- };
194
- }
195
- }
196
-
197
- var map = {
198
- title: _react2.default.createElement(
199
- 'font',
200
- { className: 'dynamic-label-' + item.blm },
201
- item.title
202
- ),
203
- text: dataMap.text,
204
- required: required,
205
- render: render,
206
- span: span,
207
- id: item.id
208
- };
209
-
210
- dataList.push(map);
211
- }
212
- return item;
213
- });
214
- return dataList;
215
- }, _temp), _possibleConstructorReturn(_this, _ret);
216
- }
217
-
218
- _createClass(CardItem, [{
219
- key: 'render',
220
- value: function render() {
221
- var _this2 = this;
222
-
223
- var _props = this.props,
224
- isEdit = _props.isEdit,
225
- titleList = _props.titleList,
226
- data = _props.data,
227
- model = _props.model;
228
-
229
-
230
- var dataList = this.getDataList(titleList, data);
231
- return _react2.default.createElement(
232
- 'div',
233
- null,
234
- _react2.default.createElement(
235
- _list2.default,
236
- null,
237
- dataList.map(function (item) {
238
- if (isEdit) {
239
- return item.render();
240
- } else {
241
- return _react2.default.createElement(
242
- _list2.default.Item,
243
- { extra: item.text, wrap: true, key: item.id, multipleLine: true },
244
- item.title
245
- );
246
- }
247
- })
248
- ),
249
- isEdit ? model !== 'editCheck' || model === 'editCheck' && !data.id ? _react2.default.createElement(
250
- 'div',
251
- null,
252
- _react2.default.createElement(
253
- _button2.default,
254
- { icon: 'cross', type: 'ghost', size: 'small', onClick: function onClick() {
255
- return _this2.onDelete(data.seq, data.id, data);
256
- } },
257
- '\u5220\u9664'
258
- )
259
- ) :
260
- // 如果为纠错编辑模式下 非新增的不显示删除按钮 暂时只考虑补录的情况
261
- null : null,
262
- _react2.default.createElement('br', null)
263
- );
264
- }
265
- }]);
266
-
267
- return CardItem;
268
- }(_react2.default.Component);
269
-
270
- CardItem.propTypes = {
271
- order: _propTypes2.default.any,
272
- isEdit: _propTypes2.default.bool,
273
- onDelete: _propTypes2.default.func
274
- };
275
- CardItem.defaultProps = {
276
- order: "", // 序号
277
- isEdit: false // 是否正在编辑
278
- };
279
- exports.default = CardItem;
@@ -1,206 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _button = require('antd-mobile/lib/button');
8
-
9
- var _button2 = _interopRequireDefault(_button);
10
-
11
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
12
-
13
- 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; }; }();
14
-
15
- require('antd-mobile/lib/button/style/css');
16
-
17
- var _react = require('react');
18
-
19
- var _react2 = _interopRequireDefault(_react);
20
-
21
- var _rcForm = require('rc-form');
22
-
23
- var _index = require('./cardItem/index');
24
-
25
- var _index2 = _interopRequireDefault(_index);
26
-
27
- var _createUuid = require('../../../../utils/createUuid');
28
-
29
- var _createUuid2 = _interopRequireDefault(_createUuid);
30
-
31
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32
-
33
- 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); } }
34
-
35
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
36
-
37
- 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; }
38
-
39
- 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; }
40
-
41
- var Card = function (_React$Component) {
42
- _inherits(Card, _React$Component);
43
-
44
- function Card() {
45
- var _ref;
46
-
47
- var _temp, _this, _ret;
48
-
49
- _classCallCheck(this, Card);
50
-
51
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
52
- args[_key] = arguments[_key];
53
- }
54
-
55
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Card.__proto__ || Object.getPrototypeOf(Card)).call.apply(_ref, [this].concat(args))), _this), _this.onAdd = function () {
56
- var dataList = [].concat(_toConsumableArray(_this.props.dataList));
57
- dataList.push({
58
- seq: dataList.length + 1,
59
- fieldPrefix: (0, _createUuid2.default)()
60
- });
61
- if (_this.props.setDataList) {
62
- _this.props.setDataList(dataList);
63
- }
64
- }, _this.onClose = function (seq, id, data) {
65
- var dataList = [].concat(_toConsumableArray(_this.props.dataList));
66
- dataList = dataList.filter(function (item) {
67
- return item.seq !== seq;
68
- });
69
- dataList = dataList.map(function (item, index) {
70
- item.seq = index + 1;
71
- return item;
72
- });
73
- if (_this.props.setDataList) {
74
- _this.props.setDataList(dataList, id, data);
75
- }
76
- }, _this.onChange = function (seq, fieldName, v, t, item) {
77
- var value = v;
78
- var text = t;
79
- if (item.bdkjlx === 'nhcascader') {
80
- //如果值是级联,此时需要做处理
81
- value = "";
82
- text = "";
83
- t.map(function (map) {
84
- text += map.label;
85
- value = map.value;
86
- return map;
87
- });
88
- }
89
-
90
- var dataList = [].concat(_toConsumableArray(_this.props.dataList));
91
- var map = dataList[seq - 1] || {};
92
-
93
- if (map.id === undefined) {
94
- //说明是新增加的一条数据
95
- map[fieldName] = {
96
- text: text,
97
- value: value
98
- };
99
- map.isChange = true; //这个时候的值肯定是改变了的
100
- } else {
101
- //说明是本来就有的数据
102
- map[fieldName].text = text;
103
- map[fieldName].value = value;
104
- //此时需要判断所有的值是否存在改变
105
- var isChange = false;
106
- for (var key in map) {
107
- if (_typeof(map[key]) === 'object' && map[key].value !== map[key].initValue) {
108
- isChange = true;
109
- }
110
- }
111
- map.isChange = isChange;
112
- }
113
-
114
- if (_this.props.setDataList) {
115
- _this.props.setDataList(dataList);
116
- }
117
- }, _this.onCacheSave = function () {
118
- _this.props.onEditClose();
119
- }, _this.onCancel = function () {
120
- _this.props.onCacheBack();
121
- }, _temp), _possibleConstructorReturn(_this, _ret);
122
- }
123
-
124
- // 新增
125
-
126
-
127
- // 删除
128
-
129
-
130
- /**
131
- * 值的改变事件
132
- */
133
-
134
-
135
- // editCheck模式 点击保存缓存数据
136
-
137
-
138
- // editCheck模式,点击取消回退先前的数据
139
-
140
-
141
- _createClass(Card, [{
142
- key: 'render',
143
- value: function render() {
144
- var _this2 = this;
145
-
146
- var _props = this.props,
147
- isEdit = _props.isEdit,
148
- titleList = _props.titleList,
149
- dataList = _props.dataList,
150
- form = _props.form,
151
- model = _props.model;
152
-
153
- return _react2.default.createElement(
154
- 'div',
155
- null,
156
- _react2.default.createElement(
157
- 'form',
158
- null,
159
- dataList.map(function (item) {
160
- return _react2.default.createElement(_index2.default, {
161
- key: item.seq,
162
- order: item.seq,
163
- data: item,
164
- titleList: titleList,
165
- form: form,
166
- isEdit: isEdit,
167
- onDelete: _this2.onClose,
168
- onChange: _this2.onChange,
169
- model: model
170
- });
171
- })
172
- ),
173
- isEdit === true && dataList.length < this.props.tsxzzdz ? _react2.default.createElement(
174
- 'div',
175
- null,
176
- _react2.default.createElement(
177
- _button2.default,
178
- { icon: 'plus', type: 'ghost', size: 'small', onClick: this.onAdd },
179
- '\u6DFB\u52A0'
180
- )
181
- ) : null,
182
-
183
- // 纠错编辑模式
184
- isEdit === true && model === 'editCheck' && _react2.default.createElement(
185
- 'div',
186
- { style: { display: 'flex', justifyContent: 'space-around', margin: '10px 0px 5px 0' } },
187
- _react2.default.createElement(
188
- _button2.default,
189
- { type: 'primary', inline: true, size: 'small', onClick: this.onCacheSave },
190
- '\u4FDD\u5B58'
191
- ),
192
- _react2.default.createElement(
193
- _button2.default,
194
- { type: 'ghost', inline: true, size: 'small', onClick: this.onCancel },
195
- '\u53D6\u6D88'
196
- )
197
- )
198
- );
199
- }
200
- }]);
201
-
202
- return Card;
203
- }(_react2.default.Component);
204
-
205
- var CardForm = (0, _rcForm.createForm)()(Card);
206
- exports.default = CardForm;