sasp-flow-render 1.1.7 → 1.1.8

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.8",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -797,7 +797,7 @@
797
797
  nodeFormButtonObj: {},
798
798
  optColumnWidth: 336,
799
799
  showModel: "list",//默认风格 list:列表card:卡片
800
- showInfo: "",//展示信息 flow:流程信息 form:表单信息
800
+ showInfo: "flow",//展示信息 flow:流程信息 form:表单信息
801
801
  operateType: {},
802
802
  resourceTabOpts: ['draft','pending','processed','rescinded','finished','discontinue','flowQuery'],
803
803
  tabTypeObj: {},//标签页对象
@@ -1128,6 +1128,7 @@
1128
1128
  this.flowDefine = this.flowDefineByFlowId[row.flowId];
1129
1129
  this.startNodeKeyObj = this.startNodeKeyObjByFlowId[row.flowId];
1130
1130
  this.flowVersionNodeObj = this.flowVersionNodeObjByFlowId[row.flowId];
1131
+ this.initFlowObj();
1131
1132
  // Object.assign(this.formInfo, this.formInfoByFlowId[row.flowId]);
1132
1133
  }
1133
1134
 
@@ -1352,7 +1353,6 @@
1352
1353
 
1353
1354
  saveNewBatchDealFormData() {
1354
1355
  this.saveFormInfo().then(result => {
1355
- // console.log('保存方法1', result);
1356
1356
  if (result) {
1357
1357
  let flowNewBatchDealVm = this.$refs.flowNewBatchDealRef;
1358
1358
  // 数据保存成功,更改行数据
@@ -1381,7 +1381,6 @@
1381
1381
  });
1382
1382
  }
1383
1383
  this.$set(flowObj, "isEdited", true);
1384
- // console.log('flowObj', flowObj, flowNewBatchDealVm);
1385
1384
  this.flowInstDataDialog = false;
1386
1385
  // 刷新下一步处理人
1387
1386
  if (flowNewBatchDealVm) {
@@ -1392,7 +1391,6 @@
1392
1391
  },
1393
1392
 
1394
1393
  newBatchDealSubmit(selectionArr, submitType) {
1395
- // console.log('提交',selectionArr);
1396
1394
  if (selectionArr.length === 0) {
1397
1395
  return this.$message.warning('请先勾选要提交的数据!');
1398
1396
  }
@@ -1425,7 +1423,7 @@
1425
1423
  nextStepSelectionArr.push(selectionObj);
1426
1424
  }
1427
1425
  });
