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,375 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _toast = require("antd-mobile/lib/toast");
|
|
8
|
+
|
|
9
|
+
var _toast2 = _interopRequireDefault(_toast);
|
|
10
|
+
|
|
11
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
12
|
+
|
|
13
|
+
require("antd-mobile/lib/toast/style/css");
|
|
14
|
+
|
|
15
|
+
var _react = require("react");
|
|
16
|
+
|
|
17
|
+
var _react2 = _interopRequireDefault(_react);
|
|
18
|
+
|
|
19
|
+
var _NHFetch = require("../../../../../utils/NHFetch");
|
|
20
|
+
|
|
21
|
+
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
22
|
+
|
|
23
|
+
var _EditForm = require("./EditForm");
|
|
24
|
+
|
|
25
|
+
var _EditForm2 = _interopRequireDefault(_EditForm);
|
|
26
|
+
|
|
27
|
+
var _propTypes = require("prop-types");
|
|
28
|
+
|
|
29
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
30
|
+
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
|
+
|
|
33
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
34
|
+
|
|
35
|
+
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; }
|
|
36
|
+
|
|
37
|
+
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; }
|
|
38
|
+
|
|
39
|
+
var TssqEditForm = function (_React$Component) {
|
|
40
|
+
_inherits(TssqEditForm, _React$Component);
|
|
41
|
+
|
|
42
|
+
function TssqEditForm(props) {
|
|
43
|
+
_classCallCheck(this, TssqEditForm);
|
|
44
|
+
|
|
45
|
+
var _this = _possibleConstructorReturn(this, (TssqEditForm.__proto__ || Object.getPrototypeOf(TssqEditForm)).call(this, props));
|
|
46
|
+
|
|
47
|
+
_this.InitialOneOnOneInfo = function () {
|
|
48
|
+
var params = {
|
|
49
|
+
id: _this.props.objId,
|
|
50
|
+
bdid: _this.props.formId,
|
|
51
|
+
type: '2', //this.props.model === "view" ? "1" : "2", 如果查看模式需要根据控件类型占不同的列,此处只能为'2'
|
|
52
|
+
zdflid: _this.props.flid,
|
|
53
|
+
clientType: "mobile"
|
|
54
|
+
};
|
|
55
|
+
if (_this.props.processId !== undefined) {
|
|
56
|
+
params.lcId = _this.props.processId;
|
|
57
|
+
}
|
|
58
|
+
if (_this.props.processApplyId !== undefined) {
|
|
59
|
+
params.lcsqid = _this.props.processApplyId;
|
|
60
|
+
}
|
|
61
|
+
if (_this.props.pkid !== undefined) {
|
|
62
|
+
params.pkid = _this.props.pkid;
|
|
63
|
+
}
|
|
64
|
+
if (_this.props.rwid) {
|
|
65
|
+
params.rwid = _this.props.rwid; // 任务id
|
|
66
|
+
}
|
|
67
|
+
(0, _NHFetch2.default)("api/sm-dynamic-form/dynamicShow/queryBdzdInfo", "GET", params).then(function (res) {
|
|
68
|
+
if (res) {
|
|
69
|
+
//把通过接口方式获取的功能实现
|
|
70
|
+
var listInfo = [];
|
|
71
|
+
if (res.data != null && res.data != "" && res.data != undefined) {
|
|
72
|
+
listInfo = res.data;
|
|
73
|
+
}
|
|
74
|
+
_this.setState({
|
|
75
|
+
list: listInfo,
|
|
76
|
+
loading: false
|
|
77
|
+
}, function () {
|
|
78
|
+
_this.state.list.map(function (item) {
|
|
79
|
+
if (item.jkUrl !== "" && item.jkUrl !== undefined && item.jkUrl !== null) {
|
|
80
|
+
var url = item.jkUrl;
|
|
81
|
+
(0, _NHFetch2.default)(url, "GET", params).then(function (res) {
|
|
82
|
+
if (res) {
|
|
83
|
+
var maps = {};
|
|
84
|
+
maps = res.data;
|
|
85
|
+
var zzd = item.zzd; //要获取的值字段名称
|
|
86
|
+
var wbzd = item.wbzd; //要获取的文本字段名称
|
|
87
|
+
item.text = maps[wbzd];
|
|
88
|
+
item.inittext = maps[wbzd];
|
|
89
|
+
item.value = maps[zzd];
|
|
90
|
+
item.initValue = maps[zzd];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
_this.setState({
|
|
94
|
+
list: _this.state.list
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
return item;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
_this.getTsgl(_this.props.pkid);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
_this.getGender(_this.props.processApplyId);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
_this.save = function (func, failCallback) {
|
|
109
|
+
var _this$props = _this.props,
|
|
110
|
+
processApplyId = _this$props.processApplyId,
|
|
111
|
+
objId = _this$props.objId,
|
|
112
|
+
pkid = _this$props.pkid,
|
|
113
|
+
fieldMap = _this$props.fieldMap;
|
|
114
|
+
var formData = _this.state.formData;
|
|
115
|
+
// console.log("props:", this.props)
|
|
116
|
+
// console.log("state", this.state)
|
|
117
|
+
|
|
118
|
+
var param = formData;
|
|
119
|
+
param.pkid = pkid;
|
|
120
|
+
// param.gzfbid = params.pcid,
|
|
121
|
+
param.xsid = objId;
|
|
122
|
+
param.lcslid = processApplyId;
|
|
123
|
+
param.xn = fieldMap['XN'].value;
|
|
124
|
+
param.xq = fieldMap['XQ'].value;
|
|
125
|
+
param.sjly = 2;
|
|
126
|
+
for (var i = 0; i < _this.state.list.length; i++) {
|
|
127
|
+
var item = _this.state.list[i];
|
|
128
|
+
if (item.title === "调宿原因") {
|
|
129
|
+
param.tsyy = item.value;
|
|
130
|
+
}
|
|
131
|
+
if (item.title === "调宿原因说明") {
|
|
132
|
+
param.tsyysm = item.text;
|
|
133
|
+
}
|
|
134
|
+
if (item.title === "调整床位") {
|
|
135
|
+
param.xcwid = item.value;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
console.log("提交参数", param);
|
|
139
|
+
var list = [param.fjid];
|
|
140
|
+
(0, _NHFetch2.default)('front/zhxg-unauth/dynamic/save', 'POST', list).then(function (res) {
|
|
141
|
+
if (res && res.code === 200) {
|
|
142
|
+
(0, _NHFetch2.default)('api/zhxg-gyrcgl/openapi/saveTssq', 'POST', param).then(function (res) {
|
|
143
|
+
if (res && res.code === 200) {
|
|
144
|
+
func();
|
|
145
|
+
} else {
|
|
146
|
+
failCallback && failCallback();
|
|
147
|
+
_toast2.default.fail("表单保存失败,请联系管理员!");
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
} else {
|
|
151
|
+
_toast2.default.fail("保存失败");
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
_this.onChange = function (seq, value, text, isChange) {
|
|
157
|
+
var list = _this.state.list;
|
|
158
|
+
if (list[seq - 1] !== undefined) {
|
|
159
|
+
list[seq - 1].text = text;
|
|
160
|
+
list[seq - 1].value = value;
|
|
161
|
+
//判断值是否有改变
|
|
162
|
+
if (isChange !== "" && isChange !== undefined) {
|
|
163
|
+
list[seq - 1].isChange = isChange;
|
|
164
|
+
} else {
|
|
165
|
+
if (list[seq - 1].value === list[seq - 1].initValue || !value && list[seq - 1].initValue === '') {
|
|
166
|
+
list[seq - 1].isChange = false;
|
|
167
|
+
} else {
|
|
168
|
+
list[seq - 1].isChange = true;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
_this.setState({
|
|
172
|
+
list: list
|
|
173
|
+
});
|
|
174
|
+
var oneONOneInfo = {
|
|
175
|
+
id: _this.props.objId,
|
|
176
|
+
sjkyh: _this.props.sjkyh,
|
|
177
|
+
dto: _this.state.list,
|
|
178
|
+
flid: _this.props.flid,
|
|
179
|
+
baseUrl: _this.props.baseUrl,
|
|
180
|
+
flstdm: _this.props.flstdm,
|
|
181
|
+
pkid: _this.props.pkid === undefined ? null : _this.props.pkid,
|
|
182
|
+
lcslid: _this.props.processApplyId
|
|
183
|
+
};
|
|
184
|
+
_this.props.handlOneOnDetail(oneONOneInfo);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
_this.validate = function (func) {
|
|
189
|
+
if (_this.nhEditForm) {
|
|
190
|
+
_this.nhEditForm.validateFields(function (err, formData) {
|
|
191
|
+
if (err) {
|
|
192
|
+
func(false);
|
|
193
|
+
} else {
|
|
194
|
+
_this.setState({ formData: formData }, function () {
|
|
195
|
+
func(true);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
} else {
|
|
200
|
+
func(true);
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
_this.getGender = function (lcsqid) {
|
|
205
|
+
var params = {
|
|
206
|
+
lcsqid: lcsqid
|
|
207
|
+
};
|
|
208
|
+
(0, _NHFetch2.default)('api/zhxg-gyrcgl/tsgl/selectXbm', 'GET', params).then(function (res) {
|
|
209
|
+
if (res && res.data) {
|
|
210
|
+
_this.setState({ gender: res.data });
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
_this.getTsgl = function (pkid) {
|
|
216
|
+
// console.log("之前:",this.state.list);
|
|
217
|
+
var list = _this.state.list;
|
|
218
|
+
for (var i = 0; i < list.length; i++) {
|
|
219
|
+
var item = list[i];
|
|
220
|
+
if (item.title === "调宿原因") {
|
|
221
|
+
list[i].bdkjcs = '{"name":"下拉选择器组件","type":"select","widthType":"default","widthStr":"","dataTag":"DMK_GYFW_TSSQYY","required":false,"defaultValue":"","validationValueType":"string","baseUrl":""}';
|
|
222
|
+
list[i].bdkjlx = "select";
|
|
223
|
+
list[i].blm = "TSYY";
|
|
224
|
+
list[i].bm = "ZHXG_GY_RCGL_TSGL";
|
|
225
|
+
list[i].sjcjfsdm = "01";
|
|
226
|
+
}
|
|
227
|
+
if (item.title === "调宿原因说明") {
|
|
228
|
+
list[i].bdkjcs = '{"name":"多行文本输入组件","type":"textarea","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":false,"defaultValue":"","validationValueType":"string"}';
|
|
229
|
+
list[i].bdkjlx = "textarea";
|
|
230
|
+
list[i].blm = "TSYYSM";
|
|
231
|
+
list[i].bm = "ZHXG_GY_RCGL_TSGL";
|
|
232
|
+
list[i].sjcjfsdm = "01";
|
|
233
|
+
}
|
|
234
|
+
if (item.title === "调整床位") {
|
|
235
|
+
list[i].bdkjcs = '{"name":"级联下拉选择器组件","type":"nhcascader","widthType":"default","widthStr":"","dataTag":"zhxg_gy_ydzsxxjl","required":false,"defaultValue":[],"validationValueType":"array","baseUrl":"api/zhxg-gyrcgl","changeOnSelect":false}';
|
|
236
|
+
list[i].bdkjlx = "nhcascader";
|
|
237
|
+
list[i].blm = "XCWID";
|
|
238
|
+
list[i].bm = "ZHXG_GY_RCGL_TSGL";
|
|
239
|
+
list[i].sjcjfsdm = "01";
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
_this.setState({ list: list });
|
|
243
|
+
(0, _NHFetch2.default)('api/zhxg-gyrcgl/openapi/getTssq/' + pkid, 'GET').then(function (res) {
|
|
244
|
+
if (res && res.data) {
|
|
245
|
+
for (var _i = 0; _i < list.length; _i++) {
|
|
246
|
+
var _item = list[_i];
|
|
247
|
+
// if (item.title === "调宿原因"){
|
|
248
|
+
// list[i].text = res.data.tsyy;
|
|
249
|
+
// list[i].initText = res.data.tsyy;
|
|
250
|
+
// }
|
|
251
|
+
if (_item.title === "调宿原因说明") {
|
|
252
|
+
list[_i].text = res.data.tsyysm;
|
|
253
|
+
list[_i].initText = res.data.tsyysm;
|
|
254
|
+
}
|
|
255
|
+
if (_item.title === "调整床位" && res.data.xcwid) {
|
|
256
|
+
var tzcw = res.data.xxqmc + '/' + res.data.xldmc + '/' + res.data.xfj + '/' + res.data.xcwh;
|
|
257
|
+
list[_i].text = tzcw;
|
|
258
|
+
list[_i].initText = tzcw;
|
|
259
|
+
list[_i].value = res.data.xcwid;
|
|
260
|
+
list[_i].initValue = res.data.xcwid;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
_this.getTssqTssy(list, res.data);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
_this.getTssqTssy = function (list, tssq) {
|
|
269
|
+
var _loop = function _loop(i) {
|
|
270
|
+
if (list[i].title === "调宿原因" && tssq && tssq.tsyy) {
|
|
271
|
+
var params = { sign: 'DMK_GYFW_TSSQYY' };
|
|
272
|
+
(0, _NHFetch2.default)(_this.props.baseUrl + '/proData/selectDataList', 'GET', params).then(function (res) {
|
|
273
|
+
if (res && res.data) {
|
|
274
|
+
for (var j = 0; j < res.data.length; j++) {
|
|
275
|
+
var yy = res.data[j];
|
|
276
|
+
if (yy['VALUE'] === tssq.tsyy) {
|
|
277
|
+
list[i].text = list[i].initText = yy['LABEL'];
|
|
278
|
+
list[i].value = list[i].initValue = yy['VALUE'];
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
_this.setState({ list: list }, function () {
|
|
283
|
+
return console.log("插入数据后的list", _this.state.list);
|
|
284
|
+
});
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
for (var i = 0; i < list.length; i++) {
|
|
290
|
+
_loop(i);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
_this.state = {
|
|
295
|
+
isEdit: props.model === "edit" ? true : false, //当时编辑模式模式时,直接自动进入编辑模式
|
|
296
|
+
list: [
|
|
297
|
+
//该分类的所有的数据
|
|
298
|
+
// 标题 显示的文本 控件的值 控件初始化的值 数据采集方式 表单控件参数
|
|
299
|
+
// {seq:1,id:'1',title:'姓名',text:'百里屠苏',value:'百里屠苏',initValue:'百里屠苏',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
|
|
300
|
+
// //接口url 值字段 文本字段 是否显示 是否编辑 是否必填 字段最小值 字段最大值
|
|
301
|
+
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
|
|
302
|
+
// {seq:2,id:'2',title:'性别',text:'是',value:'1',initValue:'1',sjcjfsdm:'01',bdkjcs:'{"type":"switch","checkedText":"是","uncheckedText":"否","defaultChecked":false}'
|
|
303
|
+
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'0',zszxz:'',zszdz:'',isChange:false,bdkjlx:'switch'},
|
|
304
|
+
// {seq:3,id:'3',title:'年龄',text:'23',value:'23',initValue:'23',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
|
|
305
|
+
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
|
|
306
|
+
// {seq:4,id:'4',title:'籍贯',text:'湖南',value:'湖南',initValue:'湖南',sjcjfsdm:'01',bdkjcs:'{"name":"单行文本输入控件","type":"input","widthType":"default","widthStr":"","patternTag":"","placeholder":"","required":true,"defaultValue":""}'
|
|
307
|
+
// ,jkUrl:'',zzd:'',wbzd:'',sfxs:'1',sfbj:'1',sfbt:'1',zszxz:'',zszdz:'',isChange:false,bdkjlx:'input'},
|
|
308
|
+
],
|
|
309
|
+
cacheList: [], //缓存数据
|
|
310
|
+
formData: {}
|
|
311
|
+
};
|
|
312
|
+
return _this;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
_createClass(TssqEditForm, [{
|
|
316
|
+
key: "UNSAFE_componentWillMount",
|
|
317
|
+
value: function UNSAFE_componentWillMount() {
|
|
318
|
+
this.InitialOneOnOneInfo();
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* 保存方法,该方法必须存在
|
|
323
|
+
* 改分类的信息保存成功后,调用func方法进行后续信息的保存
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* 值改变事件
|
|
329
|
+
*/
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* 校验该分类表单是否全部填写完成
|
|
334
|
+
*/
|
|
335
|
+
|
|
336
|
+
}, {
|
|
337
|
+
key: "render",
|
|
338
|
+
value: function render() {
|
|
339
|
+
var _this2 = this;
|
|
340
|
+
|
|
341
|
+
var _props = this.props,
|
|
342
|
+
data = _props.data,
|
|
343
|
+
showTitle = _props.showTitle,
|
|
344
|
+
showHeader = _props.showHeader; //data 是这一条分类的信息
|
|
345
|
+
|
|
346
|
+
var isEdit = this.state.isEdit;
|
|
347
|
+
|
|
348
|
+
var title = showHeader && showTitle ? data.flmc : "";
|
|
349
|
+
return _react2.default.createElement(_EditForm2.default, {
|
|
350
|
+
ref: function ref(form) {
|
|
351
|
+
_this2.nhEditForm = form;
|
|
352
|
+
},
|
|
353
|
+
gender: this.state.gender,
|
|
354
|
+
isEdit: isEdit,
|
|
355
|
+
list: this.state.list,
|
|
356
|
+
onChange: this.onChange,
|
|
357
|
+
title: title
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
}]);
|
|
361
|
+
|
|
362
|
+
return TssqEditForm;
|
|
363
|
+
}(_react2.default.Component);
|
|
364
|
+
|
|
365
|
+
TssqEditForm.propTypes = {
|
|
366
|
+
title: _propTypes2.default.string,
|
|
367
|
+
showTitle: _propTypes2.default.bool,
|
|
368
|
+
showHeader: _propTypes2.default.bool
|
|
369
|
+
};
|
|
370
|
+
TssqEditForm.defaultProps = {
|
|
371
|
+
title: "Title", // 标题
|
|
372
|
+
showTitle: true,
|
|
373
|
+
showHeader: true
|
|
374
|
+
};
|
|
375
|
+
exports.default = TssqEditForm;
|