sasp-flow-render 1.0.5 → 1.0.7

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.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -10,19 +10,13 @@
10
10
  </el-form-item>
11
11
  <el-form-item label="启动人"
12
12
  v-if="isShow('pending,processed,finished,rescinded,discontinue,flowQuery')">
13
- <el-select v-model="crud.searchForm.startUserName" style="width: 90px;" filterable allow-create clearable>
14
- <el-option v-for="item in userArr" :key="item.id" :value="item.id" :label="item.userName">
15
-
16
- </el-option>
17
- </el-select>
13
+ <el-input v-model="crud.searchForm.startUserName" style="width: 90px;">
14
+ </el-input>
18
15
  </el-form-item>
19
16
 
20
17
  <el-form-item label="当前处理人" v-if="isShow('flowQuery')">
21
- <el-select v-model="crud.searchForm.dealUserId" style="width: 90px;" filterable allow-create clearable>
22
- <el-option v-for="item in userArr" :key="item.id" :value="item.id" :label="item.userName">
23
-
24
- </el-option>
25
- </el-select>
18
+ <el-input v-model="crud.searchForm.dealUserName" style="width: 90px;">
19
+ </el-input>
26
20
  </el-form-item>
27
21
  <el-form-item label="当前任务" v-if="isShow('pending,processed,flowQuery')">
28
22
  <el-select v-model="crud.searchForm.currentNode" filterable clearable style="width: 130px;">
@@ -476,6 +476,7 @@
476
476
  initMessageFunc:{type: Function,default:null},
477
477
  initFormInfo:{type: Function,default:null}, // 添加修改打开表单时执行的事件
478
478
  saveFormInfo:{type: Function,default:null}, // 保存表单时执行的事件
479
+ getFormInfo:{type: Function,default:null}, // 获取表单内容,以方便进行表单信息修改
479
480
  dataPermis:{type:String,default:''},
480
481
  flowNextOperation:{type: Function,default:null} // 流程下一步时的参数回调事件
481
482
  },
@@ -909,6 +910,7 @@
909
910
  let nowVersion = this.flowDefine.releaseVersion; //只要已发布最小版本为1.0
910
911
  this.currentRowData = {};
911
912
  this.initFieldStatus(this.startNodeKeyObj[nowVersion],nowVersion).then(()=>{
913
+ this.flowInstDataDialog = true;
912
914
  this.initFormInfoFunc('add').then(() => {
913
915
  this.formBtnArr = this.getAddAndUpdateFormBtn({});
914
916
  Object.assign(this.formInfo, {
@@ -916,7 +918,14 @@
916
918
  opt: "add"
917
919
  });
918
920
  this.currentInst = {};
919
- this.flowInstDataDialog = true;
921
+ this.$nextTick(() => {
922
+ this.exeFlowEvent("add","afterClick");
923
+ let startNodeKey = this.startNodeKeyObj[nowVersion];
924
+ let startNodeObj = this.flowVersionNodeObj[nowVersion][startNodeKey] || {};
925
+ if(startNodeObj.openEvent == '1'){
926
+ this.exeNewFlowEvent("addAfter");//新事件规则
927
+ }
928
+ })
920
929
  })
921
930
  });
922
931
  // this.$refs.flowInstDataInfo && (this.$refs.flowInstDataInfo.optFormData = {});
@@ -954,8 +963,18 @@
954
963
  }
955
964
  // console.log(currentNode);
956
965
  return new Promise(resolve => {
957
- this.initFormInfo && this.initFormInfo(type,dataId,JSON.parse(currentNode.fieldOperate || "{}"),rowData);
958
- resolve();
966
+ if(this.initFormInfo){
967
+ let promise = this.initFormInfo(type,dataId,JSON.parse(currentNode.fieldOperate || "{}"),rowData);
968
+ if(promise.then){
969
+ promise.then(() => {
970
+ resolve();
971
+ })
972
+ }else{
973
+ resolve();
974
+ }
975
+ } else{
976
+ resolve();
977
+ }
959
978
  })
960
979
  },
