fmui-base 2.3.13 → 2.3.14
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 +1 -0
- package/lib/process_info/processInfo.js +84 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -517,7 +517,7 @@ var PageHome = function (_React$Component) {
|
|
|
517
517
|
selectProcessCode: '', //选中的子流程
|
|
518
518
|
subProcessType: '', //子流程类型 0串行 1并行
|
|
519
519
|
urgencyList: [], //紧急程度列表
|
|
520
|
-
urgency: '' }, _defineProperty(_param, 'urgent', ''), _defineProperty(_param, 'backInitiatorEndFlow', '0'), _defineProperty(_param, 'oauthWindowURL', ''), _defineProperty(_param, 'signDataId', ''), _defineProperty(_param, 'isCaUser', '0'), _defineProperty(_param, 'caFirm', ''), _defineProperty(_param, 'caESignatureName', ''), _defineProperty(_param, 'caFormSign', ''), _defineProperty(_param, 'addlotsReturn', ''), _defineProperty(_param, 'inscriptionShow', ''), _defineProperty(_param, 'showOrgSwitcher', false), _defineProperty(_param, 'approveOrgOptions', []), _defineProperty(_param, 'approveOrgSelectValue', {}), _defineProperty(_param, 'approveCurOrgId', ''), _defineProperty(_param, 'startUserOrgId', ''), _defineProperty(_param, 'taskAssignOrgId', ''), _defineProperty(_param, 'approveOrgApiUnavailable', false), _param);
|
|
520
|
+
urgency: '' }, _defineProperty(_param, 'urgent', ''), _defineProperty(_param, 'backInitiatorEndFlow', '0'), _defineProperty(_param, 'oauthWindowURL', ''), _defineProperty(_param, 'signDataId', ''), _defineProperty(_param, 'isCaUser', '0'), _defineProperty(_param, 'caFirm', ''), _defineProperty(_param, 'caESignatureName', ''), _defineProperty(_param, 'caFormSign', ''), _defineProperty(_param, 'addlotsReturn', ''), _defineProperty(_param, 'inscriptionShow', ''), _defineProperty(_param, 'showOrgSwitcher', false), _defineProperty(_param, 'approveOrgOptions', []), _defineProperty(_param, 'approveOrgSelectValue', {}), _defineProperty(_param, 'approveFormParttimeOrgEnabled', true), _defineProperty(_param, 'approveCurOrgId', ''), _defineProperty(_param, 'startUserOrgId', ''), _defineProperty(_param, 'taskAssignOrgId', ''), _defineProperty(_param, 'approveOrgApiUnavailable', false), _param);
|
|
521
521
|
FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
|
|
522
522
|
|
|
523
523
|
//处理特有参数
|
|
@@ -7638,10 +7638,18 @@ var PageHome = function (_React$Component) {
|
|
|
7638
7638
|
value: org.id
|
|
7639
7639
|
};
|
|
7640
7640
|
}
|
|
7641
|
+
|
|
7642
|
+
/** 流程设置「表单切换兼职组织」是否启用,默认启用(仅明确为 0 时禁用) */
|
|
7643
|
+
|
|
7644
|
+
}, {
|
|
7645
|
+
key: 'isApproveFormParttimeOrgEnabled',
|
|
7646
|
+
value: function isApproveFormParttimeOrgEnabled() {
|
|
7647
|
+
return this.state.approveFormParttimeOrgEnabled !== false;
|
|
7648
|
+
}
|
|
7641
7649
|
}, {
|
|
7642
7650
|
key: 'renderApproveOrgSwitcher',
|
|
7643
7651
|
value: function renderApproveOrgSwitcher(orgList, selectedOrgId) {
|
|
7644
|
-
if (!orgList || orgList.length <= 1) {
|
|
7652
|
+
if (!this.isApproveFormParttimeOrgEnabled() || !orgList || orgList.length <= 1) {
|
|
7645
7653
|
this.setState({
|
|
7646
7654
|
showOrgSwitcher: false,
|
|
7647
7655
|
approveOrgOptions: [],
|
|
@@ -7686,44 +7694,85 @@ var PageHome = function (_React$Component) {
|
|
|
7686
7694
|
if (!window.approveOrgAutoSwitchedMap) {
|
|
7687
7695
|
window.approveOrgAutoSwitchedMap = {};
|
|
7688
7696
|
}
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
}
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7697
|
+
// 先读取流程设置「表单切换兼职组织」(默认启用)
|
|
7698
|
+
var loadOrgSwitcher = function loadOrgSwitcher(parttimeOrgEnabled) {
|
|
7699
|
+
t.setState({ approveFormParttimeOrgEnabled: parttimeOrgEnabled !== false });
|
|
7700
|
+
_db2.default.FlowModuleAPI.getUserSetInfo({}).then(function (userInfo) {
|
|
7701
|
+
if (currentSeq != window.approveOrgSwitcherSeq || t.state.approveOrgApiUnavailable) {
|
|
7702
|
+
return;
|
|
7703
|
+
}
|
|
7704
|
+
if (!userInfo) {
|
|
7705
|
+
t.hideApproveOrgSwitcherSilently();
|
|
7706
|
+
return;
|
|
7707
|
+
}
|
|
7708
|
+
if (userInfo.content && !userInfo.orgList) {
|
|
7709
|
+
userInfo = userInfo.content;
|
|
7710
|
+
}
|
|
7711
|
+
var orgList = userInfo.orgList || [];
|
|
7712
|
+
var showSwitcher = parttimeOrgEnabled !== false && orgList && orgList.length > 1;
|
|
7713
|
+
if (!orgList || orgList.length == 0 || !showSwitcher) {
|
|
7714
|
+
// 开关禁用但有兼职时,仍可静默切到目标组织,仅隐藏切换区
|
|
7715
|
+
if (orgList && orgList.length > 1 && parttimeOrgEnabled === false) {
|
|
7716
|
+
var curOrgIdHide = userInfo.curOrgId || '';
|
|
7717
|
+
var hideTargetOrgId = t.resolveApproveOrgTargetId(orgList, curOrgIdHide, t.state.taskAssignOrgId, t.state.startUserOrgId);
|
|
7718
|
+
if (hideTargetOrgId && hideTargetOrgId != curOrgIdHide && !window.approveOrgAutoSwitchedMap[autoSwitchKey]) {
|
|
7719
|
+
t.switchApproveOrg(hideTargetOrgId, function () {
|
|
7720
|
+
if (currentSeq != window.approveOrgSwitcherSeq) {
|
|
7721
|
+
return;
|
|
7722
|
+
}
|
|
7723
|
+
window.approveOrgAutoSwitchedMap[autoSwitchKey] = true;
|
|
7724
|
+
t.setState({ showOrgSwitcher: false });
|
|
7725
|
+
}, function () {
|
|
7726
|
+
if (currentSeq != window.approveOrgSwitcherSeq) {
|
|
7727
|
+
return;
|
|
7728
|
+
}
|
|
7729
|
+
t.setState({ showOrgSwitcher: false });
|
|
7730
|
+
}, { silent: true });
|
|
7731
|
+
return;
|
|
7732
|
+
}
|
|
7717
7733
|
}
|
|
7734
|
+
t.setState({ showOrgSwitcher: false });
|
|
7735
|
+
return;
|
|
7736
|
+
}
|
|
7737
|
+
var curOrgId = userInfo.curOrgId || '';
|
|
7738
|
+
var targetOrgId = t.resolveApproveOrgTargetId(orgList, curOrgId, t.state.taskAssignOrgId, t.state.startUserOrgId);
|
|
7739
|
+
if (targetOrgId && targetOrgId != curOrgId && !window.approveOrgAutoSwitchedMap[autoSwitchKey]) {
|
|
7740
|
+
t.switchApproveOrg(targetOrgId, function () {
|
|
7741
|
+
if (currentSeq != window.approveOrgSwitcherSeq) {
|
|
7742
|
+
return;
|
|
7743
|
+
}
|
|
7744
|
+
window.approveOrgAutoSwitchedMap[autoSwitchKey] = true;
|
|
7745
|
+
t.renderApproveOrgSwitcher(orgList, targetOrgId);
|
|
7746
|
+
}, function () {
|
|
7747
|
+
if (currentSeq != window.approveOrgSwitcherSeq) {
|
|
7748
|
+
return;
|
|
7749
|
+
}
|
|
7750
|
+
t.hideApproveOrgSwitcherSilently();
|
|
7751
|
+
}, { silent: true });
|
|
7752
|
+
return;
|
|
7753
|
+
}
|
|
7754
|
+
t.renderApproveOrgSwitcher(orgList, targetOrgId || curOrgId);
|
|
7755
|
+
}).catch(function (err) {
|
|
7756
|
+
if (currentSeq == window.approveOrgSwitcherSeq) {
|
|
7718
7757
|
t.hideApproveOrgSwitcherSilently();
|
|
7719
|
-
}
|
|
7758
|
+
}
|
|
7759
|
+
});
|
|
7760
|
+
};
|
|
7761
|
+
_db2.default.FlowModuleAPI.getSysSettingByMark({ mark: 'approveFormParttimeOrg' }).then(function (content) {
|
|
7762
|
+
if (currentSeq != window.approveOrgSwitcherSeq) {
|
|
7720
7763
|
return;
|
|
7721
7764
|
}
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7765
|
+
var val = content;
|
|
7766
|
+
if (content && (typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && content.content != null) {
|
|
7767
|
+
val = content.content;
|
|
7768
|
+
}
|
|
7769
|
+
// 默认启用:仅明确为 '0' 时禁用
|
|
7770
|
+
loadOrgSwitcher(val != '0');
|
|
7771
|
+
}).catch(function () {
|
|
7772
|
+
if (currentSeq != window.approveOrgSwitcherSeq) {
|
|
7773
|
+
return;
|
|
7726
7774
|
}
|
|
7775
|
+
loadOrgSwitcher(true);
|
|
7727
7776
|
});
|
|
7728
7777
|
}
|
|
7729
7778
|
}, {
|