sasp-flow-render 1.1.8 → 1.1.9

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.8",
3
+ "version": "1.1.9",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -93,6 +93,7 @@
93
93
  v-if="isShow('draft')"></el-table-column>
94
94
  <el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
95
95
  <el-table-column label="事项概述" prop="flowSummary" show-overflow-tooltip :formatter="formatterFlowSummary"></el-table-column>
96
+ <el-table-column label="流程名称" prop="flowId" width="200" align="center" :formatter="formatterFlowName" v-if="flowIds.includes(',')"></el-table-column>
96
97
  <el-table-column label="启动人" prop="startUserId" v-if="isNotShow('draft')" width="100" align="center">
97
98
  <template slot-scope="scope">
98
99
  {{userMap[scope.row.startUserId]}}
@@ -107,7 +108,7 @@
107
108
  <el-table-column label="中止时间" prop="discontinueTime" width="180" align="center"
108
109
  v-if="isShow('discontinue')"></el-table-column>
109
110
  <el-table-column label="当前任务" prop="currentNodeName" width="150" align="center"
110
- v-if="!isShow('draft')" show-overflow-tooltip :sortable="tabType == 'pending' ? 'custom' : false">
111
+ v-if="!isShow('draft')" show-overflow-tooltip :sortable="tabType === 'pending' ? 'custom' : false">
111
112
  <template slot-scope="scope">
112
113
  {{formatterCurrentNodeName(scope.row)}}
113
114
  <span v-if="scope.row.operateStatus == '0' && scope.row.agentType == '0'">(正常)</span>
@@ -397,6 +398,7 @@
397
398
  flowImpParamObj: {type: Object, default: () => ({})},
398
399
  downloadTemplate: {type: Function, default: null},
399
400
  getFormDataByDataIds: {type: Function, default: null},
401
+ flowDefineByFlowId: {type: Object, default: () => ({})},
400
402
  },
401
403
  data() {
402
404
 
@@ -921,6 +923,11 @@
921
923
  })
922
924
  return arr.join(",");
923
925
  },
926
+
927
+ formatterFlowName(row, column, cellValue) {
928
+ let flowDefineObj = this.flowDefineByFlowId[cellValue] || {};
929
+ return flowDefineObj.flowName || "";
930
+ },
924
931
  //点击列排序是的函数