961
980
  /**
@@ -992,17 +1011,13 @@
992
1011
  this.currNodeName = 'noEnd';
993
1012
  this.flowInstDataDialog = true;
994
1013
  this.initUpdateFlowForm(row).then(() =>{
995
- this.flowInstDataDialog = true;
996
- // this.$nextTick(() => {
997
- // this.$refs.flowInstDataInfo.loadData().then(() => {
998
- // this.exeFlowEvent(executePosition,"afterClick",row.currentNode);
999
- //
1000
- // let currentNodeObj = this.flowNodeIdToInfo[row.currentNode] ||{};
1001
- // if(currentNodeObj.openEvent== '1'){ //开启事件
1002
- // this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
1003
- // }
1004
- // })
1005
- // })
1014
+ this.$nextTick(() => {
1015
+ this.exeFlowEvent(executePosition,"afterClick",row.currentNode);
1016
+ let currentNodeObj = this.flowNodeIdToInfo[row.currentNode] ||{};
1017
+ if(currentNodeObj.openEvent== '1'){ //开启事件
1018
+ this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
1019
+ }
1020
+ })
1006
1021
  });
1007
1022
  },
1008
1023
 
@@ -1016,6 +1031,7 @@
1016
1031
  this.currNodeName = "end";
1017
1032
  }
1018
1033
  this.initFieldStatus(row.nodeKey || startNodeKey,row.version,row.flowStatus).then(() =>{
1034
+ this.flowInstDataDialog = true;
1019
1035
  this.initFormInfoFunc('view',row).then(() => {
1020
1036
  this.currentStartUser = this.userMap[row.startUserId] || "";
1021
1037
  this.currentStartTime = row.startTime;
@@ -1026,7 +1042,6 @@
1026
1042
  opt: "view",
1027
1043
  });
1028
1044
  this.formBtnArr = this.getViewFormBtn(row);
1029
- this.flowInstDataDialog = true;
1030
1045
  });
1031
1046
  });
1032
1047
  },
@@ -1260,6 +1275,7 @@
1260
1275
  flowInst = Object.assign(flowInst,{"version":this.flowDefine.releaseVersion,"isRelease":this.flowDefine.isRelease})
1261
1276
  }
1262
1277
  this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1278
+ this.runFlowEvt();
1263
1279
  resolve(instRes.data.operateObj);
1264
1280
  });
1265
1281
  }else{
@@ -1284,6 +1300,7 @@
1284
1300
  };
1285
1301
  }
1286
1302
  this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1303
+ this.runFlowEvt();
1287
1304
  resolve(instRes.data.operateObj);
1288
1305
  this.currentInst=instRes.data.operateObj;
1289
1306
  });
@@ -1291,82 +1308,98 @@
1291
1308
  })
1292
1309
  },
1293
1310
 
1311
+ runFlowEvt(){
1312
+ let type = this.flowBatchPendingDialog ? "batch" : "";
1313
+ let afterClickResult;
1314
+ let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1315
+ if (type == 'batch') {//批量处理 需处理tab页
1316
+ let ref = "batchTableForm"+this.batchUpdateFormInfo.activeName+"Ref";
1317
+ if(currentNodeObj.openEvent == '1'){
1318
+ afterClickResult=this.exeNewFlowEvent("saveAfter", currentNodeObj.nodeLinkId,ref);
1319
+ }
1320
+ }else {
1321
+ if(currentNodeObj.openEvent == '1'){
1322
+ afterClickResult=this.exeNewFlowEvent("saveAfter", currentNodeObj.nodeLinkId);
1323
+ }
1324
+ }
1325
+ },
1326
+
1294
1327
  /**
1295
1328
  * 保存草稿
1296
1329
  */
