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