fmui-base 2.2.98 → 2.3.1
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 +3 -0
- package/lib/form/formExtHelper.js +16 -0
- package/lib/form/table.js +3 -0
- package/lib/process_info/processInfo.js +37 -8
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -3695,6 +3695,9 @@ var PageHome = function (_React$Component) {
|
|
|
3695
3695
|
value: function attitudeItemClick(item) {
|
|
3696
3696
|
var attitudeValue = item && item.value != null ? item.value : '';
|
|
3697
3697
|
this.phraseItemClick(attitudeValue);
|
|
3698
|
+
if (this.props.newspyj) {
|
|
3699
|
+
this.props.newspyj.commentAttitude = (0, _formExtHelper.mapCommentAttitudeSaveValue)(attitudeValue);
|
|
3700
|
+
}
|
|
3698
3701
|
if (FlowCommon && typeof FlowCommon.dealwithAttitudeClick === 'function') {
|
|
3699
3702
|
FlowCommon.dealwithAttitudeClick(item, this);
|
|
3700
3703
|
}
|
|
@@ -9,6 +9,7 @@ exports.clampSubColumnCount = clampSubColumnCount;
|
|
|
9
9
|
exports.buildDetailItemParam = buildDetailItemParam;
|
|
10
10
|
exports.applyDealwithFormParamExt = applyDealwithFormParamExt;
|
|
11
11
|
exports.resolveSubColumnCountFromConfig = resolveSubColumnCountFromConfig;
|
|
12
|
+
exports.mapCommentAttitudeSaveValue = mapCommentAttitudeSaveValue;
|
|
12
13
|
/**
|
|
13
14
|
* 表单扩展加载:流程 flow_common / 纯表单 form_common
|
|
14
15
|
*
|
|
@@ -225,4 +226,19 @@ function resolveSubColumnCountFromConfig(options) {
|
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
return 1;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** 批示意见态度显示值转存库值(与 PC comment_idea_radio 一致) */
|
|
232
|
+
function mapCommentAttitudeSaveValue(displayValue) {
|
|
233
|
+
var val = displayValue == null ? '' : String(displayValue);
|
|
234
|
+
if (val === '同意') {
|
|
235
|
+
return 'yes';
|
|
236
|
+
}
|
|
237
|
+
if (val === '不同意') {
|
|
238
|
+
return 'no';
|
|
239
|
+
}
|
|
240
|
+
if (val === '已阅') {
|
|
241
|
+
return 'read';
|
|
242
|
+
}
|
|
243
|
+
return val;
|
|
228
244
|
}
|
package/lib/form/table.js
CHANGED
|
@@ -2459,6 +2459,9 @@ var PageHome = function (_React$Component) {
|
|
|
2459
2459
|
var t = this;
|
|
2460
2460
|
var attitudeValue = item && item.value != null ? item.value : '';
|
|
2461
2461
|
t.phraseItemClick(attitudeValue);
|
|
2462
|
+
if (t.props.newspyj) {
|
|
2463
|
+
t.props.newspyj.commentAttitude = (0, _formExtHelper.mapCommentAttitudeSaveValue)(attitudeValue);
|
|
2464
|
+
}
|
|
2462
2465
|
var flowCommonRef = FlowCommon;
|
|
2463
2466
|
if (!flowCommonRef) {
|
|
2464
2467
|
var formCode = t.state.formCode || t.props.formCode || '';
|
|
@@ -82,6 +82,8 @@ var _table = require('../form/table');
|
|
|
82
82
|
|
|
83
83
|
var _table2 = _interopRequireDefault(_table);
|
|
84
84
|
|
|
85
|
+
var _formExtHelper = require('../form/formExtHelper');
|
|
86
|
+
|
|
85
87
|
var _FlowChart = require('./FlowChart');
|
|
86
88
|
|
|
87
89
|
var _FlowChart2 = _interopRequireDefault(_FlowChart);
|
|
@@ -2695,10 +2697,11 @@ var PageHome = function (_React$Component) {
|
|
|
2695
2697
|
if (participantList[i].type != "user") {
|
|
2696
2698
|
var children = participantList[i];
|
|
2697
2699
|
for (var j = 0; j < children.length; j++) {
|
|
2700
|
+
var personValueItem = { scopeType: "user", scopeValue: children[j].id, scopeName: children[j].userName || children[j].name, imageId: "", orgNamePath: children[j].orgPath };
|
|
2698
2701
|
if (commonUsedId.split(",").indexOf(children[j].id) == -1) {
|
|
2699
2702
|
commonUsedId += children[j].id + ',';
|
|
2700
2703
|
commonUsedData.push(personValueItem);
|
|
2701
|
-
if (item.partType == '1') {
|
|
2704
|
+
if (item.partType == '1' || item.nodeType == 'readtask') {
|
|
2702
2705
|
personValue.push(personValueItem);
|
|
2703
2706
|
}
|
|
2704
2707
|
}
|
|
@@ -2708,7 +2711,7 @@ var PageHome = function (_React$Component) {
|
|
|
2708
2711
|
if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
|
|
2709
2712
|
commonUsedId += participantList[i].id + ',';
|
|
2710
2713
|
commonUsedData.push(personValueItem);
|
|
2711
|
-
if (item.partType == '1') {
|
|
2714
|
+
if (item.partType == '1' || item.nodeType == 'readtask') {
|
|
2712
2715
|
personValue.push(personValueItem);
|
|
2713
2716
|
}
|
|
2714
2717
|
}
|
|
@@ -2718,7 +2721,7 @@ var PageHome = function (_React$Component) {
|
|
|
2718
2721
|
popCode = "common,org,group";
|
|
2719
2722
|
popCode = "common,org,group,duty,politicalOutlook";
|
|
2720
2723
|
chooseType = "userNotOrg,userNotGroup,userNotDuty,userNotPoliticalOutlook";
|
|
2721
|
-
if (commonUsedData.length == 1) {
|
|
2724
|
+
if (commonUsedData.length == 1 || item.nodeType == 'readtask') {
|
|
2722
2725
|
personValue = commonUsedData;
|
|
2723
2726
|
}
|
|
2724
2727
|
} else {
|
|
@@ -2761,13 +2764,13 @@ var PageHome = function (_React$Component) {
|
|
|
2761
2764
|
if (commonUsedId.split(",").indexOf(participantList[i].id) == -1) {
|
|
2762
2765
|
commonUsedId += participantList[i].id + ',';
|
|
2763
2766
|
commonUsedData.push(personValueItem);
|
|
2764
|
-
if (item.partType == '1') {
|
|
2767
|
+
if (item.partType == '1' || item.nodeType == 'readtask') {
|
|
2765
2768
|
personValue.push(personValueItem);
|
|
2766
2769
|
}
|
|
2767
2770
|
}
|
|
2768
2771
|
}
|
|
2769
2772
|
}
|
|
2770
|
-
if (commonUsedData.length == 1) {
|
|
2773
|
+
if (commonUsedData.length == 1 || item.nodeType == 'readtask') {
|
|
2771
2774
|
personValue = commonUsedData;
|
|
2772
2775
|
}
|
|
2773
2776
|
} else {
|
|
@@ -2785,8 +2788,13 @@ var PageHome = function (_React$Component) {
|
|
|
2785
2788
|
chooseType = '';
|
|
2786
2789
|
}
|
|
2787
2790
|
if (item.nodeType == 'readtask') {
|
|
2788
|
-
|
|
2791
|
+
//如果是传阅节点,默认选中配置的全部用户
|
|
2789
2792
|
t.state.isHideRead = true;
|
|
2793
|
+
if (commonUsedData.length > 0) {
|
|
2794
|
+
personValue = commonUsedData.slice();
|
|
2795
|
+
} else if (personValues.length > 0) {
|
|
2796
|
+
personValue = personValues.slice();
|
|
2797
|
+
}
|
|
2790
2798
|
}
|
|
2791
2799
|
checkedItem.code = popCode;
|
|
2792
2800
|
checkedItem.chooseType = chooseType;
|
|
@@ -3637,7 +3645,8 @@ var PageHome = function (_React$Component) {
|
|
|
3637
3645
|
editType: t.state.editType,
|
|
3638
3646
|
formData: JSON.stringify(t.state.editFormData),
|
|
3639
3647
|
module: t.state.module,
|
|
3640
|
-
comment: newComment
|
|
3648
|
+
comment: newComment,
|
|
3649
|
+
commentAttitude: t.getSelectedCommentAttitude()
|
|
3641
3650
|
}).then(function (content) {
|
|
3642
3651
|
_Toast2.default.show({
|
|
3643
3652
|
type: 'success',
|
|
@@ -4022,6 +4031,7 @@ var PageHome = function (_React$Component) {
|
|
|
4022
4031
|
attachId: this.state.commentAttachId,
|
|
4023
4032
|
sealId: this.state.commentSealId,
|
|
4024
4033
|
commentId: t.state.commentId,
|
|
4034
|
+
commentAttitude: t.getSelectedCommentAttitude(),
|
|
4025
4035
|
hasCommentField: t.state.hasCommentField,
|
|
4026
4036
|
dataId: dataId,
|
|
4027
4037
|
urgent: urgent,
|
|
@@ -4120,6 +4130,7 @@ var PageHome = function (_React$Component) {
|
|
|
4120
4130
|
module: t.state.module,
|
|
4121
4131
|
comment: newComment,
|
|
4122
4132
|
commentId: this.state.commentId,
|
|
4133
|
+
commentAttitude: this.getSelectedCommentAttitude(),
|
|
4123
4134
|
hasCommentField: t.state.hasCommentField,
|
|
4124
4135
|
attachId: this.state.commentAttachId,
|
|
4125
4136
|
sealId: this.state.commentSealId,
|
|
@@ -4622,7 +4633,7 @@ var PageHome = function (_React$Component) {
|
|
|
4622
4633
|
formData: JSON.stringify(editFormData),
|
|
4623
4634
|
formType: "4",
|
|
4624
4635
|
editType: editType
|
|
4625
|
-
}, _defineProperty(_param2, 'module', t.state.module), _defineProperty(_param2, 'comment', newComment), _defineProperty(_param2, 'commentType', 'text'), _defineProperty(_param2, 'commentId', t.state.commentId), _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);
|
|
4636
|
+
}, _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);
|
|
4626
4637
|
var commentbizSn = t.guid2();
|
|
4627
4638
|
if (param.commentId && param.commentId != "" && param.commentId != null && typeof param.commentId != "undefined") {
|
|
4628
4639
|
commentbizSn = param.commentId;
|
|
@@ -5019,6 +5030,7 @@ var PageHome = function (_React$Component) {
|
|
|
5019
5030
|
param.processInstanceId = t.state.processInstanceId;
|
|
5020
5031
|
param.permissionCode = t.state.permissionCode;
|
|
5021
5032
|
param.commentId = t.state.commentId;
|
|
5033
|
+
param.commentAttitude = t.getSelectedCommentAttitude();
|
|
5022
5034
|
var commentbizSn = t.guid2();
|
|
5023
5035
|
if (param.commentId && param.commentId != "" && param.commentId != null && typeof param.commentId != "undefined") {
|
|
5024
5036
|
commentbizSn = param.commentId;
|
|
@@ -5217,6 +5229,21 @@ var PageHome = function (_React$Component) {
|
|
|
5217
5229
|
return true;
|
|
5218
5230
|
});
|
|
5219
5231
|
}
|
|
5232
|
+
//获取当前选中的批示意见态度(yes/no/read,与 PC 一致)
|
|
5233
|
+
|
|
5234
|
+
}, {
|
|
5235
|
+
key: 'getSelectedCommentAttitude',
|
|
5236
|
+
value: function getSelectedCommentAttitude() {
|
|
5237
|
+
var newspyj = this.state.newspyj;
|
|
5238
|
+
if (!newspyj || newspyj.commentAttitude == null || newspyj.commentAttitude === '') {
|
|
5239
|
+
return '';
|
|
5240
|
+
}
|
|
5241
|
+
var val = String(newspyj.commentAttitude);
|
|
5242
|
+
if (val === 'yes' || val === 'no' || val === 'read') {
|
|
5243
|
+
return val;
|
|
5244
|
+
}
|
|
5245
|
+
return (0, _formExtHelper.mapCommentAttitudeSaveValue)(val);
|
|
5246
|
+
}
|
|
5220
5247
|
//获取批示意见加签随机数
|
|
5221
5248
|
|
|
5222
5249
|
}, {
|
|
@@ -5652,6 +5679,7 @@ var PageHome = function (_React$Component) {
|
|
|
5652
5679
|
hasCommentField: t.state.hasCommentField,
|
|
5653
5680
|
comment: newComment,
|
|
5654
5681
|
commentId: t.state.commentId,
|
|
5682
|
+
commentAttitude: t.getSelectedCommentAttitude(),
|
|
5655
5683
|
attachId: t.state.commentAttachId,
|
|
5656
5684
|
sealId: t.state.commentSealId,
|
|
5657
5685
|
module: t.state.module,
|
|
@@ -6286,6 +6314,7 @@ var PageHome = function (_React$Component) {
|
|
|
6286
6314
|
shortMessage: shortMessage,
|
|
6287
6315
|
comment: t.state.spyj,
|
|
6288
6316
|
commentId: t.state.commentId,
|
|
6317
|
+
commentAttitude: t.getSelectedCommentAttitude(),
|
|
6289
6318
|
attachId: t.state.commentAttachId,
|
|
6290
6319
|
sealId: t.state.commentSealId
|
|
6291
6320
|
};
|