sasp-flow-render 1.1.7 → 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.7",
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'">
@@ -797,7 +798,7 @@
797
798
  nodeFormButtonObj: {},
798
799
  optColumnWidth: 336,
799
800
  showModel: "list",//默认风格 list:列表card:卡片
800
- showInfo: "",//展示信息 flow:流程信息 form:表单信息
801
+ showInfo: "flow",//展示信息 flow:流程信息 form:表单信息
801
802
  operateType: {},
802
803
  resourceTabOpts: ['draft','pending','processed','rescinded','finished','discontinue','flowQuery'],
803
804
  tabTypeObj: {},//标签页对象
@@ -1128,6 +1129,9 @@
1128
1129
  this.flowDefine = this.flowDefineByFlowId[row.flowId];
1129
1130
  this.startNodeKeyObj = this.startNodeKeyObjByFlowId[row.flowId];
1130
1131
  this.flowVersionNodeObj = this.flowVersionNodeObjByFlowId[row.flowId];
1132
+ this.initFlowObj();
1133
+ // 加载工作流脚本与工作流事件规则
1134
+ this.initFlowScript();
1131
1135
  // Object.assign(this.formInfo, this.formInfoByFlowId[row.flowId]);
1132
1136
  }
1133
1137
 
@@ -1352,7 +1356,6 @@
1352
1356
 
1353
1357
  saveNewBatchDealFormData() {
1354
1358
  this.saveFormInfo().then(result => {
1355
- // console.log('保存方法1', result);
1356
1359
  if (result) {
1357
1360
  let flowNewBatchDealVm = this.$refs.flowNewBatchDealRef;
1358
1361
  // 数据保存成功,更改行数据
@@ -1381,7 +1384,6 @@
1381
1384
  });
1382
1385
  }
1383
1386
  this.$set(flowObj, "isEdited", true);
1384
- // console.log('flowObj', flowObj, flowNewBatchDealVm);
1385
1387
  this.flowInstDataDialog = false;
1386
1388
  // 刷新下一步处理人
1387
1389
  if (flowNewBatchDealVm) {
@@ -1392,7 +1394,6 @@
1392
1394
  },
1393
1395
 
1394
1396
  newBatchDealSubmit(selectionArr, submitType) {
1395
- // console.log('提交',selectionArr);
1396
1397
  if (selectionArr.length === 0) {
1397
1398
  return this.$message.warning('请先勾选要提交的数据!');
1398
1399
  }
@@ -1425,7 +1426,7 @@
1425
1426
  nextStepSelectionArr.push(selectionObj);
1426
1427
  }
1427
1428
  });
