sasp-flow-render 1.1.29-decoupling → 1.1.31-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasp-flow-render",
3
- "version": "1.1.29-decoupling",
3
+ "version": "1.1.31-decoupling",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -36,7 +36,7 @@
36
36
  </div>
37
37
  <div style="height: 100%" v-else>
38
38
  <el-tabs v-model="tabActive" v-if="initSuccess" type="border-card" @tab-click="tabClick"
39
- style="width: 100%;height: 100%;">
39
+ style="width: 100%;height: 100%;box-sizing: border-box">
40
40
  <el-tab-pane name="draft" v-if="tabShow('draft')" style="height: 100%;" :lazy="true">
41
41
  <span slot="label">
42
42
  <i v-if="tabTypeObj['showTabIcon']" :class="tabTypeObj['draft'].iconShow"></i>
@@ -1514,7 +1514,7 @@
1514
1514
 
1515
1515
  <style lang="scss" scoped>
1516
1516
  /deep/ .el-tabs__content {
1517
- height: calc(100% - 60px);
1517
+ height: calc(100% - 70px);
1518
1518
  }
1519
1519
 
1520
1520
  .el-tab-pane {
@@ -58,6 +58,8 @@ class WorkflowEngine {
58
58
  this.forceUpdateComponent = methods["forceUpdateComponent"];
59
59
  this.nextStepAfterSave = methods["nextStepAfterSave"]; // 流程下一步保存表单数据后的回调
60
60
  this.afterNextStepSuccess = methods["afterNextStepSuccess"]; // 流程下一步成功后,即关闭对话框后的回调
61
+ this.backSubmitEvent = methods["backSubmitEvent"]; // 退回后执行方法
62
+ this.getBackSubmitEvent = methods["getBackSubmitEvent"]; // 取回后执行方法
61
63
  this.setParams = methods["setParams"];
62
64
 
63
65
  if(!this.initFormInfo){
@@ -240,43 +242,48 @@ class WorkflowEngine {
240
242
  disabled: false,
241
243
  show: false,
242
244
  method: () => {
243
- this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.stopFlow, {
244
- instId: this.currentInst.flowInstId, type: "0",
245
- procInstId: this.currentInst.linkProcId,
246
- taskId: this.currentInst.taskId
247
- }).then(res => {
248
- if (res && res.data) {
249
- if (res.data.operateSuccess) {
250
- this.$this.$message({type: "success", message: "中止成功!"});
251
- if (this.getFlowBatchDialog && this.getFlowBatchDialog()) {
252
- this.batchTabRemove(this.currentInst.dataId);
245
+ this.$this.$confirm('确定要中止此流程吗?', '警告', {
246
+ confirmButtonText: '确定',
247
+ cancelButtonText: '取消',
248
+ }).then(() => {
249
+ this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.stopFlow, {
250
+ instId: this.currentInst.flowInstId, type: "0",
251
+ procInstId: this.currentInst.linkProcId,
252
+ taskId: this.currentInst.taskId
253
+ }).then(res => {
254
+ if (res && res.data) {
255
+ if (res.data.operateSuccess) {
256
+ this.$this.$message({type: "success", message: "中止成功!"});
257
+ if (this.getFlowBatchDialog && this.getFlowBatchDialog()) {
258
+ this.batchTabRemove(this.currentInst.dataId);
259
+ } else {
260
+ this.tabCrudSearch && this.tabCrudSearch();
261
+ this.flowInstDataDialog = false;
262
+ this.$flowDialog.operateDialog('flowInstDataDialog',false);
263
+ }
264
+ this.initTabNum && this.initTabNum();
265
+
266
+ let remindParam = {
267
+ instId:this.currentInst.flowInstId,
268
+ flowId:this.flowDefine.id,
269
+ flowName:this.flowDefine.flowName,
270
+ // formId:this.formInfo.formId,
271
+ // listViewId:this.formInfo.listViewId,
272
+ dataId:this.formInfo.dataId,
273
+ instType:"stopped"
274
+ };
275
+ this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.saveRemind,remindParam);
276
+
277
+ //执行事件规则
278
+ let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode] ||{};
279
+ if(currentNodeObj.openEvent == '1'){
280
+ this.exeNewFlowEvent("suspend",currentNodeObj.nodeLinkId||'');
281
+ }
253
282
  } else {
254
- this.tabCrudSearch && this.tabCrudSearch();
255
- this.flowInstDataDialog = false;
256
- this.$flowDialog.operateDialog('flowInstDataDialog',false);
257
- }
258
- this.initTabNum && this.initTabNum();
259
-
260
- let remindParam = {
261
- instId:this.currentInst.flowInstId,
262
- flowId:this.flowDefine.id,
263
- flowName:this.flowDefine.flowName,
264
- // formId:this.formInfo.formId,
265
- // listViewId:this.formInfo.listViewId,
266
- dataId:this.formInfo.dataId,
267
- instType:"stopped"
268
- };
269
- this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.saveRemind,remindParam);
270
-
271
- //执行事件规则
272
- let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode] ||{};
273
- if(currentNodeObj.openEvent == '1'){
274
- this.exeNewFlowEvent("suspend",currentNodeObj.nodeLinkId||'');
283
+ this.$this.$message({type: "error", message: res.data.operateMessage});
275
284
  }
276
- } else {
277
- this.$this.$message({type: "error", message: res.data.operateMessage});
278
285
  }
279
- }
286
+ });
280
287
  });
281
288
  }
282
289
  },
@@ -927,6 +934,10 @@ class WorkflowEngine {
927
934
  chooseNextUserName: this.chooseNextUserName
928
935
  });
