fmui-base 2.3.15 → 2.3.17
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 +2 -0
- package/lib/process_info/processInfo.js +1 -11
- package/lib/selectMember/select.js +191 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1474,7 +1474,7 @@ var PageHome = function (_React$Component) {
|
|
|
1474
1474
|
// }
|
|
1475
1475
|
t.setState({
|
|
1476
1476
|
editFormData: formData,
|
|
1477
|
-
formDataOptlock: formData && formData.optlock !== undefined && formData.optlock !== null && formData.optlock !== '' ? String(formData.optlock) : '',
|
|
1477
|
+
formDataOptlock: formData && formData.optlock !== undefined && formData.optlock !== null && formData.optlock !== '' ? String(formData.optlock) : content.optlock !== undefined && content.optlock !== null && content.optlock !== '' ? String(content.optlock) : '',
|
|
1478
1478
|
//formDataNew:content.formDataNew,
|
|
1479
1479
|
// formData: formData,
|
|
1480
1480
|
// fileContent: fileContent,
|
|
@@ -4683,9 +4683,6 @@ var PageHome = function (_React$Component) {
|
|
|
4683
4683
|
formType: "4",
|
|
4684
4684
|
editType: editType
|
|
4685
4685
|
}, _defineProperty(_param2, 'module', t.state.module), _defineProperty(_param2, 'comment', newComment), _defineProperty(_param2, 'commentType', 'text'), _defineProperty(_param2, 'commentId', t.state.commentId), _defineProperty(_param2, 'commentAttitude', t.getSelectedCommentAttitude()), _defineProperty(_param2, 'attachId', t.state.commentAttachId), _defineProperty(_param2, 'sealId', t.state.commentSealId), _defineProperty(_param2, 'permissionCode', t.state.permissionCode), _defineProperty(_param2, 'hasCommentField', t.state.hasCommentField), _defineProperty(_param2, 'dataId', dataId), _param2);
|
|
4686
|
-
if (t.state.formDataOptlock !== '' && t.state.formDataOptlock !== null && typeof t.state.formDataOptlock !== 'undefined') {
|
|
4687
|
-
param.optlock = t.state.formDataOptlock;
|
|
4688
|
-
}
|
|
4689
4686
|
var commentbizSn = t.guid2();
|
|
4690
4687
|
if (param.commentId && param.commentId != "" && param.commentId != null && typeof param.commentId != "undefined") {
|
|
4691
4688
|
commentbizSn = param.commentId;
|
|
@@ -4699,13 +4696,6 @@ var PageHome = function (_React$Component) {
|
|
|
4699
4696
|
type: 'success',
|
|
4700
4697
|
content: '保存成功'
|
|
4701
4698
|
});
|
|
4702
|
-
if (t.state.formDataOptlock !== '' && t.state.formDataOptlock !== null) {
|
|
4703
|
-
var ol = parseInt(t.state.formDataOptlock, 10);
|
|
4704
|
-
if (!isNaN(ol)) {
|
|
4705
|
-
t.setState({ formDataOptlock: String(ol + 1) });
|
|
4706
|
-
}
|
|
4707
|
-
}
|
|
4708
|
-
|
|
4709
4699
|
var dataId = content.dataId;
|
|
4710
4700
|
//操作回调
|
|
4711
4701
|
if (typeof FlowCommon.operateCallBack === "function") {
|
|
@@ -951,7 +951,127 @@ var Page = function (_React$Component) {
|
|
|
951
951
|
var t = this;
|
|
952
952
|
var scopeList = this.state.scopeList;
|
|
953
953
|
var chooseType = this.getChooseType();
|
|
954
|
-
if ("
|
|
954
|
+
if ("common" == type) {
|
|
955
|
+
var commonCheckAll = t.state.commonCheckAll;
|
|
956
|
+
commonCheckAll = !commonCheckAll;
|
|
957
|
+
var commonUsedData = t.state.commonUsedData;
|
|
958
|
+
var total = t.state.total;
|
|
959
|
+
var selectCommonNum = t.state.selectCommonNum;
|
|
960
|
+
var selectedList = t.state.selectedList;
|
|
961
|
+
var selectUsers = selectedList.selectUsers;
|
|
962
|
+
var selectOrgs = selectedList.selectOrgs;
|
|
963
|
+
var selectRoles = selectedList.selectRoles;
|
|
964
|
+
var selectStations = selectedList.selectStations;
|
|
965
|
+
var selectGroups = selectedList.selectGroups;
|
|
966
|
+
if (selectUsers == null || selectUsers == undefined) {
|
|
967
|
+
selectUsers = [];
|
|
968
|
+
}
|
|
969
|
+
if (selectOrgs == null || selectOrgs == undefined) {
|
|
970
|
+
selectOrgs = [];
|
|
971
|
+
}
|
|
972
|
+
if (selectRoles == null || selectRoles == undefined) {
|
|
973
|
+
selectRoles = [];
|
|
974
|
+
}
|
|
975
|
+
if (selectStations == null || selectStations == undefined) {
|
|
976
|
+
selectStations = [];
|
|
977
|
+
}
|
|
978
|
+
if (selectGroups == null || selectGroups == undefined) {
|
|
979
|
+
selectGroups = [];
|
|
980
|
+
}
|
|
981
|
+
if (commonCheckAll) {
|
|
982
|
+
for (var i = 0; i < commonUsedData.length; i++) {
|
|
983
|
+
var common = commonUsedData[i];
|
|
984
|
+
if (!common.checked) {
|
|
985
|
+
commonUsedData[i].checked = true;
|
|
986
|
+
total++;
|
|
987
|
+
selectCommonNum++;
|
|
988
|
+
var selectedData = { id: common.scopeValue };
|
|
989
|
+
var selectData = null;
|
|
990
|
+
if (common.scopeType == "user") {
|
|
991
|
+
selectedData.userName = common.scopeName;
|
|
992
|
+
selectedData.imageId = common.imageId;
|
|
993
|
+
selectData = selectUsers;
|
|
994
|
+
} else if (common.scopeType == "org") {
|
|
995
|
+
selectedData.orgName = common.scopeName;
|
|
996
|
+
selectData = selectOrgs;
|
|
997
|
+
} else if (common.scopeType == "role") {
|
|
998
|
+
selectedData.roleName = common.scopeName;
|
|
999
|
+
selectData = selectRoles;
|
|
1000
|
+
} else if (common.scopeType == "station") {
|
|
1001
|
+
selectedData.stationName = common.scopeName;
|
|
1002
|
+
selectData = selectStations;
|
|
1003
|
+
} else if (common.scopeType == "group") {
|
|
1004
|
+
selectedData.groupName = common.scopeName;
|
|
1005
|
+
selectData = selectGroups;
|
|
1006
|
+
}
|
|
1007
|
+
if (selectData != null) {
|
|
1008
|
+
var flag = true;
|
|
1009
|
+
for (var j = 0; j < selectData.length; j++) {
|
|
1010
|
+
if (selectData[j].id == common.scopeValue) {
|
|
1011
|
+
flag = false;
|
|
1012
|
+
break;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
if (flag) {
|
|
1016
|
+
selectData.push(selectedData);
|
|
1017
|
+
scopeList.push(commonUsedData[i]);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
} else {
|
|
1023
|
+
for (var i = 0; i < commonUsedData.length; i++) {
|
|
1024
|
+
var common = commonUsedData[i];
|
|
1025
|
+
if (common.checked) {
|
|
1026
|
+
commonUsedData[i].checked = false;
|
|
1027
|
+
total--;
|
|
1028
|
+
selectCommonNum--;
|
|
1029
|
+
var selectData = null;
|
|
1030
|
+
if (common.scopeType == "user") {
|
|
1031
|
+
selectData = selectUsers;
|
|
1032
|
+
} else if (common.scopeType == "org") {
|
|
1033
|
+
selectData = selectOrgs;
|
|
1034
|
+
} else if (common.scopeType == "role") {
|
|
1035
|
+
selectData = selectRoles;
|
|
1036
|
+
} else if (common.scopeType == "station") {
|
|
1037
|
+
selectData = selectStations;
|
|
1038
|
+
} else if (common.scopeType == "group") {
|
|
1039
|
+
selectData = selectGroups;
|
|
1040
|
+
}
|
|
1041
|
+
if (selectData != null) {
|
|
1042
|
+
for (var j = 0; j < selectData.length; j++) {
|
|
1043
|
+
if (selectData[j].id == common.scopeValue) {
|
|
1044
|
+
selectData.splice(j, 1);
|
|
1045
|
+
break;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
for (var j = 0; j < scopeList.length; j++) {
|
|
1050
|
+
if (scopeList[j].scopeValue == common.scopeValue) {
|
|
1051
|
+
scopeList.splice(j, 1);
|
|
1052
|
+
break;
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
selectedList.selectUsers = selectUsers;
|
|
1059
|
+
selectedList.selectOrgs = selectOrgs;
|
|
1060
|
+
selectedList.selectRoles = selectRoles;
|
|
1061
|
+
selectedList.selectStations = selectStations;
|
|
1062
|
+
selectedList.selectGroups = selectGroups;
|
|
1063
|
+
var commonCheckState = t.syncCommonCheckState(commonUsedData);
|
|
1064
|
+
t.setState({
|
|
1065
|
+
commonUsedData: commonUsedData,
|
|
1066
|
+
total: total,
|
|
1067
|
+
selectCommonNum: commonCheckState.selectCommonNum,
|
|
1068
|
+
commonCheckAll: commonCheckState.commonCheckAll,
|
|
1069
|
+
selectedList: selectedList,
|
|
1070
|
+
scopeList: scopeList
|
|
1071
|
+
}, function () {
|
|
1072
|
+
_this2.instance.update(_this2.getContent());
|
|
1073
|
+
});
|
|
1074
|
+
} else if ("user" == type) {
|
|
955
1075
|
var navList = t.state.navUserList;
|
|
956
1076
|
var index = navList.length - 1;
|
|
957
1077
|
navList[index].checkAll = !navList[index].checkAll;
|
|
@@ -2141,10 +2261,13 @@ var Page = function (_React$Component) {
|
|
|
2141
2261
|
};
|
|
2142
2262
|
commonUsedData.push(data);
|
|
2143
2263
|
}
|
|
2264
|
+
var commonCheckState = t.syncCommonCheckState(commonUsedData);
|
|
2144
2265
|
t.setState({
|
|
2145
2266
|
commonTreeData: commonTreeData,
|
|
2146
2267
|
commonUsedData: commonUsedData,
|
|
2147
2268
|
selectUserNum: selectUserNum,
|
|
2269
|
+
selectCommonNum: commonCheckState.selectCommonNum,
|
|
2270
|
+
commonCheckAll: commonCheckState.commonCheckAll,
|
|
2148
2271
|
navCommonList: navList,
|
|
2149
2272
|
isShowNav: isShowNav,
|
|
2150
2273
|
isShowCheckAll: isShowCheckAll
|
|
@@ -3924,9 +4047,12 @@ var Page = function (_React$Component) {
|
|
|
3924
4047
|
};
|
|
3925
4048
|
commonUsedData.push(data);
|
|
3926
4049
|
}
|
|
4050
|
+
var commonCheckState = t.syncCommonCheckState(commonUsedData);
|
|
3927
4051
|
stateParam = {
|
|
3928
4052
|
commonTreeData: commonTreeData,
|
|
3929
4053
|
commonUsedData: commonUsedData,
|
|
4054
|
+
selectCommonNum: commonCheckState.selectCommonNum,
|
|
4055
|
+
commonCheckAll: commonCheckState.commonCheckAll,
|
|
3930
4056
|
navCommonList: navList,
|
|
3931
4057
|
isShowNav: true,
|
|
3932
4058
|
isShowCheckAll: isShowCheckAll
|
|
@@ -4148,7 +4274,7 @@ var Page = function (_React$Component) {
|
|
|
4148
4274
|
}
|
|
4149
4275
|
var result = t.checkOneCommonItem(commonUsedData[index].checked, selectData, commonUsedData, selectedData, checkType, total, selectCommonNum, index, scopeList);
|
|
4150
4276
|
total = result.total;
|
|
4151
|
-
|
|
4277
|
+
selectCommonNum = result.selectNum;
|
|
4152
4278
|
if (common.scopeType == "user") {
|
|
4153
4279
|
selectedList.selectUsers = selectData;
|
|
4154
4280
|
} else if (common.scopeType == "org") {
|
|
@@ -4160,10 +4286,12 @@ var Page = function (_React$Component) {
|
|
|
4160
4286
|
} else if (common.scopeType == "group") {
|
|
4161
4287
|
selectedList.selectGroups = selectData;
|
|
4162
4288
|
}
|
|
4289
|
+
var commonCheckState = t.syncCommonCheckState(commonUsedData);
|
|
4163
4290
|
t.setState({
|
|
4164
4291
|
commonUsedData: commonUsedData,
|
|
4165
4292
|
total: total,
|
|
4166
|
-
selectCommonNum:
|
|
4293
|
+
selectCommonNum: commonCheckState.selectCommonNum,
|
|
4294
|
+
commonCheckAll: commonCheckState.commonCheckAll,
|
|
4167
4295
|
selectedList: selectedList,
|
|
4168
4296
|
scopeList: scopeList
|
|
4169
4297
|
}, function () {
|
|
@@ -5698,6 +5826,23 @@ var Page = function (_React$Component) {
|
|
|
5698
5826
|
}
|
|
5699
5827
|
}
|
|
5700
5828
|
|
|
5829
|
+
// 根据 commonUsedData 实际选中状态同步全选(仿照 roleCheckAll 逻辑)
|
|
5830
|
+
|
|
5831
|
+
}, {
|
|
5832
|
+
key: 'syncCommonCheckState',
|
|
5833
|
+
value: function syncCommonCheckState(commonUsedData) {
|
|
5834
|
+
var selectCommonNum = 0;
|
|
5835
|
+
if (commonUsedData != null && commonUsedData != undefined && commonUsedData.length > 0) {
|
|
5836
|
+
for (var i = 0; i < commonUsedData.length; i++) {
|
|
5837
|
+
if (commonUsedData[i].checked) {
|
|
5838
|
+
selectCommonNum++;
|
|
5839
|
+
}
|
|
5840
|
+
}
|
|
5841
|
+
}
|
|
5842
|
+
var commonCheckAll = commonUsedData != null && commonUsedData != undefined && commonUsedData.length > 0 && selectCommonNum == commonUsedData.length;
|
|
5843
|
+
return { selectCommonNum: selectCommonNum, commonCheckAll: commonCheckAll };
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5701
5846
|
//修改获取的常用数据选中状态
|
|
5702
5847
|
|
|
5703
5848
|
}, {
|
|
@@ -5799,10 +5944,10 @@ var Page = function (_React$Component) {
|
|
|
5799
5944
|
commonTreeData.push(data);
|
|
5800
5945
|
}
|
|
5801
5946
|
}
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5947
|
+
t.commonDataChecked(commonUsedData);
|
|
5948
|
+
var commonCheckState = t.syncCommonCheckState(commonUsedData);
|
|
5949
|
+
selectCommonNum = commonCheckState.selectCommonNum;
|
|
5950
|
+
commonCheckAll = commonCheckState.commonCheckAll;
|
|
5806
5951
|
}
|
|
5807
5952
|
|
|
5808
5953
|
if (commonUsedDataSearch != null && commonUsedDataSearch != undefined && commonUsedDataSearch.length > 0) {
|
|
@@ -6383,23 +6528,19 @@ var Page = function (_React$Component) {
|
|
|
6383
6528
|
var t = this;
|
|
6384
6529
|
var chooseType = this.getChooseType();
|
|
6385
6530
|
if (obj.activeKey == "common") {
|
|
6386
|
-
var commonUsedData = t.state.commonUsedData;
|
|
6387
|
-
var selectCommonNum = 0;
|
|
6388
|
-
var commonCheckAll = false;
|
|
6389
|
-
if (commonUsedData != null && commonUsedData != undefined && commonUsedData.length > 0) {
|
|
6390
|
-
selectCommonNum = t.commonDataChecked(commonUsedData);
|
|
6391
|
-
if (selectCommonNum == commonUsedData.length) {
|
|
6392
|
-
commonCheckAll = true;
|
|
6393
|
-
}
|
|
6394
|
-
}
|
|
6395
6531
|
var isShowCheckAll = true;
|
|
6396
6532
|
if (checkType == "radio") {
|
|
6397
6533
|
isShowCheckAll = false;
|
|
6398
6534
|
}
|
|
6535
|
+
var commonUsedData = t.state.commonUsedData;
|
|
6536
|
+
if (commonUsedData != null && commonUsedData != undefined && commonUsedData.length > 0) {
|
|
6537
|
+
t.commonDataChecked(commonUsedData);
|
|
6538
|
+
}
|
|
6539
|
+
var commonCheckState = t.syncCommonCheckState(commonUsedData);
|
|
6399
6540
|
t.setState({
|
|
6400
|
-
selectCommonNum: selectCommonNum,
|
|
6541
|
+
selectCommonNum: commonCheckState.selectCommonNum,
|
|
6401
6542
|
isShowCheckAll: isShowCheckAll,
|
|
6402
|
-
commonCheckAll: commonCheckAll,
|
|
6543
|
+
commonCheckAll: commonCheckState.commonCheckAll,
|
|
6403
6544
|
isShowNav: false,
|
|
6404
6545
|
activeKey: obj.activeKey
|
|
6405
6546
|
}, function () {
|
|
@@ -7413,20 +7554,16 @@ var Page = function (_React$Component) {
|
|
|
7413
7554
|
|
|
7414
7555
|
}
|
|
7415
7556
|
|
|
7416
|
-
var selectCommonNum = 0;
|
|
7417
7557
|
if (commonSearchData.length > 0) {
|
|
7418
|
-
|
|
7419
|
-
}
|
|
7420
|
-
var commonCheckAll = false;
|
|
7421
|
-
if (commonSearchData != null && commonSearchData != undefined && selectCommonNum == commonSearchData.length) {
|
|
7422
|
-
commonCheckAll = true;
|
|
7558
|
+
t.commonDataChecked(commonSearchData);
|
|
7423
7559
|
}
|
|
7560
|
+
var commonCheckState = t.syncCommonCheckState(commonSearchData);
|
|
7424
7561
|
t.setState({
|
|
7425
7562
|
commonUsedData: commonSearchData,
|
|
7426
7563
|
commonTreeData: commonTreeData,
|
|
7427
|
-
selectCommonNum: selectCommonNum,
|
|
7564
|
+
selectCommonNum: commonCheckState.selectCommonNum,
|
|
7428
7565
|
isShowCheckAll: isShowCheckAll,
|
|
7429
|
-
commonCheckAll: commonCheckAll,
|
|
7566
|
+
commonCheckAll: commonCheckState.commonCheckAll,
|
|
7430
7567
|
commonName: value,
|
|
7431
7568
|
isShowNav: false,
|
|
7432
7569
|
activeKey: type
|
|
@@ -8577,6 +8714,34 @@ var Page = function (_React$Component) {
|
|
|
8577
8714
|
tabContent = _react2.default.createElement(
|
|
8578
8715
|
'div',
|
|
8579
8716
|
{ id: 'anchor', style: { overflow: "auto", height: '' + t.state.tabHeight }, className: 't-PB68 dd-top-border scrollHeight t-PR' },
|
|
8717
|
+
_react2.default.createElement(
|
|
8718
|
+
'div',
|
|
8719
|
+
{ className: t.state.isShowCheckAll && t.state.commonUsedData.length > 0 ? "" : "t-DN" },
|
|
8720
|
+
_react2.default.createElement(
|
|
8721
|
+
'div',
|
|
8722
|
+
{ className: 't-PL16 t-PR16 t-LH3 dd-bottom-border t-BCf', onClick: function onClick() {
|
|
8723
|
+
t.checkAllMember("common");
|
|
8724
|
+
} },
|
|
8725
|
+
_react2.default.createElement(
|
|
8726
|
+
HBox,
|
|
8727
|
+
{ vAlign: 'center' },
|
|
8728
|
+
_react2.default.createElement(
|
|
8729
|
+
HBox,
|
|
8730
|
+
null,
|
|
8731
|
+
_react2.default.createElement(
|
|
8732
|
+
'div',
|
|
8733
|
+
{ className: t.state.commonCheckAll ? 't-checkbox-field-icon-list checked' : 'un-checked t-checkbox-field-icon-list' },
|
|
8734
|
+
_react2.default.createElement('i', { className: 'iconfont icon-checked t-FCf t-FS14' })
|
|
8735
|
+
)
|
|
8736
|
+
),
|
|
8737
|
+
_react2.default.createElement(
|
|
8738
|
+
Box,
|
|
8739
|
+
{ flex: 1, className: 't-ML10' },
|
|
8740
|
+
'\u5168\u9009'
|
|
8741
|
+
)
|
|
8742
|
+
)
|
|
8743
|
+
)
|
|
8744
|
+
),
|
|
8580
8745
|
_react2.default.createElement(
|
|
8581
8746
|
'div',
|
|
8582
8747
|
{ className: t.state.commonName == "" && t.state.isShowNav ? "t-BCf7 t-OFA t-WSN dd-bottom-border" : "t-DN" },
|