fmui-base 2.1.44 → 2.1.47
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/css/processList.css +8 -0
- package/lib/css/react_grid.css +1013 -0
- package/lib/db/db.js +43 -0
- package/lib/db/variables.js +4 -2
- package/lib/process_info/processInfo.js +316 -7
- package/lib/react_grid/react_grid copy 1.js +1670 -0
- package/lib/react_grid/react_grid copy 2.js +722 -0
- package/lib/react_grid/react_grid copy 3.js +1502 -0
- package/lib/react_grid/react_grid copy 4.js +1421 -0
- package/lib/react_grid/react_grid copy 5.js +1670 -0
- package/lib/react_grid/react_grid copy.js +1811 -0
- package/package.json +1 -1
package/lib/db/db.js
CHANGED
|
@@ -311,6 +311,34 @@ context.create('FlowModuleAPI', {
|
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
},
|
|
314
|
+
insertBatchRelation: {
|
|
315
|
+
url: _variables2.default.URLS.insertBatchRelation,
|
|
316
|
+
method: 'POST',
|
|
317
|
+
header: {
|
|
318
|
+
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
319
|
+
},
|
|
320
|
+
/* header:{'content-Type':'application/x-www-form-urlencoded'},*/
|
|
321
|
+
willFetch: function willFetch() {
|
|
322
|
+
_Toast2.default.show({
|
|
323
|
+
content: _react2.default.createElement(_loading2.default, null),
|
|
324
|
+
duration: 800
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
startFlowTest: {
|
|
329
|
+
url: _variables2.default.URLS.startFlowTest,
|
|
330
|
+
method: 'POST',
|
|
331
|
+
header: {
|
|
332
|
+
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
333
|
+
},
|
|
334
|
+
/* header:{'content-Type':'application/x-www-form-urlencoded'},*/
|
|
335
|
+
willFetch: function willFetch() {
|
|
336
|
+
_Toast2.default.show({
|
|
337
|
+
content: _react2.default.createElement(_loading2.default, null),
|
|
338
|
+
duration: 800
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
},
|
|
314
342
|
startProcess: {
|
|
315
343
|
url: _variables2.default.URLS.startProcess,
|
|
316
344
|
method: 'GET',
|
|
@@ -934,6 +962,21 @@ context.create('FlowModuleAPI', {
|
|
|
934
962
|
duration: 800
|
|
935
963
|
});
|
|
936
964
|
}
|
|
965
|
+
},
|
|
966
|
+
|
|
967
|
+
getProcessListByCodes: {
|
|
968
|
+
mockUrl: 'query/queryCanBack.json',
|
|
969
|
+
url: _variables2.default.URLS.getProcessListByCodes,
|
|
970
|
+
method: 'GET',
|
|
971
|
+
header: {
|
|
972
|
+
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
973
|
+
},
|
|
974
|
+
/* header:{'content-Type':'application/x-www-form-urlencoded'},*/
|
|
975
|
+
willFetch: function willFetch() {
|
|
976
|
+
// Toast.show({
|
|
977
|
+
// content: <Loading />
|
|
978
|
+
// });
|
|
979
|
+
}
|
|
937
980
|
}
|
|
938
981
|
|
|
939
982
|
});
|
package/lib/db/variables.js
CHANGED
|
@@ -61,7 +61,8 @@ exports.default = {
|
|
|
61
61
|
|
|
62
62
|
getComponentInfoList: urlBasicPrefix + 'mobilehall/mobileoffice/getComponentInfoList' + '?', //获取关联表单字段
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
insertBatchRelation: approveUrlPrefix + 'insertBatchRelation' + '?', // 关联流程
|
|
65
|
+
startFlowTest: approveUrlPrefix + 'startFlowTest' + '?', // 检验间隔时间
|
|
65
66
|
startProcess: approveUrlPrefix + 'startProcess' + '?', // 启动流程的接口
|
|
66
67
|
claimTask: approveUrlPrefix + 'claimTask' + '?', //校验流程
|
|
67
68
|
saveForm: approveUrlPrefix + 'saveForm' + '?', //保存到草稿箱
|
|
@@ -122,7 +123,8 @@ exports.default = {
|
|
|
122
123
|
getCategoryListByModule: approveUrlPrefix + "getCategoryListByModule" + '?', //获取所有节点
|
|
123
124
|
cancelLimit: approveUrlPrefix + "cancelLimit" + '?', //取消超时
|
|
124
125
|
getCanCancelLimit: approveUrlPrefix + "getCanCancelLimit" + '?', //是否可以取消超时
|
|
125
|
-
getUserInfo: approveUrlPrefix + "getUserInfo" + '?' //获取用户信息
|
|
126
|
+
getUserInfo: approveUrlPrefix + "getUserInfo" + '?', //获取用户信息
|
|
127
|
+
getProcessListByCodes: approveUrlPrefix + "getProcessListByCodes" + '?' //获取可发起的子流程
|
|
126
128
|
},
|
|
127
129
|
nodataIcon: context + "/mobile/fmui/images/noData.png",
|
|
128
130
|
loadingIcon: context + "/mobile/fmui/images/loading.gif",
|
|
@@ -141,6 +141,7 @@ var commentAttachId = '';
|
|
|
141
141
|
var remindStyle = '';
|
|
142
142
|
var FlowCommon = void 0;
|
|
143
143
|
var _thirdMenuType = void 0;
|
|
144
|
+
var isSub = '';
|
|
144
145
|
var regxp = {
|
|
145
146
|
"*": /[\w\W]+/,
|
|
146
147
|
"*6-16": /^[\w\W]{6,16}$/,
|
|
@@ -187,9 +188,6 @@ var PageHome = function (_React$Component) {
|
|
|
187
188
|
// if(fxUserId!=loginUserId){
|
|
188
189
|
// Toast.show({
|
|
189
190
|
// type: 'error',
|
|
190
|
-
// content:"您无权查看此流程!"
|
|
191
|
-
// });
|
|
192
|
-
// return false;
|
|
193
191
|
// }
|
|
194
192
|
}
|
|
195
193
|
|
|
@@ -199,6 +197,10 @@ var PageHome = function (_React$Component) {
|
|
|
199
197
|
var status = '0';
|
|
200
198
|
var dataId = props.dataId;
|
|
201
199
|
var editType = '';
|
|
200
|
+
isSub = props.isSub ? props.isSub : '';
|
|
201
|
+
// if(isSub!=''){
|
|
202
|
+
// window.location.reload();
|
|
203
|
+
// }
|
|
202
204
|
if (dataId && dataId != '-1') {
|
|
203
205
|
//非新增
|
|
204
206
|
setPageTitle("流程详情");
|
|
@@ -230,6 +232,12 @@ var PageHome = function (_React$Component) {
|
|
|
230
232
|
permissionCode = 'start';
|
|
231
233
|
setPageTitle("新建");
|
|
232
234
|
}
|
|
235
|
+
//子流程打开
|
|
236
|
+
if (isSub != '') {
|
|
237
|
+
editType = 'readd';
|
|
238
|
+
permissionCode = 'start';
|
|
239
|
+
setPageTitle("新建");
|
|
240
|
+
}
|
|
233
241
|
var isPush = props.isPush;
|
|
234
242
|
|
|
235
243
|
var query = props.query == null ? {} : JSON.parse(props.query);
|
|
@@ -323,7 +331,7 @@ var PageHome = function (_React$Component) {
|
|
|
323
331
|
// category:category,
|
|
324
332
|
processInstanceId: props.processInstanceId,
|
|
325
333
|
taskId: props.taskId,
|
|
326
|
-
userId:
|
|
334
|
+
userId: loginUserId,
|
|
327
335
|
formItem: [],
|
|
328
336
|
formStyleObj: {}, //表单字体样式
|
|
329
337
|
formTblName: '',
|
|
@@ -441,7 +449,13 @@ var PageHome = function (_React$Component) {
|
|
|
441
449
|
designActivity: '', //选择的提醒环节id
|
|
442
450
|
processData: '1', //1 保留流程数据,2清除已办数据
|
|
443
451
|
processDataList: [],
|
|
444
|
-
commentUpload: '' //1 批示意见允许上传
|
|
452
|
+
commentUpload: '', //1 批示意见允许上传
|
|
453
|
+
subProcessCode: '', //子流程code
|
|
454
|
+
allSubprocessList: [], //可选择的子流程
|
|
455
|
+
dataInherit: '', //是否同步主表数据 1为同步
|
|
456
|
+
selectProcessCode: '', //选中的子流程
|
|
457
|
+
subProcessType: '' //子流程类型 0串行 1并行
|
|
458
|
+
|
|
445
459
|
};
|
|
446
460
|
FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
|
|
447
461
|
|
|
@@ -634,6 +648,7 @@ var PageHome = function (_React$Component) {
|
|
|
634
648
|
if (ActionSheetButton) {
|
|
635
649
|
ActionSheetButton.close();
|
|
636
650
|
}
|
|
651
|
+
console.log("componentWillUnmount");
|
|
637
652
|
}
|
|
638
653
|
}, {
|
|
639
654
|
key: 'imageView',
|
|
@@ -714,6 +729,9 @@ var PageHome = function (_React$Component) {
|
|
|
714
729
|
} else {
|
|
715
730
|
t.loadPage(param);
|
|
716
731
|
}
|
|
732
|
+
if (isSub != '') {
|
|
733
|
+
t.insertBatchRelation(t.state.processInstanceId, isSub, t.state.activityId, '');
|
|
734
|
+
}
|
|
717
735
|
} else {
|
|
718
736
|
t.loadPage(param);
|
|
719
737
|
}
|
|
@@ -777,6 +795,9 @@ var PageHome = function (_React$Component) {
|
|
|
777
795
|
var readScopeId = '';
|
|
778
796
|
var readScopeList = [];
|
|
779
797
|
var isRemoveCommentFormHtml = '0';
|
|
798
|
+
var subProcessCode = '';
|
|
799
|
+
var dataInherit = '';
|
|
800
|
+
var subProcessType = '';
|
|
780
801
|
if (content.readScopeId && typeof content.readScopeId != "undefined") {
|
|
781
802
|
readScopeId = content.readScopeId;
|
|
782
803
|
}
|
|
@@ -790,6 +811,15 @@ var PageHome = function (_React$Component) {
|
|
|
790
811
|
if (content.commentUpload && typeof content.commentUpload != "undefined") {
|
|
791
812
|
commentUpload = content.commentUpload;
|
|
792
813
|
}
|
|
814
|
+
if (content.subProcessCode && typeof content.subProcessCode != "undefined") {
|
|
815
|
+
subProcessCode = content.subProcessCode;
|
|
816
|
+
}
|
|
817
|
+
if (content.dataInherit && typeof content.dataInherit != "undefined") {
|
|
818
|
+
dataInherit = content.dataInherit;
|
|
819
|
+
}
|
|
820
|
+
if (content.subProcessType && typeof content.subProcessType != "undefined") {
|
|
821
|
+
subProcessType = content.subProcessType;
|
|
822
|
+
}
|
|
793
823
|
var formKey = form.formcode;
|
|
794
824
|
var formStyleObj = form.formStyle;
|
|
795
825
|
|
|
@@ -1353,7 +1383,10 @@ var PageHome = function (_React$Component) {
|
|
|
1353
1383
|
readScopeId: readScopeId,
|
|
1354
1384
|
readScopeList: readScopeList,
|
|
1355
1385
|
isRemoveCommentFormHtml: isRemoveCommentFormHtml,
|
|
1356
|
-
commentUpload: commentUpload
|
|
1386
|
+
commentUpload: commentUpload,
|
|
1387
|
+
subProcessCode: subProcessCode,
|
|
1388
|
+
dataInherit: dataInherit,
|
|
1389
|
+
subProcessType: subProcessType
|
|
1357
1390
|
}, function () {
|
|
1358
1391
|
t.refs["selectMember_circulate"].initSelectData();
|
|
1359
1392
|
t.refs["selectMember_circulate1"].initSelectData();
|
|
@@ -1616,6 +1649,36 @@ var PageHome = function (_React$Component) {
|
|
|
1616
1649
|
key: 'change',
|
|
1617
1650
|
value: function change(data, itemParam) {
|
|
1618
1651
|
console.log("数据回调" + itemParam.key);
|
|
1652
|
+
debugger;
|
|
1653
|
+
//子流程去除id字段
|
|
1654
|
+
if (isSub != '' && data) {
|
|
1655
|
+
var mainTblData = data.mainTblData;
|
|
1656
|
+
if (mainTblData && mainTblData.length > 0) {
|
|
1657
|
+
for (var i = 0; i < mainTblData.length; i++) {
|
|
1658
|
+
if (mainTblData[i].key == 'id') {
|
|
1659
|
+
mainTblData.splice(i, 1);
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
var subTbl = data.subTbl;
|
|
1664
|
+
if (subTbl && subTbl.length > 0) {
|
|
1665
|
+
for (var i = 0; i < subTbl.length; i++) {
|
|
1666
|
+
var subTblData = subTbl[i].subTblData;
|
|
1667
|
+
if (subTblData && subTblData.length > 0) {
|
|
1668
|
+
for (var j = 0; j < subTblData.length; j++) {
|
|
1669
|
+
var subTblDataItem = subTblData[j];
|
|
1670
|
+
if (subTblDataItem && subTblDataItem.length > 0) {
|
|
1671
|
+
for (var k = 0; k < subTblDataItem.length; k++) {
|
|
1672
|
+
if (subTblDataItem[k].key == 'id') {
|
|
1673
|
+
subTblDataItem[k].value = "";
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1619
1682
|
this.setState({
|
|
1620
1683
|
editFormData: data
|
|
1621
1684
|
});
|
|
@@ -2078,6 +2141,7 @@ var PageHome = function (_React$Component) {
|
|
|
2078
2141
|
}, {
|
|
2079
2142
|
key: 'handleSubmitFunc',
|
|
2080
2143
|
value: function handleSubmitFunc(operate) {
|
|
2144
|
+
console.log("handleSubmitFunc operate==" + operate);
|
|
2081
2145
|
var t = this;
|
|
2082
2146
|
var auditorUserIds = null;
|
|
2083
2147
|
// this.state.personValue.map((item, index) => {
|
|
@@ -2926,6 +2990,58 @@ var PageHome = function (_React$Component) {
|
|
|
2926
2990
|
}).catch(function (error) {
|
|
2927
2991
|
console.error(error);
|
|
2928
2992
|
});
|
|
2993
|
+
} else if (operate == 'subprocess') {
|
|
2994
|
+
//发起子流程
|
|
2995
|
+
var subProcessCode = t.state.subProcessCode;
|
|
2996
|
+
var canBackType = '';
|
|
2997
|
+
|
|
2998
|
+
if (subProcessCode != '') {
|
|
2999
|
+
//没有点击过驳回
|
|
3000
|
+
_db2.default.FlowModuleAPI.getProcessListByCodes({
|
|
3001
|
+
processCodes: subProcessCode
|
|
3002
|
+
}).then(function (content) {
|
|
3003
|
+
var subProcessList = content;
|
|
3004
|
+
if (subProcessList != null && subProcessList != '' && subProcessList.length > 0) {
|
|
3005
|
+
var selectOptions = [];
|
|
3006
|
+
subProcessList.map(function (item, index) {
|
|
3007
|
+
var option = {};
|
|
3008
|
+
option.value = item.code;
|
|
3009
|
+
option.content = item.processName;
|
|
3010
|
+
option.disable = false;
|
|
3011
|
+
option.checked = false;
|
|
3012
|
+
option.name = item.processName;
|
|
3013
|
+
if (index == 0) {
|
|
3014
|
+
option.checked = true;
|
|
3015
|
+
}
|
|
3016
|
+
selectOptions.push(option);
|
|
3017
|
+
});
|
|
3018
|
+
t.setState({
|
|
3019
|
+
allSubprocessList: selectOptions,
|
|
3020
|
+
selectProcessCode: selectOptions[0].value,
|
|
3021
|
+
operate: operate,
|
|
3022
|
+
pageStatus: '1'
|
|
3023
|
+
}, function () {
|
|
3024
|
+
$(window).scrollTop(0);
|
|
3025
|
+
});
|
|
3026
|
+
} else {
|
|
3027
|
+
_Toast2.default.show({
|
|
3028
|
+
type: 'error',
|
|
3029
|
+
content: '当前节点无可发起的子流程'
|
|
3030
|
+
});
|
|
3031
|
+
return false;
|
|
3032
|
+
}
|
|
3033
|
+
}).catch(function (error) {
|
|
3034
|
+
console.error(error);
|
|
3035
|
+
});
|
|
3036
|
+
} else {
|
|
3037
|
+
t.setState({
|
|
3038
|
+
operate: operate,
|
|
3039
|
+
pageStatus: '1',
|
|
3040
|
+
backReasonText: ''
|
|
3041
|
+
}, function () {
|
|
3042
|
+
$(window).scrollTop(0);
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
2929
3045
|
} else {
|
|
2930
3046
|
//其他按钮
|
|
2931
3047
|
if (typeof FlowCommon[operate] === "function") {
|
|
@@ -3772,9 +3888,155 @@ var PageHome = function (_React$Component) {
|
|
|
3772
3888
|
this.cancelLimitFlow(param);
|
|
3773
3889
|
} else if (operate == 18) {
|
|
3774
3890
|
this.sendMail();
|
|
3891
|
+
} else if (operate == 'subprocess') {
|
|
3892
|
+
this.startSubProcess();
|
|
3775
3893
|
}
|
|
3776
3894
|
}
|
|
3895
|
+
//子流程自动关联
|
|
3777
3896
|
|
|
3897
|
+
}, {
|
|
3898
|
+
key: 'insertBatchRelation',
|
|
3899
|
+
value: function insertBatchRelation(processInstanceId, relationIds, activityId, dataInherit) {
|
|
3900
|
+
_db2.default.FlowModuleAPI.insertBatchRelation({
|
|
3901
|
+
processInstanceId: processInstanceId,
|
|
3902
|
+
relationIds: relationIds,
|
|
3903
|
+
activityId: activityId,
|
|
3904
|
+
dataInherit: dataInherit
|
|
3905
|
+
}).then(function (content) {
|
|
3906
|
+
console.log("content==" + content);
|
|
3907
|
+
}).catch(function (error) {
|
|
3908
|
+
console.error(error);
|
|
3909
|
+
});
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
//发起子流程
|
|
3913
|
+
|
|
3914
|
+
}, {
|
|
3915
|
+
key: 'startSubProcess',
|
|
3916
|
+
value: function startSubProcess() {
|
|
3917
|
+
console.log("startSubProcess====");
|
|
3918
|
+
var t = this;
|
|
3919
|
+
var selectProcessCode = t.state.selectProcessCode;
|
|
3920
|
+
var dataInherit = t.state.dataInherit;
|
|
3921
|
+
var parentProcessInstanceId = t.state.processInstanceId;
|
|
3922
|
+
var parentTaskId = t.state.taskId;
|
|
3923
|
+
var parentDataId = t.state.dataId;
|
|
3924
|
+
var userId = t.state.userId;
|
|
3925
|
+
var isPush = t.state.isPush;
|
|
3926
|
+
var activityId = t.state.activityId;
|
|
3927
|
+
var param = {
|
|
3928
|
+
code: selectProcessCode
|
|
3929
|
+
};
|
|
3930
|
+
|
|
3931
|
+
_db2.default.FlowModuleAPI.startFlowTest(param).then(function (content) {
|
|
3932
|
+
var canStart = content.canStart;
|
|
3933
|
+
var reminder = content.reminder;
|
|
3934
|
+
if (canStart == "1") {
|
|
3935
|
+
param.parentProcessInstanceId = parentProcessInstanceId;
|
|
3936
|
+
param.parentTaskId = parentTaskId;
|
|
3937
|
+
_db2.default.FlowModuleAPI.startProcess(param).then(function (content) {
|
|
3938
|
+
var openTaskId = content.openTaskId;
|
|
3939
|
+
var processInstanceId = content.processInstanceId;
|
|
3940
|
+
var list = content.list;
|
|
3941
|
+
if (openTaskId != null && openTaskId != '') {
|
|
3942
|
+
if (list != null && list != '' && list.length > 0) {
|
|
3943
|
+
t.insertBatchRelation(parentProcessInstanceId, processInstanceId, activityId, dataInherit);
|
|
3944
|
+
for (var j = 0; j < list.length; j++) {
|
|
3945
|
+
if (openTaskId == list[j].id) {
|
|
3946
|
+
var jumppath = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/-1/0/0/' + list[j].processInstanceId + '/approve/' + userId + '/undefined/' + parentProcessInstanceId;
|
|
3947
|
+
if (dataInherit && dataInherit == '1') {
|
|
3948
|
+
jumppath = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + parentDataId + '/0/0/' + list[j].processInstanceId + '/approve/' + userId + '/undefined/' + parentProcessInstanceId;
|
|
3949
|
+
}
|
|
3950
|
+
// if (isPush == '1') {
|
|
3951
|
+
// closePage();
|
|
3952
|
+
// } else {
|
|
3953
|
+
// backPage();
|
|
3954
|
+
// }
|
|
3955
|
+
// setTimeout(function(){
|
|
3956
|
+
// location.hash = jumppath;
|
|
3957
|
+
// },100);
|
|
3958
|
+
// location.hash = jumppath;
|
|
3959
|
+
location.hash = jumppath;
|
|
3960
|
+
// location.href =window.location.href.split("#")+ jumppath;
|
|
3961
|
+
}
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
} else {
|
|
3965
|
+
if (list != null && list != '' && list.length > 0) {
|
|
3966
|
+
var assigneeName = '';
|
|
3967
|
+
for (var i = 0; i < list.length; i++) {
|
|
3968
|
+
if (list[i].assigneeName != null && list[i].assigneeName != '') {
|
|
3969
|
+
assigneeName = assigneeName + ',' + list[i].assigneeName;
|
|
3970
|
+
}
|
|
3971
|
+
}
|
|
3972
|
+
_Toast2.default.show({
|
|
3973
|
+
type: 'success',
|
|
3974
|
+
content: "流程已发送给" + assigneeName.substring(1)
|
|
3975
|
+
});
|
|
3976
|
+
}
|
|
3977
|
+
}
|
|
3978
|
+
}).catch(function (error) {
|
|
3979
|
+
console.log(error.message);
|
|
3980
|
+
});
|
|
3981
|
+
} else {
|
|
3982
|
+
_Dialog2.default.confirm({
|
|
3983
|
+
locale: 'zh_CN',
|
|
3984
|
+
title: '提示',
|
|
3985
|
+
content: reminder,
|
|
3986
|
+
onConfirm: function onConfirm() {
|
|
3987
|
+
param.parentProcessInstanceId = parentProcessInstanceId;
|
|
3988
|
+
param.parentTaskId = parentTaskId;
|
|
3989
|
+
_db2.default.FlowModuleAPI.startProcess(param).then(function (content) {
|
|
3990
|
+
var openTaskId = content.openTaskId;
|
|
3991
|
+
var processInstanceId = content.processInstanceId;
|
|
3992
|
+
var list = content.list;
|
|
3993
|
+
t.insertBatchRelation(parentProcessInstanceId, processInstanceId, activityId, dataInherit);
|
|
3994
|
+
if (openTaskId != null && openTaskId != '') {
|
|
3995
|
+
if (list != null && list != '' && list.length > 0) {
|
|
3996
|
+
for (var j = 0; j < list.length; j++) {
|
|
3997
|
+
if (openTaskId == list[j].id) {
|
|
3998
|
+
var jumppath = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/-1/0/0/' + list[j].processInstanceId + '/approve/' + userId + '/undefined/' + parentProcessInstanceId;
|
|
3999
|
+
if (dataInherit && dataInherit == '1') {
|
|
4000
|
+
jumppath = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + parentDataId + '/0/0/' + list[j].processInstanceId + '/approve/' + userId + '/undefined/' + parentProcessInstanceId;
|
|
4001
|
+
}
|
|
4002
|
+
// if (isPush == '1') {
|
|
4003
|
+
// closePage();
|
|
4004
|
+
// } else {
|
|
4005
|
+
// backPage();
|
|
4006
|
+
// }
|
|
4007
|
+
// setTimeout(function(){
|
|
4008
|
+
// location.hash = jumppath;
|
|
4009
|
+
// },100);
|
|
4010
|
+
// location.hash = jumppath;
|
|
4011
|
+
location.href = window.location.href.split("#") + jumppath;
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
} else {
|
|
4016
|
+
if (list != null && list != '' && list.length > 0) {
|
|
4017
|
+
var assigneeName = '';
|
|
4018
|
+
for (var i = 0; i < list.length; i++) {
|
|
4019
|
+
if (list[i].assigneeName != null && list[i].assigneeName != '') {
|
|
4020
|
+
assigneeName = assigneeName + ',' + list[i].assigneeName;
|
|
4021
|
+
}
|
|
4022
|
+
}
|
|
4023
|
+
_Toast2.default.show({
|
|
4024
|
+
type: 'success',
|
|
4025
|
+
content: "流程已发送给" + assigneeName.substring(1)
|
|
4026
|
+
});
|
|
4027
|
+
}
|
|
4028
|
+
}
|
|
4029
|
+
}).catch(function (error) {
|
|
4030
|
+
console.log(error.message);
|
|
4031
|
+
});
|
|
4032
|
+
},
|
|
4033
|
+
onCancel: function onCancel() {
|
|
4034
|
+
console.log('confirm cancel');
|
|
4035
|
+
}
|
|
4036
|
+
});
|
|
4037
|
+
}
|
|
4038
|
+
}).catch(function (error) {});
|
|
4039
|
+
}
|
|
3778
4040
|
//驳回流程
|
|
3779
4041
|
|
|
3780
4042
|
}, {
|
|
@@ -4114,6 +4376,7 @@ var PageHome = function (_React$Component) {
|
|
|
4114
4376
|
dataId: dataId
|
|
4115
4377
|
});
|
|
4116
4378
|
} else {
|
|
4379
|
+
|
|
4117
4380
|
if (isPush == '1') {
|
|
4118
4381
|
closePage();
|
|
4119
4382
|
} else {
|
|
@@ -4228,7 +4491,9 @@ var PageHome = function (_React$Component) {
|
|
|
4228
4491
|
if (typeof mobileExt !== 'undefined' && typeof mobileExt["operateCallBack"] === "function") {
|
|
4229
4492
|
mobileExt["operateCallBack"]({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
|
|
4230
4493
|
}
|
|
4231
|
-
|
|
4494
|
+
if (isSub != '') {
|
|
4495
|
+
backPage(2);
|
|
4496
|
+
}
|
|
4232
4497
|
if (isPush == '1') {
|
|
4233
4498
|
closePage();
|
|
4234
4499
|
//alert("_thirdMenuType:"+_thirdMenuType);
|
|
@@ -4469,6 +4734,7 @@ var PageHome = function (_React$Component) {
|
|
|
4469
4734
|
dataId = content.dataId;
|
|
4470
4735
|
t.setState({ dataId: dataId });
|
|
4471
4736
|
}
|
|
4737
|
+
|
|
4472
4738
|
if (typeof FlowCommon.operateCallBack === "function") {
|
|
4473
4739
|
// var type = 6;
|
|
4474
4740
|
// if(t.state.isStart && t.state.dataId==''){//是不是起始节点
|
|
@@ -4535,6 +4801,9 @@ var PageHome = function (_React$Component) {
|
|
|
4535
4801
|
t.handleSubmit(1);
|
|
4536
4802
|
});
|
|
4537
4803
|
} else {
|
|
4804
|
+
if (isSub != '') {
|
|
4805
|
+
backPage(2);
|
|
4806
|
+
}
|
|
4538
4807
|
if (isPush == '1') {
|
|
4539
4808
|
closePage();
|
|
4540
4809
|
} else {
|
|
@@ -5875,6 +6144,9 @@ var PageHome = function (_React$Component) {
|
|
|
5875
6144
|
var sysWatermark = _this2.state.sysWatermark;
|
|
5876
6145
|
/* buttonCodeList.push({'buttonCode':'BASE_SUMBIT','buttonName':'通过'});
|
|
5877
6146
|
buttonCodeList.push({'buttonCode':'PAGE_SAVE','buttonName':'保存'});*/
|
|
6147
|
+
if (_this2.state.subProcessCode && _this2.state.subProcessCode != '') {
|
|
6148
|
+
buttonCodeList.push({ 'buttonCode': 'subprocess', 'buttonName': '发起子流程' });
|
|
6149
|
+
}
|
|
5878
6150
|
buttonCodeList = buttonCodeList.concat();
|
|
5879
6151
|
var alllength = buttonCodeList.length + extensionButtonList.length;
|
|
5880
6152
|
if (alllength > 4) {
|
|
@@ -6250,6 +6522,17 @@ var PageHome = function (_React$Component) {
|
|
|
6250
6522
|
});
|
|
6251
6523
|
}
|
|
6252
6524
|
|
|
6525
|
+
//选择子流程
|
|
6526
|
+
|
|
6527
|
+
}, {
|
|
6528
|
+
key: 'selectSubProcess',
|
|
6529
|
+
value: function selectSubProcess(value, index, data) {
|
|
6530
|
+
debugger;
|
|
6531
|
+
this.setState({
|
|
6532
|
+
selectProcessCode: value
|
|
6533
|
+
});
|
|
6534
|
+
}
|
|
6535
|
+
|
|
6253
6536
|
//选择跳转节点
|
|
6254
6537
|
|
|
6255
6538
|
}, {
|
|
@@ -6901,6 +7184,12 @@ var PageHome = function (_React$Component) {
|
|
|
6901
7184
|
permissionCode = 'other';
|
|
6902
7185
|
}
|
|
6903
7186
|
}
|
|
7187
|
+
//子流程打开
|
|
7188
|
+
if (isSub != '') {
|
|
7189
|
+
editType = 'readd';
|
|
7190
|
+
permissionCode = 'start';
|
|
7191
|
+
setPageTitle("新建");
|
|
7192
|
+
}
|
|
6904
7193
|
var isPush = nextProps.isPush;
|
|
6905
7194
|
var isDraft = nextProps.query.isDraft; //是不是草稿箱,1是,0:不是
|
|
6906
7195
|
if (isDraft) {
|
|
@@ -7824,6 +8113,26 @@ var PageHome = function (_React$Component) {
|
|
|
7824
8113
|
value: this.state.cancelLimitReasonText,
|
|
7825
8114
|
onChange: this.changeCancelLimitReasonText.bind(this) })
|
|
7826
8115
|
),
|
|
8116
|
+
_react2.default.createElement(
|
|
8117
|
+
_Group2.default.List,
|
|
8118
|
+
{ className: this.state.operate == 'subprocess' && this.state.allSubprocessList.length > 0 ? '' : 't-DN' },
|
|
8119
|
+
_react2.default.createElement(
|
|
8120
|
+
'div',
|
|
8121
|
+
{ style: { background: '#f2f3f5', padding: '10px 5px' } },
|
|
8122
|
+
_react2.default.createElement(
|
|
8123
|
+
'span',
|
|
8124
|
+
{ className: 'theme-color' },
|
|
8125
|
+
_react2.default.createElement('i', { className: 'iconfont icon-back t-rotate-180 t-FS14 t-FR' }),
|
|
8126
|
+
'\u53D1\u8D77\u5B50\u6D41\u7A0B'
|
|
8127
|
+
)
|
|
8128
|
+
),
|
|
8129
|
+
_react2.default.createElement(_RadioField2.default, {
|
|
8130
|
+
data: this.state.allSubprocessList,
|
|
8131
|
+
mode: 'list',
|
|
8132
|
+
onChange: this.selectSubProcess.bind(this),
|
|
8133
|
+
required: true
|
|
8134
|
+
})
|
|
8135
|
+
),
|
|
7827
8136
|
_react2.default.createElement(
|
|
7828
8137
|
'div',
|
|
7829
8138
|
{ className: 't-P0 t-bottom-fixed' },
|