cloud-module-bpm 6.4.7 → 6.4.8
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/dist/cloud-module-bpm.common.js +247 -177
- package/dist/cloud-module-bpm.common.js.map +1 -1
- package/dist/cloud-module-bpm.umd.js +247 -177
- package/dist/cloud-module-bpm.umd.js.map +1 -1
- package/dist/cloud-module-bpm.umd.min.js +2 -2
- package/dist/cloud-module-bpm.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/packages/bpm-jump-dialog/bpm-jump-dialog.vue +94 -37
- package/packages/bpm-jump-latest-dialog/bpm-jump-latest-dialog.vue +111 -35
- package/packages/bpm-send-read-dialog/bpm-send-read.vue +32 -12
- package/packages/utils/merit-bpm.js +109 -59
|
@@ -18,7 +18,7 @@ var MeritBPM = {
|
|
|
18
18
|
*/
|
|
19
19
|
MeritBPM.create = function(that, procDefKey, params, callback) {
|
|
20
20
|
axios['bpm-engine']
|
|
21
|
-
.post('/api/engine/bpm/ruleengine/init/' + procDefKey,
|
|
21
|
+
.post('/api/engine/bpm/ruleengine/init/' + procDefKey, {})
|
|
22
22
|
.then(function(res) {
|
|
23
23
|
if (res.success) {
|
|
24
24
|
if (typeof callback == 'function') {
|
|
@@ -28,16 +28,6 @@ MeritBPM.create = function(that, procDefKey, params, callback) {
|
|
|
28
28
|
if (params.params != null && params.params != '') {
|
|
29
29
|
url = url + '¶ms=' + params.params;
|
|
30
30
|
}
|
|
31
|
-
// var iTop = (window.screen.availHeight - 30 - 700) / 2;
|
|
32
|
-
// var iLeft = (window.screen.availWidth - 10 - 900) / 2;
|
|
33
|
-
// var features =
|
|
34
|
-
// 'width=900px,height=700px,' +
|
|
35
|
-
// 'left=' +
|
|
36
|
-
// iLeft +
|
|
37
|
-
// 'px,' +
|
|
38
|
-
// 'top=' +
|
|
39
|
-
// iTop +
|
|
40
|
-
// 'px';
|
|
41
31
|
window.open(url, '_blank');
|
|
42
32
|
}
|
|
43
33
|
} else {
|
|
@@ -305,6 +295,9 @@ MeritBPM.finishTask = function(that, _ruleEngine) {
|
|
|
305
295
|
// 添加原因:人员选择过多造成入参过长报500,发现后端没有用nextNodes中类容,故置空
|
|
306
296
|
if (bpmVars.runtime != undefined && bpmVars.runtime.nextNodes != undefined) {
|
|
307
297
|
bpmVars.runtime.nextNodes = [];
|
|
298
|
+
if (bpmVars.runtime.opinion) {
|
|
299
|
+
bpmVars.runtime.opinion = [];
|
|
300
|
+
}
|
|
308
301
|
}
|
|
309
302
|
if (_ruleEngine.runtime.taskId != null) {
|
|
310
303
|
//办理任务
|
|
@@ -335,7 +328,14 @@ MeritBPM.finishTask = function(that, _ruleEngine) {
|
|
|
335
328
|
};
|
|
336
329
|
// 流程终止
|
|
337
330
|
MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
338
|
-
|
|
331
|
+
// 为了解决入参过多的问题
|
|
332
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
333
|
+
if (temRuleEngine.runtime.mainForm) {
|
|
334
|
+
temRuleEngine.runtime.mainForm = {};
|
|
335
|
+
}
|
|
336
|
+
if (temRuleEngine.runtime.opinion) {
|
|
337
|
+
temRuleEngine.runtime.opinion = [];
|
|
338
|
+
}
|
|
339
339
|
that
|
|
340
340
|
.$confirm('此操作将终止该流程, 是否继续?', '提示', {
|
|
341
341
|
confirmButtonText: '确定',
|
|
@@ -347,7 +347,7 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
347
347
|
axios['bpm-engine']
|
|
348
348
|
.post(
|
|
349
349
|
'/api/engine/bpm/process/over/' + ruleEngine.businessId,
|
|
350
|
-
|
|
350
|
+
temRuleEngine
|
|
351
351
|
)
|
|
352
352
|
.then(function(res) {
|
|
353
353
|
if (res.status == '1') {
|
|
@@ -366,7 +366,14 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
366
366
|
// 退回上一环节处理人
|
|
367
367
|
(MeritBPM.bpmRetprenodeBtn = function(that, ruleEngine) {
|
|
368
368
|
let businessId = that.ruleEngine.businessId;
|
|
369
|
-
|
|
369
|
+
// 为了解决入参过多的问题
|
|
370
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
371
|
+
if (temRuleEngine.runtime.mainForm) {
|
|
372
|
+
temRuleEngine.runtime.mainForm = {};
|
|
373
|
+
}
|
|
374
|
+
if (temRuleEngine.runtime.opinion) {
|
|
375
|
+
temRuleEngine.runtime.opinion = [];
|
|
376
|
+
}
|
|
370
377
|
that
|
|
371
378
|
.$confirm('此操作将退回到上一环节处理人, 是否继续?', '提示', {
|
|
372
379
|
confirmButtonText: '确定',
|
|
@@ -376,7 +383,7 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
376
383
|
})
|
|
377
384
|
.then(() => {
|
|
378
385
|
axios['bpm-engine']
|
|
379
|
-
.post('/api/engine/bpm/process/retprenode/' + businessId,
|
|
386
|
+
.post('/api/engine/bpm/process/retprenode/' + businessId, temRuleEngine)
|
|
380
387
|
.then(function(res) {
|
|
381
388
|
if (res.status == '1') {
|
|
382
389
|
that.$message.success(res.message);
|
|
@@ -394,7 +401,17 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
394
401
|
//发送到退回人
|
|
395
402
|
(MeritBPM.bpmDoBackBtn = function(that, ruleEngine) {
|
|
396
403
|
let businessId = that.ruleEngine.businessId;
|
|
397
|
-
|
|
404
|
+
// 为了解决入参过多的问题
|
|
405
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
406
|
+
if (temRuleEngine.runtime.mainForm) {
|
|
407
|
+
temRuleEngine.runtime.mainForm = {};
|
|
408
|
+
}
|
|
409
|
+
if (temRuleEngine.runtime.opinion) {
|
|
410
|
+
temRuleEngine.runtime.opinion = [];
|
|
411
|
+
}
|
|
412
|
+
if (temRuleEngine.runtime.bpmBtns) {
|
|
413
|
+
temRuleEngine.runtime.bpmBtns = [];
|
|
414
|
+
}
|
|
398
415
|
that
|
|
399
416
|
.$confirm('是否将流程直接发送给退回人', '发送提示', {
|
|
400
417
|
confirmButtonText: '确定',
|
|
@@ -404,7 +421,7 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
404
421
|
})
|
|
405
422
|
.then(() => {
|
|
406
423
|
axios['bpm-engine']
|
|
407
|
-
.post('/api/engine/bpm/process/dostatus/' + businessId,
|
|
424
|
+
.post('/api/engine/bpm/process/dostatus/' + businessId, temRuleEngine)
|
|
408
425
|
.then(function(res) {
|
|
409
426
|
if (res.status == '1') {
|
|
410
427
|
that.$message.success(res.message);
|
|
@@ -475,7 +492,14 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
475
492
|
// 退回拟稿人
|
|
476
493
|
(MeritBPM.bpmRetfirnodeBtn = function(that, ruleEngine) {
|
|
477
494
|
let businessId = that.ruleEngine.businessId;
|
|
478
|
-
|
|
495
|
+
// 为了解决入参过多的问题
|
|
496
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
497
|
+
if (temRuleEngine.runtime.mainForm) {
|
|
498
|
+
temRuleEngine.runtime.mainForm = {};
|
|
499
|
+
}
|
|
500
|
+
if (temRuleEngine.runtime.opinion) {
|
|
501
|
+
temRuleEngine.runtime.opinion = [];
|
|
502
|
+
}
|
|
479
503
|
that
|
|
480
504
|
.$confirm('此操作将退回到拟稿人, 是否继续?', '提示', {
|
|
481
505
|
confirmButtonText: '确定',
|
|
@@ -485,7 +509,10 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
485
509
|
})
|
|
486
510
|
.then(() => {
|
|
487
511
|
axios['bpm-engine']
|
|
488
|
-
.post(
|
|
512
|
+
.post(
|
|
513
|
+
'/api/engine/bpm/process/retfirnode/' + businessId,
|
|
514
|
+
temRuleEngine
|
|
515
|
+
)
|
|
489
516
|
.then(function(res) {
|
|
490
517
|
if (res.status == '1') {
|
|
491
518
|
that.$message.success(res.message);
|
|
@@ -505,7 +532,14 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
505
532
|
let businessId = that.ruleEngine.businessId;
|
|
506
533
|
let receiver = ruleEngine.resultCodes;
|
|
507
534
|
let toTaskDefKey = ruleEngine.resultToTaskDefKey;
|
|
508
|
-
|
|
535
|
+
// 为了解决入参过多的问题
|
|
536
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
537
|
+
if (temRuleEngine.runtime) {
|
|
538
|
+
temRuleEngine.runtime = {};
|
|
539
|
+
}
|
|
540
|
+
if (temRuleEngine.runtime.opinion) {
|
|
541
|
+
temRuleEngine.runtime.opinion = [];
|
|
542
|
+
}
|
|
509
543
|
axios['bpm-engine']
|
|
510
544
|
.post(
|
|
511
545
|
'/api/engine/bpm/process/RetRandomNodeStatus/' +
|
|
@@ -514,7 +548,7 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
514
548
|
toTaskDefKey +
|
|
515
549
|
'/' +
|
|
516
550
|
receiver,
|
|
517
|
-
|
|
551
|
+
temRuleEngine
|
|
518
552
|
)
|
|
519
553
|
.then(function(res) {
|
|
520
554
|
if (res.status == '1') {
|
|
@@ -531,7 +565,14 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
531
565
|
// 流程收回
|
|
532
566
|
(MeritBPM.bpmTakeBackBtn = function(that, ruleEngine) {
|
|
533
567
|
let businessId = that.ruleEngine.businessId;
|
|
534
|
-
|
|
568
|
+
// 为了解决入参过多的问题
|
|
569
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
570
|
+
if (temRuleEngine.runtime.mainForm) {
|
|
571
|
+
temRuleEngine.runtime.mainForm = {};
|
|
572
|
+
}
|
|
573
|
+
if (temRuleEngine.runtime.opinion) {
|
|
574
|
+
temRuleEngine.runtime.opinion = [];
|
|
575
|
+
}
|
|
535
576
|
that
|
|
536
577
|
.$confirm('此操作将收回该流程, 是否继续?', '提示', {
|
|
537
578
|
confirmButtonText: '确定',
|
|
@@ -541,7 +582,7 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
541
582
|
})
|
|
542
583
|
.then(() => {
|
|
543
584
|
axios['bpm-engine']
|
|
544
|
-
.post('/api/engine/bpm/process/takeBack/' + businessId,
|
|
585
|
+
.post('/api/engine/bpm/process/takeBack/' + businessId, temRuleEngine)
|
|
545
586
|
.then(function(res) {
|
|
546
587
|
if (res.status == '1') {
|
|
547
588
|
that.$message.success(res.message);
|
|
@@ -560,11 +601,18 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
560
601
|
(MeritBPM.JumpSave = function(that, ruleEngine) {
|
|
561
602
|
let toTaskDefKey = ruleEngine.toTaskDefKey;
|
|
562
603
|
let businessId = that.ruleEngine.businessId;
|
|
563
|
-
//
|
|
604
|
+
// 为了解决入参过多的问题
|
|
605
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
606
|
+
if (temRuleEngine.runtime.mainForm) {
|
|
607
|
+
temRuleEngine.runtime.mainForm = {};
|
|
608
|
+
}
|
|
609
|
+
if (temRuleEngine.runtime.opinion) {
|
|
610
|
+
temRuleEngine.runtime.opinion = [];
|
|
611
|
+
}
|
|
564
612
|
axios['bpm-engine']
|
|
565
613
|
.post(
|
|
566
614
|
'/api/engine/bpm/jump/process/' + businessId + '/' + toTaskDefKey,
|
|
567
|
-
|
|
615
|
+
temRuleEngine
|
|
568
616
|
)
|
|
569
617
|
.then(function(res) {
|
|
570
618
|
if (res.status == '1') {
|
|
@@ -582,14 +630,21 @@ MeritBPM.bpmJumpBtnEnd = function(that, ruleEngine) {
|
|
|
582
630
|
(MeritBPM.JumpManagementSave = function(that, ruleEngine) {
|
|
583
631
|
let toTaskDefKey = ruleEngine.toTaskDefKey;
|
|
584
632
|
let businessId = that.ruleEngine.businessId;
|
|
585
|
-
//
|
|
633
|
+
// 为了解决入参过多的问题
|
|
634
|
+
let temRuleEngine = JSON.parse(JSON.stringify(ruleEngine));
|
|
635
|
+
if (temRuleEngine.runtime.mainForm) {
|
|
636
|
+
temRuleEngine.runtime.mainForm = {};
|
|
637
|
+
}
|
|
638
|
+
if (temRuleEngine.runtime.opinion) {
|
|
639
|
+
temRuleEngine.runtime.opinion = [];
|
|
640
|
+
}
|
|
586
641
|
axios['bpm-engine']
|
|
587
642
|
.post(
|
|
588
643
|
'/api/engine/bpm/jump/latest/process/' +
|
|
589
644
|
businessId +
|
|
590
645
|
'/' +
|
|
591
646
|
toTaskDefKey,
|
|
592
|
-
|
|
647
|
+
temRuleEngine
|
|
593
648
|
)
|
|
594
649
|
.then(function(res) {
|
|
595
650
|
if (res.status == '1') {
|
|
@@ -652,36 +707,31 @@ MeritBPM.openProcTrackWindow = function(that, params) {
|
|
|
652
707
|
axios['bpm-engine'].post('/api/engine/track/port', {}).then(function(res) {
|
|
653
708
|
var port = res.data;
|
|
654
709
|
var url = '';
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
shielding;
|
|
681
|
-
}
|
|
682
|
-
MeritBPM.openWindow(url, params);
|
|
683
|
-
});
|
|
684
|
-
});
|
|
710
|
+
if (port == '80') {
|
|
711
|
+
url =
|
|
712
|
+
'http://' +
|
|
713
|
+
window.location.hostname +
|
|
714
|
+
'/bpm/proctrack/index.html?procInstId=' +
|
|
715
|
+
params.procInstId +
|
|
716
|
+
'&procDefId=' +
|
|
717
|
+
params.procDefId +
|
|
718
|
+
'&IsShielding=' +
|
|
719
|
+
shielding;
|
|
720
|
+
} else {
|
|
721
|
+
url =
|
|
722
|
+
'http://' +
|
|
723
|
+
window.location.hostname +
|
|
724
|
+
':' +
|
|
725
|
+
port +
|
|
726
|
+
'/bpm/proctrack/index.html?procInstId=' +
|
|
727
|
+
params.procInstId +
|
|
728
|
+
'&procDefId=' +
|
|
729
|
+
params.procDefId +
|
|
730
|
+
'&IsShielding=' +
|
|
731
|
+
shielding;
|
|
732
|
+
}
|
|
733
|
+
MeritBPM.openWindow(url, params);
|
|
734
|
+
});
|
|
685
735
|
};
|
|
686
736
|
|
|
687
737
|
// 发送人员对话框关闭
|
|
@@ -822,8 +872,8 @@ MeritBPM.validatePermit = function(that, procDefKey, callback) {
|
|
|
822
872
|
* 拼接参数/bpm-demo/example/index.html#/formEdit?id=businessId&undoId=undoId
|
|
823
873
|
*/
|
|
824
874
|
MeritBPM.getUrlParameter = function(name) {
|
|
825
|
-
|
|
826
|
-
window.location.
|
|
875
|
+
var query = window.location.href.substring(
|
|
876
|
+
window.location.href.indexOf('?') + 1
|
|
827
877
|
);
|
|
828
878
|
var vars = query.split('&');
|
|
829
879
|
for (var i = 0; i < vars.length; i++) {
|