1428
- // console.log(this.flowDefine, this.allNodeInfo, '提交', selectionArr, nextStepSelectionArr);
1429
+
1429
1430
  if (params.length > 0) {
1430
1431
  this.saveBatchDealFormData(this.formInfo.formId, JSON.stringify(params)).then(resData => {
1431
1432
  if (resData.operateSuccess) {
@@ -1481,7 +1482,7 @@
1481
1482
  selectArr.push(item);
1482
1483
  }
1483
1484
  });
1484
- // console.log('全部提交', selectArr);
1485
+
1485
1486
  if (selectArr.length === 0) {
1486
1487
  return this.$message.warning("暂无提交内容!");
1487
1488
  }
@@ -1654,7 +1655,6 @@
1654
1655
  * @param row 流程行数据
1655
1656
  */
1656
1657
  openFlowRecord(row) {
1657
- console.log('流转记录',row);
1658
1658
  let arr = ["2", "3", "4"]; // 旧版本的已办结已撤销以及已中止数据通过旧版接口查询流转记录
1659
1659
  if (arr.indexOf(row.flowStatus) > -1 && row.isOldData === "1") {
1660
1660
  this.flowRecordObj = {instId: row.flowInstId || "", oldDialogVisible: true};
@@ -1886,14 +1886,14 @@
1886
1886
  let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1887
1887
  afterClickResult=this.exeFlowEvent("nextStep","afterClick", this.currentInst.currentNode || this.draftNodeId);
1888
1888
  //
1889
- if(currentNodeObj.openEvent == '1'){
1889
+ if(currentNodeObj.openEvent === '1'){
1890
1890
  afterClickResult = this.exeNewFlowEvent("nextClick",currentNodeObj.nodeLinkId);
1891
1891
  }
1892
1892
 
1893
1893
  // let afterValidateResult;
1894
1894
  // let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1895
1895
  this.exeFlowEvent("nextStep","afterValidate", this.currentInst.currentNode || this.draftNodeId);
1896
- if(currentNodeObj.openEvent == '1'){
1896
+ if(currentNodeObj.openEvent === '1'){
1897
1897
  this.exeNewFlowEvent("nextCheck",currentNodeObj.nodeLinkId);
1898
1898
  }
1899
1899
 
@@ -2313,7 +2313,7 @@
2313
2313
  */
2314
2314
  sureCompleteSign() {
2315
2315
  let checkedUserArr = this.$refs.completeSignRef.chooseUsers || [];
2316
- if (checkedUserArr.length == 0) {
2316
+ if (checkedUserArr.length === 0) {
2317
2317
  this.$message({type: "error", message: "请选择加签人!"});
2318
2318
  return;
2319
2319
  }
@@ -2344,7 +2344,7 @@
2344
2344
  */
2345
2345
  sureTurnSign() {
2346
2346
  let checkedUserArr = this.$refs.turnSignRef.chooseUsers || [];
2347
- if (checkedUserArr.length == 0) {
2347
+ if (checkedUserArr.length === 0) {
2348
2348
  this.$message({type: "error", message: "请选择转签人!"});
2349
2349
  return;
2350
2350
  }
@@ -2723,6 +2723,9 @@
2723
2723
 
2724
2724
  initTabNum() {
2725
2725
  this.initMessageFunc && this.initMessageFunc();
2726
+ if (this.flowId.includes(",")) {
2727
+ return;
2728
+ }
2726
2729
  this.saspFlowAxios.all([
2727
2730
  this.saspFlowAxios.post(this.api.plFlowInst.getTabsNum,
2728
2731
  {flowId: this.flowData.flowId, type: "1"}),
@@ -2851,7 +2854,7 @@
2851
2854
  this.$forceUpdate();
2852
2855
  }
2853
2856
  // 加载工作流脚本与工作流事件规则
2854
- this.initFlowScript(this.flowData.flowId).then(() => {
2857
+ this.initFlowScript().then(() => {
2855
2858
  resolve(true);
2856
2859
  })
2857
2860
  });
@@ -2924,12 +2927,12 @@
2924
2927
  let flowId = allFlowNode[0].flowId;
2925
2928
  this.$set(this.startNodeKeyObjByFlowId, flowId, this.startNodeKeyObj);
2926
2929
  this.$set(this.flowVersionNodeObjByFlowId, flowId, this.flowVersionNodeObj);
2927
- // 加载工作流脚本与工作流事件规则
2928
2930
  this.flowDefine = this.flowDefineByFlowId[flowId];
2929
- this.initFlowScript(flowId).then(() => {
2930
- resolve(true);
2931
- });
2931
+ // this.initFlowScript().then(() => {
2932
+ // resolve(true);
2933
+ // });
2932
2934
  }
2935
+ resolve(true);
2933
2936
  });
2934
2937
  });
2935
2938
  },
@@ -2937,11 +2940,11 @@
2937
2940
  /**
2938
2941
  * 加载工作流脚本与工作流事件规则
2939
2942
  */
2940
- initFlowScript(flowId){
2943
+ initFlowScript(){
2941
2944
  return new Promise(resolve => {
2942
2945
  this.saspFlowAxios.all([
2943
- this.saspFlowAxios.post(this.api.plFlowScript.find,{"flowId": flowId}),
2944
- 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"})
2945
2948
  ]).then(this.saspFlowAxios.spread((resScript, resEvent) => {
2946
2949
  // 流程脚本
2947
2950
  if(resScript){
@@ -3344,10 +3347,10 @@
3344
3347
  },
3345
3348
 
3346
3349
  tabClick(tab) {
3347
- if (this.showInfo == "flow" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].crud) {
3350
+ if (this.showInfo === "flow" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].crud) {
3348
3351
  this.$refs[tab.name + "Ref"].crud.search();
3349
3352
  this.initTabNum();
3350
- } else if (this.showInfo == "form" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].getDataRows) {
3353
+ } else if (this.showInfo === "form" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].getDataRows) {
3351
3354
  this.$refs[tab.name + "Ref"].getDataRows();
3352
3355
  this.initTabNum();
3353
3356
  }
@@ -3362,6 +3365,7 @@
3362
3365
  },
3363
3366
 
3364
3367
  initFlowObj() {//处理流程定义对象
3368
+ this.isRefreshGetNextUsers = [];
3365
3369
  let gatewayFields = this.flowDefine.gatewayFields || "";
3366
3370
  this.isRefreshGetNextUsers = gatewayFields.split(",");
3367
3371
  Object.keys(this.allNodeInfo).forEach(key => {
@@ -3375,22 +3379,24 @@
3375
3379
  }
3376
3380
  }
3377
3381
  });
3378
- let tabSetting = JSON.parse(this.flowDefine.tabSetting);
3379
- tabSetting.forEach(data => {
3380
- this.$set(this.tabTypeObj, data.type, data);
3381
- });
3382
- Object.keys(this.tabTypeObj).forEach(key => {
3383
- let objTemp = this.tabTypeObj[key];
3384
- objTemp.tabName = objTemp["showName"] || objTemp["name"];
3385
- });
3386
- let tabTitleType = this.flowDefine.tabTitleType;
3387
- if (tabTitleType == "1") {
3388
- this.tabTypeObj["showtTabText"] = true;
3389
- this.tabTypeObj["showTabIcon"] = true;
3390
- } else if (tabTitleType == "2") {
3391
- this.tabTypeObj["showtTabText"] = true;
3392
- } else if (tabTitleType == "3") {
3393
- this.tabTypeObj["showTabIcon"] = true;
3382
+ if (!this.flowId.includes(",")) {
3383
+ let tabSetting = JSON.parse(this.flowDefine.tabSetting);
3384
+ tabSetting.forEach(data => {
3385
+ this.$set(this.tabTypeObj, data.type, data);
3386
+ });
3387
+ Object.keys(this.tabTypeObj).forEach(key => {
3388
+ let objTemp = this.tabTypeObj[key];
3389
+ objTemp.tabName = objTemp["showName"] || objTemp["name"];
3390
+ });
3391
+ let tabTitleType = this.flowDefine.tabTitleType;
3392
+ if (tabTitleType === "1") {
3393
+ this.tabTypeObj["showtTabText"] = true;
3394
+ this.tabTypeObj["showTabIcon"] = true;
3395
+ } else if (tabTitleType === "2") {
3396
+ this.tabTypeObj["showtTabText"] = true;
3397
+ } else if (tabTitleType === "3") {
3398
+ this.tabTypeObj["showTabIcon"] = true;
3399
+ }
3394
3400
  }
3395
3401
  },
3396
3402