@tddc/assign-modal 1.0.7 → 1.0.8
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.
|
@@ -117,10 +117,6 @@ var AssignModal = function AssignModal(props) {
|
|
|
117
117
|
|
|
118
118
|
setCheckedKeys(initOrgs);
|
|
119
119
|
setAppKeys(initApps || []);
|
|
120
|
-
onChange && onChange({
|
|
121
|
-
appKeys: appCodes.includes('all') ? 'all' : appCodes || [],
|
|
122
|
-
checkedKeys: appCodes.includes('all') ? 'all' : orgCodes || []
|
|
123
|
-
});
|
|
124
120
|
}, [dataItem]);
|
|
125
121
|
(0, _react.useEffect)(function () {
|
|
126
122
|
// 机构和应用 全选
|
|
@@ -138,13 +134,18 @@ var AssignModal = function AssignModal(props) {
|
|
|
138
134
|
return allOrg.includes(item);
|
|
139
135
|
});
|
|
140
136
|
|
|
141
|
-
if (app.length === appList.length || org.length === allOrg.length) {
|
|
142
|
-
onChange && onChange({
|
|
143
|
-
appKeys: app.length === appList.length ? ['all'] : appKeys,
|
|
144
|
-
checkedKeys: org.length === allOrg.length ? ['all'] : checkedKeys
|
|
145
|
-
});
|
|
146
|
-
}
|
|
137
|
+
if (app.length === appList.length || org.length === allOrg.length) {}
|
|
147
138
|
|
|
139
|
+
onChange && onChange({
|
|
140
|
+
appKeys: app.length === appList.length ? ['all'] : appKeys,
|
|
141
|
+
checkedKeys: org.length === allOrg.length ? ['all'] : checkedKeys,
|
|
142
|
+
appCheckAll: app.length === allApp.length,
|
|
143
|
+
orgCheckAll: org.length === allOrg.length,
|
|
144
|
+
checkData: {
|
|
145
|
+
apps: app.length === allApp.length ? allApp : appKeys,
|
|
146
|
+
orgs: org.length === allOrg.length ? allOrg : checkedKeys
|
|
147
|
+
}
|
|
148
|
+
});
|
|
148
149
|
setAllAppChecked(app.length === appList.length);
|
|
149
150
|
setAllOrgChecked(org.length === allOrg.length);
|
|
150
151
|
}
|
|
@@ -211,10 +212,6 @@ var AssignModal = function AssignModal(props) {
|
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
setCheckedKeys(checked);
|
|
214
|
-
onChange && onChange({
|
|
215
|
-
appKeys: appKeys,
|
|
216
|
-
checkedKeys: checked
|
|
217
|
-
});
|
|
218
215
|
};
|
|
219
216
|
|
|
220
217
|
var assignApp = function assignApp(e) {
|
|
@@ -235,11 +232,6 @@ var AssignModal = function AssignModal(props) {
|
|
|
235
232
|
});
|
|
236
233
|
setAppKeys(newAppKeys);
|
|
237
234
|
}
|
|
238
|
-
|
|
239
|
-
onChange && onChange({
|
|
240
|
-
checkedKeys: checkedKeys,
|
|
241
|
-
appKeys: newAppKeys
|
|
242
|
-
});
|
|
243
235
|
};
|
|
244
236
|
|
|
245
237
|
var checkAllOrg = function checkAllOrg(e) {
|
|
@@ -248,17 +240,9 @@ var AssignModal = function AssignModal(props) {
|
|
|
248
240
|
if (e.target.checked) {
|
|
249
241
|
orgKeys = (0, _utils.preorder)(orgList[0]);
|
|
250
242
|
setCheckedKeys(orgKeys);
|
|
251
|
-
onChange({
|
|
252
|
-
appKeys: appKeys,
|
|
253
|
-
checkedKeys: ['all']
|
|
254
|
-
});
|
|
255
243
|
} else {
|
|
256
244
|
orgKeys = _toConsumableArray(path);
|
|
257
245
|
setCheckedKeys(orgKeys);
|
|
258
|
-
onChange({
|
|
259
|
-
appKeys: appKeys,
|
|
260
|
-
checkedKeys: orgKeys
|
|
261
|
-
});
|
|
262
246
|
}
|
|
263
247
|
};
|
|
264
248
|
|
|
@@ -270,17 +254,9 @@ var AssignModal = function AssignModal(props) {
|
|
|
270
254
|
return item.value;
|
|
271
255
|
});
|
|
272
256
|
setAppKeys(appKeys);
|
|
273
|
-
onChange({
|
|
274
|
-
appKeys: ['all'],
|
|
275
|
-
checkedKeys: checkedKeys
|
|
276
|
-
});
|
|
277
257
|
} else {
|
|
278
258
|
appKeys = [appCode];
|
|
279
259
|
setAppKeys(appKeys);
|
|
280
|
-
onChange({
|
|
281
|
-
appKeys: appKeys,
|
|
282
|
-
checkedKeys: checkedKeys
|
|
283
|
-
});
|
|
284
260
|
}
|
|
285
261
|
};
|
|
286
262
|
|
package/lib/AssignModal/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tddc/assign-modal",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Layout",
|
|
5
5
|
"author": "zj <jun.zhang002383@tongdun.net>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"jsencrypt": "^3.2.1"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "acab77ece0b40c408f124f815c484de792ee45d0"
|
|
22
22
|
}
|