@bchr/bchr-front-lib 0.3.139 → 0.3.142
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/modal/SmartModal.js +21 -20
- package/lib/base/widgets/stree/LeftOrgTreeRightPersonGridForSelectPsnModal.js +16 -10
- package/package.json +1 -1
- package/src/base/layout/modal/SmartModal.js +21 -20
- package/src/base/widgets/stree/LeftOrgTreeRightPersonGridForSelectPsnModal.js +20 -15
|
@@ -61,11 +61,12 @@ var showConfirm = function showConfirm(options) {
|
|
|
61
61
|
okText: options.okText,
|
|
62
62
|
cancelText: options.cancelText,
|
|
63
63
|
zIndex: options.zIndex,
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
closable: options.closable,
|
|
65
|
+
onOk: function onOk(e) {
|
|
66
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
66
67
|
},
|
|
67
|
-
onCancel: function onCancel() {
|
|
68
|
-
options.cancelCallback ? options.cancelCallback() : function () {};
|
|
68
|
+
onCancel: function onCancel(e) {
|
|
69
|
+
options.cancelCallback ? options.cancelCallback(e) : function () {};
|
|
69
70
|
},
|
|
70
71
|
autoFocusButton: null
|
|
71
72
|
});
|
|
@@ -83,8 +84,8 @@ var showInfo = function showInfo(options) {
|
|
|
83
84
|
okText: options.okText,
|
|
84
85
|
zIndex: options.zIndex,
|
|
85
86
|
closable: options.closable,
|
|
86
|
-
onOk: function onOk() {
|
|
87
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
87
|
+
onOk: function onOk(e) {
|
|
88
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
|
|
@@ -101,8 +102,8 @@ var showSuccess = function showSuccess(options) {
|
|
|
101
102
|
okText: options.okText,
|
|
102
103
|
zIndex: options.zIndex,
|
|
103
104
|
closable: options.closable,
|
|
104
|
-
onOk: function onOk() {
|
|
105
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
105
|
+
onOk: function onOk(e) {
|
|
106
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
106
107
|
}
|
|
107
108
|
});
|
|
108
109
|
|
|
@@ -119,8 +120,8 @@ var showError = function showError(options) {
|
|
|
119
120
|
okText: options.okText,
|
|
120
121
|
zIndex: options.zIndex,
|
|
121
122
|
closable: options.closable,
|
|
122
|
-
onOk: function onOk() {
|
|
123
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
123
|
+
onOk: function onOk(e) {
|
|
124
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
|
|
@@ -137,8 +138,8 @@ var showWarn = function showWarn(options) {
|
|
|
137
138
|
okText: options.okText,
|
|
138
139
|
zIndex: options.zIndex,
|
|
139
140
|
closable: options.closable,
|
|
140
|
-
onOk: function onOk() {
|
|
141
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
141
|
+
onOk: function onOk(e) {
|
|
142
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
142
143
|
}
|
|
143
144
|
});
|
|
144
145
|
|
|
@@ -157,8 +158,8 @@ var showAutoCloseInfo = function showAutoCloseInfo(options) {
|
|
|
157
158
|
okText: options.okText,
|
|
158
159
|
zIndex: options.zIndex,
|
|
159
160
|
closable: options.closable,
|
|
160
|
-
onOk: function onOk() {
|
|
161
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
161
|
+
onOk: function onOk(e) {
|
|
162
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
162
163
|
}
|
|
163
164
|
});
|
|
164
165
|
|
|
@@ -183,8 +184,8 @@ var showAutoCloseSuccess = function showAutoCloseSuccess(options) {
|
|
|
183
184
|
okText: options.okText,
|
|
184
185
|
zIndex: options.zIndex,
|
|
185
186
|
closable: options.closable,
|
|
186
|
-
onOk: function onOk() {
|
|
187
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
187
|
+
onOk: function onOk(e) {
|
|
188
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
188
189
|
}
|
|
189
190
|
});
|
|
190
191
|
|
|
@@ -209,8 +210,8 @@ var showAutoCloseError = function showAutoCloseError(options) {
|
|
|
209
210
|
okText: options.okText,
|
|
210
211
|
zIndex: options.zIndex,
|
|
211
212
|
closable: options.closable,
|
|
212
|
-
onOk: function onOk() {
|
|
213
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
213
|
+
onOk: function onOk(e) {
|
|
214
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
214
215
|
}
|
|
215
216
|
});
|
|
216
217
|
|
|
@@ -235,8 +236,8 @@ var showAutoCloseWarn = function showAutoCloseWarn(options) {
|
|
|
235
236
|
okText: options.okText,
|
|
236
237
|
zIndex: options.zIndex,
|
|
237
238
|
closable: options.closable,
|
|
238
|
-
onOk: function onOk() {
|
|
239
|
-
options.okCallback ? options.okCallback() : function () {};
|
|
239
|
+
onOk: function onOk(e) {
|
|
240
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
240
241
|
}
|
|
241
242
|
});
|
|
242
243
|
|
|
@@ -138,17 +138,22 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
138
138
|
var currentState = _this2.state;
|
|
139
139
|
var pagerData = currentState.pagerData;
|
|
140
140
|
var isAllPsnSelected = !currentState.isAllPsnSelected;
|
|
141
|
+
var selectedPsnList = [];
|
|
141
142
|
|
|
142
143
|
if (pagerData.data && pagerData.data.length > 0) {
|
|
143
144
|
pagerData.data.forEach(function (dataItem) {
|
|
144
145
|
dataItem.selected = isAllPsnSelected;
|
|
146
|
+
|
|
147
|
+
if (isAllPsnSelected) {
|
|
148
|
+
selectedPsnList.push(dataItem);
|
|
149
|
+
}
|
|
145
150
|
});
|
|
146
151
|
}
|
|
147
152
|
|
|
148
153
|
_this2.setState(_objectSpread(_objectSpread({}, currentState), {}, {
|
|
149
154
|
pagerData: pagerData,
|
|
150
155
|
isAllPsnSelected: isAllPsnSelected,
|
|
151
|
-
selectedPsnList:
|
|
156
|
+
selectedPsnList: selectedPsnList
|
|
152
157
|
}));
|
|
153
158
|
});
|
|
154
159
|
|
|
@@ -157,7 +162,7 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
157
162
|
selectedRowData.selected = !selectedRowData.selected;
|
|
158
163
|
var currentState = _this2.state;
|
|
159
164
|
var selectedPsnList = [];
|
|
160
|
-
var psnList = currentState.pagerData.data;
|
|
165
|
+
var psnList = currentState.pagerData.data || [];
|
|
161
166
|
var isAllPsnSelected = true;
|
|
162
167
|
|
|
163
168
|
if (psnList && psnList.length > 0) {
|
|
@@ -168,7 +173,7 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
168
173
|
});
|
|
169
174
|
}
|
|
170
175
|
|
|
171
|
-
if (selectedPsnList.length !=
|
|
176
|
+
if (selectedPsnList.length != psnList.length) {
|
|
172
177
|
isAllPsnSelected = false;
|
|
173
178
|
}
|
|
174
179
|
|
|
@@ -181,7 +186,7 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
181
186
|
_defineProperty(_assertThisInitialized(_this2), "selectPsnRadiosChange", function (e) {
|
|
182
187
|
var currentState = _this2.state;
|
|
183
188
|
var selectedPsnList = [];
|
|
184
|
-
var psnList = currentState.pagerData.data;
|
|
189
|
+
var psnList = currentState.pagerData.data || [];
|
|
185
190
|
|
|
186
191
|
if (psnList && psnList.length > 0) {
|
|
187
192
|
psnList.forEach(function (dataItem) {
|
|
@@ -455,8 +460,7 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
455
460
|
}, {
|
|
456
461
|
key: "render",
|
|
457
462
|
value: function render() {
|
|
458
|
-
var _this3 = this
|
|
459
|
-
_React$createElement;
|
|
463
|
+
var _this3 = this;
|
|
460
464
|
|
|
461
465
|
var treeViewMessages = {
|
|
462
466
|
retry: "重新加载",
|
|
@@ -555,13 +559,15 @@ var LeftOrgTreeRightPersonGridForSelectPsnModal = /*#__PURE__*/function (_React$
|
|
|
555
559
|
onChange: _this3.onGridRowSelectionChange.bind(_this3, props)
|
|
556
560
|
}));
|
|
557
561
|
}
|
|
558
|
-
}), /*#__PURE__*/_react["default"].createElement(_kendoReactGrid.GridColumn,
|
|
562
|
+
}), /*#__PURE__*/_react["default"].createElement(_kendoReactGrid.GridColumn, {
|
|
559
563
|
field: "sequence_number",
|
|
560
564
|
title: "\u5E8F\u53F7",
|
|
561
|
-
width: "50px",
|
|
562
565
|
className: "text-center",
|
|
563
|
-
headerClassName: "text-center"
|
|
564
|
-
|
|
566
|
+
headerClassName: "text-center",
|
|
567
|
+
width: "55px",
|
|
568
|
+
sortable: false,
|
|
569
|
+
cell: _bchrFrontLib.GridRowSequenceNumberCell
|
|
570
|
+
}), /*#__PURE__*/_react["default"].createElement(_kendoReactGrid.GridColumn, {
|
|
565
571
|
field: "name",
|
|
566
572
|
title: "\u59D3\u540D",
|
|
567
573
|
className: "text-center",
|
package/package.json
CHANGED
|
@@ -55,11 +55,12 @@ const showConfirm = function(options){
|
|
|
55
55
|
okText: options.okText,
|
|
56
56
|
cancelText: options.cancelText,
|
|
57
57
|
zIndex: options.zIndex,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
closable: options.closable,
|
|
59
|
+
onOk(e) {
|
|
60
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
60
61
|
},
|
|
61
|
-
onCancel() {
|
|
62
|
-
options.cancelCallback ? options.cancelCallback() : function() {};
|
|
62
|
+
onCancel(e) {
|
|
63
|
+
options.cancelCallback ? options.cancelCallback(e) : function() {};
|
|
63
64
|
},
|
|
64
65
|
autoFocusButton: null
|
|
65
66
|
});
|
|
@@ -78,8 +79,8 @@ const showInfo = function(options) {
|
|
|
78
79
|
okText: options.okText,
|
|
79
80
|
zIndex: options.zIndex,
|
|
80
81
|
closable: options.closable,
|
|
81
|
-
onOk() {
|
|
82
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
82
|
+
onOk(e) {
|
|
83
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
83
84
|
},
|
|
84
85
|
});
|
|
85
86
|
|
|
@@ -96,8 +97,8 @@ const showSuccess = function(options) {
|
|
|
96
97
|
okText: options.okText,
|
|
97
98
|
zIndex: options.zIndex,
|
|
98
99
|
closable: options.closable,
|
|
99
|
-
onOk() {
|
|
100
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
100
|
+
onOk(e) {
|
|
101
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
101
102
|
},
|
|
102
103
|
});
|
|
103
104
|
|
|
@@ -114,8 +115,8 @@ const showError = function(options) {
|
|
|
114
115
|
okText: options.okText,
|
|
115
116
|
zIndex: options.zIndex,
|
|
116
117
|
closable: options.closable,
|
|
117
|
-
onOk() {
|
|
118
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
118
|
+
onOk(e) {
|
|
119
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
119
120
|
},
|
|
120
121
|
});
|
|
121
122
|
|
|
@@ -132,8 +133,8 @@ const showWarn = function(options) {
|
|
|
132
133
|
okText: options.okText,
|
|
133
134
|
zIndex: options.zIndex,
|
|
134
135
|
closable: options.closable,
|
|
135
|
-
onOk() {
|
|
136
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
136
|
+
onOk(e) {
|
|
137
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
137
138
|
},
|
|
138
139
|
});
|
|
139
140
|
|
|
@@ -152,8 +153,8 @@ const showAutoCloseInfo = function(options) {
|
|
|
152
153
|
okText: options.okText,
|
|
153
154
|
zIndex: options.zIndex,
|
|
154
155
|
closable: options.closable,
|
|
155
|
-
onOk() {
|
|
156
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
156
|
+
onOk(e) {
|
|
157
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
157
158
|
},
|
|
158
159
|
});
|
|
159
160
|
|
|
@@ -177,8 +178,8 @@ const showAutoCloseSuccess = function(options) {
|
|
|
177
178
|
okText: options.okText,
|
|
178
179
|
zIndex: options.zIndex,
|
|
179
180
|
closable: options.closable,
|
|
180
|
-
onOk() {
|
|
181
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
181
|
+
onOk(e) {
|
|
182
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
182
183
|
},
|
|
183
184
|
});
|
|
184
185
|
|
|
@@ -202,8 +203,8 @@ const showAutoCloseError = function(options) {
|
|
|
202
203
|
okText: options.okText,
|
|
203
204
|
zIndex: options.zIndex,
|
|
204
205
|
closable: options.closable,
|
|
205
|
-
onOk() {
|
|
206
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
206
|
+
onOk(e) {
|
|
207
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
207
208
|
},
|
|
208
209
|
});
|
|
209
210
|
|
|
@@ -227,8 +228,8 @@ const showAutoCloseWarn = function(options) {
|
|
|
227
228
|
okText: options.okText,
|
|
228
229
|
zIndex: options.zIndex,
|
|
229
230
|
closable: options.closable,
|
|
230
|
-
onOk() {
|
|
231
|
-
options.okCallback ? options.okCallback() : function () {}
|
|
231
|
+
onOk(e) {
|
|
232
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
232
233
|
},
|
|
233
234
|
});
|
|
234
235
|
|
|
@@ -312,12 +312,18 @@ class LeftOrgTreeRightPersonGridForSelectPsnModal extends React.Component {
|
|
|
312
312
|
*/
|
|
313
313
|
onGridHeaderSelectionChange = () => {
|
|
314
314
|
let currentState = this.state;
|
|
315
|
-
let pagerData = currentState
|
|
315
|
+
let {pagerData} = currentState;
|
|
316
316
|
let isAllPsnSelected = !currentState.isAllPsnSelected;
|
|
317
317
|
|
|
318
|
+
|
|
319
|
+
let selectedPsnList = [];
|
|
318
320
|
if (pagerData.data && pagerData.data.length > 0) {
|
|
319
321
|
pagerData.data.forEach(dataItem => {
|
|
320
322
|
dataItem.selected = isAllPsnSelected;
|
|
323
|
+
if (isAllPsnSelected) {
|
|
324
|
+
selectedPsnList.push(dataItem);
|
|
325
|
+
}
|
|
326
|
+
|
|
321
327
|
})
|
|
322
328
|
}
|
|
323
329
|
|
|
@@ -325,7 +331,7 @@ class LeftOrgTreeRightPersonGridForSelectPsnModal extends React.Component {
|
|
|
325
331
|
...currentState,
|
|
326
332
|
pagerData,
|
|
327
333
|
isAllPsnSelected,
|
|
328
|
-
selectedPsnList
|
|
334
|
+
selectedPsnList
|
|
329
335
|
})
|
|
330
336
|
}
|
|
331
337
|
|
|
@@ -339,7 +345,7 @@ class LeftOrgTreeRightPersonGridForSelectPsnModal extends React.Component {
|
|
|
339
345
|
|
|
340
346
|
let currentState = this.state;
|
|
341
347
|
let selectedPsnList = [];
|
|
342
|
-
let psnList = currentState.pagerData.data;
|
|
348
|
+
let psnList = currentState.pagerData.data || [];
|
|
343
349
|
let isAllPsnSelected = true;
|
|
344
350
|
|
|
345
351
|
if (psnList && psnList.length > 0) {
|
|
@@ -350,7 +356,7 @@ class LeftOrgTreeRightPersonGridForSelectPsnModal extends React.Component {
|
|
|
350
356
|
})
|
|
351
357
|
}
|
|
352
358
|
|
|
353
|
-
if (selectedPsnList.length !=
|
|
359
|
+
if (selectedPsnList.length != psnList.length) {
|
|
354
360
|
isAllPsnSelected = false;
|
|
355
361
|
}
|
|
356
362
|
|
|
@@ -364,7 +370,7 @@ class LeftOrgTreeRightPersonGridForSelectPsnModal extends React.Component {
|
|
|
364
370
|
selectPsnRadiosChange = (e) => {
|
|
365
371
|
let currentState = this.state;
|
|
366
372
|
let selectedPsnList = [];
|
|
367
|
-
let psnList = currentState.pagerData.data;
|
|
373
|
+
let psnList = currentState.pagerData.data || [];
|
|
368
374
|
|
|
369
375
|
if (psnList && psnList.length > 0) {
|
|
370
376
|
psnList.forEach(dataItem => {
|
|
@@ -455,22 +461,21 @@ class LeftOrgTreeRightPersonGridForSelectPsnModal extends React.Component {
|
|
|
455
461
|
<td className={"text-center locked_column k-grid-content-sticky"} style={{left: "0px", right: "0px"}}>
|
|
456
462
|
<Radio name='selectDef' defaultChecked={props.dataItem.selected}
|
|
457
463
|
className={"grid-radio"} key={props.dataIndex}
|
|
458
|
-
onChange={this.selectPsnRadiosChange.bind(this, props)}
|
|
459
|
-
></Radio>
|
|
464
|
+
onChange={this.selectPsnRadiosChange.bind(this, props)}/>
|
|
460
465
|
</td>)
|
|
461
466
|
}}/> : <GridColumn locked field="selected" title="选择" width="50px" className={"text-center locked"}
|
|
462
467
|
headerClassName={"text-center"} sortable={false} headerCell={props => {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
468
|
+
return <Checkbox checked={this.state.isAllPsnSelected} onChange={this.onGridHeaderSelectionChange}/>
|
|
469
|
+
}}
|
|
470
|
+
cell={props => {
|
|
471
|
+
return <td className={"text-center locked_column k-grid-content-sticky"} style={{left: "0px", right: "0px"}}>
|
|
472
|
+
<Checkbox checked={props.dataItem.selected} onChange={this.onGridRowSelectionChange.bind(this, props)}/>
|
|
473
|
+
</td>
|
|
474
|
+
}}
|
|
470
475
|
/>
|
|
471
476
|
|
|
472
477
|
}
|
|
473
|
-
<GridColumn field="sequence_number" title="序号"
|
|
478
|
+
<GridColumn field="sequence_number" title="序号" className={"text-center"} headerClassName={"text-center"} width="55px" sortable={false} cell={GridRowSequenceNumberCell}/>
|
|
474
479
|
<GridColumn field="name" title="姓名" className={"text-center"} headerClassName={"text-center"} width="120px" />
|
|
475
480
|
<GridColumn field="code" title="人员编码" className={"text-center"} headerClassName={"text-center"} width="120px" />
|
|
476
481
|
<GridColumn field="corp_ext_name" title="单位名称" className={"text-center"} headerClassName={"text-center"} width="180px" />
|