fmui-base 1.0.38 → 1.0.40
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/comment_list/List.js +22 -13
- package/lib/comment_list/List.less +3 -0
- package/lib/form/form.js +212 -72
- package/lib/form/table.js +1 -1
- package/lib/process_info/processInfo.js +106 -38
- package/package.json +72 -72
package/README.md
CHANGED
package/lib/comment_list/List.js
CHANGED
|
@@ -108,10 +108,12 @@ var PageHome = function (_React$Component) {
|
|
|
108
108
|
_db2.default.FlowApproval.verifySign(param).then(function (content) {
|
|
109
109
|
var result = content.verifySignRes;
|
|
110
110
|
if (result == 'success') {
|
|
111
|
+
$("#commentSign-" + item.id).removeClass('t-PR16');
|
|
111
112
|
$("#" + item.id + "_sucess").show();
|
|
112
113
|
}
|
|
113
114
|
}).catch(function (error) {
|
|
114
115
|
if (error.errorMsg == "签名值与原文不匹配") {
|
|
116
|
+
$("#commentSign-" + item.id).removeClass('t-PR16');
|
|
115
117
|
$("#" + item.id + "_fail").show();
|
|
116
118
|
}
|
|
117
119
|
// else{
|
|
@@ -268,33 +270,33 @@ var PageHome = function (_React$Component) {
|
|
|
268
270
|
{ className: 't-PR5' },
|
|
269
271
|
item.orgShowName
|
|
270
272
|
);
|
|
271
|
-
var signPicHtml = _react2.default.createElement('img', { className: 't-H64 t-W64 t-PR5', src: t.state.loadImg + item.signPic });
|
|
273
|
+
var signPicHtml = item.signPic ? _react2.default.createElement('img', { className: 't-H64 t-W64 t-PR5', src: t.state.loadImg + item.signPic }) : "";
|
|
272
274
|
var taskNameHtml = _react2.default.createElement(
|
|
273
275
|
'span',
|
|
274
276
|
{ className: 't-PR5' },
|
|
275
277
|
item.taskName
|
|
276
278
|
);
|
|
277
279
|
var inscriptionShowArray = item.inscriptionShow.split(",");
|
|
278
|
-
var _returnHtml = inscriptionShowArray.map(function (
|
|
279
|
-
if (
|
|
280
|
-
if (
|
|
280
|
+
var _returnHtml = inscriptionShowArray.map(function (inscriptionItem) {
|
|
281
|
+
if (inscriptionItem) {
|
|
282
|
+
if (inscriptionItem == "userName" && (item.inscriptionShow.indexOf("signImg") < 0 || item.inscriptionShow.indexOf("signImg") >= 0 && (typeof item.signPic == 'undefined' || item.signPic == null || item.signPic == ""))) {
|
|
281
283
|
return userNameHtml;
|
|
282
|
-
} else if (
|
|
284
|
+
} else if (inscriptionItem == "date") {
|
|
283
285
|
return dateHtml;
|
|
284
|
-
} else if (
|
|
286
|
+
} else if (inscriptionItem == "time") {
|
|
285
287
|
return timeHtml;
|
|
286
|
-
} else if (
|
|
288
|
+
} else if (inscriptionItem == "org") {
|
|
287
289
|
return orgNameHtml;
|
|
288
|
-
} else if (
|
|
290
|
+
} else if (inscriptionItem == "signImg") {
|
|
289
291
|
return signPicHtml;
|
|
290
|
-
} else if (
|
|
292
|
+
} else if (inscriptionItem == "taskName") {
|
|
291
293
|
return taskNameHtml;
|
|
292
294
|
}
|
|
293
295
|
}
|
|
294
296
|
});
|
|
295
297
|
return _react2.default.createElement(
|
|
296
298
|
Box,
|
|
297
|
-
{ style: { marginLeft: "auto", "text-align": "right" } },
|
|
299
|
+
{ style: { marginLeft: "auto", "text-align": "right", width: '100%' } },
|
|
298
300
|
_returnHtml
|
|
299
301
|
);
|
|
300
302
|
} else {
|
|
@@ -312,13 +314,13 @@ var PageHome = function (_React$Component) {
|
|
|
312
314
|
return _react2.default.createElement(
|
|
313
315
|
VBox,
|
|
314
316
|
{ className: 't-PB10 t-LH1_5 t-field t-FS14 t-PL10' },
|
|
315
|
-
item.type.indexOf('image') < 0 ? _react2.default.createElement(Box, { className: 't-FS16', dangerouslySetInnerHTML: { __html: item.fullMessage == null ? "" : item.fullMessage.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/ /g, ' ') } }) : item.fullMessage == '' ? _react2.default.createElement(
|
|
317
|
+
item.type.indexOf('image') < 0 ? _react2.default.createElement(Box, { className: 't-FS16 t-PR16', dangerouslySetInnerHTML: { __html: item.fullMessage == null ? "" : item.fullMessage.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/ /g, ' ') } }) : item.fullMessage == '' ? _react2.default.createElement(
|
|
316
318
|
Box,
|
|
317
319
|
null,
|
|
318
320
|
'\'\''
|
|
319
321
|
) : _react2.default.createElement(
|
|
320
322
|
HBox,
|
|
321
|
-
|
|
323
|
+
{ className: 't-PR16' },
|
|
322
324
|
_react2.default.createElement('img', { width: '100%', height: '128', src: t.state.loadImg + item.fullMessage })
|
|
323
325
|
),
|
|
324
326
|
_react2.default.createElement(
|
|
@@ -361,7 +363,14 @@ var PageHome = function (_React$Component) {
|
|
|
361
363
|
);
|
|
362
364
|
}) : ""
|
|
363
365
|
),
|
|
364
|
-
|
|
366
|
+
_react2.default.createElement(
|
|
367
|
+
Box,
|
|
368
|
+
{ vAlign: 'start', hAlign: 'end', id: 'commentSign-' + item.id, className: 't-FBH t-PR16' },
|
|
369
|
+
' ',
|
|
370
|
+
item.inscriptionShow ? t.getCommentSign(item) : "",
|
|
371
|
+
_react2.default.createElement('i', { id: item.id + "_sucess", className: 'iconfont icon-checked t-PT10 t-PL3', style: { color: 'green', display: 'none' } }),
|
|
372
|
+
_react2.default.createElement('i', { id: item.id + "_fail", className: 'iconfont icon-close t-PT10 t-PL3', style: { color: 'red', display: 'none' } })
|
|
373
|
+
)
|
|
365
374
|
);
|
|
366
375
|
}) : ''
|
|
367
376
|
);
|
package/lib/form/form.js
CHANGED
|
@@ -526,8 +526,8 @@ var PageHome = function (_React$Component) {
|
|
|
526
526
|
itemParam.decimalPlace = form.decimalPlace; //小数位数
|
|
527
527
|
itemParam.dataAttr = form['dataAttr'];
|
|
528
528
|
itemParam.maxlength = form['length'];
|
|
529
|
-
/*if(itemParam.dataAttr){
|
|
530
|
-
alert("265====="+itemParam.dataAttr.textLineFeed);
|
|
529
|
+
/*if(itemParam.dataAttr){
|
|
530
|
+
alert("265====="+itemParam.dataAttr.textLineFeed);
|
|
531
531
|
}*/
|
|
532
532
|
var calculateExpList = data.calculateExpList; //计算公式列表
|
|
533
533
|
var calculateExp = form.calculateExp; //计算公式
|
|
@@ -554,6 +554,16 @@ var PageHome = function (_React$Component) {
|
|
|
554
554
|
}
|
|
555
555
|
data.calculateExpList = calculateExpList;
|
|
556
556
|
}
|
|
557
|
+
|
|
558
|
+
//todo 百分位千分位
|
|
559
|
+
// if(itemParam.dataAttr){
|
|
560
|
+
// var type = itemParam.dataAttr.dataSrc;
|
|
561
|
+
// if(type == "1"){
|
|
562
|
+
// value = parseFloat(value)*100+"%";
|
|
563
|
+
// }else if(type == "2"){
|
|
564
|
+
// value = this.toThousands(parseFloat(value));
|
|
565
|
+
// }
|
|
566
|
+
// }
|
|
557
567
|
} else if (itemType == 'textarea') {
|
|
558
568
|
//多行
|
|
559
569
|
itemParam.maxlength = form['length'];
|
|
@@ -568,15 +578,17 @@ var PageHome = function (_React$Component) {
|
|
|
568
578
|
if (selectItem) {
|
|
569
579
|
if (selectItem.length > 0) {
|
|
570
580
|
selectItem.map(function (item) {
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
581
|
+
if (typeof item.state == 'undefined' || item.state == "1" || item.state == "0" && readOnly == true) {
|
|
582
|
+
var option = {};
|
|
583
|
+
option.value = item.value;
|
|
584
|
+
option.text = item.name;
|
|
585
|
+
// if(status != '0'){
|
|
586
|
+
if (value == item.value) {
|
|
587
|
+
value = { value: value, text: item.name };
|
|
588
|
+
}
|
|
589
|
+
// }
|
|
590
|
+
selectOptions.push(option);
|
|
577
591
|
}
|
|
578
|
-
// }
|
|
579
|
-
selectOptions.push(option);
|
|
580
592
|
});
|
|
581
593
|
}
|
|
582
594
|
}
|
|
@@ -593,24 +605,30 @@ var PageHome = function (_React$Component) {
|
|
|
593
605
|
var valueArray = [];
|
|
594
606
|
//if(status != '0'){
|
|
595
607
|
if (value != 0 && value) {
|
|
596
|
-
|
|
608
|
+
if (value.indexOf("[") >= 0) {
|
|
609
|
+
valueArray = JSON.parse(value);
|
|
610
|
+
} else {
|
|
611
|
+
valueArray = value.split(",");
|
|
612
|
+
}
|
|
597
613
|
}
|
|
598
614
|
// }
|
|
599
615
|
if (selectItem.length > 0) {
|
|
600
616
|
selectItem.map(function (item) {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
617
|
+
if (typeof item.state == 'undefined' || item.state == "1" || item.state == "0" && readOnly == true) {
|
|
618
|
+
var option = {};
|
|
619
|
+
option.value = item.value;
|
|
620
|
+
option.text = item.name;
|
|
621
|
+
option.disable = false;
|
|
622
|
+
option.checked = false;
|
|
623
|
+
if (valueArray.length > 0) {
|
|
624
|
+
for (var i = 0; i < valueArray.length; i++) {
|
|
625
|
+
if (valueArray[i] == item.value) {
|
|
626
|
+
option.checked = true;
|
|
627
|
+
}
|
|
610
628
|
}
|
|
611
629
|
}
|
|
630
|
+
selectOptions.push(option);
|
|
612
631
|
}
|
|
613
|
-
selectOptions.push(option);
|
|
614
632
|
});
|
|
615
633
|
}
|
|
616
634
|
}
|
|
@@ -619,42 +637,96 @@ var PageHome = function (_React$Component) {
|
|
|
619
637
|
} else if (itemType == 'select') {
|
|
620
638
|
//下拉选择
|
|
621
639
|
var selectItem = form.multiItems; //选项
|
|
622
|
-
|
|
640
|
+
isVerifySingValue = value;
|
|
623
641
|
|
|
624
642
|
if (form.dataAttr && form.dataAttr.selectClass && form.dataAttr.selectClass == "2") {
|
|
625
643
|
//当多选时只显示
|
|
626
|
-
itemParam.itemType = "
|
|
627
|
-
itemParam.
|
|
644
|
+
itemParam.itemType = "checkbox";
|
|
645
|
+
itemParam.realType = "select";
|
|
646
|
+
// itemParam.readOnly=true;
|
|
647
|
+
var selectOptions = [];
|
|
628
648
|
if (value) {
|
|
649
|
+
|
|
629
650
|
var valueArray = JSON.parse(value);
|
|
630
|
-
|
|
651
|
+
selectItem.map(function (selectI) {
|
|
652
|
+
valueArray.map(function (item) {
|
|
653
|
+
if (typeof selectI.state == 'undefined' || selectI.state == "1" || selectI.state == "0" && readOnly == true) {
|
|
654
|
+
if (selectI.value == item) {
|
|
655
|
+
var option = {};
|
|
656
|
+
option.value = selectI.value;
|
|
657
|
+
option.text = selectI.name;
|
|
658
|
+
option.disable = false;
|
|
659
|
+
option.checked = true;
|
|
660
|
+
selectOptions.push(option);
|
|
661
|
+
} else {
|
|
662
|
+
var option = {};
|
|
663
|
+
option.value = selectI.value;
|
|
664
|
+
option.text = selectI.name;
|
|
665
|
+
option.disable = false;
|
|
666
|
+
option.checked = false;
|
|
667
|
+
selectOptions.push(option);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
// showValue+=","+item;
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
// var showValue = "";
|
|
631
675
|
valueArray.map(function (item) {
|
|
632
|
-
|
|
676
|
+
var hasValue = false;
|
|
677
|
+
selectItem.map(function (selectI) {
|
|
678
|
+
if (selectI.value == item && (typeof selectI.state == 'undefined' || selectI.state == "1" || selectI.state == "0" && readOnly == true)) {
|
|
679
|
+
hasValue = true;
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
if (!hasValue) {
|
|
683
|
+
var option = {};
|
|
684
|
+
option.value = item;
|
|
685
|
+
option.text = item;
|
|
686
|
+
option.disable = false;
|
|
687
|
+
option.checked = true;
|
|
688
|
+
selectOptions.push(option);
|
|
689
|
+
}
|
|
690
|
+
// showValue+=","+item;
|
|
691
|
+
});
|
|
692
|
+
// if(showValue){
|
|
693
|
+
// value = showValue.substring(1);
|
|
694
|
+
// }
|
|
695
|
+
} else {
|
|
696
|
+
selectItem.map(function (selectI) {
|
|
697
|
+
if (typeof selectI.state == 'undefined' || selectI.state == "1" || selectI.state == "0" && readOnly == true) {
|
|
698
|
+
var option = {};
|
|
699
|
+
option.value = selectI.value;
|
|
700
|
+
option.text = selectI.name;
|
|
701
|
+
option.disable = false;
|
|
702
|
+
option.checked = false;
|
|
703
|
+
selectOptions.push(option);
|
|
704
|
+
}
|
|
633
705
|
});
|
|
634
|
-
if (showValue) {
|
|
635
|
-
value = showValue.substring(1);
|
|
636
|
-
}
|
|
637
|
-
isVerifySingValue = value;
|
|
638
706
|
}
|
|
707
|
+
itemParam.selectOptions = selectOptions;
|
|
708
|
+
itemParam.selectItem = selectOptions;
|
|
639
709
|
} else {
|
|
640
710
|
var selectOptions = [];
|
|
641
711
|
if (selectItem) {
|
|
642
712
|
if (selectItem.length > 0) {
|
|
643
713
|
selectItem.map(function (item) {
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
/*}else{
|
|
652
|
-
var defaultValue=form.defaultValue;
|
|
653
|
-
if(defaultValue == item.value){
|
|
654
|
-
value = {value:value,text:item.name};
|
|
714
|
+
if (typeof item.state == 'undefined' || item.state == "1" || item.state == "0" && readOnly == true) {
|
|
715
|
+
var option = {};
|
|
716
|
+
option.value = item.value;
|
|
717
|
+
option.text = item.name;
|
|
718
|
+
// if(status != '0'){ //非新增
|
|
719
|
+
if (value == item.value) {
|
|
720
|
+
value = { value: value, text: item.name };
|
|
655
721
|
}
|
|
656
|
-
|
|
657
|
-
|
|
722
|
+
/*}else{
|
|
723
|
+
var defaultValue=form.defaultValue;
|
|
724
|
+
if(defaultValue == item.value){
|
|
725
|
+
value = {value:value,text:item.name};
|
|
726
|
+
}
|
|
727
|
+
}*/
|
|
728
|
+
selectOptions.push(option);
|
|
729
|
+
}
|
|
658
730
|
});
|
|
659
731
|
}
|
|
660
732
|
}
|
|
@@ -1522,21 +1594,21 @@ var PageHome = function (_React$Component) {
|
|
|
1522
1594
|
var length = item.maxlength;
|
|
1523
1595
|
var patrn = /^-?\d+(\.\d+)?$/;
|
|
1524
1596
|
if (newValue !== '' && newValue != '-') {
|
|
1525
|
-
/* var validAttr=item['validAttr'];
|
|
1526
|
-
if(validAttr!=null && validAttr.length>0){
|
|
1527
|
-
for(var va=0;va<validAttr.length;va++){
|
|
1528
|
-
var regular=validAttr[va]['regular'];
|
|
1529
|
-
var tips=validAttr[va]['tips'];
|
|
1530
|
-
var reg=new RegExp(regular.slice(1,-1),"g");
|
|
1531
|
-
if(!reg.test(newValue)){
|
|
1532
|
-
Toast.show({
|
|
1533
|
-
type: 'error',
|
|
1534
|
-
content:item.title+':'+tips
|
|
1535
|
-
});
|
|
1536
|
-
return false;
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
}
|
|
1597
|
+
/* var validAttr=item['validAttr'];
|
|
1598
|
+
if(validAttr!=null && validAttr.length>0){
|
|
1599
|
+
for(var va=0;va<validAttr.length;va++){
|
|
1600
|
+
var regular=validAttr[va]['regular'];
|
|
1601
|
+
var tips=validAttr[va]['tips'];
|
|
1602
|
+
var reg=new RegExp(regular.slice(1,-1),"g");
|
|
1603
|
+
if(!reg.test(newValue)){
|
|
1604
|
+
Toast.show({
|
|
1605
|
+
type: 'error',
|
|
1606
|
+
content:item.title+':'+tips
|
|
1607
|
+
});
|
|
1608
|
+
return false;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
}
|
|
1540
1612
|
}*/
|
|
1541
1613
|
if (typeof length != "undefined" && length != null && length != "" && inputFormat == "char") {
|
|
1542
1614
|
if (newValue.length > length) {
|
|
@@ -1587,6 +1659,62 @@ var PageHome = function (_React$Component) {
|
|
|
1587
1659
|
|
|
1588
1660
|
this.props.onChange(data, itemParam);
|
|
1589
1661
|
}
|
|
1662
|
+
}, {
|
|
1663
|
+
key: 'handleTextFocus',
|
|
1664
|
+
value: function handleTextFocus(item, newValue) {
|
|
1665
|
+
if (newValue !== '' && newValue != '-') {
|
|
1666
|
+
var type = item.dataAttr.dataSrc;
|
|
1667
|
+
if (type == "1") {
|
|
1668
|
+
if (newValue.indexOf("%") >= 0) {
|
|
1669
|
+
newValue = parseFloat(newValue) / 100;
|
|
1670
|
+
}
|
|
1671
|
+
} else if (type == "2") {
|
|
1672
|
+
if (newValue.indexOf(",") >= 0) {
|
|
1673
|
+
newValue = newValue.replace(/,/g, "");
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
var itemParam = this.state.itemParam;
|
|
1678
|
+
itemParam.value = newValue;
|
|
1679
|
+
this.setState({
|
|
1680
|
+
itemParam: itemParam
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
}, {
|
|
1684
|
+
key: 'handleTextBlur',
|
|
1685
|
+
value: function handleTextBlur(item, newValue) {
|
|
1686
|
+
if (newValue !== '' && newValue != '-') {
|
|
1687
|
+
var type = item.dataAttr.dataSrc;
|
|
1688
|
+
if (type == "1") {
|
|
1689
|
+
newValue = parseFloat(newValue) * 100 + "%";
|
|
1690
|
+
} else if (type == "2") {
|
|
1691
|
+
newValue = this.toThousands(parseFloat(newValue));
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
var itemParam = this.state.itemParam;
|
|
1695
|
+
itemParam.value = newValue;
|
|
1696
|
+
this.setState({
|
|
1697
|
+
itemParam: itemParam
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
//千分位
|
|
1702
|
+
|
|
1703
|
+
}, {
|
|
1704
|
+
key: 'toThousands',
|
|
1705
|
+
value: function toThousands(num) {
|
|
1706
|
+
var result = '',
|
|
1707
|
+
counter = 0;
|
|
1708
|
+
num = (num || 0).toString();
|
|
1709
|
+
for (var i = num.length - 1; i >= 0; i--) {
|
|
1710
|
+
counter++;
|
|
1711
|
+
result = num.charAt(i) + result;
|
|
1712
|
+
if (!(counter % 3) && i != 0) {
|
|
1713
|
+
result = ',' + result;
|
|
1714
|
+
}
|
|
1715
|
+
}
|
|
1716
|
+
return result;
|
|
1717
|
+
}
|
|
1590
1718
|
|
|
1591
1719
|
//多行文本
|
|
1592
1720
|
|
|
@@ -1619,14 +1747,24 @@ var PageHome = function (_React$Component) {
|
|
|
1619
1747
|
|
|
1620
1748
|
}, {
|
|
1621
1749
|
key: 'checkboxChange',
|
|
1622
|
-
value: function checkboxChange(code, value) {
|
|
1750
|
+
value: function checkboxChange(code, realType, value) {
|
|
1623
1751
|
var data = this.props.data;
|
|
1624
1752
|
var valueStr = '';
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1753
|
+
var valueArray = [];
|
|
1754
|
+
if (realType == "select") {
|
|
1755
|
+
for (var i = 0; i < value.length; i++) {
|
|
1756
|
+
valueArray.push(value[i].value);
|
|
1757
|
+
}
|
|
1758
|
+
if (valueArray.length) {
|
|
1759
|
+
valueStr = JSON.stringify(valueArray);
|
|
1760
|
+
}
|
|
1761
|
+
} else {
|
|
1762
|
+
for (var i = 0; i < value.length; i++) {
|
|
1763
|
+
valueStr += value[i].value + ",";
|
|
1764
|
+
}
|
|
1765
|
+
if (valueStr != '') {
|
|
1766
|
+
valueStr = valueStr.substring(0, valueStr.length - 1);
|
|
1767
|
+
}
|
|
1630
1768
|
}
|
|
1631
1769
|
|
|
1632
1770
|
data = this.editData(code, valueStr, data);
|
|
@@ -1893,12 +2031,12 @@ var PageHome = function (_React$Component) {
|
|
|
1893
2031
|
});
|
|
1894
2032
|
return false;
|
|
1895
2033
|
}
|
|
1896
|
-
/* if(newValue=''){
|
|
1897
|
-
Toast.show({
|
|
1898
|
-
type: 'error',
|
|
1899
|
-
content: '意见不能为空!',
|
|
1900
|
-
});
|
|
1901
|
-
return false;
|
|
2034
|
+
/* if(newValue=''){
|
|
2035
|
+
Toast.show({
|
|
2036
|
+
type: 'error',
|
|
2037
|
+
content: '意见不能为空!',
|
|
2038
|
+
});
|
|
2039
|
+
return false;
|
|
1902
2040
|
}*/
|
|
1903
2041
|
if (newValue.length > 2000) {
|
|
1904
2042
|
newValue = newValue.substring(0, 2000);
|
|
@@ -2258,6 +2396,8 @@ var PageHome = function (_React$Component) {
|
|
|
2258
2396
|
onChange: function onChange(value) {
|
|
2259
2397
|
t.handleTextChange(t.state.itemParam, value);
|
|
2260
2398
|
}
|
|
2399
|
+
// onFocus={(value) => { t.handleTextFocus(t.state.itemParam, value); }}
|
|
2400
|
+
// onBlur={(value) => { t.handleTextBlur(t.state.itemParam, value); }}
|
|
2261
2401
|
}),
|
|
2262
2402
|
t.state.itemParam.isVerifySing == "1" ? _react2.default.createElement('i', { className: 'iconfont icon-checked t-PT10', style: { color: 'green' } }) : t.state.itemParam.isVerifySing == "2" ? _react2.default.createElement('i', { className: 'iconfont icon-close t-PT10', style: { color: 'red' } }) : ""
|
|
2263
2403
|
)
|
|
@@ -2375,7 +2515,7 @@ var PageHome = function (_React$Component) {
|
|
|
2375
2515
|
iconPosition: 'right',
|
|
2376
2516
|
label: t.state.itemParam.title,
|
|
2377
2517
|
ref: "checkbox_" + t.state.itemParam.tableName + "_" + t.state.itemParam.key,
|
|
2378
|
-
onChange: t.checkboxChange.bind(t, t.state.itemParam.key) }))
|
|
2518
|
+
onChange: t.checkboxChange.bind(t, t.state.itemParam.key, t.state.itemParam.realType) }))
|
|
2379
2519
|
),
|
|
2380
2520
|
t.state.itemParam.isVerifySing == "1" ? _react2.default.createElement('i', { className: 'iconfont icon-checked t-PT10', style: { color: 'green' } }) : t.state.itemParam.isVerifySing == "2" ? _react2.default.createElement('i', { className: 'iconfont icon-close t-PT10', style: { color: 'red' } }) : ""
|
|
2381
2521
|
)
|
|
@@ -2616,7 +2756,7 @@ var PageHome = function (_React$Component) {
|
|
|
2616
2756
|
{ borderTopNone: true },
|
|
2617
2757
|
_react2.default.createElement(
|
|
2618
2758
|
HBox,
|
|
2619
|
-
{ className: 't-field-box' },
|
|
2759
|
+
{ className: 'flex-comment t-field-box' },
|
|
2620
2760
|
_react2.default.createElement(
|
|
2621
2761
|
'div',
|
|
2622
2762
|
{ className: 't-field-layout-h-label t-FS16 t-FBJ' },
|
package/lib/form/table.js
CHANGED
|
@@ -1370,7 +1370,7 @@ var PageHome = function (_React$Component) {
|
|
|
1370
1370
|
{ className: t.props.commentDefaultList.length > 0 ? '' : 't-DN' },
|
|
1371
1371
|
_react2.default.createElement(
|
|
1372
1372
|
HBox,
|
|
1373
|
-
{ className: 't-field-box' },
|
|
1373
|
+
{ className: 'flex-comment t-field-box' },
|
|
1374
1374
|
_react2.default.createElement(
|
|
1375
1375
|
'div',
|
|
1376
1376
|
{ className: 't-field-layout-h-label t-FS16 t-FBJ' },
|
|
@@ -1664,18 +1664,39 @@ var PageHome = function (_React$Component) {
|
|
|
1664
1664
|
//表单提交前
|
|
1665
1665
|
if (typeof FlowCommon.saveBefore === "function") {
|
|
1666
1666
|
FlowCommon.saveBefore(0, t.state, function (param) {
|
|
1667
|
-
|
|
1668
|
-
var
|
|
1667
|
+
//项目开发模块统一扩展
|
|
1668
|
+
var mobileModuleExt;
|
|
1669
1669
|
try {
|
|
1670
|
-
if (t.state.
|
|
1671
|
-
|
|
1670
|
+
if (t.state.module) {
|
|
1671
|
+
mobileModuleExt = typeof eval(t.state.module + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_mobileExt") : null;
|
|
1672
1672
|
}
|
|
1673
1673
|
} catch (e) {
|
|
1674
1674
|
// alert("exception: "+e.message);
|
|
1675
1675
|
}
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1676
|
+
|
|
1677
|
+
if (typeof mobileModuleExt !== 'undefined' && typeof mobileModuleExt["submitBefore"] === "function") {
|
|
1678
|
+
mobileModuleExt["submitBefore"](t.state, function () {
|
|
1679
|
+
//项目开发扩展
|
|
1680
|
+
var mobileExt;
|
|
1681
|
+
try {
|
|
1682
|
+
if (t.state.formKey) {
|
|
1683
|
+
mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
|
|
1684
|
+
}
|
|
1685
|
+
} catch (e) {
|
|
1686
|
+
// alert("exception: "+e.message);
|
|
1687
|
+
}
|
|
1688
|
+
if (typeof mobileExt !== 'undefined' && typeof mobileExt["submitBefore"] === "function") {
|
|
1689
|
+
mobileExt["submitBefore"](t.state, function () {
|
|
1690
|
+
t.handleSubmitFunc(operate);
|
|
1691
|
+
}, function (error) {
|
|
1692
|
+
_Toast2.default.show({
|
|
1693
|
+
type: 'error',
|
|
1694
|
+
content: error
|
|
1695
|
+
});
|
|
1696
|
+
});
|
|
1697
|
+
} else {
|
|
1698
|
+
t.handleSubmitFunc(operate);
|
|
1699
|
+
}
|
|
1679
1700
|
}, function (error) {
|
|
1680
1701
|
_Toast2.default.show({
|
|
1681
1702
|
type: 'error',
|
|
@@ -1683,7 +1704,27 @@ var PageHome = function (_React$Component) {
|
|
|
1683
1704
|
});
|
|
1684
1705
|
});
|
|
1685
1706
|
} else {
|
|
1686
|
-
|
|
1707
|
+
//项目开发扩展
|
|
1708
|
+
var mobileExt;
|
|
1709
|
+
try {
|
|
1710
|
+
if (t.state.formKey) {
|
|
1711
|
+
mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
|
|
1712
|
+
}
|
|
1713
|
+
} catch (e) {
|
|
1714
|
+
// alert("exception: "+e.message);
|
|
1715
|
+
}
|
|
1716
|
+
if (typeof mobileExt !== 'undefined' && typeof mobileExt["submitBefore"] === "function") {
|
|
1717
|
+
mobileExt["submitBefore"](t.state, function () {
|
|
1718
|
+
t.handleSubmitFunc(operate);
|
|
1719
|
+
}, function (error) {
|
|
1720
|
+
_Toast2.default.show({
|
|
1721
|
+
type: 'error',
|
|
1722
|
+
content: error
|
|
1723
|
+
});
|
|
1724
|
+
});
|
|
1725
|
+
} else {
|
|
1726
|
+
t.handleSubmitFunc(operate);
|
|
1727
|
+
}
|
|
1687
1728
|
}
|
|
1688
1729
|
}, function (error) {
|
|
1689
1730
|
_Toast2.default.show({
|
|
@@ -1692,18 +1733,39 @@ var PageHome = function (_React$Component) {
|
|
|
1692
1733
|
});
|
|
1693
1734
|
});
|
|
1694
1735
|
} else {
|
|
1695
|
-
|
|
1696
|
-
var
|
|
1736
|
+
//项目开发模块统一扩展
|
|
1737
|
+
var mobileModuleExt;
|
|
1697
1738
|
try {
|
|
1698
|
-
if (t.state.
|
|
1699
|
-
|
|
1739
|
+
if (t.state.module) {
|
|
1740
|
+
mobileModuleExt = typeof eval(t.state.module + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_mobileExt") : null;
|
|
1700
1741
|
}
|
|
1701
1742
|
} catch (e) {
|
|
1702
1743
|
// alert("exception: "+e.message);
|
|
1703
1744
|
}
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1745
|
+
|
|
1746
|
+
if (typeof mobileModuleExt !== 'undefined' && typeof mobileModuleExt["submitBefore"] === "function") {
|
|
1747
|
+
mobileModuleExt["submitBefore"](t.state, function () {
|
|
1748
|
+
//项目开发扩展
|
|
1749
|
+
var mobileExt;
|
|
1750
|
+
try {
|
|
1751
|
+
if (t.state.formKey) {
|
|
1752
|
+
mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
|
|
1753
|
+
}
|
|
1754
|
+
} catch (e) {
|
|
1755
|
+
// alert("exception: "+e.message);
|
|
1756
|
+
}
|
|
1757
|
+
if (typeof mobileExt !== 'undefined' && typeof mobileExt["submitBefore"] === "function") {
|
|
1758
|
+
mobileExt["submitBefore"](t.state, function () {
|
|
1759
|
+
t.handleSubmitFunc(operate);
|
|
1760
|
+
}, function (error) {
|
|
1761
|
+
_Toast2.default.show({
|
|
1762
|
+
type: 'error',
|
|
1763
|
+
content: error
|
|
1764
|
+
});
|
|
1765
|
+
});
|
|
1766
|
+
} else {
|
|
1767
|
+
t.handleSubmitFunc(operate);
|
|
1768
|
+
}
|
|
1707
1769
|
}, function (error) {
|
|
1708
1770
|
_Toast2.default.show({
|
|
1709
1771
|
type: 'error',
|
|
@@ -1711,31 +1773,31 @@ var PageHome = function (_React$Component) {
|
|
|
1711
1773
|
});
|
|
1712
1774
|
});
|
|
1713
1775
|
} else {
|
|
1714
|
-
|
|
1776
|
+
//项目开发扩展
|
|
1777
|
+
var mobileExt;
|
|
1778
|
+
try {
|
|
1779
|
+
if (t.state.formKey) {
|
|
1780
|
+
mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
|
|
1781
|
+
}
|
|
1782
|
+
} catch (e) {
|
|
1783
|
+
// alert("exception: "+e.message);
|
|
1784
|
+
}
|
|
1785
|
+
if (typeof mobileExt !== 'undefined' && typeof mobileExt["submitBefore"] === "function") {
|
|
1786
|
+
mobileExt["submitBefore"](t.state, function () {
|
|
1787
|
+
t.handleSubmitFunc(operate);
|
|
1788
|
+
}, function (error) {
|
|
1789
|
+
_Toast2.default.show({
|
|
1790
|
+
type: 'error',
|
|
1791
|
+
content: error
|
|
1792
|
+
});
|
|
1793
|
+
});
|
|
1794
|
+
} else {
|
|
1795
|
+
t.handleSubmitFunc(operate);
|
|
1796
|
+
}
|
|
1715
1797
|
}
|
|
1716
1798
|
}
|
|
1717
1799
|
} else {
|
|
1718
|
-
|
|
1719
|
-
var mobileExt;
|
|
1720
|
-
try {
|
|
1721
|
-
if (t.state.formKey) {
|
|
1722
|
-
mobileExt = typeof eval(t.state.module + "_" + t.state.formKey + "_mobileExt") !== 'undefined' ? eval(t.state.module + "_" + t.state.formKey + "_mobileExt") : null;
|
|
1723
|
-
}
|
|
1724
|
-
} catch (e) {
|
|
1725
|
-
// alert("exception: "+e.message);
|
|
1726
|
-
}
|
|
1727
|
-
if (typeof mobileExt !== 'undefined' && typeof mobileExt["submitBefore"] === "function") {
|
|
1728
|
-
mobileExt["submitBefore"](t.state, function () {
|
|
1729
|
-
t.handleSubmitFunc(operate);
|
|
1730
|
-
}, function (error) {
|
|
1731
|
-
_Toast2.default.show({
|
|
1732
|
-
type: 'error',
|
|
1733
|
-
content: error
|
|
1734
|
-
});
|
|
1735
|
-
});
|
|
1736
|
-
} else {
|
|
1737
|
-
t.handleSubmitFunc(operate);
|
|
1738
|
-
}
|
|
1800
|
+
t.handleSubmitFunc(operate);
|
|
1739
1801
|
}
|
|
1740
1802
|
}
|
|
1741
1803
|
}, {
|
|
@@ -2067,12 +2129,18 @@ var PageHome = function (_React$Component) {
|
|
|
2067
2129
|
}
|
|
2068
2130
|
if (commonUsedData.length > 0) {
|
|
2069
2131
|
popCode = "common,org,group";
|
|
2132
|
+
popCode = "common,org,group,duty,politicalOutlook";
|
|
2133
|
+
chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
|
|
2070
2134
|
} else {
|
|
2071
2135
|
popCode = "org,group";
|
|
2136
|
+
popCode = "org,group,duty,politicalOutlook";
|
|
2137
|
+
chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
|
|
2072
2138
|
}
|
|
2073
2139
|
} else {
|
|
2074
2140
|
chooseType = "userNotOrg";
|
|
2075
2141
|
popCode = "org";
|
|
2142
|
+
popCode = "org,group,duty,politicalOutlook";
|
|
2143
|
+
chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
|
|
2076
2144
|
}
|
|
2077
2145
|
}
|
|
2078
2146
|
|
|
@@ -6242,7 +6310,7 @@ var PageHome = function (_React$Component) {
|
|
|
6242
6310
|
this.state.buttonList.map(function (item, i) {
|
|
6243
6311
|
return _react2.default.createElement(
|
|
6244
6312
|
_Button2.default,
|
|
6245
|
-
{ type: item.type, display: item.display, onClick: t.handleSubmit.bind(t, item.no) },
|
|
6313
|
+
{ type: item.type, code: item.buttonCode, display: item.display, onClick: t.handleSubmit.bind(t, item.no) },
|
|
6246
6314
|
item.name
|
|
6247
6315
|
);
|
|
6248
6316
|
}.bind(this))
|
package/package.json
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "fmui-base",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"title": "fmui-base",
|
|
5
|
-
"description": "fmui移动端组件",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"lib"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"test": "jest",
|
|
13
|
-
"coverage": "jest && codecov",
|
|
14
|
-
"build": "webpack --config webpack.config",
|
|
15
|
-
"start": "npm run build && webpack-dev-server --inline ",
|
|
16
|
-
"docs-start": "webpack-dev-server --config ./scripts/docs.config --inline",
|
|
17
|
-
"clean": "rd /s/q lib && mkdir lib",
|
|
18
|
-
"lib": " npm run build && babel src --out-dir lib --ignore \"**/*.test.js\"",
|
|
19
|
-
"docs": "webpack --config ./scripts/docs.config",
|
|
20
|
-
"docs-build": "webpack --config ./scripts/build.config"
|
|
21
|
-
},
|
|
22
|
-
"author": "zhaoyh",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"babel-cli": "^6.24.0",
|
|
26
|
-
"babel-core": "^6.18.2",
|
|
27
|
-
"babel-jest": "^17.0.2",
|
|
28
|
-
"babel-loader": "^6.2.8",
|
|
29
|
-
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
|
30
|
-
"babel-preset-es2015": "^6.18.0",
|
|
31
|
-
"babel-preset-react": "^6.16.0",
|
|
32
|
-
"babel-preset-stage-2": "^6.18.0",
|
|
33
|
-
"codecov": "^2.1.0",
|
|
34
|
-
"css-loader": "^0.26.1",
|
|
35
|
-
"enzyme": "^2.7.1",
|
|
36
|
-
"enzyme-to-json": "^1.5.0",
|
|
37
|
-
"eslint": "^3.13.1",
|
|
38
|
-
"eslint-plugin-babel": "^4.0.0",
|
|
39
|
-
"eslint-plugin-jsx-a11y": "^3.0.2",
|
|
40
|
-
"eslint-plugin-react": "^6.9.0",
|
|
41
|
-
"file-loader": "^0.9.0",
|
|
42
|
-
"github-markdown-css": "^2.5.0",
|
|
43
|
-
"jest": "^19.0.2",
|
|
44
|
-
"json-loader": "^0.5.4",
|
|
45
|
-
"less": "^3.9.0",
|
|
46
|
-
"less-loader": "^4.1.0",
|
|
47
|
-
"marked": "^0.3.6",
|
|
48
|
-
"prismjs": "^1.6.0",
|
|
49
|
-
"raw-loader": "^0.5.1",
|
|
50
|
-
"react": "^15.4.1",
|
|
51
|
-
"react-addons-perf": "^15.4.1",
|
|
52
|
-
"react-addons-test-utils": "^15.4.2",
|
|
53
|
-
"react-css-modules": "^4.1.0",
|
|
54
|
-
"react-dom": "^15.4.1",
|
|
55
|
-
"style-loader": "^0.13.1",
|
|
56
|
-
"url-loader": "^0.5.7",
|
|
57
|
-
"webpack": "^2.2.1",
|
|
58
|
-
"webpack-dev-middleware": "^1.10.1",
|
|
59
|
-
"webpack-dev-server": "^2.4.1",
|
|
60
|
-
"webpack-hot-middleware": "^2.17.1",
|
|
61
|
-
"webpack-validator": "^2.3.0"
|
|
62
|
-
},
|
|
63
|
-
"jest": {
|
|
64
|
-
"rootDir": "src",
|
|
65
|
-
"coverageDirectory": "./coverage/",
|
|
66
|
-
"collectCoverage": true
|
|
67
|
-
},
|
|
68
|
-
"dependencies": {
|
|
69
|
-
"copy-webpack-plugin": "^3.0.1",
|
|
70
|
-
"saltui": "^4.13.1"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "fmui-base",
|
|
3
|
+
"version": "1.0.40",
|
|
4
|
+
"title": "fmui-base",
|
|
5
|
+
"description": "fmui移动端组件",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"lib"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "jest",
|
|
13
|
+
"coverage": "jest && codecov",
|
|
14
|
+
"build": "webpack --config webpack.config",
|
|
15
|
+
"start": "npm run build && webpack-dev-server --inline ",
|
|
16
|
+
"docs-start": "webpack-dev-server --config ./scripts/docs.config --inline",
|
|
17
|
+
"clean": "rd /s/q lib && mkdir lib",
|
|
18
|
+
"lib": " npm run build && babel src --out-dir lib --ignore \"**/*.test.js\"",
|
|
19
|
+
"docs": "webpack --config ./scripts/docs.config",
|
|
20
|
+
"docs-build": "webpack --config ./scripts/build.config"
|
|
21
|
+
},
|
|
22
|
+
"author": "zhaoyh",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"babel-cli": "^6.24.0",
|
|
26
|
+
"babel-core": "^6.18.2",
|
|
27
|
+
"babel-jest": "^17.0.2",
|
|
28
|
+
"babel-loader": "^6.2.8",
|
|
29
|
+
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
|
30
|
+
"babel-preset-es2015": "^6.18.0",
|
|
31
|
+
"babel-preset-react": "^6.16.0",
|
|
32
|
+
"babel-preset-stage-2": "^6.18.0",
|
|
33
|
+
"codecov": "^2.1.0",
|
|
34
|
+
"css-loader": "^0.26.1",
|
|
35
|
+
"enzyme": "^2.7.1",
|
|
36
|
+
"enzyme-to-json": "^1.5.0",
|
|
37
|
+
"eslint": "^3.13.1",
|
|
38
|
+
"eslint-plugin-babel": "^4.0.0",
|
|
39
|
+
"eslint-plugin-jsx-a11y": "^3.0.2",
|
|
40
|
+
"eslint-plugin-react": "^6.9.0",
|
|
41
|
+
"file-loader": "^0.9.0",
|
|
42
|
+
"github-markdown-css": "^2.5.0",
|
|
43
|
+
"jest": "^19.0.2",
|
|
44
|
+
"json-loader": "^0.5.4",
|
|
45
|
+
"less": "^3.9.0",
|
|
46
|
+
"less-loader": "^4.1.0",
|
|
47
|
+
"marked": "^0.3.6",
|
|
48
|
+
"prismjs": "^1.6.0",
|
|
49
|
+
"raw-loader": "^0.5.1",
|
|
50
|
+
"react": "^15.4.1",
|
|
51
|
+
"react-addons-perf": "^15.4.1",
|
|
52
|
+
"react-addons-test-utils": "^15.4.2",
|
|
53
|
+
"react-css-modules": "^4.1.0",
|
|
54
|
+
"react-dom": "^15.4.1",
|
|
55
|
+
"style-loader": "^0.13.1",
|
|
56
|
+
"url-loader": "^0.5.7",
|
|
57
|
+
"webpack": "^2.2.1",
|
|
58
|
+
"webpack-dev-middleware": "^1.10.1",
|
|
59
|
+
"webpack-dev-server": "^2.4.1",
|
|
60
|
+
"webpack-hot-middleware": "^2.17.1",
|
|
61
|
+
"webpack-validator": "^2.3.0"
|
|
62
|
+
},
|
|
63
|
+
"jest": {
|
|
64
|
+
"rootDir": "src",
|
|
65
|
+
"coverageDirectory": "./coverage/",
|
|
66
|
+
"collectCoverage": true
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"copy-webpack-plugin": "^3.0.1",
|
|
70
|
+
"saltui": "^4.13.1"
|
|
71
|
+
}
|
|
72
|
+
}
|