sasp-flow-render 1.1.25-decoupling → 1.1.27-decoupling
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
|
@@ -35,6 +35,7 @@ class WorkflowEngine {
|
|
|
35
35
|
this.flowDefine = {};
|
|
36
36
|
this.flowRecordObj = {};
|
|
37
37
|
this.flowChartObj = {};
|
|
38
|
+
this.draftNodeId = "";
|
|
38
39
|
|
|
39
40
|
// 初始化插入部分方法
|
|
40
41
|
let methods = flowAttrs["methods"] || {};
|
|
@@ -372,6 +373,7 @@ class WorkflowEngine {
|
|
|
372
373
|
init(){
|
|
373
374
|
return new Promise(resolve => {
|
|
374
375
|
if(!this.skipAutoInit && !this.loadSuccess){
|
|
376
|
+
this.initUserData();
|
|
375
377
|
this.$this.saspFlowAxios.all([
|
|
376
378
|
this.initFlowInfo(),
|
|
377
379
|
this.initFlowFormInfo()
|
|
@@ -382,7 +384,6 @@ class WorkflowEngine {
|
|
|
382
384
|
}else{
|
|
383
385
|
resolve();
|
|
384
386
|
}
|
|
385
|
-
this.initUserData();
|
|
386
387
|
this.initDialogProps();
|
|
387
388
|
})
|
|
388
389
|
}
|
|
@@ -481,6 +482,9 @@ class WorkflowEngine {
|
|
|
481
482
|
}
|
|
482
483
|
if (item.nodeType === "UserTask" && (item.nodeLinkId || "").indexOf("Activity_draft") > -1) {
|
|
483
484
|
this.draftNodeId = item.id; // 草稿节点id
|
|
485
|
+
this.$flowDialog.fillFlowDialogParams({
|
|
486
|
+
draftNodeId: this.draftNodeId
|
|
487
|
+
});
|
|
484
488
|
}
|
|
485
489
|
// 行按钮
|
|
486
490
|
let listButton = JSON.parse(item.listButton || "[]") || [];
|
|
@@ -532,6 +536,7 @@ class WorkflowEngine {
|
|
|
532
536
|
flowVersionNodeObjByFlowId : this.flowVersionNodeObjByFlowId,
|
|
533
537
|
flowEventScriptByFlowId : this.flowEventScriptByFlowId
|
|
534
538
|
};
|
|
539
|
+
this.$flowDialog.fillFlowDialogParams(result);
|
|
535
540
|
resolve(result);
|
|
536
541
|
});
|
|
537
542
|
});
|
|
@@ -594,6 +599,9 @@ class WorkflowEngine {
|
|
|
594
599
|
}
|
|
595
600
|
if(item.nodeType == "UserTask" && (item.nodeLinkId || "").indexOf("Activity_draft") > -1){
|
|
596
601
|
this.draftNodeId = item.id; // 草稿节点id
|
|
602
|
+
this.$flowDialog.fillFlowDialogParams({
|
|
603
|
+
draftNodeId: this.draftNodeId
|
|
604
|
+
});
|
|
597
605
|
}
|
|
598
606
|
// }
|
|
599
607
|
this.allNodeInfo[item.id] = item;
|
|
@@ -659,6 +667,7 @@ class WorkflowEngine {
|
|
|
659
667
|
diyButtonsObj : this.diyButtonsObj,
|
|
660
668
|
};
|
|
661
669
|
this.initFlowObj();
|
|
670
|
+
this.$flowDialog.fillFlowDialogParams(result);
|
|
662
671
|
resolve(result);
|
|
663
672
|
})
|
|
664
673
|
});
|
|
@@ -1501,6 +1510,24 @@ class WorkflowEngine {
|
|
|
1501
1510
|
let version = this.flowDefine.releaseVersion;
|
|
1502
1511
|
currentNode = this.flowVersionNodeObj[version][this.startNodeKeyObj[version]];
|
|
1503
1512
|
}
|
|
1513
|
+
let result = {
|
|
1514
|
+
draftNodeId: this.draftNodeId,
|
|
1515
|
+
// operateType : this.operateType,
|
|
1516
|
+
// tabActive : this.tabActive,
|
|
1517
|
+
flowDefine : this.flowDefine,
|
|
1518
|
+
startNodeKey : this.startNodeKey,
|
|
1519
|
+
startNodeKeyObj : this.startNodeKeyObj,
|
|
1520
|
+
flowVersionNodeObj : this.flowVersionNodeObj,
|
|
1521
|
+
allNodeInfo : this.allNodeInfo,
|
|
1522
|
+
flowNodeNameObj : this.flowNodeNameObj,
|
|
1523
|
+
flowNodeIdToInfo : this.flowNodeIdToInfo,
|
|
1524
|
+
nodeListButtonObj : this.nodeListButtonObj,
|
|
1525
|
+
nodeFormButtonObj : this.nodeFormButtonObj,
|
|
1526
|
+
nodeFormBtnObj : this.nodeFormBtnObj,
|
|
1527
|
+
// optColumnWidth : this.optColumnWidth,
|
|
1528
|
+
diyButtonsObj : this.diyButtonsObj,
|
|
1529
|
+
};
|
|
1530
|
+
this.$flowDialog.fillFlowDialogParams(result);
|
|
1504
1531
|
return new Promise(resolve => {
|
|
1505
1532
|
if(this.initFormInfo){
|
|
1506
1533
|
let promise = this.initFormInfo(type,dataId,JSON.parse(currentNode.fieldOperate || "{}"),rowData);
|
|
@@ -2136,7 +2163,7 @@ class WorkflowEngine {
|
|
|
2136
2163
|
})
|
|
2137
2164
|
this.userArr = arr;
|
|
2138
2165
|
this.$this.INTER_CACHE.setUserArr(arr);
|
|
2139
|
-
this
|
|
2166
|
+
this.userMap = this.$this.INTER_CACHE.getUserMap();
|
|
2140
2167
|
})
|
|
2141
2168
|
})
|
|
2142
2169
|
}
|
|
@@ -2237,6 +2264,14 @@ class WorkflowEngine {
|
|
|
2237
2264
|
this.$flowDialog.openFlowDialog(args);
|
|
2238
2265
|
}
|
|
2239
2266
|
|
|
2267
|
+
openRecordEvent(dataId){ // 采用初始化构造类时传递flowId
|
|
2268
|
+
if(!this.flowId){
|
|
2269
|
+
this.$this.$message.error("请先设置flowId");
|
|
2270
|
+
return;
|
|
2271
|
+
}
|
|
2272
|
+
this.openRecord(this.flowId,dataId);
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2240
2275
|
openRecord(flowId,dataId){
|
|
2241
2276
|
this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.getFlowInstByFlowDataId,{flowId:(flowId || this.flowId),dataId:dataId}).then(res => {
|
|
2242
2277
|
if (!res.data) {
|
|
@@ -2248,6 +2283,14 @@ class WorkflowEngine {
|
|
|
2248
2283
|
});
|
|
2249
2284
|
}
|
|
2250
2285
|
|
|
2286
|
+
openChartEvent(dataId){ // 采用初始化构造类时传递flowId
|
|
2287
|
+
if(!this.flowId){
|
|
2288
|
+
this.$this.$message.error("请先设置flowId");
|
|
2289
|
+
return;
|
|
2290
|
+
}
|
|
2291
|
+
this.openChart(this.flowId,dataId);
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2251
2294
|
openChart(flowId,dataId){
|
|
2252
2295
|
if(dataId){
|
|
2253
2296
|
this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.getFlowInstByFlowDataId,{flowId:flowId || this.flowId,dataId:dataId}).then(res => {
|