1428
- // console.log(this.flowDefine, this.allNodeInfo, '提交', selectionArr, nextStepSelectionArr);
1426
+
1429
1427
  if (params.length > 0) {
1430
1428
  this.saveBatchDealFormData(this.formInfo.formId, JSON.stringify(params)).then(resData => {
1431
1429
  if (resData.operateSuccess) {
@@ -1481,7 +1479,7 @@
1481
1479
  selectArr.push(item);
1482
1480
  }
1483
1481
  });
1484
- // console.log('全部提交', selectArr);
1482
+
1485
1483
  if (selectArr.length === 0) {
1486
1484
  return this.$message.warning("暂无提交内容!");
1487
1485
  }
@@ -1654,7 +1652,6 @@
1654
1652
  * @param row 流程行数据
1655
1653
  */
1656
1654
  openFlowRecord(row) {
1657
- console.log('流转记录',row);
1658
1655
  let arr = ["2", "3", "4"]; // 旧版本的已办结已撤销以及已中止数据通过旧版接口查询流转记录
1659
1656
  if (arr.indexOf(row.flowStatus) > -1 && row.isOldData === "1") {
1660
1657
  this.flowRecordObj = {instId: row.flowInstId || "", oldDialogVisible: true};
@@ -1886,14 +1883,14 @@
1886
1883
  let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1887
1884
  afterClickResult=this.exeFlowEvent("nextStep","afterClick", this.currentInst.currentNode || this.draftNodeId);
1888
1885
  //
1889
- if(currentNodeObj.openEvent == '1'){
1886
+ if(currentNodeObj.openEvent === '1'){
1890
1887
  afterClickResult = this.exeNewFlowEvent("nextClick",currentNodeObj.nodeLinkId);
1891
1888
  }
1892
1889
 
1893
1890
  // let afterValidateResult;
1894
1891
  // let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1895
1892
  this.exeFlowEvent("nextStep","afterValidate", this.currentInst.currentNode || this.draftNodeId);
1896
- if(currentNodeObj.openEvent == '1'){
1893
+ if(currentNodeObj.openEvent === '1'){
1897
1894
  this.exeNewFlowEvent("nextCheck",currentNodeObj.nodeLinkId);
1898
1895
  }
1899
1896
 
@@ -2253,7 +2250,9 @@
2253
2250
  Object.assign(params,this.flowParams || {},obj);
2254
2251
  this.saspFlowAxios.post(this.api.plFlowInst.executeNextStep,params).then(res => {
2255
2252
  if (res && res.data && res.data.operateSuccess) {
2256
- this.initTabNum();
2253
+ if (!this.flowId.includes(",")) {
2254
+ this.initTabNum();
2255
+ }
2257
2256
  this.$message({type: "success", message: "提交成功!"});
2258
2257
  if (this.flowBatchPendingDialog) {
2259
2258
  this.batchTabRemove(this.currentInst.dataId);
@@ -2313,7 +2312,7 @@
2313
2312
  */
2314
2313
  sureCompleteSign() {
2315
2314
  let checkedUserArr = this.$refs.completeSignRef.chooseUsers || [];
2316
- if (checkedUserArr.length == 0) {
2315
+ if (checkedUserArr.length === 0) {
2317
2316
  this.$message({type: "error", message: "请选择加签人!"});
2318
2317
  return;
2319
2318
  }
@@ -2329,7 +2328,9 @@
2329
2328
  if (res && res.data && res.data.operateSuccess) {
2330
2329
  this.completeSignDialog = false;
2331
2330
  this.flowInstDataDialog = false;
2332
- this.initTabNum();
2331
+ if (!this.flowId.includes(",")) {
2332
+ this.initTabNum();
2333
+ }
2333
2334
  this.$message({type: "success", message: "加签成功!"});
2334
2335
  this.tabCrudSearch();
2335
2336
  } else {
@@ -2344,7 +2345,7 @@
2344
2345
  */
2345
2346
  sureTurnSign() {
2346
2347
  let checkedUserArr = this.$refs.turnSignRef.chooseUsers || [];
2347
- if (checkedUserArr.length == 0) {
2348
+ if (checkedUserArr.length === 0) {
2348
2349
  this.$message({type: "error", message: "请选择转签人!"});
2349
2350
  return;
2350
2351
  }
@@ -2357,7 +2358,9 @@
2357
2358
  if (res && res.data && res.data.operateSuccess) {
2358
2359
  this.turnSignDialog = false;
2359
2360
  this.flowInstDataDialog = false;
2360
- this.initTabNum();
2361
+ if (!this.flowId.includes(",")) {
2362
+ this.initTabNum();
2363
+ }
2361
2364
  this.$message({type: "success", message: "转签成功!"});
2362
2365
  this.tabCrudSearch();
2363
2366
  } else {
@@ -2391,7 +2394,9 @@
2391
2394
  }).then(res => {
2392
2395
  if (res && res.data && res.data.operateSuccess) {
2393
2396
  this.$message({type: "success", message: "退回成功!"});
2394
- this.initTabNum();
2397
+ if (!this.flowId.includes(",")) {
2398
+ this.initTabNum();
2399
+ }
2395
2400
  if (this.flowBatchPendingDialog) {
2396
2401
  this.batchTabRemove(this.currentInst.dataId);
2397
2402
  } else {
@@ -2430,7 +2435,9 @@
2430
2435
  }).then(res => {
2431
2436
  if (res && res.data && res.data.operateSuccess) {
2432
2437
  this.$message({type: "success", message: "取回成功!"});
2433
- this.initTabNum();
2438
+ if (!this.flowId.includes(",")) {
2439
+ this.initTabNum();
2440
+ }
2434
2441
  if (this.flowBatchPendingDialog) {
2435
2442
  this.batchTabRemove(this.currentInst.dataId);
2436
2443
  } else {
@@ -2704,7 +2711,9 @@
2704
2711
  } else {
2705
2712
  this.tabCrudSearch();
2706
2713
  }
2707
- this.initTabNum();
2714
+ if (!this.flowId.includes(",")) {
2715
+ this.initTabNum();
2716
+ }
2708
2717
  } else {
2709
2718
  this.$message({type: "error", message: res.data.operateMessage});
2710
2719
  }
@@ -3344,10 +3353,12 @@
3344
3353
  },
3345
3354
 
3346
3355
  tabClick(tab) {
3347
- if (this.showInfo == "flow" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].crud) {
3356
+ if (this.showInfo === "flow" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].crud) {
3348
3357
  this.$refs[tab.name + "Ref"].crud.search();
3349
- this.initTabNum();
3350
- } else if (this.showInfo == "form" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].getDataRows) {
3358
+ if (!this.flowId.includes(",")) {
3359
+ this.initTabNum();
3360
+ }
3361
+ } else if (this.showInfo === "form" && this.$refs[tab.name + "Ref"] && this.$refs[tab.name + "Ref"].getDataRows) {
3351
3362
  this.$refs[tab.name + "Ref"].getDataRows();
3352
3363
  this.initTabNum();
3353
3364
  }
@@ -3362,6 +3373,7 @@
3362
3373
  },
3363
3374
 
3364
3375
  initFlowObj() {//处理流程定义对象
3376
+ this.isRefreshGetNextUsers = [];
3365
3377
  let gatewayFields = this.flowDefine.gatewayFields || "";
3366
3378
  this.isRefreshGetNextUsers = gatewayFields.split(",");
3367
3379
  Object.keys(this.allNodeInfo).forEach(key => {
@@ -3375,22 +3387,24 @@
3375
3387
  }
3376
3388
  }
3377
3389
  });
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;
3390
+ if (!this.flowId.includes(",")) {
3391
+ let tabSetting = JSON.parse(this.flowDefine.tabSetting);
3392
+ tabSetting.forEach(data => {
3393
+ this.$set(this.tabTypeObj, data.type, data);
3394
+ });
3395
+ Object.keys(this.tabTypeObj).forEach(key => {
3396
+ let objTemp = this.tabTypeObj[key];
3397
+ objTemp.tabName = objTemp["showName"] || objTemp["name"];
3398
+ });
3399
+ let tabTitleType = this.flowDefine.tabTitleType;
3400
+ if (tabTitleType === "1") {
3401
+ this.tabTypeObj["showtTabText"] = true;
3402
+ this.tabTypeObj["showTabIcon"] = true;
3403
+ } else if (tabTitleType === "2") {
3404
+ this.tabTypeObj["showtTabText"] = true;
3405
+ } else if (tabTitleType === "3") {
3406
+ this.tabTypeObj["showTabIcon"] = true;
3407
+ }
3394
3408
  }
3395
3409
  },
3396
3410