925
932
  flowSortChange({column, prop, order}){
926
933
  if(column.order){
@@ -30,6 +30,7 @@
30
30
  :open-batch-update-flow-form="openBatchUpdateFlowForm"
31
31
  :openNewBatchUpdateFlowForm="openNewBatchUpdateFlowForm"
32
32
  @setDataValue="setDataValue"
33
+ :flowDefineByFlowId="flowDefineByFlowId"
33
34
  >
34
35
  </flow-inst-list>
35
36
  </div>
@@ -324,7 +325,7 @@
324
325
  </el-dialog>
325
326
 
326
327
  <!--流程下一步处理人选择弹窗-->
327
- <el-dialog :close-on-click-modal=false :title="'下一步' + (nextNodeName ? (isProceedNext?' -> ' + nextNodeName:'->等待他人处理') : '')"
328
+ <el-dialog :close-on-click-modal=false style="font-family: '微软雅黑'" :title="'下一步' + (nextNodeName ? (isProceedNext?' -> ' + nextNodeName:'->等待他人处理') : '')"
328
329
  :top="nextNode.nextType != 'inclusiveGateway' ? '20vh': '10vh'" append-to-body
329
330
  width="500px" :visible.sync="nextSteptUserDialog" @closed="closeNextSteptUserDialog">
330
331
  <el-form label-width="100px" size="small" v-if="nextNode.nodeType != 'EndEvent'">
@@ -1129,6 +1130,8 @@
1129
1130
  this.startNodeKeyObj = this.startNodeKeyObjByFlowId[row.flowId];
1130
1131
  this.flowVersionNodeObj = this.flowVersionNodeObjByFlowId[row.flowId];
1131
1132
  this.initFlowObj();
1133
+ // 加载工作流脚本与工作流事件规则
1134
+ this.initFlowScript();
1132
1135
  // Object.assign(this.formInfo, this.formInfoByFlowId[row.flowId]);
1133
1136
  }
1134
1137
 
@@ -2250,9 +2253,7 @@
2250
2253
  Object.assign(params,this.flowParams || {},obj);
2251
2254
  this.saspFlowAxios.post(this.api.plFlowInst.executeNextStep,params).then(res => {
2252
2255
  if (res && res.data && res.data.operateSuccess) {
2253
- if (!this.flowId.includes(",")) {
2254
- this.initTabNum();
2255
- }
2256
+ this.initTabNum();
2256
2257
  this.$message({type: "success", message: "提交成功!"});
2257
2258
  if (this.flowBatchPendingDialog) {
2258
2259
  this.batchTabRemove(this.currentInst.dataId);
@@ -2328,9 +2329,7 @@
2328
2329
  if (res && res.data && res.data.operateSuccess) {
2329
2330
  this.completeSignDialog = false;
2330
2331
  this.flowInstDataDialog = false;
2331
- if (!this.flowId.includes(",")) {
2332
- this.initTabNum();
2333
- }
2332
+ this.initTabNum();
2334
2333
  this.$message({type: "success", message: "加签成功!"});
2335
2334
  this.tabCrudSearch();
2336
2335
  } else {
@@ -2358,9 +2357,7 @@
2358
2357
  if (res && res.data && res.data.operateSuccess) {
2359
2358
  this.turnSignDialog = false;
2360
2359
  this.flowInstDataDialog = false;
2361
- if (!this.flowId.includes(",")) {
2362
- this.initTabNum();
2363
- }
2360
+ this.initTabNum();
2364
2361
  this.$message({type: "success", message: "转签成功!"});
2365
2362
  this.tabCrudSearch();
2366
2363
  } else {
@@ -2394,9 +2391,7 @@
2394
2391
  }).then(res => {
2395
2392
  if (res && res.data && res.data.operateSuccess) {
2396
2393
  this.$message({type: "success", message: "退回成功!"});
2397
- if (!this.flowId.includes(",")) {
2398
- this.initTabNum();
2399
- }
2394
+ this.initTabNum();
2400
2395
  if (this.flowBatchPendingDialog) {
2401
2396
  this.batchTabRemove(this.currentInst.dataId);
2402
2397
  } else {
@@ -2435,9 +2430,7 @@
2435
2430
  }).then(res => {
2436
2431
  if (res && res.data && res.data.operateSuccess) {
2437
2432
  this.$message({type: "success", message: "取回成功!"});
2438
- if (!this.flowId.includes(",")) {
2439
- this.initTabNum();
2440
- }
2433
+ this.initTabNum();
2441
2434
  if (this.flowBatchPendingDialog) {
2442
2435
  this.batchTabRemove(this.currentInst.dataId);
2443
2436
  } else {
@@ -2711,9 +2704,7 @@
2711
2704
  } else {
2712
2705
  this.tabCrudSearch();
2713
2706
  }
2714
- if (!this.flowId.includes(",")) {
2715
- this.initTabNum();
2716
- }
2707
+ this.initTabNum();
2717
2708
  } else {
2718
2709
  this.$message({type: "error", message: res.data.operateMessage});
2719
2710
  }
@@ -2732,6 +2723,9 @@
2732
2723
 
2733
2724
  initTabNum() {
2734
2725
  this.initMessageFunc && this.initMessageFunc();
2726
+ if (this.flowId.includes(",")) {
2727
+ return;
2728
+ }
2735
2729
  this.saspFlowAxios.all([
2736
2730
  this.saspFlowAxios.post(this.api.plFlowInst.getTabsNum,
2737
2731
  {flowId: this.flowData.flowId, type: "1"}),
@@ -2860,7 +2854,7 @@
2860
2854
  this.$forceUpdate();
2861
2855
  }
2862
2856
  // 加载工作流脚本与工作流事件规则
2863
- this.initFlowScript(this.flowData.flowId).then(() => {
2857
+ this.initFlowScript().then(() => {
2864
2858
  resolve(true);
2865
2859
  })
2866
2860
  });
@@ -2933,12 +2927,12 @@
2933
2927
  let flowId = allFlowNode[0].flowId;
2934
2928
  this.$set(this.startNodeKeyObjByFlowId, flowId, this.startNodeKeyObj);
2935
2929
  this.$set(this.flowVersionNodeObjByFlowId, flowId, this.flowVersionNodeObj);
2936
- // 加载工作流脚本与工作流事件规则
2937
2930
  this.flowDefine = this.flowDefineByFlowId[flowId];
2938
- this.initFlowScript(flowId).then(() => {
2939
- resolve(true);
2940
- });
2931
+ // this.initFlowScript().then(() => {
2932
+ // resolve(true);
2933
+ // });
2941
2934
  }
2935
+ resolve(true);
2942
2936
  });
2943
2937
  });
2944
2938
  },
@@ -2946,11 +2940,11 @@
2946
2940
  /**
2947
2941
  * 加载工作流脚本与工作流事件规则
2948
2942
  */
2949
- initFlowScript(flowId){
2943
+ initFlowScript(){
2950
2944
  return new Promise(resolve => {
2951
2945
  this.saspFlowAxios.all([
2952
- this.saspFlowAxios.post(this.api.plFlowScript.find,{"flowId": flowId}),
2953
- this.saspFlowAxios.post(this.api.plFlowEventDetail.findByFlowAndLeadFunc,{"flowId": flowId,"version":this.flowDefine.flowVersion || "1.0"})
2946
+ this.saspFlowAxios.post(this.api.plFlowScript.find,{"flowId": this.flowDefine.id}),
2947
+ this.saspFlowAxios.post(this.api.plFlowEventDetail.findByFlowAndLeadFunc,{"flowId": this.flowDefine.id,"version":this.flowDefine.flowVersion || "1.0"})
2954
2948
  ]).then(this.saspFlowAxios.spread((resScript, resEvent) => {
2955
2949
  // 流程脚本
2956
2950
  if(resScript){
@@ -3355,9 +3349,7 @@
3355
3349
  tabClick(tab) {
3356
3350
  if (this.showInfo === "flow" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].crud) {
3357
3351
  this.$refs[tab.name + "Ref"].crud.search();
3358
- if (!this.flowId.includes(",")) {
3359
- this.initTabNum();
3360
- }
3352
+ this.initTabNum();
3361
3353
  } else if (this.showInfo === "form" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].getDataRows) {
3362
3354
  this.$refs[tab.name + "Ref"].getDataRows();
3363
3355
  this.initTabNum();