@bchr/bchr-front-lib 0.3.138 → 0.3.141
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 +28 -19
- package/lib/base/widgets/stree/LeftOrgTreeRightPersonGridForSelectPsnModal.js +16 -10
- package/package.json +1 -1
- package/src/base/layout/modal/SmartModal.js +28 -19
- 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
68
|
onCancel: function onCancel() {
|
|
68
|
-
options.cancelCallback ? options.cancelCallback() : function () {};
|
|
69
|
+
options.cancelCallback ? options.cancelCallback(e) : function () {};
|
|
69
70
|
},
|
|
70
71
|
autoFocusButton: null
|
|
71
72
|
});
|
|
@@ -82,8 +83,9 @@ var showInfo = function showInfo(options) {
|
|
|
82
83
|
content: options.content,
|
|
83
84
|
okText: options.okText,
|
|
84
85
|
zIndex: options.zIndex,
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
closable: options.closable,
|
|
87
|
+
onOk: function onOk(e) {
|
|
88
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
87
89
|
}
|
|
88
90
|
});
|
|
89
91
|
|
|
@@ -99,8 +101,9 @@ var showSuccess = function showSuccess(options) {
|
|
|
99
101
|
content: options.content,
|
|
100
102
|
okText: options.okText,
|
|
101
103
|
zIndex: options.zIndex,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
closable: options.closable,
|
|
105
|
+
onOk: function onOk(e) {
|
|
106
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
104
107
|
}
|
|
105
108
|
});
|
|
106
109
|
|
|
@@ -116,8 +119,9 @@ var showError = function showError(options) {
|
|
|
116
119
|
content: options.content,
|
|
117
120
|
okText: options.okText,
|
|
118
121
|
zIndex: options.zIndex,
|
|
119
|
-
|
|
120
|
-
|
|
122
|
+
closable: options.closable,
|
|
123
|
+
onOk: function onOk(e) {
|
|
124
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
121
125
|
}
|
|
122
126
|
});
|
|
123
127
|
|
|
@@ -133,8 +137,9 @@ var showWarn = function showWarn(options) {
|
|
|
133
137
|
content: options.content,
|
|
134
138
|
okText: options.okText,
|
|
135
139
|
zIndex: options.zIndex,
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
closable: options.closable,
|
|
141
|
+
onOk: function onOk(e) {
|
|
142
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
138
143
|
}
|
|
139
144
|
});
|
|
140
145
|
|
|
@@ -152,8 +157,9 @@ var showAutoCloseInfo = function showAutoCloseInfo(options) {
|
|
|
152
157
|
content: "".concat(timeOut, "\u79D2\u540E\u81EA\u52A8\u5173\u95ED"),
|
|
153
158
|
okText: options.okText,
|
|
154
159
|
zIndex: options.zIndex,
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
closable: options.closable,
|
|
161
|
+
onOk: function onOk(e) {
|
|
162
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
157
163
|
}
|
|
158
164
|
});
|
|
159
165
|
|
|
@@ -177,8 +183,9 @@ var showAutoCloseSuccess = function showAutoCloseSuccess(options) {
|
|
|
177
183
|
content: "".concat(timeOut, "\u79D2\u540E\u81EA\u52A8\u5173\u95ED"),
|
|
178
184
|
okText: options.okText,
|
|
179
185
|
zIndex: options.zIndex,
|
|
180
|
-
|
|
181
|
-
|
|
186
|
+
closable: options.closable,
|
|
187
|
+
onOk: function onOk(e) {
|
|
188
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
182
189
|
}
|
|
183
190
|
});
|
|
184
191
|
|
|
@@ -202,8 +209,9 @@ var showAutoCloseError = function showAutoCloseError(options) {
|
|
|
202
209
|
content: "".concat(timeOut, "\u79D2\u540E\u81EA\u52A8\u5173\u95ED"),
|
|
203
210
|
okText: options.okText,
|
|
204
211
|
zIndex: options.zIndex,
|
|
205
|
-
|
|
206
|
-
|
|
212
|
+
closable: options.closable,
|
|
213
|
+
onOk: function onOk(e) {
|
|
214
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
207
215
|
}
|
|
208
216
|
});
|
|
209
217
|
|
|
@@ -227,8 +235,9 @@ var showAutoCloseWarn = function showAutoCloseWarn(options) {
|
|
|
227
235
|
content: "".concat(timeOut, "\u79D2\u540E\u81EA\u52A8\u5173\u95ED"),
|
|
228
236
|
okText: options.okText,
|
|
229
237
|
zIndex: options.zIndex,
|
|
230
|
-
|
|
231
|
-
|
|
238
|
+
closable: options.closable,
|
|
239
|
+
onOk: function onOk(e) {
|
|
240
|
+
options.okCallback ? options.okCallback(e) : function () {};
|
|
232
241
|
}
|
|
233
242
|
});
|
|
234
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
62
|
onCancel() {
|
|
62
|
-
options.cancelCallback ? options.cancelCallback() : function() {};
|
|
63
|
+
options.cancelCallback ? options.cancelCallback(e) : function() {};
|
|
63
64
|
},
|
|
64
65
|
autoFocusButton: null
|
|
65
66
|
});
|
|
@@ -77,8 +78,9 @@ const showInfo = function(options) {
|
|
|
77
78
|
content: options.content,
|
|
78
79
|
okText: options.okText,
|
|
79
80
|
zIndex: options.zIndex,
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
closable: options.closable,
|
|
82
|
+
onOk(e) {
|
|
83
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
82
84
|
},
|
|
83
85
|
});
|
|
84
86
|
|
|
@@ -94,8 +96,9 @@ const showSuccess = function(options) {
|
|
|
94
96
|
content: options.content,
|
|
95
97
|
okText: options.okText,
|
|
96
98
|
zIndex: options.zIndex,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
closable: options.closable,
|
|
100
|
+
onOk(e) {
|
|
101
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
99
102
|
},
|
|
100
103
|
});
|
|
101
104
|
|
|
@@ -111,8 +114,9 @@ const showError = function(options) {
|
|
|
111
114
|
content: options.content,
|
|
112
115
|
okText: options.okText,
|
|
113
116
|
zIndex: options.zIndex,
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
closable: options.closable,
|
|
118
|
+
onOk(e) {
|
|
119
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
116
120
|
},
|
|
117
121
|
});
|
|
118
122
|
|
|
@@ -128,8 +132,9 @@ const showWarn = function(options) {
|
|
|
128
132
|
content: options.content,
|
|
129
133
|
okText: options.okText,
|
|
130
134
|
zIndex: options.zIndex,
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
closable: options.closable,
|
|
136
|
+
onOk(e) {
|
|
137
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
133
138
|
},
|
|
134
139
|
});
|
|
135
140
|
|
|
@@ -147,8 +152,9 @@ const showAutoCloseInfo = function(options) {
|
|
|
147
152
|
content: `${timeOut}秒后自动关闭`,
|
|
148
153
|
okText: options.okText,
|
|
149
154
|
zIndex: options.zIndex,
|
|
150
|
-
|
|
151
|
-
|
|
155
|
+
closable: options.closable,
|
|
156
|
+
onOk(e) {
|
|
157
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
152
158
|
},
|
|
153
159
|
});
|
|
154
160
|
|
|
@@ -171,8 +177,9 @@ const showAutoCloseSuccess = function(options) {
|
|
|
171
177
|
content: `${timeOut}秒后自动关闭`,
|
|
172
178
|
okText: options.okText,
|
|
173
179
|
zIndex: options.zIndex,
|
|
174
|
-
|
|
175
|
-
|
|
180
|
+
closable: options.closable,
|
|
181
|
+
onOk(e) {
|
|
182
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
176
183
|
},
|
|
177
184
|
});
|
|
178
185
|
|
|
@@ -195,8 +202,9 @@ const showAutoCloseError = function(options) {
|
|
|
195
202
|
content: `${timeOut}秒后自动关闭`,
|
|
196
203
|
okText: options.okText,
|
|
197
204
|
zIndex: options.zIndex,
|
|
198
|
-
|
|
199
|
-
|
|
205
|
+
closable: options.closable,
|
|
206
|
+
onOk(e) {
|
|
207
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
200
208
|
},
|
|
201
209
|
});
|
|
202
210
|
|
|
@@ -219,8 +227,9 @@ const showAutoCloseWarn = function(options) {
|
|
|
219
227
|
content: `${timeOut}秒后自动关闭`,
|
|
220
228
|
okText: options.okText,
|
|
221
229
|
zIndex: options.zIndex,
|
|
222
|
-
|
|
223
|
-
|
|
230
|
+
closable: options.closable,
|
|
231
|
+
onOk(e) {
|
|
232
|
+
options.okCallback ? options.okCallback(e) : function () {}
|
|
224
233
|
},
|
|
225
234
|
});
|
|
226
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" />
|