fmui-base 2.0.13 → 2.0.15
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/form/form.js +4 -1
- package/lib/form/table.js +3 -1
- package/lib/process_info/processInfo.js +9 -1
- package/lib/selectMember/select.js +391 -57
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -1040,7 +1040,10 @@ var PageHome = function (_React$Component) {
|
|
|
1040
1040
|
if (form.popuserMap.chooseScope == 5) {
|
|
1041
1041
|
itemParam.queryLimit = form.popuserMap.chooseScope;
|
|
1042
1042
|
itemParam.limitData = getLoginUserInfo().orgId;
|
|
1043
|
-
} else if (form.popuserMap.chooseScope == "all") {} else {
|
|
1043
|
+
} else if (form.popuserMap.chooseScope == "all") {} else if (form.popuserMap.chooseScope == "3") {
|
|
1044
|
+
itemParam.queryLimit = 3;
|
|
1045
|
+
itemParam.limitData = form.popuserMap.chooseScopeData;
|
|
1046
|
+
} else {
|
|
1044
1047
|
itemParam.queryLimit = 5;
|
|
1045
1048
|
itemParam.limitData = form.popuserMap.chooseScope;
|
|
1046
1049
|
}
|
package/lib/form/table.js
CHANGED
|
@@ -936,7 +936,8 @@ var PageHome = function (_React$Component) {
|
|
|
936
936
|
//当为时间时且有differDate或者differHour函数
|
|
937
937
|
var differDateRegExp = new RegExp("differDate\\(", "g");
|
|
938
938
|
var differHourRegExp = new RegExp("differHour\\(", "g");
|
|
939
|
-
|
|
939
|
+
var differHalfDateRegExp = new RegExp("differHalfDate\\(", "g");
|
|
940
|
+
if (exp.match(differDateRegExp) || exp.match(differHourRegExp) || exp.match(differHalfDateRegExp)) {
|
|
940
941
|
//当有differDate函数
|
|
941
942
|
if (typeof filedItemValue == 'undefined' || filedItemValue == "" || filedItemValue == null) {
|
|
942
943
|
//filedItemValue = 0;
|
|
@@ -969,6 +970,7 @@ var PageHome = function (_React$Component) {
|
|
|
969
970
|
exp = exp.replace(new RegExp("rmb\\(", "g"), 'calculate.rmb(');
|
|
970
971
|
exp = exp.replace(new RegExp("differDate\\(", "g"), 'calculate.differDate(');
|
|
971
972
|
exp = exp.replace(new RegExp("differHour\\(", "g"), 'calculate.differHour(');
|
|
973
|
+
exp = exp.replace(new RegExp("differHalfDate\\(", "g"), 'calculate.differHalfDate(');
|
|
972
974
|
try {
|
|
973
975
|
var res = eval(exp);
|
|
974
976
|
} catch (e) {
|
|
@@ -894,7 +894,15 @@ var PageHome = function (_React$Component) {
|
|
|
894
894
|
|
|
895
895
|
if (t.state.listType == '0') {
|
|
896
896
|
var tipsTitle = content['tipsTitle'];
|
|
897
|
-
if (content['buttons'] == '' && content['message'] == '
|
|
897
|
+
if (content['buttons'] == '' && content['message'] == 'delete') {
|
|
898
|
+
t.setState({
|
|
899
|
+
status: '2'
|
|
900
|
+
});
|
|
901
|
+
_Dialog2.default.alert({
|
|
902
|
+
title: '',
|
|
903
|
+
content: '该流程已被删除'
|
|
904
|
+
});
|
|
905
|
+
} else if (content['buttons'] == '' && content['message'] == 'view') {
|
|
898
906
|
t.setState({
|
|
899
907
|
status: '2'
|
|
900
908
|
});
|
|
@@ -110,9 +110,82 @@ var Page = function (_React$Component) {
|
|
|
110
110
|
var orgHiddenId = getLoginUserInfo().orgId;
|
|
111
111
|
// var orgHiddenId = document.getElementById('orgHiddenId').value;
|
|
112
112
|
var baseCorpId = getLoginUserInfo().baseCorpId == null ? "0" : getLoginUserInfo().baseCorpId;
|
|
113
|
+
var chooseCode = "";
|
|
114
|
+
|
|
115
|
+
var popCode = "";
|
|
116
|
+
var popObj = props.chooseObj ? props.chooseObj : "";
|
|
117
|
+
var showSecret = _this.props.showSecret;
|
|
118
|
+
if (showSecret) {
|
|
119
|
+
//开启定密 只能选择用户
|
|
120
|
+
code = "user";
|
|
121
|
+
}
|
|
122
|
+
var propsCode = props.code;
|
|
123
|
+
if (propsCode) {
|
|
124
|
+
if (propsCode.substring(0, 1) != ",") {
|
|
125
|
+
popCode = "," + propsCode;
|
|
126
|
+
} else {
|
|
127
|
+
popCode = propsCode;
|
|
128
|
+
}
|
|
129
|
+
if (propsCode.substring(propsCode.length - 1, propsCode.length) != ",") {
|
|
130
|
+
popCode = popCode + ",";
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (popCode.indexOf(",inst,") >= 0 && popCode.indexOf(",dep,") >= 0) {
|
|
134
|
+
popCode = popCode.replace(",inst,", ",org,");
|
|
135
|
+
popCode = popCode.replace(",dep,", ",");
|
|
136
|
+
popObj += ",inst,dept";
|
|
137
|
+
} else if (popCode.indexOf(",inst,") >= 0) {
|
|
138
|
+
popCode = popCode.replace(",inst,", ",org,");
|
|
139
|
+
popObj += ",inst";
|
|
140
|
+
} else if (popCode.indexOf(",dep,") >= 0) {
|
|
141
|
+
popCode = popCode.replace(",dep,", ",org,");
|
|
142
|
+
popObj += ",dept";
|
|
143
|
+
}
|
|
144
|
+
var chooseName = "";
|
|
145
|
+
var chooseObj = "";
|
|
146
|
+
var extObj = {};
|
|
147
|
+
// var nameObj = {};
|
|
148
|
+
$.ajax({
|
|
149
|
+
type: 'GET',
|
|
150
|
+
url: getLoginUserInfo().context + "/api/m/cmp/popuser/mobile/getSceneInfo?token=" + getLoginUserInfo().token,
|
|
151
|
+
data: {
|
|
152
|
+
popCode: popCode,
|
|
153
|
+
chooseObj: popObj
|
|
154
|
+
},
|
|
155
|
+
dataType: "json",
|
|
156
|
+
async: false,
|
|
157
|
+
success: function success(data) {
|
|
158
|
+
if (data.type == "success") {
|
|
159
|
+
if (data.data && data.data.length > 0) {
|
|
160
|
+
for (var j = 0; j < data.data.length; j++) {
|
|
161
|
+
chooseCode += data.data[j].popuCode + ",";
|
|
162
|
+
if (data.data[j].chooseObj) {
|
|
163
|
+
chooseObj += data.data[j].chooseObj ? data.data[j].chooseObj : "" + ",";
|
|
164
|
+
}
|
|
165
|
+
chooseName += data.data[j].popuName + ",";
|
|
166
|
+
if (data.data[j].popuUrl) {
|
|
167
|
+
extObj[data.data[j].popuCode] = data.data[j];
|
|
168
|
+
// nameObj[chooseCode]=data.data[j].popuName;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (chooseCode) {
|
|
173
|
+
chooseCode = chooseCode.substring(0, chooseCode.length - 1);
|
|
174
|
+
}
|
|
175
|
+
if (chooseObj) {
|
|
176
|
+
chooseObj = chooseObj.substring(0, chooseObj.length - 1);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
} });
|
|
180
|
+
if (popCode.indexOf("common,") >= 0) {
|
|
181
|
+
chooseCode = "common," + chooseCode;
|
|
182
|
+
}
|
|
113
183
|
_this.state = {
|
|
114
184
|
bottomHeight: bottomHeight,
|
|
115
185
|
baseCorpId: baseCorpId,
|
|
186
|
+
chooseCode: chooseCode,
|
|
187
|
+
extObj: extObj,
|
|
188
|
+
chooseObj: popObj,
|
|
116
189
|
label: props.label,
|
|
117
190
|
required: props.required,
|
|
118
191
|
isDelete: props.isDelete,
|
|
@@ -331,45 +404,31 @@ var Page = function (_React$Component) {
|
|
|
331
404
|
}, {
|
|
332
405
|
key: 'getRealCode',
|
|
333
406
|
value: function getRealCode() {
|
|
334
|
-
var chooseObj = this.
|
|
335
|
-
var code =
|
|
336
|
-
if
|
|
337
|
-
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
var showSecret = this.props.showSecret;
|
|
342
|
-
if (showSecret) {
|
|
343
|
-
//开启定密 只能选择用户
|
|
344
|
-
code = "user";
|
|
345
|
-
}
|
|
346
|
-
code = "," + code + ",";
|
|
347
|
-
if (code.indexOf(",inst,") >= 0 && code.indexOf(",dep,") >= 0) {
|
|
348
|
-
code = code.replace(",inst,", ",org,");
|
|
349
|
-
code = code.replace(",dep,", ",");
|
|
350
|
-
} else if (code.indexOf(",inst,") >= 0) {
|
|
351
|
-
code = code.replace(",inst,", ",org,");
|
|
352
|
-
} else if (code.indexOf(",dep,") >= 0) {
|
|
353
|
-
code = code.replace(",dep,", ",org,");
|
|
354
|
-
}
|
|
407
|
+
// var chooseObj = this.state.chooseObj;
|
|
408
|
+
var code = this.state.chooseCode;
|
|
409
|
+
// if(chooseObj){
|
|
410
|
+
// code = this.state.chooseObj;
|
|
411
|
+
// }else{
|
|
412
|
+
// code = this.state.chooseCode;
|
|
413
|
+
// }
|
|
355
414
|
// if(code.indexOf(",userNotOrg,org,")>=0){
|
|
356
415
|
// code = code.replace(",userNotOrg,org,", ",userAndOrg,");
|
|
357
416
|
// }
|
|
358
|
-
if (code != "" && code != null && code != undefined) {
|
|
359
|
-
|
|
360
|
-
}
|
|
417
|
+
// if (code != "" && code != null && code != undefined) {
|
|
418
|
+
// code = code.substring(1, code.length - 1);
|
|
419
|
+
// }
|
|
361
420
|
return code;
|
|
362
421
|
}
|
|
363
422
|
}, {
|
|
364
423
|
key: 'getOrgType',
|
|
365
424
|
value: function getOrgType() {
|
|
366
425
|
var orgType = "";
|
|
367
|
-
var chooseObj = this.
|
|
426
|
+
var chooseObj = this.state.chooseObj;
|
|
368
427
|
var code = "";
|
|
369
428
|
if (chooseObj) {
|
|
370
|
-
code = this.
|
|
429
|
+
code = this.state.chooseObj;
|
|
371
430
|
} else {
|
|
372
|
-
code = this.
|
|
431
|
+
code = this.state.chooseCode;
|
|
373
432
|
}
|
|
374
433
|
if (code.indexOf("inst") >= 0 && code.indexOf("dep") >= 0) {
|
|
375
434
|
orgType = "";
|
|
@@ -387,7 +446,7 @@ var Page = function (_React$Component) {
|
|
|
387
446
|
}, {
|
|
388
447
|
key: 'getChooseType',
|
|
389
448
|
value: function getChooseType() {
|
|
390
|
-
var chooseObj = this.
|
|
449
|
+
var chooseObj = this.state.chooseObj;
|
|
391
450
|
var chooseType = this.props.chooseType;
|
|
392
451
|
var code = this.getRealCode();
|
|
393
452
|
if (code == null || code == undefined) {
|
|
@@ -399,52 +458,52 @@ var Page = function (_React$Component) {
|
|
|
399
458
|
|
|
400
459
|
if (chooseObj) {
|
|
401
460
|
// code = this.props.chooseObj;
|
|
402
|
-
if (
|
|
461
|
+
if (chooseObj.indexOf("userNotOrg") >= 0 && chooseObj.indexOf("org") >= 0) {
|
|
403
462
|
chooseType = "userAndOrg";
|
|
404
|
-
} else if (
|
|
463
|
+
} else if (chooseObj.indexOf("userNotOrg") >= 0 && chooseObj.indexOf("org") < 0) {
|
|
405
464
|
chooseType = "userNotOrg";
|
|
406
|
-
} else if (
|
|
465
|
+
} else if (chooseObj.indexOf("org") >= 0 || chooseObj.indexOf("dept") >= 0 || chooseObj.indexOf("inst") >= 0) {
|
|
407
466
|
chooseType = "org";
|
|
408
467
|
} else {
|
|
409
468
|
chooseType = "";
|
|
410
469
|
}
|
|
411
470
|
|
|
412
|
-
if (
|
|
471
|
+
if (chooseObj.indexOf("userAndStation") >= 0) {
|
|
413
472
|
chooseType += ",userAndStation";
|
|
414
|
-
} else if (
|
|
473
|
+
} else if (chooseObj.indexOf("userNotStation") >= 0) {
|
|
415
474
|
chooseType += ",userNotStation";
|
|
416
|
-
} else if (
|
|
475
|
+
} else if (chooseObj.indexOf("station") >= 0) {
|
|
417
476
|
chooseType += ",station";
|
|
418
477
|
}
|
|
419
478
|
|
|
420
|
-
if (
|
|
479
|
+
if (chooseObj.indexOf("userAndGroup") >= 0) {
|
|
421
480
|
chooseType += ",userAndGroup";
|
|
422
|
-
} else if (
|
|
481
|
+
} else if (chooseObj.indexOf("userNotGroup") >= 0) {
|
|
423
482
|
chooseType += ",userNotGroup";
|
|
424
|
-
} else if (
|
|
483
|
+
} else if (chooseObj.indexOf("group") >= 0) {
|
|
425
484
|
chooseType += ",group";
|
|
426
485
|
}
|
|
427
|
-
if (
|
|
486
|
+
if (chooseObj.indexOf("userAndPersonGroup") >= 0) {
|
|
428
487
|
chooseType += ",userAndPersonGroup";
|
|
429
|
-
} else if (
|
|
488
|
+
} else if (chooseObj.indexOf("userNotPersonGroup") >= 0) {
|
|
430
489
|
chooseType += ",userNotPersonGroup";
|
|
431
|
-
} else if (
|
|
490
|
+
} else if (chooseObj.indexOf("personGroup") >= 0) {
|
|
432
491
|
chooseType += ",personGroup";
|
|
433
492
|
}
|
|
434
493
|
|
|
435
|
-
if (
|
|
494
|
+
if (chooseObj.indexOf("userAndDuty") >= 0) {
|
|
436
495
|
chooseType += ",userAndDuty";
|
|
437
|
-
} else if (
|
|
496
|
+
} else if (chooseObj.indexOf("userNotDuty") >= 0) {
|
|
438
497
|
chooseType += ",userNotDuty";
|
|
439
|
-
} else if (
|
|
498
|
+
} else if (chooseObj.indexOf("duty") >= 0) {
|
|
440
499
|
chooseType += ",duty";
|
|
441
500
|
}
|
|
442
501
|
|
|
443
|
-
if (
|
|
502
|
+
if (chooseObj.indexOf("userAndPoliticalOutlook") >= 0) {
|
|
444
503
|
chooseType += ",userAndPoliticalOutlook";
|
|
445
|
-
} else if (
|
|
504
|
+
} else if (chooseObj.indexOf("userNotPoliticalOutlook") >= 0) {
|
|
446
505
|
chooseType += ",userNotPoliticalOutlook";
|
|
447
|
-
} else if (
|
|
506
|
+
} else if (chooseObj.indexOf("politicalOutlook") >= 0) {
|
|
448
507
|
chooseType += ",politicalOutlook";
|
|
449
508
|
}
|
|
450
509
|
} else {
|
|
@@ -1686,6 +1745,16 @@ var Page = function (_React$Component) {
|
|
|
1686
1745
|
} else {
|
|
1687
1746
|
url += "&type=2";
|
|
1688
1747
|
}
|
|
1748
|
+
} else {
|
|
1749
|
+
url = context + this.dealwithExtUrl(this.state.extObj[type].popuUrl) + "?token=" + token + "&searchData=" + search + "&corpId=" + realCorpId + searchLimit;
|
|
1750
|
+
}
|
|
1751
|
+
return url;
|
|
1752
|
+
}
|
|
1753
|
+
}, {
|
|
1754
|
+
key: 'dealwithExtUrl',
|
|
1755
|
+
value: function dealwithExtUrl(url) {
|
|
1756
|
+
if (url) {
|
|
1757
|
+
url = url.replace("/w/", "/m/");
|
|
1689
1758
|
}
|
|
1690
1759
|
return url;
|
|
1691
1760
|
}
|
|
@@ -3644,6 +3713,9 @@ var Page = function (_React$Component) {
|
|
|
3644
3713
|
} else if (type == "politicalOutlook") {
|
|
3645
3714
|
scope.scopeType = "politicalOutlook";
|
|
3646
3715
|
scope.scopeName = dataList[index].politicalOutlookName;
|
|
3716
|
+
} else {
|
|
3717
|
+
scope.scopeType = type;
|
|
3718
|
+
scope.scopeName = dataList[index][type + "Name"];
|
|
3647
3719
|
}
|
|
3648
3720
|
if (checkType == "radio") {
|
|
3649
3721
|
scopeList[0] = scope;
|
|
@@ -4302,6 +4374,41 @@ var Page = function (_React$Component) {
|
|
|
4302
4374
|
}, function () {
|
|
4303
4375
|
t.instance.update(t.getContent(), true);
|
|
4304
4376
|
});
|
|
4377
|
+
} else {
|
|
4378
|
+
var _t$setState;
|
|
4379
|
+
|
|
4380
|
+
var extList = t.state[type + "List"];
|
|
4381
|
+
extList[index].checked = !extList[index].checked;
|
|
4382
|
+
var total = t.state.total;
|
|
4383
|
+
var selectExtNum = t.state["select" + type + "Num"]; //当前组织下选中的用户数量
|
|
4384
|
+
// var selectUsers = selectedList.selectUsers;
|
|
4385
|
+
// if (selectUsers == null || selectUsers == undefined) {
|
|
4386
|
+
// selectUsers = [];
|
|
4387
|
+
// }
|
|
4388
|
+
var selectExts = selectedList["select" + type + "s"];
|
|
4389
|
+
if (selectExts == null || selectExts == undefined) {
|
|
4390
|
+
selectExts = [];
|
|
4391
|
+
}
|
|
4392
|
+
var result = t.checkOneItem("1", extList[index].checked, selectExts, extList, checkType, total, selectExtNum, index, scopeList, type);
|
|
4393
|
+
total = result.total;
|
|
4394
|
+
selectExtNum = result.selectNum;
|
|
4395
|
+
selectedList["select" + type + "s"] = selectExts;
|
|
4396
|
+
// var navList = t.state.navPoliticalOutlookList;
|
|
4397
|
+
// var noUsePoliticalOutlookNum = t.state.noUsePoliticalOutlookNum;
|
|
4398
|
+
// var selectPoliticalOutlookUserNum = 0;
|
|
4399
|
+
// var politicalOutlookUserList = [];
|
|
4400
|
+
// if (chooseType.indexOf("userAndPoliticalOutlook") >= 0) {
|
|
4401
|
+
// selectPoliticalOutlookUserNum = t.state.selectPoliticalOutlookUserNum;
|
|
4402
|
+
// politicalOutlookUserList = t.state.politicalOutlookUserList;
|
|
4403
|
+
// }
|
|
4404
|
+
// if ((selectPoliticalOutlookNum + selectPoliticalOutlookUserNum) == (politicalOutlookUserList.length + politicalOutlookList.length - noUsePoliticalOutlookNum)) {
|
|
4405
|
+
// navList[navList.length - 1].checkAll = true;
|
|
4406
|
+
// } else {
|
|
4407
|
+
// navList[navList.length - 1].checkAll = false;
|
|
4408
|
+
// }
|
|
4409
|
+
t.setState((_t$setState = {}, _defineProperty(_t$setState, type + "List", extList), _defineProperty(_t$setState, 'total', total), _defineProperty(_t$setState, "select" + type + "Num", selectExtNum), _defineProperty(_t$setState, 'selectedList', selectedList), _defineProperty(_t$setState, 'scopeList', scopeList), _t$setState), function () {
|
|
4410
|
+
_this4.instance.update(_this4.getContent(), true);
|
|
4411
|
+
});
|
|
4305
4412
|
}
|
|
4306
4413
|
}
|
|
4307
4414
|
|
|
@@ -5822,6 +5929,55 @@ var Page = function (_React$Component) {
|
|
|
5822
5929
|
}).catch(function (error) {
|
|
5823
5930
|
alert("2745错误:" + error);
|
|
5824
5931
|
});
|
|
5932
|
+
} else {
|
|
5933
|
+
// var checkType = this.props.checkType;
|
|
5934
|
+
// var isShowCheckAll = true;
|
|
5935
|
+
// if (checkType == "radio") {
|
|
5936
|
+
// isShowCheckAll = false;
|
|
5937
|
+
// }
|
|
5938
|
+
var url = t.getFetchUrl(type, "", "", false, true);
|
|
5939
|
+
fetch(url, {
|
|
5940
|
+
method: "GET",
|
|
5941
|
+
mode: "cors",
|
|
5942
|
+
headers: {
|
|
5943
|
+
'Accept': 'application/json, text/plain, */*',
|
|
5944
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
5945
|
+
}
|
|
5946
|
+
}).then(function (response) {
|
|
5947
|
+
return response.json();
|
|
5948
|
+
}).then(function (result) {
|
|
5949
|
+
var _t$setState2;
|
|
5950
|
+
|
|
5951
|
+
//alert(JSON.stringify(result));
|
|
5952
|
+
//console.log("fetch请求数据"+JSON.stringify(result));
|
|
5953
|
+
var extList = result.content[type + "List"];
|
|
5954
|
+
// numObj["select"+code+"Num"] = 0;
|
|
5955
|
+
// numObj["noUse"+code+"Num"] = 0;
|
|
5956
|
+
var selectExtNum = 0,
|
|
5957
|
+
noUseExtNum = 0;
|
|
5958
|
+
var navList = [{ "id": "0", "orgName": "全部", "checkAll": false }];
|
|
5959
|
+
if (extList == null || extList == undefined) {
|
|
5960
|
+
extList = [];
|
|
5961
|
+
} else {
|
|
5962
|
+
var selectExts = t.state.selectedList["select" + type + "s"] ? t.state.selectedList["select" + type + "s"] : [];
|
|
5963
|
+
selectExtNum = t.dataIsChecked(extList, selectExts, selectExtNum);
|
|
5964
|
+
noUseExtNum = t.countNoUseNum(extList); //不可选岗位数量
|
|
5965
|
+
if (extList.length == noUseExtNum) {
|
|
5966
|
+
//全部不可选
|
|
5967
|
+
navList[0].canUse = "0";
|
|
5968
|
+
} else {
|
|
5969
|
+
navList[0].canUse = "1";
|
|
5970
|
+
if (selectExtNum == extList.length - noUseExtNum) {
|
|
5971
|
+
navList[0].checkAll = true;
|
|
5972
|
+
}
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5975
|
+
t.setState((_t$setState2 = {}, _defineProperty(_t$setState2, type + "List", extList), _defineProperty(_t$setState2, "select" + type + "Num", selectExtNum), _defineProperty(_t$setState2, "noUse" + type + "Num", noUseExtNum), _defineProperty(_t$setState2, 'activeKey', type), _t$setState2), function () {
|
|
5976
|
+
t.instance.update(t.getContent());
|
|
5977
|
+
});
|
|
5978
|
+
}).catch(function (error) {
|
|
5979
|
+
alert("2745错误:" + error);
|
|
5980
|
+
});
|
|
5825
5981
|
}
|
|
5826
5982
|
}
|
|
5827
5983
|
|
|
@@ -6753,6 +6909,58 @@ var Page = function (_React$Component) {
|
|
|
6753
6909
|
t.instance.update(t.getContent());
|
|
6754
6910
|
});
|
|
6755
6911
|
}
|
|
6912
|
+
} else {
|
|
6913
|
+
// var checkType = this.props.checkType;
|
|
6914
|
+
// var isShowCheckAll = true;
|
|
6915
|
+
// if (checkType == "radio") {
|
|
6916
|
+
// isShowCheckAll = false;
|
|
6917
|
+
// }
|
|
6918
|
+
var url = t.getFetchUrl(obj.active, "", "", false, true);
|
|
6919
|
+
fetch(url, {
|
|
6920
|
+
method: "GET",
|
|
6921
|
+
mode: "cors",
|
|
6922
|
+
headers: {
|
|
6923
|
+
'Accept': 'application/json, text/plain, */*',
|
|
6924
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
6925
|
+
}
|
|
6926
|
+
}).then(function (response) {
|
|
6927
|
+
return response.json();
|
|
6928
|
+
}).then(function (result) {
|
|
6929
|
+
//alert(JSON.stringify(result));
|
|
6930
|
+
//console.log("fetch请求数据"+JSON.stringify(result));
|
|
6931
|
+
if (result.type == "success") {
|
|
6932
|
+
var _t$setState3;
|
|
6933
|
+
|
|
6934
|
+
var extList = result.content[obj.active + "List"];
|
|
6935
|
+
var numObj = {};
|
|
6936
|
+
// numObj["select"+code+"Num"] = 0;
|
|
6937
|
+
// numObj["noUse"+code+"Num"] = 0;
|
|
6938
|
+
var selectExtNum = 0,
|
|
6939
|
+
noUseExtNum = 0;
|
|
6940
|
+
var navList = [{ "id": "0", "orgName": "全部", "checkAll": false }];
|
|
6941
|
+
if (extList == null || extList == undefined) {
|
|
6942
|
+
extList = [];
|
|
6943
|
+
} else {
|
|
6944
|
+
var selectExts = t.state.selectedList["select" + obj.active + "s"] ? t.state.selectedList["select" + obj.active + "s"] : [];
|
|
6945
|
+
selectExtNum = t.dataIsChecked(extList, selectExts, selectExtNum);
|
|
6946
|
+
noUseExtNum = t.countNoUseNum(extList); //不可选岗位数量
|
|
6947
|
+
if (extList.length == noUseExtNum) {
|
|
6948
|
+
//全部不可选
|
|
6949
|
+
navList[0].canUse = "0";
|
|
6950
|
+
} else {
|
|
6951
|
+
navList[0].canUse = "1";
|
|
6952
|
+
if (selectExtNum == extList.length - noUseExtNum) {
|
|
6953
|
+
navList[0].checkAll = true;
|
|
6954
|
+
}
|
|
6955
|
+
}
|
|
6956
|
+
}
|
|
6957
|
+
t.setState((_t$setState3 = {}, _defineProperty(_t$setState3, obj.active + "List", extList), _defineProperty(_t$setState3, "select" + obj.active + "Num", selectPoliticalOutlookNum), _defineProperty(_t$setState3, "noUse" + obj.active + "Num", numObj["noUse" + obj.active + "Num"]), _defineProperty(_t$setState3, 'activeKey', obj.active), _t$setState3), function () {
|
|
6958
|
+
t.instance.update(t.getContent());
|
|
6959
|
+
});
|
|
6960
|
+
}
|
|
6961
|
+
}).catch(function (error) {
|
|
6962
|
+
alert("2745错误:" + error);
|
|
6963
|
+
});
|
|
6756
6964
|
}
|
|
6757
6965
|
}
|
|
6758
6966
|
//我的部门搜索
|
|
@@ -7530,18 +7738,27 @@ var Page = function (_React$Component) {
|
|
|
7530
7738
|
selectPersonalGroups = selectedList.selectPersonalGroups,
|
|
7531
7739
|
selectDutys = selectedList.selectDutys,
|
|
7532
7740
|
selectPoliticalOutlooks = selectedList.selectPoliticalOutlooks;
|
|
7741
|
+
|
|
7742
|
+
var extObjArray = [];
|
|
7743
|
+
for (var key in t.state.extObj) {
|
|
7744
|
+
var extObjItem = t.state.extObj[key];
|
|
7745
|
+
extObjItem.selectedList = selectedList["select" + key + "s"];
|
|
7746
|
+
extObjArray.push(extObjItem);
|
|
7747
|
+
}
|
|
7533
7748
|
var isRadio = t.props.checkType == 'radio' ? true : false;
|
|
7534
7749
|
|
|
7535
|
-
var chooseObj = this.
|
|
7750
|
+
// var chooseObj = this.state.chooseObj;
|
|
7751
|
+
var chooseCode = this.state.chooseCode;
|
|
7536
7752
|
var getOrgType = this.getOrgType();
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7753
|
+
var selectCode = "";
|
|
7754
|
+
if (chooseCode) {
|
|
7755
|
+
// selectCode = t.props.code.split(",");
|
|
7756
|
+
// }else{
|
|
7540
7757
|
var propsCode = this.getRealCode();
|
|
7541
7758
|
if (propsCode == undefined || propsCode == null) {
|
|
7542
7759
|
propsCode = "user";
|
|
7543
7760
|
}
|
|
7544
|
-
|
|
7761
|
+
selectCode = propsCode.split(",");
|
|
7545
7762
|
var userIndex = -1,
|
|
7546
7763
|
orgIndex = -1;
|
|
7547
7764
|
for (var i = 0; i < selectCode.length; i++) {
|
|
@@ -7876,7 +8093,7 @@ var Page = function (_React$Component) {
|
|
|
7876
8093
|
),
|
|
7877
8094
|
_react2.default.createElement(
|
|
7878
8095
|
'div',
|
|
7879
|
-
_defineProperty({ className:
|
|
8096
|
+
_defineProperty({ className: selectRoles.length > 0 ? "dd-appwrap" : "t-DN" }, 'className', 'role-list mt-10'),
|
|
7880
8097
|
selectRoles.map(function (item, i) {
|
|
7881
8098
|
return _react2.default.createElement(
|
|
7882
8099
|
'div',
|
|
@@ -7912,7 +8129,7 @@ var Page = function (_React$Component) {
|
|
|
7912
8129
|
),
|
|
7913
8130
|
_react2.default.createElement(
|
|
7914
8131
|
'div',
|
|
7915
|
-
_defineProperty({ className:
|
|
8132
|
+
_defineProperty({ className: selectPoliticalOutlooks.length > 0 ? "dd-appwrap" : "t-DN" }, 'className', 'political-list mt-10'),
|
|
7916
8133
|
selectPoliticalOutlooks.map(function (item, i) {
|
|
7917
8134
|
return _react2.default.createElement(
|
|
7918
8135
|
'div',
|
|
@@ -7945,7 +8162,45 @@ var Page = function (_React$Component) {
|
|
|
7945
8162
|
)
|
|
7946
8163
|
);
|
|
7947
8164
|
})
|
|
7948
|
-
)
|
|
8165
|
+
),
|
|
8166
|
+
extObjArray.map(function (itemJ, j) {
|
|
8167
|
+
return _react2.default.createElement(
|
|
8168
|
+
'div',
|
|
8169
|
+
_defineProperty({ className: itemJ["selectedList"] && itemJ["selectedList"].length > 0 ? "dd-appwrap" : "t-DN" }, 'className', 'political-list mt-10'),
|
|
8170
|
+
itemJ["selectedList"] && itemJ["selectedList"].map(function (item, i) {
|
|
8171
|
+
return _react2.default.createElement(
|
|
8172
|
+
'div',
|
|
8173
|
+
{ className: 'selected-list-item' },
|
|
8174
|
+
_react2.default.createElement(
|
|
8175
|
+
'div',
|
|
8176
|
+
{ className: 't-avatar t-WH40 t-LH40 t-BCblue icon' },
|
|
8177
|
+
_react2.default.createElement('i', { className: 't-FS20 iconfont icon-group t-FCf' })
|
|
8178
|
+
),
|
|
8179
|
+
_react2.default.createElement(
|
|
8180
|
+
'div',
|
|
8181
|
+
{ className: 'right-content' },
|
|
8182
|
+
_react2.default.createElement(
|
|
8183
|
+
'li',
|
|
8184
|
+
null,
|
|
8185
|
+
_react2.default.createElement(
|
|
8186
|
+
'p',
|
|
8187
|
+
null,
|
|
8188
|
+
item[itemJ.popuCode + "Name"]
|
|
8189
|
+
),
|
|
8190
|
+
_react2.default.createElement('p', null)
|
|
8191
|
+
)
|
|
8192
|
+
),
|
|
8193
|
+
_react2.default.createElement(
|
|
8194
|
+
'div',
|
|
8195
|
+
{ className: 'delete-icon' },
|
|
8196
|
+
_react2.default.createElement('i', { className: 'iconfont icon-close', onClick: function onClick() {
|
|
8197
|
+
t.deleteItemMember(i, itemJ.popuCode);
|
|
8198
|
+
} })
|
|
8199
|
+
)
|
|
8200
|
+
);
|
|
8201
|
+
})
|
|
8202
|
+
);
|
|
8203
|
+
})
|
|
7949
8204
|
),
|
|
7950
8205
|
_react2.default.createElement(
|
|
7951
8206
|
'div',
|
|
@@ -9852,6 +10107,86 @@ var Page = function (_React$Component) {
|
|
|
9852
10107
|
} })),
|
|
9853
10108
|
tabContent
|
|
9854
10109
|
);
|
|
10110
|
+
} else {
|
|
10111
|
+
var isShowCheckAll = t.state.isShowCheckAll;
|
|
10112
|
+
// if (isShowCheckAll) {
|
|
10113
|
+
// if (chooseType.indexOf("userNotPoliticalOutlook") < 0 && t.state.politicalOutlookList.length > 0) {
|
|
10114
|
+
// isShowCheckAll = true;
|
|
10115
|
+
// } else if ((chooseType.indexOf("userAndPoliticalOutlook") >= 0 || chooseType.indexOf("userNotPoliticalOutlook") >= 0) && t.state.politicalOutlookUserList.length > 0) {
|
|
10116
|
+
// isShowCheckAll = true;
|
|
10117
|
+
// } else {
|
|
10118
|
+
// isShowCheckAll = false;
|
|
10119
|
+
// }
|
|
10120
|
+
// }
|
|
10121
|
+
// var isShowThisOrg = t.state.isShowThisOrg;
|
|
10122
|
+
// if (isShowThisOrg) {
|
|
10123
|
+
// if ((chooseType.indexOf("userAndPoliticalOutlook") >= 0 || chooseType.indexOf("userNotPoliticalOutlook") >= 0) && t.state.politicalOutlookUserList.length > 0) {
|
|
10124
|
+
// isShowThisOrg = true;
|
|
10125
|
+
// } else {
|
|
10126
|
+
// isShowThisOrg = false;
|
|
10127
|
+
// }
|
|
10128
|
+
// }
|
|
10129
|
+
var tabContent = _react2.default.createElement(
|
|
10130
|
+
'div',
|
|
10131
|
+
{ id: 'anchor', style: { overflow: "auto", height: '' + t.state.tabHeight }, className: 't-PB68 dd-top-border scrollHeight t-PR t-BCf' },
|
|
10132
|
+
t.state[code + "List"] && t.state[code + "List"].length <= 0 ? _react2.default.createElement(
|
|
10133
|
+
'div',
|
|
10134
|
+
{ className: 'nodata-wrapper' },
|
|
10135
|
+
_react2.default.createElement(
|
|
10136
|
+
VBox,
|
|
10137
|
+
{ vAlign: 'center', hAlign: 'center', className: 'nodata' },
|
|
10138
|
+
_react2.default.createElement(
|
|
10139
|
+
Box,
|
|
10140
|
+
null,
|
|
10141
|
+
_react2.default.createElement(
|
|
10142
|
+
'div',
|
|
10143
|
+
null,
|
|
10144
|
+
_react2.default.createElement('img', { src: _variables.nodataIcon, alt: '', style: { width: 68 + 'px' } })
|
|
10145
|
+
)
|
|
10146
|
+
),
|
|
10147
|
+
_react2.default.createElement(
|
|
10148
|
+
Box,
|
|
10149
|
+
{ className: 't-FCc' },
|
|
10150
|
+
t.state.nodataText
|
|
10151
|
+
)
|
|
10152
|
+
)
|
|
10153
|
+
) : "",
|
|
10154
|
+
t.state[code + "List"] && t.state[code + "List"].map(function (extObjItem, index) {
|
|
10155
|
+
if (extObjItem.canUse == '0') {
|
|
10156
|
+
return;
|
|
10157
|
+
}
|
|
10158
|
+
return _react2.default.createElement(
|
|
10159
|
+
HBox,
|
|
10160
|
+
{ vAlign: 'center', className: 'dd-bottom-border t-BCf' },
|
|
10161
|
+
_react2.default.createElement(
|
|
10162
|
+
HBox,
|
|
10163
|
+
{ className: 't-PL16 t-PR10', onClick: function onClick() {
|
|
10164
|
+
t.checkItemMember(index, code);
|
|
10165
|
+
} },
|
|
10166
|
+
_react2.default.createElement(
|
|
10167
|
+
'div',
|
|
10168
|
+
{ className: extObjItem.canUse == '0' ? 't-checkbox-field-icon-list disabled' : extObjItem.checked ? 't-checkbox-field-icon-list checked' + (isRadio ? ' t-list-cricle' : '') : 'un-checked t-checkbox-field-icon-list' + (isRadio ? ' t-list-cricle' : '') },
|
|
10169
|
+
_react2.default.createElement('i', { className: 'iconfont icon-checked t-FCf t-FS14' })
|
|
10170
|
+
)
|
|
10171
|
+
),
|
|
10172
|
+
_react2.default.createElement(
|
|
10173
|
+
Box,
|
|
10174
|
+
{ className: 't-PT10 t-PB10 t-PR6' },
|
|
10175
|
+
_react2.default.createElement('i', { className: 'iconfont icon-group t-FCd t-FS20' })
|
|
10176
|
+
),
|
|
10177
|
+
_react2.default.createElement(
|
|
10178
|
+
Box,
|
|
10179
|
+
{ flex: 1, className: 't-FS16 t-PL4 t-PR10 t-omit' },
|
|
10180
|
+
extObjItem[code + "Name"]
|
|
10181
|
+
)
|
|
10182
|
+
);
|
|
10183
|
+
})
|
|
10184
|
+
);
|
|
10185
|
+
return _react2.default.createElement(
|
|
10186
|
+
_Tab2.default.Item,
|
|
10187
|
+
{ title: t.state.extObj[code].popuName, key: code, className: selectCode.indexOf(code) >= 0 ? "" : "t-DN" },
|
|
10188
|
+
tabContent
|
|
10189
|
+
);
|
|
9855
10190
|
}
|
|
9856
10191
|
})
|
|
9857
10192
|
),
|
|
@@ -10142,7 +10477,6 @@ var Page = function (_React$Component) {
|
|
|
10142
10477
|
isShowCheckAll: false,
|
|
10143
10478
|
isShowThisOrg: false
|
|
10144
10479
|
}, _defineProperty(_setState, 'personalGroupName', ""), _defineProperty(_setState, 'personalGroupList', []), _defineProperty(_setState, 'personalGroupUserList', []), _defineProperty(_setState, 'navPersonalGroupList', []), _defineProperty(_setState, 'dutyName', ""), _defineProperty(_setState, 'dutyList', []), _defineProperty(_setState, 'dutyUserList', []), _defineProperty(_setState, 'navDutyList', []), _defineProperty(_setState, 'politicalOutlookName', ""), _defineProperty(_setState, 'politicalOutlookList', []), _defineProperty(_setState, 'politicalOutlookUserList', []), _defineProperty(_setState, 'navPoliticalOutlookList', []), _setState));
|
|
10145
|
-
debugger;
|
|
10146
10480
|
this.props.onChange(result);
|
|
10147
10481
|
}
|
|
10148
10482
|
/*$("#App").css({
|
|
@@ -10323,8 +10657,8 @@ var Page = function (_React$Component) {
|
|
|
10323
10657
|
var isShowInMyOrg = _this6.state.isShowInMyOrg;
|
|
10324
10658
|
if (isShowInMyOrg) {
|
|
10325
10659
|
//this.getSelectData();
|
|
10326
|
-
var
|
|
10327
|
-
var type =
|
|
10660
|
+
var _code = _this6.getRealCode().split(",");
|
|
10661
|
+
var type = _code[0];
|
|
10328
10662
|
var realUserCode = "user";
|
|
10329
10663
|
var chooseObj = _this6.props.chooseObj;
|
|
10330
10664
|
if (chooseObj) {
|