sasp-flow-render 1.1.28-decoupling → 1.1.30-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/index.js CHANGED
@@ -125,7 +125,8 @@ let initAxios = (Vue, props) => {
125
125
  let loadFlowDialog = (Vue,opts) => {
126
126
  // 创建 Dialog 实例并挂载到 body
127
127
  const DialogConstructor = Vue.extend(flowDialog);
128
- const instance = new DialogConstructor().$mount();
128
+ let router = opts.router;
129
+ const instance = new DialogConstructor({router}).$mount();
129
130
  document.body.appendChild(instance.$el);
130
131
 
131
132
  // 将实例挂载到 Vue 原型,方便全局调用
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasp-flow-render",
3
- "version": "1.1.28-decoupling",
3
+ "version": "1.1.30-decoupling",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -56,7 +56,8 @@ class WorkflowEngine {
56
56
  this.getFormInfo = methods["getFormInfo"];
57
57
  this.flowNextOperation = methods["flowNextOperation"];
58
58
  this.forceUpdateComponent = methods["forceUpdateComponent"];
59
- this.nextStepAfterSave = methods["nextStepAfterSave"];
59
+ this.nextStepAfterSave = methods["nextStepAfterSave"]; // 流程下一步保存表单数据后的回调
60
+ this.afterNextStepSuccess = methods["afterNextStepSuccess"]; // 流程下一步成功后,即关闭对话框后的回调
60
61
  this.setParams = methods["setParams"];
61
62
 
62
63
  if(!this.initFormInfo){
@@ -165,7 +166,7 @@ class WorkflowEngine {
165
166
  type: "success",
166
167
  icon: "el-icon-check",
167
168
  disabled: false,
168
- show: true,
169
+ show: false,
169
170
  method: () => {
170
171
  this.saveDraft();
171
172
  }
@@ -176,7 +177,7 @@ class WorkflowEngine {
176
177
  type: "primary",
177
178
  icon: "el-icon-d-arrow-right",
178
179
  disabled: false,
179
- show: true,
180
+ show: false,
180
181
  method: () => {
181
182
  this.nextStep();
182
183
  // this.isDisabled1 = true;
@@ -239,43 +240,48 @@ class WorkflowEngine {
239
240
  disabled: false,
240
241
  show: false,
241
242
  method: () => {
242
- this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.stopFlow, {
243
- instId: this.currentInst.flowInstId, type: "0",
244
- procInstId: this.currentInst.linkProcId,
245
- taskId: this.currentInst.taskId
246
- }).then(res => {
247
- if (res && res.data) {
248
- if (res.data.operateSuccess) {
249
- this.$this.$message({type: "success", message: "中止成功!"});
250
- if (this.getFlowBatchDialog && this.getFlowBatchDialog()) {
251
- this.batchTabRemove(this.currentInst.dataId);
243
+ this.$this.$confirm('确定要中止此流程吗?', '警告', {
244
+ confirmButtonText: '确定',
245
+ cancelButtonText: '取消',
246
+ }).then(() => {
247
+ this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.stopFlow, {
248
+ instId: this.currentInst.flowInstId, type: "0",
249
+ procInstId: this.currentInst.linkProcId,
250
+ taskId: this.currentInst.taskId
251
+ }).then(res => {
252
+ if (res && res.data) {
253
+ if (res.data.operateSuccess) {
254
+ this.$this.$message({type: "success", message: "中止成功!"});
255
+ if (this.getFlowBatchDialog && this.getFlowBatchDialog()) {
256
+ this.batchTabRemove(this.currentInst.dataId);
257
+ } else {
258
+ this.tabCrudSearch && this.tabCrudSearch();
259
+ this.flowInstDataDialog = false;
260
+ this.$flowDialog.operateDialog('flowInstDataDialog',false);
261
+ }
262
+ this.initTabNum && this.initTabNum();
263
+
264
+ let remindParam = {
265
+ instId:this.currentInst.flowInstId,
266
+ flowId:this.flowDefine.id,
267
+ flowName:this.flowDefine.flowName,
268
+ // formId:this.formInfo.formId,
269
+ // listViewId:this.formInfo.listViewId,
270
+ dataId:this.formInfo.dataId,
271
+ instType:"stopped"
272
+ };
273
+ this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.saveRemind,remindParam);
274
+
275
+ //执行事件规则
276
+ let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode] ||{};
277
+ if(currentNodeObj.openEvent == '1'){
278
+ this.exeNewFlowEvent("suspend",currentNodeObj.nodeLinkId||'');
279
+ }
252
280
  } else {
253
- this.tabCrudSearch && this.tabCrudSearch();
254
- this.flowInstDataDialog = false;
255
- this.$flowDialog.operateDialog('flowInstDataDialog',false);
281
+ this.$this.$message({type: "error", message: res.data.operateMessage});
256
282
  }
257
- this.initTabNum && this.initTabNum();
258
-
259
- let remindParam = {
260
- instId:this.currentInst.flowInstId,
261
- flowId:this.flowDefine.id,
262
- flowName:this.flowDefine.flowName,
263
- // formId:this.formInfo.formId,
264
- // listViewId:this.formInfo.listViewId,
265
- dataId:this.formInfo.dataId,
266
- instType:"stopped"
267
- };
268
- this.$this.saspFlowAxios.post(this.$this.api.plFlowInst.saveRemind,remindParam);
269
-
270
- //执行事件规则
271
- let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode] ||{};
272
- if(currentNodeObj.openEvent == '1'){
273
- this.exeNewFlowEvent("suspend",currentNodeObj.nodeLinkId||'');
274
- }
275
- } else {
276
- this.$this.$message({type: "error", message: res.data.operateMessage});
277
283
  }
278
- }
284
+ });
279
285
  });
280
286
  }
281
287
  },
@@ -348,7 +354,7 @@ class WorkflowEngine {
348
354
  type: "warning",
349
355
  icon: "saspiconfont pl-icon-liuchengtu",
350
356
  disabled: false,
351
- show: true,
357
+ show: false,
352
358
  isView: true,
353
359
  method: () => {
354
360
  this.openFlowRecord(this.currentInst);
@@ -359,7 +365,7 @@ class WorkflowEngine {
359
365
  type: "",
360
366
  icon: "el-icon-close",
361
367
  disabled: false,
362
- show: true,
368
+ show: false,
363
369
  isView: true,
364
370
  method: () => {
365
371
  this.flowInstDataDialog = false;
@@ -1889,14 +1895,14 @@ class WorkflowEngine {
1889
1895
  */
1890
1896
  openFlowRecord(row) {
1891
1897
  let arr = ["2", "3", "4"]; // 旧版本的已办结已撤销以及已中止数据通过旧版接口查询流转记录
1898
+ this.$flowDialog.fillFlowDialogParams({
1899
+ flowRecordObj: this.flowRecordObj
1900
+ });
1892
1901
  if (arr.indexOf(row.flowStatus) > -1 && row.isOldData === "1") {
1893
1902
  this.flowRecordObj = {instId: row.flowInstId || "", oldDialogVisible: true};
1894
1903
  } else {
1895
1904
  this.flowRecordObj = {instId: row.flowInstId || "", dialogVisible: true};
1896
1905
  }
1897
- this.$flowDialog.fillFlowDialogParams({
1898
- flowRecordObj: this.flowRecordObj
1899
- });
1900
1906
  }
1901
1907
 
1902
1908
  openFlowChart(row) {
@@ -1965,7 +1971,7 @@ class WorkflowEngine {
1965
1971
  }else {
1966
1972
  arrNodeFormBtns = this.nodeFormBtnObj[this.flowVersionNodeObj[this.flowDefine.releaseVersion][this.startNodeKeyObj[this.flowDefine.releaseVersion]].id];
1967
1973
  }
1968
- let hideBtnTypes = new Set(["getBack","stopped"]);
1974
+ let hideBtnTypes = new Set(["getBack"]);
1969
1975
  if (this.tabActive == "draft") {
1970
1976
  hideBtnTypes.add("flowRecord");
1971
1977
  hideBtnTypes.add("record");
@@ -668,19 +668,11 @@ export default {
668
668
  let type = this.flowBatchPendingDialog ? "batch" : "";
669
669
  let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
670
670
  let submitSuccessRusult;
671
- if (type == 'batch') {
672
- // 批量处理
673
- let ref = "batchTableForm"+this.batchUpdateFormInfo.activeName+"Ref";
674
- submitSuccessRusult=this.workFlowUtil.exeFlowEvent("nextStep","submitSuccess", this.currentInst.currentNode || this.draftNodeId,ref);
675
- if(currentNodeObj.openEvent == '1'){
676
- submitSuccessRusult = this.workFlowUtil.exeNewFlowEvent("nextSubmit",currentNodeObj.nodeLinkId||'',ref)
677
- }
678
- } else {
679
- submitSuccessRusult=this.workFlowUtil.exeFlowEvent("nextStep","submitSuccess", this.currentInst.currentNode || this.draftNodeId);
680
- if(currentNodeObj.openEvent == '1'){
681
- submitSuccessRusult =this.workFlowUtil.exeNewFlowEvent("nextSubmit",currentNodeObj.nodeLinkId||'')
682
- }
671
+ submitSuccessRusult=this.workFlowUtil.exeFlowEvent("nextStep","submitSuccess", this.currentInst.currentNode || this.draftNodeId);
672
+ if(currentNodeObj.openEvent == '1'){
673
+ submitSuccessRusult =this.workFlowUtil.exeNewFlowEvent("nextSubmit",currentNodeObj.nodeLinkId||'')
683
674
  }
675
+ this.workFlowUtil.afterNextStepSuccess && this.workFlowUtil.afterNextStepSuccess(this.workFlowUtil.$this,this.workFlowUtil);
684
676
  if(submitSuccessRusult){
685
677
  //办结提醒
686
678
  if(this.nextNode.nodeType == "EndEvent"){
@@ -138,10 +138,11 @@
138
138
  "label":"用户名称",
139
139
  },
140
140
  ], //用户信息
141
+ loginUser:{}
141
142
  }
142
143
  },
143
144
  created(){
144
-
145
+ this.loginUser = this.FLOW_CACHE_GLOBAL.getLoginUser() || {};
145
146
  },
146
147
  methods:{
147
148
  /**