929
936
  } else if (this.nextNode.nodeType == "EndEvent") {
937
+ if(window.skipFlowEnd && window.skipFlowEnd.includes(this.flowId)){
938
+ this.$flowDialog.saveNextStept();
939
+ return;
940
+ }
930
941
  this.nextSteptUserDialog = true;
931
942
  this.$flowDialog.operateDialog('nextSteptUserDialog',true);
932
943
  return;
@@ -1001,7 +1012,7 @@ class WorkflowEngine {
1001
1012
  return new Promise(resolve => {
1002
1013
  if(this.nextStepAfterSave){
1003
1014
  let result = this.nextStepAfterSave(this.$this,this);
1004
- if(result && result.then){
1015
+ if(result && (result instanceof Promise)){
1005
1016
  result.then(res => {
1006
1017
  resolve(res);
1007
1018
  })
@@ -1019,7 +1030,7 @@ class WorkflowEngine {
1019
1030
  return new Promise(resolve => {
1020
1031
  if(this.saveFormInfo){
1021
1032
  let result = this.saveFormInfo(type);
1022
- if(result && result.then){
1033
+ if(result && (result instanceof Promise)){
1023
1034
  result.then(res => {
1024
1035
  if(!res){
1025
1036
  this.isDisabled['nextStep'] = true;
@@ -1757,6 +1768,9 @@ class WorkflowEngine {
1757
1768
  }).then(res => {
1758
1769
  if (res && res.data && res.data.operateSuccess) {
1759
1770
  this.$this.$message({type: "success", message: "退回成功!"});
1771
+ let currentNodeObj = this.flowNodeIdToInfo[currentInst.currentNode] ||{};
1772
+ this.exeNewFlowEvent("backSubmit",currentNodeObj.nodeLinkId);
1773
+ this.backSubmitEvent && this.backSubmitEvent(this.$this,this,currentInst);
1760
1774
  this.initTabNum && this.initTabNum();
1761
1775
  if (this.getFlowBatchDialog && this.getFlowBatchDialog()) {
1762
1776
  this.batchTabRemove(this.currentInst.dataId);
@@ -1797,6 +1811,9 @@ class WorkflowEngine {
1797
1811
  }).then(res => {
1798
1812
  if (res && res.data && res.data.operateSuccess) {
1799
1813
  this.$this.$message({type: "success", message: "取回成功!"});
1814
+ let currentNodeObj = this.flowNodeIdToInfo[currentInst.currentNode] ||{};
1815
+ this.exeNewFlowEvent("getBackSubmit",currentNodeObj.nodeLinkId);
1816
+ this.getBackSubmitEvent && this.getBackSubmitEvent(this.$this,this,currentInst);
1800
1817
  this.initTabNum && this.initTabNum();
1801
1818
  if (this.getFlowBatchDialog && this.getFlowBatchDialog()) {
1802
1819
  this.batchTabRemove(this.currentInst.dataId);
@@ -1966,7 +1983,7 @@ class WorkflowEngine {
1966
1983
  }else {
1967
1984
  arrNodeFormBtns = this.nodeFormBtnObj[this.flowVersionNodeObj[this.flowDefine.releaseVersion][this.startNodeKeyObj[this.flowDefine.releaseVersion]].id];
1968
1985
  }
1969
- let hideBtnTypes = new Set(["getBack","stopped"]);
1986
+ let hideBtnTypes = new Set(["getBack"]);
1970
1987
  if (this.tabActive == "draft") {
1971
1988
  hideBtnTypes.add("flowRecord");
1972
1989
  hideBtnTypes.add("record");