1297
1330
  saveData() {
1298
1331
  let type = this.flowBatchPendingDialog ? "batch" : "";
1299
1332
  return new Promise(resolve => {
1300
- let flowInstDataInfoRef = "";
1301
- if (type == 'batch') {
1302
- // 批量处理
1303
- flowInstDataInfoRef = this.$refs[`batchTableForm${this.batchUpdateFormInfo.activeName}Ref`];
1304
- flowInstDataInfoRef = flowInstDataInfoRef[0] || flowInstDataInfoRef;
1305
- } else {
1306
- flowInstDataInfoRef = this.$refs.flowInstDataInfo;
1307
- }
1308
- let startNodeKey = this.startNodeKeyObj[this.flowDefine.releaseVersion];
1309
- flowInstDataInfoRef.saveData(this.loginUser.id).then(res => {
1310
- if (res && res.operateSuccess) {
1311
- let flowSummary = this.getFlowSummary(flowInstDataInfoRef.optFormData,flowInstDataInfoRef.fieldSysDataObj || {});
1312
- let flowInst = {};
1313
- let dataId = res.operateObj;
1314
- this.dataId = dataId;
1315
- if(this.currentInst && this.currentInst.id){
1316
- this.$set(this.formInfo,"opt","update");
1317
- flowInst = {
1318
- "id": this.currentInst.id,
1319
- "flowSummary": flowSummary,
1320
- "updated": this.loginUser.id,
1321
- };
1322
- if(this.formInfo.opt == 'add' || this.tabActive == 'draft'){ //版本号也要随之更新
1323
- flowInst = Object.assign(flowInst,{"version":this.flowDefine.releaseVersion,"isRelease":this.flowDefine.isRelease})
1324
- }
1325
- this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1326
- resolve(instRes.data);
1327
- });
1328
- }else{
1329
- if (this.formInfo.opt == "add") {
1330
- flowInst = {
1331
- flowId: this.flowDefine.id,
1332
- flowSummary: flowSummary,
1333
- dataId: dataId,
1334
- startUserId: this.loginUser.id,
1335
- version:this.flowDefine.releaseVersion, //版本号
1336
- startTime: this.DATE_UTIL.getCurrentDateTime(), flowStatus: "0",
1337
- created: this.loginUser.id,
1338
- currentNode: this.flowVersionNodeObj[this.flowDefine.releaseVersion][startNodeKey].id,
1339
- isRelease:this.flowDefine.isRelease
1340
- };
1341
- } else {
1342
- flowInst = {
1343
- id: this.currentInst.id,
1344
- flowSummary: flowSummary,
1345
- version:this.flowDefine.releaseVersion, //版本号也要随之更新
1346
- updated: this.loginUser.id,
1347
- };
1348
- }
1349
- this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1350
- resolve(instRes.data);
1351
- this.currentInst=instRes.data;
1352
- });
1353
- }
1354
- let afterClickResult;
1355
- let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1356
- if (type == 'batch') {//批量处理 需处理tab页
1357
- let ref = "batchTableForm"+this.batchUpdateFormInfo.activeName+"Ref";
1358
- if(currentNodeObj.openEvent == '1'){
1359
- afterClickResult=this.exeNewFlowEvent("saveAfter", currentNodeObj.nodeLinkId,ref);
1360
- }
1361
- }else {
1362
- if(currentNodeObj.openEvent == '1'){
1363
- afterClickResult=this.exeNewFlowEvent("saveAfter", currentNodeObj.nodeLinkId);
1364
- }
1365
- }
1366
- }else{
1367
- this.$message({type:"error",message:"保存失败!"});
1368
- }
1369
- });
1333
+ // let flowInstDataInfoRef = "";
1334
+ // if (type == 'batch') {
1335
+ // // 批量处理
1336
+ // flowInstDataInfoRef = this.$refs[`batchTableForm${this.batchUpdateFormInfo.activeName}Ref`];
1337
+ // flowInstDataInfoRef = flowInstDataInfoRef[0] || flowInstDataInfoRef;
1338
+ // } else {
1339
+ // flowInstDataInfoRef = this.$refs.flowInstDataInfo;
1340
+ // }
1341
+ // let startNodeKey = this.startNodeKeyObj[this.flowDefine.releaseVersion];
1342
+ // flowInstDataInfoRef.saveData(this.loginUser.id).then(res => {
1343
+ // if (res && res.operateSuccess) {
1344
+ // let flowSummary = this.getFlowSummary(flowInstDataInfoRef.optFormData,flowInstDataInfoRef.fieldSysDataObj || {});
1345
+ // let flowInst = {};
1346
+ // let dataId = res.operateObj;
1347
+ // this.dataId = dataId;
1348
+ // if(this.currentInst && this.currentInst.id){
1349
+ // this.$set(this.formInfo,"opt","update");
1350
+ // flowInst = {
1351
+ // "id": this.currentInst.id,
1352
+ // "flowSummary": flowSummary,
1353
+ // "updated": this.loginUser.id,
1354
+ // };
1355
+ // if(this.formInfo.opt == 'add' || this.tabActive == 'draft'){ //版本号也要随之更新
1356
+ // flowInst = Object.assign(flowInst,{"version":this.flowDefine.releaseVersion,"isRelease":this.flowDefine.isRelease})
1357
+ // }
1358
+ // this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1359
+ // resolve(instRes.data);
1360
+ // });
1361
+ // }else{
1362
+ // if (this.formInfo.opt == "add") {
1363
+ // flowInst = {
1364
+ // flowId: this.flowDefine.id,
1365
+ // flowSummary: flowSummary,
1366
+ // dataId: dataId,
1367
+ // startUserId: this.loginUser.id,
1368
+ // version:this.flowDefine.releaseVersion, //版本号
1369
+ // startTime: this.DATE_UTIL.getCurrentDateTime(), flowStatus: "0",
1370
+ // created: this.loginUser.id,
1371
+ // currentNode: this.flowVersionNodeObj[this.flowDefine.releaseVersion][startNodeKey].id,
1372
+ // isRelease:this.flowDefine.isRelease
1373
+ // };
1374
+ // } else {
1375
+ // flowInst = {
1376
+ // id: this.currentInst.id,
1377
+ // flowSummary: flowSummary,
1378
+ // version:this.flowDefine.releaseVersion, //版本号也要随之更新
1379
+ // updated: this.loginUser.id,
1380
+ // };
1381
+ // }
1382
+ // this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1383
+ // resolve(instRes.data);
1384
+ // this.currentInst=instRes.data;
1385
+ // });
1386
+ // }
1387
+ // let afterClickResult;
1388
+ // let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1389
+ // if (type == 'batch') {//批量处理 需处理tab页
1390
+ // let ref = "batchTableForm"+this.batchUpdateFormInfo.activeName+"Ref";
1391
+ // if(currentNodeObj.openEvent == '1'){
1392
+ // afterClickResult=this.exeNewFlowEvent("saveAfter", currentNodeObj.nodeLinkId,ref);
1393
+ // }
1394
+ // }else {
1395
+ // if(currentNodeObj.openEvent == '1'){
1396
+ // afterClickResult=this.exeNewFlowEvent("saveAfter", currentNodeObj.nodeLinkId);
1397
+ // }
1398
+ // }
1399
+ // }else{
1400
+ // this.$message({type:"error",message:"保存失败!"});
1401
+ // }
1402
+ // });
1370
1403
  });
