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,443 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _select = require('antd/lib/select');
|
|
8
|
-
|
|
9
|
-
var _select2 = _interopRequireDefault(_select);
|
|
10
|
-
|
|
11
|
-
var _datePicker = require('antd/lib/date-picker');
|
|
12
|
-
|
|
13
|
-
var _datePicker2 = _interopRequireDefault(_datePicker);
|
|
14
|
-
|
|
15
|
-
var _inputNumber = require('antd/lib/input-number');
|
|
16
|
-
|
|
17
|
-
var _inputNumber2 = _interopRequireDefault(_inputNumber);
|
|
18
|
-
|
|
19
|
-
var _row = require('antd/lib/row');
|
|
20
|
-
|
|
21
|
-
var _row2 = _interopRequireDefault(_row);
|
|
22
|
-
|
|
23
|
-
var _col = require('antd/lib/col');
|
|
24
|
-
|
|
25
|
-
var _col2 = _interopRequireDefault(_col);
|
|
26
|
-
|
|
27
|
-
var _message2 = require('antd/lib/message');
|
|
28
|
-
|
|
29
|
-
var _message3 = _interopRequireDefault(_message2);
|
|
30
|
-
|
|
31
|
-
var _stringify = require('babel-runtime/core-js/json/stringify');
|
|
32
|
-
|
|
33
|
-
var _stringify2 = _interopRequireDefault(_stringify);
|
|
34
|
-
|
|
35
|
-
var _extends2 = require('babel-runtime/helpers/extends');
|
|
36
|
-
|
|
37
|
-
var _extends3 = _interopRequireDefault(_extends2);
|
|
38
|
-
|
|
39
|
-
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
|
40
|
-
|
|
41
|
-
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
|
42
|
-
|
|
43
|
-
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
|
44
|
-
|
|
45
|
-
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
46
|
-
|
|
47
|
-
var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
48
|
-
|
|
49
|
-
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
50
|
-
|
|
51
|
-
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
|
52
|
-
|
|
53
|
-
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
|
54
|
-
|
|
55
|
-
var _inherits2 = require('babel-runtime/helpers/inherits');
|
|
56
|
-
|
|
57
|
-
var _inherits3 = _interopRequireDefault(_inherits2);
|
|
58
|
-
|
|
59
|
-
var _radio = require('antd/lib/radio');
|
|
60
|
-
|
|
61
|
-
var _radio2 = _interopRequireDefault(_radio);
|
|
62
|
-
|
|
63
|
-
require('antd/lib/select/style');
|
|
64
|
-
|
|
65
|
-
require('antd/lib/date-picker/style');
|
|
66
|
-
|
|
67
|
-
require('antd/lib/input-number/style');
|
|
68
|
-
|
|
69
|
-
require('antd/lib/row/style');
|
|
70
|
-
|
|
71
|
-
require('antd/lib/col/style');
|
|
72
|
-
|
|
73
|
-
require('antd/lib/message/style');
|
|
74
|
-
|
|
75
|
-
require('antd/lib/radio/style');
|
|
76
|
-
|
|
77
|
-
var _react = require('react');
|
|
78
|
-
|
|
79
|
-
var _react2 = _interopRequireDefault(_react);
|
|
80
|
-
|
|
81
|
-
var _inputConst = require('./input-const');
|
|
82
|
-
|
|
83
|
-
var _moment = require('moment');
|
|
84
|
-
|
|
85
|
-
var _moment2 = _interopRequireDefault(_moment);
|
|
86
|
-
|
|
87
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
88
|
-
|
|
89
|
-
var RadioGroup = _radio2.default.Group;
|
|
90
|
-
|
|
91
|
-
//最小宽度
|
|
92
|
-
var minWidth = 1;
|
|
93
|
-
|
|
94
|
-
/*
|
|
95
|
-
* @Description:日期时间控件
|
|
96
|
-
* @Author: zengweijin
|
|
97
|
-
* @LastEditors: zengweijin
|
|
98
|
-
* @Date: 2019-04-09 09:24:19
|
|
99
|
-
* @LastEditTime: 2019-04-29 16:35:49
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
var SettingDateTimePicker = function (_React$Component) {
|
|
103
|
-
(0, _inherits3.default)(SettingDateTimePicker, _React$Component);
|
|
104
|
-
|
|
105
|
-
function SettingDateTimePicker(props) {
|
|
106
|
-
(0, _classCallCheck3.default)(this, SettingDateTimePicker);
|
|
107
|
-
|
|
108
|
-
var _this = (0, _possibleConstructorReturn3.default)(this, (SettingDateTimePicker.__proto__ || (0, _getPrototypeOf2.default)(SettingDateTimePicker)).call(this, props));
|
|
109
|
-
|
|
110
|
-
_this.getFeature = function () {
|
|
111
|
-
return _this.state.feature;
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
_this.handleWidthRadioChange = function (e) {
|
|
115
|
-
var widthType = e.target.value;
|
|
116
|
-
|
|
117
|
-
var fp = (0, _extends3.default)({}, _this.state.featureParams);
|
|
118
|
-
fp.widthType = widthType;
|
|
119
|
-
fp.widthStr = '';
|
|
120
|
-
|
|
121
|
-
_this.setState({ width: '', featureParams: fp });
|
|
122
|
-
_this.createFeature(fp);
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
_this.handleWidthChange = function (value) {
|
|
126
|
-
var widthStr = void 0;
|
|
127
|
-
var widthType = _this.state.featureParams.widthType;
|
|
128
|
-
|
|
129
|
-
if (widthType == _inputConst.WidthType.RELATIVE) {
|
|
130
|
-
widthStr = value + '%';
|
|
131
|
-
} else if (widthType == _inputConst.WidthType.FIXED) {
|
|
132
|
-
widthStr = value + 'px';
|
|
133
|
-
} else {
|
|
134
|
-
widthStr = '';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
var fp = (0, _extends3.default)({}, _this.state.featureParams);
|
|
138
|
-
fp.widthStr = widthStr;
|
|
139
|
-
|
|
140
|
-
_this.setState({ width: value, featureParams: fp });
|
|
141
|
-
_this.createFeature(fp);
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
_this.handleRequiredRadioChange = function (e) {
|
|
145
|
-
var required = e.target.value;
|
|
146
|
-
|
|
147
|
-
var fp = (0, _extends3.default)({}, _this.state.featureParams);
|
|
148
|
-
fp.required = required;
|
|
149
|
-
|
|
150
|
-
_this.setState({ featureParams: fp });
|
|
151
|
-
_this.createFeature(fp);
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
_this.handleDefaultValueChange = function (date, dateStr) {
|
|
155
|
-
var defaultValue = dateStr;
|
|
156
|
-
var fp = (0, _extends3.default)({}, _this.state.featureParams);
|
|
157
|
-
fp.defaultValue = defaultValue;
|
|
158
|
-
_this.setState({ featureParams: fp });
|
|
159
|
-
_this.createFeature(fp);
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
_this.handleFormatChange = function (value) {
|
|
163
|
-
var format = value;
|
|
164
|
-
var fp = (0, _extends3.default)({}, _this.state.featureParams);
|
|
165
|
-
fp.format = format;
|
|
166
|
-
_this.setState({ featureParams: fp });
|
|
167
|
-
_this.createFeature(fp);
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
_this.createFeature = function (featureParams) {
|
|
171
|
-
|
|
172
|
-
try {
|
|
173
|
-
var feature = (0, _stringify2.default)(featureParams);
|
|
174
|
-
_this.setState({
|
|
175
|
-
feature: feature
|
|
176
|
-
});
|
|
177
|
-
_this.props.onChange(feature);
|
|
178
|
-
} catch (e) {
|
|
179
|
-
console.log(e);
|
|
180
|
-
_message3.default.error('生成控件配置参数出错!');
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
_this.state = {
|
|
185
|
-
feature: '', //原参数json字符串
|
|
186
|
-
width: minWidth, //设置的宽度值,初始为最小宽度值
|
|
187
|
-
featureParams: {
|
|
188
|
-
name: '日期时间控件',
|
|
189
|
-
type: _inputConst.InputType.DATETIMEPICKER, //控件类型,必须有此属性,用于渲染时期判断控件类型
|
|
190
|
-
widthType: _inputConst.WidthType.DEFAULT, //宽度类型:自适应'default'、百分比'relative'、固定值'fixed'
|
|
191
|
-
widthStr: '', //input宽度值
|
|
192
|
-
required: false, //是否必须
|
|
193
|
-
defaultValue: '', //默认值
|
|
194
|
-
format: 'YYYY-MM-DD HH:mm:ss',
|
|
195
|
-
validationValueType: 'object'
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
return _this;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
(0, _createClass3.default)(SettingDateTimePicker, [{
|
|
202
|
-
key: 'componentWillMount',
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
//在渲染前调用,可在此最后一次初始化组件状态
|
|
206
|
-
value: function componentWillMount() {
|
|
207
|
-
//将输入控件配置参数设置到状态中
|
|
208
|
-
if (this.props.initFeature) {
|
|
209
|
-
try {
|
|
210
|
-
var initFeature = JSON.parse(this.props.initFeature);
|
|
211
|
-
if (initFeature.type == _inputConst.InputType.DATETIMEPICKER) {
|
|
212
|
-
var widthType = initFeature.widthType,
|
|
213
|
-
_initFeature$widthStr = initFeature.widthStr,
|
|
214
|
-
widthStr = _initFeature$widthStr === undefined ? '' : _initFeature$widthStr,
|
|
215
|
-
_initFeature$required = initFeature.required,
|
|
216
|
-
required = _initFeature$required === undefined ? false : _initFeature$required,
|
|
217
|
-
_initFeature$defaultV = initFeature.defaultValue,
|
|
218
|
-
defaultValue = _initFeature$defaultV === undefined ? '' : _initFeature$defaultV,
|
|
219
|
-
format = initFeature.format;
|
|
220
|
-
|
|
221
|
-
var width = '';
|
|
222
|
-
|
|
223
|
-
if (widthType == _inputConst.WidthType.RELATIVE) {
|
|
224
|
-
width = widthStr.replace('%', '');
|
|
225
|
-
} else if (widthType == _inputConst.WidthType.FIXED) {
|
|
226
|
-
width = widthStr.replace('px', '');
|
|
227
|
-
}
|
|
228
|
-
var fp = (0, _extends3.default)({}, this.state.featureParams);
|
|
229
|
-
fp.widthType = widthType;
|
|
230
|
-
fp.widthStr = widthStr;
|
|
231
|
-
fp.required = required;
|
|
232
|
-
fp.defaultValue = defaultValue;
|
|
233
|
-
fp.format = format;
|
|
234
|
-
this.setState({
|
|
235
|
-
feature: this.props.initFeature,
|
|
236
|
-
width: width,
|
|
237
|
-
featureParams: fp
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
} catch (e) {
|
|
241
|
-
_message3.default.error('解析控件配置参数出错!');
|
|
242
|
-
}
|
|
243
|
-
} else {
|
|
244
|
-
try {
|
|
245
|
-
var feature = (0, _stringify2.default)(this.state.featureParams);
|
|
246
|
-
this.setState({
|
|
247
|
-
feature: feature
|
|
248
|
-
});
|
|
249
|
-
} catch (e) {
|
|
250
|
-
console.log(e);
|
|
251
|
-
_message3.default.error('生成控件配置参数出错!');
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
//供父组件获取feature
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
//切换宽度类型radio时回调,清空之前的值
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
//宽度值改变的时候,同步更新状态参数
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
//是否必填
|
|
266
|
-
|
|
267
|
-
//当输入默认值改变时
|
|
268
|
-
|
|
269
|
-
// 日期时间格式
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
//生成feature参数json字符串
|
|
273
|
-
|
|
274
|
-
}, {
|
|
275
|
-
key: 'render',
|
|
276
|
-
value: function render() {
|
|
277
|
-
|
|
278
|
-
var width = this.state.width;
|
|
279
|
-
var _state$featureParams = this.state.featureParams,
|
|
280
|
-
widthType = _state$featureParams.widthType,
|
|
281
|
-
required = _state$featureParams.required,
|
|
282
|
-
defaultValue = _state$featureParams.defaultValue,
|
|
283
|
-
showTime = _state$featureParams.showTime,
|
|
284
|
-
format = _state$featureParams.format;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
return _react2.default.createElement(
|
|
288
|
-
'div',
|
|
289
|
-
{ id: 'input-setting-div' },
|
|
290
|
-
_react2.default.createElement(
|
|
291
|
-
_row2.default,
|
|
292
|
-
{ type: 'flex' },
|
|
293
|
-
_react2.default.createElement(
|
|
294
|
-
_col2.default,
|
|
295
|
-
null,
|
|
296
|
-
_react2.default.createElement(
|
|
297
|
-
'div',
|
|
298
|
-
{ style: { margin: "16px 0" } },
|
|
299
|
-
'\u5BBD\u5EA6'
|
|
300
|
-
)
|
|
301
|
-
)
|
|
302
|
-
),
|
|
303
|
-
_react2.default.createElement(
|
|
304
|
-
_row2.default,
|
|
305
|
-
{ type: 'flex' },
|
|
306
|
-
_react2.default.createElement(
|
|
307
|
-
_col2.default,
|
|
308
|
-
null,
|
|
309
|
-
_react2.default.createElement(
|
|
310
|
-
RadioGroup,
|
|
311
|
-
{ onChange: this.handleWidthRadioChange, name: 'widthradiogroup',
|
|
312
|
-
value: widthType },
|
|
313
|
-
_react2.default.createElement(
|
|
314
|
-
_radio2.default,
|
|
315
|
-
{ value: _inputConst.WidthType.DEFAULT },
|
|
316
|
-
'\u81EA\u9002\u5E94'
|
|
317
|
-
),
|
|
318
|
-
_react2.default.createElement(
|
|
319
|
-
_radio2.default,
|
|
320
|
-
{ value: _inputConst.WidthType.RELATIVE },
|
|
321
|
-
'\u767E\u5206\u6BD4'
|
|
322
|
-
),
|
|
323
|
-
_react2.default.createElement(
|
|
324
|
-
_radio2.default,
|
|
325
|
-
{ value: _inputConst.WidthType.FIXED },
|
|
326
|
-
'\u56FA\u5B9A\u5BBD\u5EA6'
|
|
327
|
-
)
|
|
328
|
-
)
|
|
329
|
-
),
|
|
330
|
-
_react2.default.createElement(
|
|
331
|
-
_col2.default,
|
|
332
|
-
null,
|
|
333
|
-
widthType == _inputConst.WidthType.RELATIVE ? _react2.default.createElement(_inputNumber2.default, { size: 'small',
|
|
334
|
-
min: minWidth,
|
|
335
|
-
formatter: function formatter(value) {
|
|
336
|
-
return value + '%';
|
|
337
|
-
},
|
|
338
|
-
parser: function parser(value) {
|
|
339
|
-
return value.replace('%', '');
|
|
340
|
-
},
|
|
341
|
-
onChange: this.handleWidthChange,
|
|
342
|
-
value: width }) : widthType == _inputConst.WidthType.FIXED ? _react2.default.createElement(_inputNumber2.default, { size: 'small',
|
|
343
|
-
min: minWidth,
|
|
344
|
-
formatter: function formatter(value) {
|
|
345
|
-
return value + 'px';
|
|
346
|
-
},
|
|
347
|
-
parser: function parser(value) {
|
|
348
|
-
return value.replace('px', '');
|
|
349
|
-
},
|
|
350
|
-
onChange: this.handleWidthChange,
|
|
351
|
-
value: width }) : null
|
|
352
|
-
)
|
|
353
|
-
),
|
|
354
|
-
_react2.default.createElement(
|
|
355
|
-
_row2.default,
|
|
356
|
-
{ type: 'flex' },
|
|
357
|
-
_react2.default.createElement(
|
|
358
|
-
_col2.default,
|
|
359
|
-
null,
|
|
360
|
-
_react2.default.createElement(
|
|
361
|
-
'div',
|
|
362
|
-
{ style: { margin: "16px 0" } },
|
|
363
|
-
'\u662F\u5426\u5FC5\u586B'
|
|
364
|
-
)
|
|
365
|
-
)
|
|
366
|
-
),
|
|
367
|
-
_react2.default.createElement(
|
|
368
|
-
_row2.default,
|
|
369
|
-
{ type: 'flex' },
|
|
370
|
-
_react2.default.createElement(
|
|
371
|
-
_col2.default,
|
|
372
|
-
null,
|
|
373
|
-
_react2.default.createElement(
|
|
374
|
-
RadioGroup,
|
|
375
|
-
{ onChange: this.handleRequiredRadioChange, name: 'requiredradiogroup',
|
|
376
|
-
value: required },
|
|
377
|
-
_react2.default.createElement(
|
|
378
|
-
_radio2.default,
|
|
379
|
-
{ value: false },
|
|
380
|
-
'\u975E\u5FC5\u586B'
|
|
381
|
-
),
|
|
382
|
-
_react2.default.createElement(
|
|
383
|
-
_radio2.default,
|
|
384
|
-
{ value: true },
|
|
385
|
-
'\u5FC5\u586B'
|
|
386
|
-
)
|
|
387
|
-
)
|
|
388
|
-
)
|
|
389
|
-
),
|
|
390
|
-
_react2.default.createElement(
|
|
391
|
-
_row2.default,
|
|
392
|
-
{ type: 'flex' },
|
|
393
|
-
_react2.default.createElement(
|
|
394
|
-
_col2.default,
|
|
395
|
-
{ span: 24 },
|
|
396
|
-
_react2.default.createElement(
|
|
397
|
-
'div',
|
|
398
|
-
{ style: { margin: "16px 0" } },
|
|
399
|
-
'\u9ED8\u8BA4\u503C | \u65E5\u671F\u65F6\u95F4\u683C\u5F0F'
|
|
400
|
-
)
|
|
401
|
-
)
|
|
402
|
-
),
|
|
403
|
-
_react2.default.createElement(
|
|
404
|
-
_row2.default,
|
|
405
|
-
{ type: 'flex' },
|
|
406
|
-
_react2.default.createElement(
|
|
407
|
-
_col2.default,
|
|
408
|
-
{ span: 12 },
|
|
409
|
-
_react2.default.createElement(_datePicker2.default, { showTime: true, placeholder: '\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C', value: defaultValue ? (0, _moment2.default)(new Date(defaultValue), 'yyyy-MM-dd HH:mm:ss') : undefined, onChange: this.handleDefaultValueChange, format: format })
|
|
410
|
-
),
|
|
411
|
-
_react2.default.createElement(
|
|
412
|
-
_col2.default,
|
|
413
|
-
{ span: 12 },
|
|
414
|
-
_react2.default.createElement(
|
|
415
|
-
_select2.default,
|
|
416
|
-
{ dropdownMatchSelectWidth: false, onChange: this.handleFormatChange, value: format },
|
|
417
|
-
_react2.default.createElement(
|
|
418
|
-
_select2.default.Option,
|
|
419
|
-
{ value: 'YYYY-MM-DD HH:mm:ss' },
|
|
420
|
-
'YYYY-MM-DD HH:mm:ss'
|
|
421
|
-
),
|
|
422
|
-
_react2.default.createElement(
|
|
423
|
-
_select2.default.Option,
|
|
424
|
-
{ value: 'YYYY-MM-DD HH:mm' },
|
|
425
|
-
'YYYY-MM-DD HH:mm'
|
|
426
|
-
),
|
|
427
|
-
_react2.default.createElement(
|
|
428
|
-
_select2.default.Option,
|
|
429
|
-
{ value: 'YYYY-MM-DD HH' },
|
|
430
|
-
'YYYY-MM-DD HH'
|
|
431
|
-
)
|
|
432
|
-
)
|
|
433
|
-
)
|
|
434
|
-
)
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
}]);
|
|
438
|
-
return SettingDateTimePicker;
|
|
439
|
-
}(_react2.default.Component);
|
|
440
|
-
|
|
441
|
-
SettingDateTimePicker.defaultProps = {
|
|
442
|
-
initFeature: '' };
|
|
443
|
-
exports.default = SettingDateTimePicker;
|