sasp-flow-render 1.1.12 → 1.1.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/package.json
CHANGED
|
@@ -155,6 +155,7 @@ let objResult = {
|
|
|
155
155
|
reStartFlow:"/plFlowInstController/reStartFlow", //重启办结状态下的流程
|
|
156
156
|
batchUpdateFlowStatus:"/plFlowInstController/batchUpdateFlowStatus", //新版流程批量处理的批量修改流程状态
|
|
157
157
|
batchExecuteNextStep:"/plFlowInstController/batchExecuteNextStep", //新版流程批量处理的批量执行下一步
|
|
158
|
+
recoverNode:"/plFlowInstController/recoverNode", //恢复指定节点
|
|
158
159
|
},
|
|
159
160
|
|
|
160
161
|
plFlowSetting:{
|
|
@@ -302,6 +302,7 @@
|
|
|
302
302
|
:key="btn.btnType"
|
|
303
303
|
:type="btn.type"
|
|
304
304
|
:icon="btn.icon"
|
|
305
|
+
:disabled="btn.disabled"
|
|
305
306
|
size="small">
|
|
306
307
|
{{btn.text}}
|
|
307
308
|
</el-button>
|
|
@@ -594,6 +595,7 @@
|
|
|
594
595
|
text: "存草稿",
|
|
595
596
|
type: "success",
|
|
596
597
|
icon: "el-icon-check",
|
|
598
|
+
disabled: false,
|
|
597
599
|
show: true,
|
|
598
600
|
method: () => {
|
|
599
601
|
this.saveDraft();
|
|
@@ -604,6 +606,7 @@
|
|
|
604
606
|
text: "下一步",
|
|
605
607
|
type: "primary",
|
|
606
608
|
icon: "el-icon-d-arrow-right",
|
|
609
|
+
disabled: false,
|
|
607
610
|
show: true,
|
|
608
611
|
method: () => {
|
|
609
612
|
this.nextStep();
|
|
@@ -615,6 +618,7 @@
|
|
|
615
618
|
text: "加签",
|
|
616
619
|
type: "primary",
|
|
617
620
|
icon: "saspiconfont pl-icon-jiaqian",
|
|
621
|
+
disabled: false,
|
|
618
622
|
show: false,
|
|
619
623
|
method: () => {
|
|
620
624
|
this.completeSignDialog = true;
|
|
@@ -625,6 +629,7 @@
|
|
|
625
629
|
text: "转签",
|
|
626
630
|
type: "primary",
|
|
627
631
|
icon: "saspiconfont pl-icon-zhuanqian-icon",
|
|
632
|
+
disabled: false,
|
|
628
633
|
show: false,
|
|
629
634
|
method: () => {
|
|
630
635
|
this.turnSignDialog = true;
|
|
@@ -635,6 +640,7 @@
|
|
|
635
640
|
text: "退回",
|
|
636
641
|
type: "danger",
|
|
637
642
|
icon: "el-icon-d-arrow-left",
|
|
643
|
+
disabled: false,
|
|
638
644
|
show: false,
|
|
639
645
|
method: () => {
|
|
640
646
|
this.backToPrevious(this.currentInst);
|
|
@@ -645,6 +651,7 @@
|
|
|
645
651
|
text: "退回指定节点",
|
|
646
652
|
type: "danger",
|
|
647
653
|
icon: "el-icon-refresh-left",
|
|
654
|
+
disabled: false,
|
|
648
655
|
show: false,
|
|
649
656
|
method: () => {
|
|
650
657
|
this.retSpecified(this.currentInst); //退回指定节点
|
|
@@ -655,6 +662,7 @@
|
|
|
655
662
|
text: "中止",
|
|
656
663
|
type: "danger",
|
|
657
664
|
icon: "saspiconfont pl-icon-yizhongzhi",
|
|
665
|
+
disabled: false,
|
|
658
666
|
show: false,
|
|
659
667
|
method: () => {
|
|
660
668
|
this.saspFlowAxios.post(this.api.plFlowInst.stopFlow, {
|
|
@@ -701,6 +709,7 @@
|
|
|
701
709
|
text: "撤销",
|
|
702
710
|
type: "danger",
|
|
703
711
|
icon: "saspiconfont pl-icon-chexiao",
|
|
712
|
+
disabled: false,
|
|
704
713
|
show: false,
|
|
705
714
|
isView: true,
|
|
706
715
|
method: () => {
|
|
@@ -739,6 +748,7 @@
|
|
|
739
748
|
text: "取回",
|
|
740
749
|
type: "danger",
|
|
741
750
|
icon: "el-icon-refresh-left",
|
|
751
|
+
disabled: false,
|
|
742
752
|
show: false,
|
|
743
753
|
isView: true,
|
|
744
754
|
method: () => {
|
|
@@ -750,6 +760,7 @@
|
|
|
750
760
|
text: "恢复",
|
|
751
761
|
type: "success",
|
|
752
762
|
icon: "saspiconfont pl-icon-chexiao",
|
|
763
|
+
disabled: false,
|
|
753
764
|
show: false,
|
|
754
765
|
isView: true,
|
|
755
766
|
method: () => {
|
|
@@ -760,6 +771,7 @@
|
|
|
760
771
|
text: "流转记录",
|
|
761
772
|
type: "warning",
|
|
762
773
|
icon: "saspiconfont pl-icon-liuchengtu",
|
|
774
|
+
disabled: false,
|
|
763
775
|
show: true,
|
|
764
776
|
isView: true,
|
|
765
777
|
method: () => {
|
|
@@ -770,6 +782,7 @@
|
|
|
770
782
|
text: "关闭",
|
|
771
783
|
type: "",
|
|
772
784
|
icon: "el-icon-close",
|
|
785
|
+
disabled: false,
|
|
773
786
|
show: true,
|
|
774
787
|
isView: true,
|
|
775
788
|
method: () => {
|
|
@@ -1122,7 +1135,7 @@
|
|
|
1122
1135
|
/**
|
|
1123
1136
|
* 打开[修改和处理]窗口
|
|
1124
1137
|
*/
|
|
1125
|
-
initUpdateFlowForm(row) {
|
|
1138
|
+
initUpdateFlowForm(row, type) {
|
|
1126
1139
|
this.currentRowData = row;
|
|
1127
1140
|
this.currNodeName = 'noEnd';
|
|
1128
1141
|
if (this.flowId.includes(',')) {
|
|
@@ -1138,7 +1151,7 @@
|
|
|
1138
1151
|
return new Promise(resolve => {
|
|
1139
1152
|
let startNodeKey = this.startNodeKeyObj[row.version];
|
|
1140
1153
|
this.initFieldStatus(row.nodeKey || startNodeKey,row.version).then(()=>{
|
|
1141
|
-
this.initFormInfoFunc(
|
|
1154
|
+
this.initFormInfoFunc(type,row).then(() => {
|
|
1142
1155
|
this.currentStartUser = this.userMap[row.startUserId] || "";
|
|
1143
1156
|
this.currentStartTime = row.startTime;
|
|
1144
1157
|
this.currentInst = row;
|
|
@@ -1169,7 +1182,7 @@
|
|
|
1169
1182
|
return;
|
|
1170
1183
|
}
|
|
1171
1184
|
this.flowInstDataDialog = true;
|
|
1172
|
-
this.initUpdateFlowForm(row).then(() =>{
|
|
1185
|
+
this.initUpdateFlowForm(row, 'update').then(() =>{
|
|
1173
1186
|
this.$nextTick(() => {
|
|
1174
1187
|
this.exeFlowEvent(executePosition,"afterClick",row.currentNode);
|
|
1175
1188
|
let currentNodeObj = this.flowNodeIdToInfo[row.currentNode] ||{};
|
|
@@ -1221,15 +1234,33 @@
|
|
|
1221
1234
|
activeName: arrRows[0].dataId,
|
|
1222
1235
|
batchDataId: arrRows[0].dataId
|
|
1223
1236
|
});
|
|
1224
|
-
|
|
1237
|
+
let currentNodeObj = this.flowNodeIdToInfo[arrRows[0].currentNode] ||{};
|
|
1238
|
+
let result = null;
|
|
1239
|
+
let type = "update";
|
|
1240
|
+
if (currentNodeObj.openEvent === '1') {
|
|
1241
|
+
result = this.exeNewFlowEvent("editBefore",currentNodeObj.nodeLinkId ||'');//新事件规则
|
|
1242
|
+
if (result === false && typeof result == "boolean") {
|
|
1243
|
+
type = "view";
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1225
1246
|
this.flowBatchPendingDialog = true;
|
|
1226
|
-
this.initUpdateFlowForm(arrRows[0]).then(()=>{
|
|
1247
|
+
this.initUpdateFlowForm(arrRows[0],type).then(()=>{
|
|
1227
1248
|
// this.batchUpdateFormInfo.formShow = true;
|
|
1228
1249
|
let ref='batchTableForm'+arrRows[0].dataId+'Ref'
|
|
1229
1250
|
|
|
1230
1251
|
this.$nextTick(()=>{
|
|
1231
1252
|
// this.$refs[ref][0].loadData().then(() => {
|
|
1253
|
+
if(result === false && typeof result == "boolean"){
|
|
1254
|
+
this.formBtnArr.forEach(item => {
|
|
1255
|
+
if (item.btnType !== "close" && item.btnType !== "record") {
|
|
1256
|
+
item.disabled = true;
|
|
1257
|
+
}
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1232
1260
|
this.exeFlowEvent("handle","afterClick",arrRows[0].currentNode,ref);
|
|
1261
|
+
if(currentNodeObj.openEvent === '1'){ //开启事件
|
|
1262
|
+
this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
|
|
1263
|
+
}
|
|
1233
1264
|
// })
|
|
1234
1265
|
})
|
|
1235
1266
|
});
|
|
@@ -1884,18 +1915,33 @@
|
|
|
1884
1915
|
nextStep() {
|
|
1885
1916
|
// let type = this.flowBatchPendingDialog ? "batch" : "";
|
|
1886
1917
|
let afterClickResult;
|
|
1918
|
+
let result;
|
|
1887
1919
|
let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
|
|
1888
1920
|
afterClickResult=this.exeFlowEvent("nextStep","afterClick", this.currentInst.currentNode || this.draftNodeId);
|
|
1889
|
-
|
|
1921
|
+
|
|
1922
|
+
if(typeof afterClickResult == "boolean" && afterClickResult === false){
|
|
1923
|
+
return;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1890
1926
|
if(currentNodeObj.openEvent === '1'){
|
|
1891
1927
|
afterClickResult = this.exeNewFlowEvent("nextClick",currentNodeObj.nodeLinkId);
|
|
1892
1928
|
}
|
|
1893
1929
|
|
|
1930
|
+
if(typeof afterClickResult == "boolean" && afterClickResult === false){
|
|
1931
|
+
return;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1894
1934
|
// let afterValidateResult;
|
|
1895
1935
|
// let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
|
|
1896
|
-
this.exeFlowEvent("nextStep","afterValidate", this.currentInst.currentNode || this.draftNodeId);
|
|
1936
|
+
result = this.exeFlowEvent("nextStep","afterValidate", this.currentInst.currentNode || this.draftNodeId);
|
|
1937
|
+
if(typeof result == "boolean" && result === false){
|
|
1938
|
+
return;
|
|
1939
|
+
}
|
|
1897
1940
|
if(currentNodeObj.openEvent === '1'){
|
|
1898
|
-
this.exeNewFlowEvent("nextCheck",currentNodeObj.nodeLinkId);
|
|
1941
|
+
result = this.exeNewFlowEvent("nextCheck",currentNodeObj.nodeLinkId);
|
|
1942
|
+
if(typeof result == "boolean" && result === false){
|
|
1943
|
+
return;
|
|
1944
|
+
}
|
|
1899
1945
|
}
|
|
1900
1946
|
|
|
1901
1947
|
this.isDisabled['nextStep'] = false;
|
|
@@ -2070,17 +2116,36 @@
|
|
|
2070
2116
|
*/
|
|
2071
2117
|
batchTabClick(val) {
|
|
2072
2118
|
this.batchUpdateFormInfo.batchDataId = val.name;
|
|
2073
|
-
this.initUpdateFlowForm(this.batchUpdateFormInfo.dataRows[val.index]);
|
|
2074
2119
|
let dataId=this.batchUpdateFormInfo.dataRows[val.index].dataId;
|
|
2075
2120
|
let currentNode=this.batchUpdateFormInfo.dataRows[val.index].currentNode;
|
|
2076
|
-
let ref='batchTableForm'+dataId+'Ref';
|
|
2077
2121
|
|
|
2078
|
-
this
|
|
2122
|
+
let currentNodeObj = this.flowNodeIdToInfo[currentNode] ||{};
|
|
2123
|
+
let result = null;
|
|
2124
|
+
let type = "update";
|
|
2125
|
+
if (currentNodeObj.openEvent === '1') {
|
|
2126
|
+
result = this.exeNewFlowEvent("editBefore",currentNodeObj.nodeLinkId ||'');//新事件规则
|
|
2127
|
+
if (result === false && typeof result == "boolean") {
|
|
2128
|
+
type = "view";
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
this.initUpdateFlowForm(this.batchUpdateFormInfo.dataRows[val.index], type).then(() => {
|
|
2132
|
+
let ref='batchTableForm'+dataId+'Ref';
|
|
2133
|
+
this.$nextTick(()=>{
|
|
2134
|
+
if(result === false && typeof result == "boolean"){
|
|
2135
|
+
this.formBtnArr.forEach(item => {
|
|
2136
|
+
if (item.btnType !== "close" && item.btnType !== "record") {
|
|
2137
|
+
this.$set(item, 'disabled', true);
|
|
2138
|
+
}
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2079
2141
|
// this.$refs[ref][0].loadData().then(() => {
|
|
2080
2142
|
this.exeFlowEvent("handle","afterClick",currentNode,ref);
|
|
2143
|
+
if(currentNodeObj.openEvent === '1'){ //开启事件
|
|
2144
|
+
this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
|
|
2145
|
+
}
|
|
2081
2146
|
// })
|
|
2147
|
+
})
|
|
2082
2148
|
})
|
|
2083
|
-
|
|
2084
2149
|
},
|
|
2085
2150
|
|
|
2086
2151
|
/**
|
|
@@ -2104,13 +2169,33 @@
|
|
|
2104
2169
|
this.batchUpdateFormInfo.activeName = nextTab.dataId;
|
|
2105
2170
|
this.batchUpdateFormInfo.batchDataId =nextTab.dataId;
|
|
2106
2171
|
this.batchUpdateFormInfo.formShow = false;
|
|
2172
|
+
|
|
2173
|
+
let currentNodeObj = this.flowNodeIdToInfo[nextTab.currentNode] ||{};
|
|
2174
|
+
let result = null;
|
|
2175
|
+
let type = "update";
|
|
2176
|
+
if (currentNodeObj.openEvent === '1') {
|
|
2177
|
+
result = this.exeNewFlowEvent("editBefore",currentNodeObj.nodeLinkId ||'');//新事件规则
|
|
2178
|
+
if (result === false && typeof result == "boolean") {
|
|
2179
|
+
type = "view";
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2107
2182
|
this.$nextTick(() => {
|
|
2108
2183
|
this.batchUpdateFormInfo.formShow = true;
|
|
2109
|
-
this.initUpdateFlowForm(nextTab).then(()=>{
|
|
2184
|
+
this.initUpdateFlowForm(nextTab, type).then(()=>{
|
|
2110
2185
|
this.$nextTick(()=>{
|
|
2111
2186
|
let ref='batchTableForm'+nextTab.dataId+'Ref';
|
|
2187
|
+
if(result === false && typeof result == "boolean"){
|
|
2188
|
+
this.formBtnArr.forEach(item => {
|
|
2189
|
+
if (item.btnType !== "close" && item.btnType !== "record") {
|
|
2190
|
+
item.disabled = true;
|
|
2191
|
+
}
|
|
2192
|
+
});
|
|
2193
|
+
}
|
|
2112
2194
|
// this.$refs[ref][0].loadData().then(() => {
|
|
2113
2195
|
this.exeFlowEvent("handle","afterClick",nextTab.currentNode,ref);
|
|
2196
|
+
if(currentNodeObj.openEvent === '1'){ //开启事件
|
|
2197
|
+
this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
|
|
2198
|
+
}
|
|
2114
2199
|
// })
|
|
2115
2200
|
})
|
|
2116
2201
|
});
|
|
@@ -3407,6 +3492,14 @@
|
|
|
3407
3492
|
if (obj.dealerType === "variable" && obj.variable) {
|
|
3408
3493
|
this.isRefreshGetNextUsers.push(obj.variable);
|
|
3409
3494
|
}
|
|
3495
|
+
if (obj.dealerType === "interface" && obj.dealerUrlParam) {
|
|
3496
|
+
let dealerUrlParam = JSON.parse(obj.dealerUrlParam || "[]");
|
|
3497
|
+
dealerUrlParam.forEach(param => {
|
|
3498
|
+
if (param.paramType === "variable") {
|
|
3499
|
+
this.isRefreshGetNextUsers.push(param.paramVal);
|
|
3500
|
+
}
|
|
3501
|
+
})
|
|
3502
|
+
}
|
|
3410
3503
|
}
|
|
3411
3504
|
});
|
|
3412
3505
|
if (!this.flowId.includes(",")) {
|
|
@@ -265,13 +265,26 @@
|
|
|
265
265
|
],
|
|
266
266
|
|
|
267
267
|
appendSignNodeArr: [],
|
|
268
|
-
flowNodeAppendSignDatas: []
|
|
268
|
+
flowNodeAppendSignDatas: [],
|
|
269
|
+
linkProcId: '',
|
|
270
|
+
isPrevious: false
|
|
269
271
|
};
|
|
270
272
|
},
|
|
271
273
|
created() {
|
|
274
|
+
this.initData();
|
|
272
275
|
this.init();
|
|
273
276
|
},
|
|
274
277
|
methods: {
|
|
278
|
+
initData() {
|
|
279
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getById,{"id":this.instId}).then(res => {
|
|
280
|
+
let flowInst = res.data;
|
|
281
|
+
this.linkProcId = flowInst["linkProcId"] || '';
|
|
282
|
+
if(flowInst["previousInstId"]) {
|
|
283
|
+
this.isPrevious = true;
|
|
284
|
+
}
|
|
285
|
+
})
|
|
286
|
+
},
|
|
287
|
+
|
|
275
288
|
init() {
|
|
276
289
|
this.flowInstNodeArr = [];
|
|
277
290
|
this.loading = true;
|
|
@@ -459,6 +472,9 @@
|
|
|
459
472
|
}
|
|
460
473
|
if(item.activityType == "startEvent"){
|
|
461
474
|
item.actorUserName = "";
|
|
475
|
+
if(this.isPrevious && this.linkProcId !== '' && item.rootProcessInstanceId === this.linkProcId) {
|
|
476
|
+
item.activityName = "恢复";
|
|
477
|
+
}
|
|
462
478
|
}else if(variables["resolve_" + item.taskId]){ // 代理
|
|
463
479
|
item.actorUserName += "(由用户‘"+ userIdsMap[variables["resolve_" + item.taskId]] + "’代理完成)";
|
|
464
480
|
}else if(variables["getBack_" + item.taskId]){ // 取回
|
|
@@ -560,6 +576,9 @@
|
|
|
560
576
|
},
|
|
561
577
|
|
|
562
578
|
sortInst(a,b){
|
|
579
|
+
if(this.isPrevious) {
|
|
580
|
+
return a.endTime - b.endTime;
|
|
581
|
+
}
|
|
563
582
|
if(a.endTime && b.endTime){
|
|
564
583
|
if(a.activityType == "startEvent"){
|
|
565
584
|
return -1;
|
|
@@ -617,6 +636,9 @@
|
|
|
617
636
|
*/
|
|
618
637
|
nodeInstIcon(nodeInst) {
|
|
619
638
|
if (nodeInst.activityType == "startEvent") {
|
|
639
|
+
if(this.isPrevious && this.linkProcId !== '' && nodeInst.rootProcessInstanceId === this.linkProcId) {
|
|
640
|
+
return "el-icon-refresh";
|
|
641
|
+
}
|
|
620
642
|
return "el-icon-caret-right";
|
|
621
643
|
} else if (nodeInst.activityType == "userTask") {
|
|
622
644
|
return "el-icon-user-solid";
|