1371
1404
  },
1372
1405
 
@@ -1375,20 +1408,20 @@
1375
1408
  */
1376
1409
  nextStep() {
1377
1410
  // let type = this.flowBatchPendingDialog ? "batch" : "";
1378
- // let afterClickResult;
1379
- // let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1380
- // afterClickResult=this.exeFlowEvent("nextStep","afterClick", this.currentInst.currentNode || this.draftNodeId);
1411
+ let afterClickResult;
1412
+ let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1413
+ afterClickResult=this.exeFlowEvent("nextStep","afterClick", this.currentInst.currentNode || this.draftNodeId);
1381
1414
  //
1382
- // if(currentNodeObj.openEvent == '1'){
1383
- // afterClickResult = this.exeNewFlowEvent("nextClick",currentNodeObj.nodeLinkId);
1384
- // }
1415
+ if(currentNodeObj.openEvent == '1'){
1416
+ afterClickResult = this.exeNewFlowEvent("nextClick",currentNodeObj.nodeLinkId);
1417
+ }
1385
1418
 
1386
1419
  // let afterValidateResult;
1387
1420
  // let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode || this.draftNodeId] ||{};
1388
- // afterValidateResult=this.exeFlowEvent("nextStep","afterValidate", this.currentInst.currentNode || this.draftNodeId);
1389
- // if(currentNodeObj.openEvent == '1'){
1390
- // afterValidateResult = this.exeNewFlowEvent("nextCheck",currentNodeObj.nodeLinkId);
1391
- // }
1421
+ this.exeFlowEvent("nextStep","afterValidate", this.currentInst.currentNode || this.draftNodeId);
1422
+ if(currentNodeObj.openEvent == '1'){
1423
+ this.exeNewFlowEvent("nextCheck",currentNodeObj.nodeLinkId);
1424
+ }
1392
1425
 
1393
1426
  this.isDisabled['nextStep'] = false;
1394
1427
  this.flowParams = {};
@@ -2357,13 +2390,14 @@
2357
2390
  try{
2358
2391
  if(item.content){
2359
2392
  let value = item.content;
2360
- value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2361
- value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2362
- value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2363
- value = this.platStringUtil.replaceAll(value,"/oaproject/",oaServeName);
2364
- value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2365
- value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2366
- value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2393
+ // value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2394
+ // value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2395
+ // value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2396
+ // value = this.platStringUtil.replaceAll(value,"/oaproject/",oaServeName);
2397
+ // value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2398
+ // value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2399
+ // value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2400
+ value = this.replaceUrl(value);
2367
2401
  item.content = value;
2368
2402
  }
2369
2403
  scriptObj[item.executePosition][item.executeTime].push(new Function(...arr,item.content));
@@ -2387,12 +2421,13 @@
2387
2421
  try{
2388
2422
  if(item.content){
2389
2423
  let value = item.content;
2390
- value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2391
- value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2392
- value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2393
- value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2394
- value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2395
- value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2424
+ // value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2425
+ // value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2426
+ // value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2427
+ // value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2428
+ // value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2429
+ // value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2430
+ value = this.replaceUrl(value);
2396
2431
  item.content = value;
2397
2432
  }
2398
2433
  executeTimeArr.push(new Function(...arr,item.content));
@@ -2428,13 +2463,14 @@
2428
2463
  try{
2429
2464
  if(item.funcBody){ //方法体
2430
2465
  let value = item.funcBody;
2431
- value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2432
- value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2433
- value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2434
- value = this.platStringUtil.replaceAll(value,"/oaproject/",oaServeName);
2435
- value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2436
- value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2437
- value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2466
+ // value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2467
+ // value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2468
+ // value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2469
+ // value = this.platStringUtil.replaceAll(value,"/oaproject/",oaServeName);
2470
+ // value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2471
+ // value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2472
+ // value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2473
+ value = this.replaceUrl(value);
2438
2474
  item.funcBody = value;
2439
2475
  }
2440
2476
  scriptObj[executeType].push(new Function(...arr,item.funcBody));
@@ -2454,13 +2490,14 @@
2454
2490
  try{
2455
2491
  if(item.funcBody){
2456
2492
  let value = item.funcBody;
2457
- value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2458
- value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2459
- value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2460
- value = this.platStringUtil.replaceAll(value,"/oaproject/",oaServeName);
2461
- value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2462
- value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2463
- value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2493
+ // value = this.platStringUtil.replaceAll(value,"/admin/",adminServeName);
2494
+ // value = this.platStringUtil.replaceAll(value,"/form/",formServeName);
2495
+ // value = this.platStringUtil.replaceAll(value,"/flow/",flowServeName);
2496
+ // value = this.platStringUtil.replaceAll(value,"/oaproject/",oaServeName);
2497
+ // value = this.platStringUtil.replaceAll(value,"/oaadmin/",adminServeName);
2498
+ // value = this.platStringUtil.replaceAll(value,"/oaform/",formServeName);
2499
+ // value = this.platStringUtil.replaceAll(value,"/oaflow/",flowServeName);
2500
+ value = this.replaceUrl(value);
2464
2501
  item.funcBody = value;
2465
2502
  }
2466
2503
  positionArr.push(new Function(...arr,item.funcBody));
@@ -2524,6 +2561,42 @@
2524
2561
  })
2525
2562
  },
2526
2563
 
2564
+ replaceUrl(value){
2565
+ if(window.ADMIN_URL && (value.indexOf("/admin/") > -1 || value.indexOf("/oaadmin/") > -1)){
2566
+ if(value.indexOf("/admin/") > -1){
2567
+ value = this.platStringUtil.replaceAll(value,"/admin/", window.ADMIN_URL + "/");
2568
+ }else{
2569
+ value = this.platStringUtil.replaceAll(value,"/oaadmin/",window.ADMIN_URL + "/");
2570
+ }
2571
+ }
2572
+ if(window.FLOW_URL && (value.indexOf("/flow/") > -1 || value.indexOf("/oaflow/") > -1)){
2573
+ if(value.indexOf("/flow/") > -1){
2574
+ value = this.platStringUtil.replaceAll(value,"/flow/", window.FLOW_URL + "/");
2575
+ }else{
2576
+ value = this.platStringUtil.replaceAll(value,"/oaflow/",window.FLOW_URL + "/");
2577
+ }
2578
+ }
2579
+ if(window.FORM_RENDER_URL && (value.indexOf("/form/") > -1|| value.indexOf("/oaform/") > -1)){
2580
+ if(value.indexOf("/form/") > -1){
2581
+ value = this.platStringUtil.replaceAll(value,"/form/", window.FORM_RENDER_URL + "/");
2582
+ }else{
2583
+ value = this.platStringUtil.replaceAll(value,"/oaform/",window.FORM_RENDER_URL + "/");
2584
+ }
2585
+ }
2586
+ if(window.OA_URL && (value.indexOf("/project/") > -1 || value.indexOf("/oaproject/") > -1)){
2587
+ if(value.indexOf("/project/") > -1){
2588
+ value = this.platStringUtil.replaceAll(value,"/project/", window.OA_URL + "/");
2589
+ }else{
2590
+ value = this.platStringUtil.replaceAll(value,"/oaproject/",window.OA_URL + "/");
2591
+ }
2592
+ }
2593
+ value = this.platStringUtil.replaceAll(value,"window.JAVA_URL","''");
2594
+ value = this.platStringUtil.replaceAll(value,"JAVA_URL","''");
2595
+ value = this.platStringUtil.replaceAll(value,"window.baseUrl","''");
2596
+ value = this.platStringUtil.replaceAll(value,"baseUrl","''");
2597
+ return value;
2598
+ },
2599
+
2527
2600
  /**
2528
2601
  * 执行工作流脚本,为兼容1.0版本定制
2529
2602
  */
@@ -2532,13 +2605,17 @@
2532
2605
  // executePosition:add:['afterClick'],update:['afterClick'],handle:['afterClick'],
2533
2606
  // nextStep:['afterClick','afterValidate','submitSuccess'],view:['afterClick'],
2534
2607
  // (columnFormatter:['finished','end']?暂时不用)
2535
- let formData;
2536
- if(batchDataRef){//批量处理走单独方法
2537
- formData=this.$refs[batchDataRef][0] && this.$refs[batchDataRef][0].optFormData || {};
2538
- }else{
2539
- formData=(this.$refs.flowInstDataInfo && this.$refs.flowInstDataInfo.optFormData) || {};
2608
+ let formData = {};
2609
+ if(this.getFormInfo){
2610
+ formData = this.getFormInfo();
2540
2611
  }
2541
- let CTX = window.JAVA_URL;
2612
+ // if(batchDataRef){//批量处理走单独方法
2613
+ // formData=this.$refs[batchDataRef][0] && this.$refs[batchDataRef][0].optFormData || {};
2614
+ // }else{
2615
+ // formData=(this.$refs.flowInstDataInfo && this.$refs.flowInstDataInfo.optFormData) || {};
2616
+ // }
2617
+ // let CTX = window.JAVA_URL;
2618
+ let CTX = "";
2542
2619
  let paramValues = [this,this.axios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode,null]; // 入参
2543
2620
  if(executePosition == "add" || executePosition == "update"){
2544
2621
  ((this.scriptObj[executePosition] || {})[executeTime] || []).forEach(event => {
@@ -2568,14 +2645,19 @@
2568
2645
  * 执行工作流新版本事件规则
2569
2646
  */
2570
2647
  exeNewFlowEvent(executeType,nodeKey,batchDataRef){
2571
- let formData;
2572
- if(batchDataRef){//批量处理走单独方法
2573
- formData=this.$refs[batchDataRef][0] && this.$refs[batchDataRef][0].optFormData || {};
2574
- }else{
2575
- formData=(this.$refs.flowInstDataInfo && this.$refs.flowInstDataInfo.optFormData) || {};
2648
+ let formData = {};
2649
+ if(this.getFormInfo){
2650
+ formData = this.getFormInfo();
2576
2651
  }
2652
+ // let formData;
2653
+ // if(batchDataRef){//批量处理走单独方法
2654
+ // formData=this.$refs[batchDataRef][0] && this.$refs[batchDataRef][0].optFormData || {};
2655
+ // }else{
2656
+ // formData=(this.$refs.flowInstDataInfo && this.$refs.flowInstDataInfo.optFormData) || {};
2657
+ // }
2577
2658
  //执行自定义脚本
2578
- let CTX = window.JAVA_URL;
2659
+ // let CTX = window.JAVA_URL;
2660
+ let CTX = "";
2579
2661
  let paramValues = [this,this.axios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode]; // 入参
2580
2662
  if(executeType == "addAfter" || executeType == "editAfter"){ //新增或者修改后
2581
2663
  (this.newScriptObj[executeType] || []).forEach(event => {
@@ -30,6 +30,7 @@
30
30
  <el-timeline v-show="showStyle=='图形展现'">
31
31
  <el-timeline-item
32
32
  v-for="(item, index) in flowInstNodeArr"
33
+ v-if="!hideMap[item.id]"
33
34
  :key="index"
34
35
  placement="top"
35
36
  :class="{'appendsign-item':(item.isAppendsign=='1' || item.activityType=='multiInstanceBody' || item.turnSign)}"
@@ -226,6 +227,7 @@
226
227
  return {
227
228
  loading: true,
228
229
  flowInstNodeArr: [],
230
+ hideMap:{},
229
231
  flowSummary:"",
230
232
  showStyle: "图形展现",
231
233
  flowStatusCode: {
@@ -350,6 +352,9 @@
350
352
  default:
351
353
  let assignee = item.taskAssignee || "";
352
354
  if(assignee.indexOf("completeSign") > -1){
355
+ if(!item.endTime){
356
+ this.hideMap[item.id] = true;
357
+ }
353
358
  assignee = assignee.substring(0,assignee.lastIndexOf("completeSign"));
354
359
  }
355
360
  if(assignee.indexOf("revoke") > -1){
@@ -559,6 +564,12 @@
559
564
  if(b.activityType == "startEvent"){
560
565
  return 1;
561
566
  }
567
+ if(a.activityType == "noneEndEvent"){
568
+ return 1;
569
+ }
570
+ if(b.activityType == "noneEndEvent"){
571
+ return -1;
572
+ }
562
573
  if(a.activityId == b.activityId){
563
574
  return a.endTime - b.endTime;
564
575
  }
@@ -2,7 +2,7 @@
2
2
  <flow-inst-tab :flow-id="useFlowId" :userArr="userArr" :userMap="userMap"
3
3
  :operateRootArr="operateArr" :dataPermis="dataPermis"
4
4
  :initFormInfo="initFormInfo" :saveFormInfo="saveFormInfo" :class='flowViewMainClass'
5
- :flow-next-operation="flowNextOperation">
5
+ :flow-next-operation="flowNextOperation" :getFormInfo="getFormInfo">
6
6
  <template slot="formInfo">
7
7
  <slot name="formInfo"></slot>
8
8
  </template>
@@ -21,6 +21,7 @@
21
21
  operateArr:{type:Array,default:null},
22
22
  initFormInfo:{type: Function,default:null}, // 添加修改打开表单时执行的事件
23
23
  saveFormInfo:{type: Function,default:null}, // 保存表单时执行的事件
24
+ getFormInfo:{type: Function,default:null}, // 获取表单内容,以方便进行表单信息修改
24
25
  flowNextOperation:{type: Function,default:null} // 流程下一步时的参数回调事件
25
26
  },
26
27
  data(){