@bchr/bchr-front-lib 0.3.116 → 0.3.120
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/lib/base/layout/ui_tpl/form/FormForModify.js +3 -3
- package/lib/base/widgets/stree/LeftOrgTreeRightPersonGridForSelectPsnModal.js +8 -7
- package/lib/services/HttpService.js +14 -16
- package/package.json +1 -1
- package/src/base/layout/ui_tpl/form/FormForModify.js +3 -3
- package/src/base/widgets/stree/LeftOrgTreeRightPersonGridForSelectPsnModal.js +3 -3
- package/src/services/HttpService.js +14 -16
|
@@ -336,7 +336,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
336
336
|
label: dataItem.label,
|
|
337
337
|
name: dataItem.name,
|
|
338
338
|
rules: [{
|
|
339
|
-
required: !dataItem.
|
|
339
|
+
required: !dataItem.b_readonly && dataItem.required
|
|
340
340
|
}]
|
|
341
341
|
}, dataItem.render));
|
|
342
342
|
}
|
|
@@ -641,7 +641,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
641
641
|
required: !dataItem.b_readonly && b_required,
|
|
642
642
|
message: "请填写" + name,
|
|
643
643
|
whitespace: true,
|
|
644
|
-
validator: _this2.validator.bind(_assertThisInitialized(_this2), !dataItem.
|
|
644
|
+
validator: _this2.validator.bind(_assertThisInitialized(_this2), !dataItem.b_readonly && b_required, ui_render_type)
|
|
645
645
|
}, {
|
|
646
646
|
required: false,
|
|
647
647
|
message: name + "格式不正确",
|
|
@@ -649,7 +649,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
649
649
|
validator: _this2.formatValidator.bind(_assertThisInitialized(_this2)),
|
|
650
650
|
pattern: regexp_pattern
|
|
651
651
|
}],
|
|
652
|
-
hasFeedback: !dataItem.
|
|
652
|
+
hasFeedback: !dataItem.b_readonly && b_required,
|
|
653
653
|
valuePropName: valuePropName ? valuePropName : "value"
|
|
654
654
|
}, component));
|
|
655
655
|
});
|
|
@@ -9,16 +9,12 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _treeview = _interopRequireDefault(require("@progress/kendo-treeview-react-wrapper/dist/npm/treeview"));
|
|
11
11
|
|
|
12
|
-
var _antd =
|
|
12
|
+
var _antd = require("antd");
|
|
13
13
|
|
|
14
14
|
var _kendoReactGrid = require("@progress/kendo-react-grid");
|
|
15
15
|
|
|
16
16
|
var _bchrFrontLib = require("@bchr/bchr-front-lib");
|
|
17
17
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
19
|
-
|
|
20
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
19
|
|
|
24
20
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
@@ -509,6 +505,7 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
509
505
|
onSelectionChange: this.onGridRowSelectionChange,
|
|
510
506
|
onHeaderSelectionChange: this.onGridHeaderSelectionChange
|
|
511
507
|
}), this.props.selectType && this.props.selectType === 'single' ? /*#__PURE__*/_react["default"].createElement(_kendoReactGrid.GridColumn, {
|
|
508
|
+
locked: true,
|
|
512
509
|
field: "selected",
|
|
513
510
|
title: "\u9009\u62E9",
|
|
514
511
|
width: "55px",
|
|
@@ -519,8 +516,12 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
519
516
|
},
|
|
520
517
|
cell: function cell(props) {
|
|
521
518
|
return /*#__PURE__*/_react["default"].createElement("td", {
|
|
522
|
-
className: "text-center"
|
|
523
|
-
|
|
519
|
+
className: "text-center locked_column k-grid-content-sticky",
|
|
520
|
+
style: {
|
|
521
|
+
left: "0px",
|
|
522
|
+
right: "0px"
|
|
523
|
+
}
|
|
524
|
+
}, /*#__PURE__*/_react["default"].createElement(_antd.Radio, {
|
|
524
525
|
name: "selectDef",
|
|
525
526
|
defaultChecked: props.dataItem.selected,
|
|
526
527
|
className: "grid-radio",
|
|
@@ -131,24 +131,22 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
131
131
|
rpcMethodName = "";
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (ajaxOptions.rpcMethodName) {
|
|
140
|
-
delete ajaxOptions.rpcMethodName;
|
|
141
|
-
}
|
|
134
|
+
if (jsonObject) {
|
|
135
|
+
ajaxOptions.data = jsonObject;
|
|
136
|
+
}
|
|
142
137
|
|
|
143
|
-
|
|
144
|
-
ajaxOptions.
|
|
138
|
+
if (ajaxOptions.rpcMethodName) {
|
|
139
|
+
delete ajaxOptions.rpcMethodName;
|
|
140
|
+
}
|
|
145
141
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
142
|
+
ajaxOptions.type = "post";
|
|
143
|
+
ajaxOptions.dataType = "json";
|
|
149
144
|
|
|
150
|
-
|
|
145
|
+
if (!ajaxOptions.url) {
|
|
146
|
+
ajaxOptions.url = this.requestContextPath + rpcMethodName;
|
|
151
147
|
}
|
|
148
|
+
|
|
149
|
+
return _jquery["default"].ajax(ajaxOptions);
|
|
152
150
|
}
|
|
153
151
|
}, {
|
|
154
152
|
key: "__postForMock",
|
|
@@ -324,7 +322,7 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
324
322
|
var containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
|
|
325
323
|
|
|
326
324
|
if (containsHTML) {
|
|
327
|
-
throw new Error("
|
|
325
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
328
326
|
}
|
|
329
327
|
}
|
|
330
328
|
}, {
|
|
@@ -364,7 +362,7 @@ var HttpService = /*#__PURE__*/function () {
|
|
|
364
362
|
var containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
|
|
365
363
|
|
|
366
364
|
if (containsHTML) {
|
|
367
|
-
throw new Error("
|
|
365
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
368
366
|
}
|
|
369
367
|
}
|
|
370
368
|
}, {
|
package/package.json
CHANGED
|
@@ -326,7 +326,7 @@ class FormForModify extends React.Component{
|
|
|
326
326
|
key={form_id + "_" + dataItem.code}
|
|
327
327
|
label={dataItem.label}
|
|
328
328
|
name={dataItem.name}
|
|
329
|
-
rules={[{ required: !dataItem.
|
|
329
|
+
rules={[{ required: !dataItem.b_readonly && dataItem.required}]}
|
|
330
330
|
>
|
|
331
331
|
{dataItem.render}
|
|
332
332
|
</Form.Item>
|
|
@@ -728,10 +728,10 @@ class FormForModify extends React.Component{
|
|
|
728
728
|
name={code}
|
|
729
729
|
initialValue={initialValue}
|
|
730
730
|
rules={[
|
|
731
|
-
{required: (!dataItem.b_readonly && b_required), message: ("请填写" + name), whitespace: true, validator: this.validator.bind(this, (!dataItem.
|
|
731
|
+
{required: (!dataItem.b_readonly && b_required), message: ("请填写" + name), whitespace: true, validator: this.validator.bind(this, (!dataItem.b_readonly && b_required), ui_render_type)},
|
|
732
732
|
{required: false, message: (name + "格式不正确"), whitespace: true, validator: this.formatValidator.bind(this), pattern: regexp_pattern}
|
|
733
733
|
]}
|
|
734
|
-
hasFeedback={(!dataItem.
|
|
734
|
+
hasFeedback={(!dataItem.b_readonly && b_required)}
|
|
735
735
|
valuePropName={valuePropName ? valuePropName : "value"}
|
|
736
736
|
>
|
|
737
737
|
{component}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import TreeView from "@progress/kendo-treeview-react-wrapper/dist/npm/treeview";
|
|
3
|
-
import
|
|
3
|
+
import {Checkbox, Input, Radio} from "antd";
|
|
4
4
|
import {Grid, GridColumn} from "@progress/kendo-react-grid";
|
|
5
5
|
import {GridRowSequenceNumberCell, SmartMessage, HttpService, SModal} from "@bchr/bchr-front-lib";
|
|
6
6
|
|
|
@@ -445,14 +445,14 @@ class LeftOrgTreeRightPersonGridForSelectPsnModal extends React.Component {
|
|
|
445
445
|
onHeaderSelectionChange={this.onGridHeaderSelectionChange}
|
|
446
446
|
>
|
|
447
447
|
{
|
|
448
|
-
this.props.selectType && this.props.selectType ==='single' ? <GridColumn field="selected" title="选择" width="55px" className={"text-center"}
|
|
448
|
+
this.props.selectType && this.props.selectType ==='single' ? <GridColumn locked field="selected" title="选择" width="55px" className={"text-center"}
|
|
449
449
|
sortable={false}
|
|
450
450
|
headerCell={props => {
|
|
451
451
|
return (<span>选择</span>)
|
|
452
452
|
}}
|
|
453
453
|
cell={(props) => {
|
|
454
454
|
return (
|
|
455
|
-
<td className={"text-center"}>
|
|
455
|
+
<td className={"text-center locked_column k-grid-content-sticky"} style={{left: "0px", right: "0px"}}>
|
|
456
456
|
<Radio name='selectDef' defaultChecked={props.dataItem.selected}
|
|
457
457
|
className={"grid-radio"} key={props.dataIndex}
|
|
458
458
|
onChange={this.selectPsnRadiosChange.bind(this, props)}
|
|
@@ -114,24 +114,22 @@ class HttpService {
|
|
|
114
114
|
rpcMethodName = "";
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
if (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (ajaxOptions.rpcMethodName) {
|
|
123
|
-
delete ajaxOptions.rpcMethodName;
|
|
124
|
-
}
|
|
117
|
+
if (jsonObject) {
|
|
118
|
+
ajaxOptions.data = jsonObject;
|
|
119
|
+
}
|
|
125
120
|
|
|
126
|
-
|
|
127
|
-
ajaxOptions.
|
|
121
|
+
if (ajaxOptions.rpcMethodName) {
|
|
122
|
+
delete ajaxOptions.rpcMethodName;
|
|
123
|
+
}
|
|
128
124
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
125
|
+
ajaxOptions.type = "post";
|
|
126
|
+
ajaxOptions.dataType = "json";
|
|
132
127
|
|
|
133
|
-
|
|
128
|
+
if (!ajaxOptions.url) {
|
|
129
|
+
ajaxOptions.url = this.requestContextPath + rpcMethodName;
|
|
134
130
|
}
|
|
131
|
+
|
|
132
|
+
return $.ajax(ajaxOptions);
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
__postForMock(mockOptions) {
|
|
@@ -303,7 +301,7 @@ class HttpService {
|
|
|
303
301
|
|
|
304
302
|
let containsHTML = /<(noframes|noscript|object|script|video).*?<\/\2>/i.test(str);
|
|
305
303
|
if (containsHTML) {
|
|
306
|
-
throw new Error("
|
|
304
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
307
305
|
}
|
|
308
306
|
}
|
|
309
307
|
|
|
@@ -341,7 +339,7 @@ class HttpService {
|
|
|
341
339
|
|
|
342
340
|
let containsHTML = /<(br|basefont|hr|input|source|frame|param|area|meta|!--|col|link|option|base|img|wbr|!DOCTYPE).*?>|<(a|abbr|acronym|address|applet|article|aside|audio|b|bdi|bdo|big|blockquote|body|button|canvas|caption|center|cite|code|colgroup|command|datalist|dd|del|details|dfn|dialog|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frameset|head|header|hgroup|h1|h2|h3|h4|h5|h6|html|i|iframe|ins|kbd|keygen|label|legend|li|map|mark|menu|meter|nav|noframes|noscript|object|ol|optgroup|output|p|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|tt|u|ul|var|video).*?<\/\2>/i.test(str);
|
|
343
341
|
if (containsHTML) {
|
|
344
|
-
throw new Error("
|
|
342
|
+
throw new Error("不安全的输入,请检查!【" + str + "】");
|
|
345
343
|
}
|
|
346
344
|
}
|
|
347
345
|
|