sasp-flow-render 1.1.2 → 1.1.3

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.
@@ -32,6 +32,9 @@
32
32
  :open-add-flow-form="openAddFlowForm"
33
33
  :open-update-flow-form="openUpdateFlowForm"
34
34
  :open-batch-update-flow-form="openBatchUpdateFlowForm"
35
+ :formImpMethod="formImpMethod"
36
+ :flowImpParamObj="flowImpParamObj"
37
+ :downloadTemplate="downloadTemplate"
35
38
  >
36
39
  </flow-inst-list>
37
40
  </el-tab-pane>
@@ -267,7 +270,7 @@
267
270
  </el-dialog>
268
271
 
269
272
 
270
- <el-dialog :close-on-click-modal=false :title="'下一步' + (nextNodeName ? (' -> ' + nextNodeName) : '')"
273
+ <el-dialog :close-on-click-modal=false :title="'下一步' + (nextNodeName ? (isProceedNext?' -> ' + nextNodeName:'->等待他人处理') : '')"
271
274
  :top="nextNode.nextType != 'inclusiveGateway' ? '20vh': '10vh'" append-to-body
272
275
  width="500px" :visible.sync="nextSteptUserDialog" @closed="closeNextSteptUserDialog">
273
276
  <el-form label-width="100px" size="small" v-if="nextNode.nodeType != 'EndEvent'">
@@ -290,7 +293,7 @@
290
293
  </div>
291
294
  </el-form-item>
292
295
  </fieldset>
293
- <el-form-item label="下一步执行人" v-if="nextNode.nextType != 'inclusiveGateway'">
296
+ <el-form-item label="下一步执行人" v-if="nextNode.nextType != 'inclusiveGateway' && isProceedNext">
294
297
  <el-select v-model="chooseNextUserId" v-if="nextSteptUserType != 'all' && nextSteptUserDialog"
295
298
  :multiple="mulitiChooseUser" filterable style="width:100%">
296
299
  <el-option v-for="item in nextSteptUserArr" :key="item.id" :value="item.id"
@@ -310,9 +313,12 @@
310
313
  <el-input type="textarea" :rows="5" v-model="description"></el-input>
311
314
  </el-form-item>
312
315
  </fieldset>
313
- <el-form-item label="附加说明" v-if="nextNode.nextType != 'inclusiveGateway'">
316
+ <el-form-item label="附加说明" v-if="nextNode.nextType != 'inclusiveGateway' && isProceedNext">
314
317
  <el-input type="textarea" :rows="5" v-model="description"></el-input>
315
318
  </el-form-item>
319
+ <el-form-item v-if="nextNode.nextType != 'inclusiveGateway' && !isProceedNext" label-width="0">
320
+ <div>请等待其他人员处理完成。</div>
321
+ </el-form-item>
316
322
  </el-form>
317
323
  <div v-if="nextNode.nodeType == 'EndEvent'">流程即将结束,是否继续?</div>
318
324
  <div slot="footer" class="dialog-footer">
@@ -341,7 +347,7 @@
341
347
  </el-dialog>
342
348
 
343
349
  <el-dialog :close-on-click-modal=false title="选择加签人" top="5vh" width="80%" height="80%"
344
- :visible.sync="completeSignDialog" append-to-body>
350
+ :visible.sync="completeSignDialog" append-to-body @closed="disableSign = false">
345
351
  <!-- <sys-org-pos-user-select ref="completeSignRef"-->
346
352
  <!-- :filterUserParam="{'commonUserType':'common','filterLoginUser':'Y'}"-->
347
353
  <!-- :ognEnable="false"-->
@@ -354,13 +360,13 @@
354
360
  v-if="completeSignDialog">
355
361
  </user-select>
356
362
  <div slot="footer" class="dialog-footer">
357
- <el-button type="primary" size="small" @click="sureCompleteSign()">确定</el-button>
363
+ <el-button type="primary" size="small" @click="sureCompleteSign()" :disabled="disableSign">确定</el-button>
358
364
  <el-button size="small" @click="completeSignDialog = false">取消</el-button>
359
365
  </div>
360
366
  </el-dialog>
361
367
 
362
368
  <el-dialog :close-on-click-modal=false title="选择转签人" top="5vh" width="80%" height="80%"
363
- :visible.sync="turnSignDialog" append-to-body>
369
+ :visible.sync="turnSignDialog" append-to-body @closed="disableSign = false">
364
370
  <!-- <sys-org-pos-user-select ref="turnSignRef"-->
365
371
  <!-- :filterUserParam="{'commonUserType':'common' }"-->
366
372
  <!-- :ognEnable="false"-->
@@ -374,7 +380,7 @@
374
380
  v-if="turnSignDialog">
375
381
  </user-select>
376
382
  <div slot="footer" class="dialog-footer">
377
- <el-button type="primary" size="small" @click="sureTurnSign()">确定</el-button>
383
+ <el-button type="primary" size="small" @click="sureTurnSign()" :disabled="disableSign">确定</el-button>
378
384
  <el-button size="small" @click="turnSignDialog = false">取消</el-button>
379
385
  </div>
380
386
  </el-dialog>
@@ -466,7 +472,10 @@
466
472
  saveFormInfo:{type: Function,default:null}, // 保存表单时执行的事件
467
473
  getFormInfo:{type: Function,default:null}, // 获取表单内容,以方便进行表单信息修改
468
474
  dataPermis:{type:String,default:''},
469
- flowNextOperation:{type: Function,default:null} // 流程下一步时的参数回调事件
475
+ flowNextOperation:{type: Function,default:null}, // 流程下一步时的参数回调事件
476
+ formImpMethod:{type: Function,default: null},
477
+ flowImpParamObj: {type: Object,default: () => ({})},
478
+ downloadTemplate: {type: Function, default: null},
470
479
  },
471
480
  data() {
472
481
  let vm = this;
@@ -587,7 +596,7 @@
587
596
  icon: "saspiconfont pl-icon-yizhongzhi",
588
597
  show: false,
589
598
  method: () => {
590
- this.axios.post(this.api.plFlowInst.stopFlow, {
599
+ this.saspFlowAxios.post(this.api.plFlowInst.stopFlow, {
591
600
  instId: this.currentInst.flowInstId, type: "0",
592
601
  procInstId: this.currentInst.linkProcId,
593
602
  taskId: this.currentInst.taskId
@@ -612,7 +621,7 @@
612
621
  dataId:this.formInfo.dataId,
613
622
  instType:"stopped"
614
623
  };
615
- this.axios.post(this.api.plFlowInst.saveRemind,remindParam);
624
+ this.saspFlowAxios.post(this.api.plFlowInst.saveRemind,remindParam);
616
625
 
617
626
  //执行事件规则
618
627
  let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode] ||{};
@@ -634,7 +643,7 @@
634
643
  show: false,
635
644
  isView: true,
636
645
  method: () => {
637
- this.axios.post(this.api.plFlowInst.revokeFlow, {
646
+ this.saspFlowAxios.post(this.api.plFlowInst.revokeFlow, {
638
647
  instId: this.currentInst.flowInstId,
639
648
  taskId: this.currentInst.taskId
640
649
  }).then(res => {
@@ -654,7 +663,7 @@
654
663
  dataId:this.formInfo.dataId,
655
664
  instType:"cancel"
656
665
  };
657
- this.axios.post(this.api.plFlowInst.saveRemind,remindParam);
666
+ this.saspFlowAxios.post(this.api.plFlowInst.saveRemind,remindParam);
658
667
 
659
668
 
660
669
  } else {
@@ -785,6 +794,8 @@
785
794
 
786
795
  nextNodeName:"", // 下一个节点名称
787
796
  nextNode: {},//下一个节点信息
797
+ nowNode: {},//本节点信息
798
+ isProceedNext:true,
788
799
  description: "",//附加说明
789
800
 
790
801
  // 处理、修改、查看流程信息弹窗
@@ -853,6 +864,7 @@
853
864
  currNodeName: "", //当前节点名称
854
865
  nextUserInfo:{}, // 下一步处理人的信息
855
866
  dataId:"", // 表单数据id
867
+ disableSign:false, // 禁用加签转签按钮
856
868
  }
857
869
  },
858
870
  watch:{
@@ -1265,7 +1277,7 @@
1265
1277
  if(this.formInfo.opt == 'add' || this.tabActive == 'draft'){ //版本号也要随之更新
1266
1278
  flowInst = Object.assign(flowInst,{"version":this.flowDefine.releaseVersion,"isRelease":this.flowDefine.isRelease})
1267
1279
  }
1268
- this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1280
+ this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1269
1281
  this.runFlowEvt();
1270
1282
  resolve(instRes.data.operateObj);
1271
1283
  });
@@ -1290,7 +1302,7 @@
1290
1302
  updated: this.loginUser.id,
1291
1303
  };
1292
1304
  }
1293
- this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1305
+ this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1294
1306
  this.runFlowEvt();
1295
1307
  resolve(instRes.data.operateObj);
1296
1308
  this.currentInst=instRes.data.operateObj;
@@ -1346,7 +1358,7 @@
1346
1358
  // if(this.formInfo.opt == 'add' || this.tabActive == 'draft'){ //版本号也要随之更新
1347
1359
  // flowInst = Object.assign(flowInst,{"version":this.flowDefine.releaseVersion,"isRelease":this.flowDefine.isRelease})
1348
1360
  // }
1349
- // this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1361
+ // this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1350
1362
  // resolve(instRes.data);
1351
1363
  // });
1352
1364
  // }else{
@@ -1370,7 +1382,7 @@
1370
1382
  // updated: this.loginUser.id,
1371
1383
  // };
1372
1384
  // }
1373
- // this.axios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1385
+ // this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
1374
1386
  // resolve(instRes.data);
1375
1387
  // this.currentInst=instRes.data;
1376
1388
  // });
@@ -1423,11 +1435,16 @@
1423
1435
  this.currentInst.id = instId;
1424
1436
  this.description = "";
1425
1437
  this.saveInstId = instId;
1438
+ this.nowNode = this.allNodeInfo[currentNodeObj.id] || {};
1439
+ this.isProceedNext = true;
1426
1440
  //获取处理人
1427
- let obj = {instId: instId, taskId: this.currentInst.taskId};
1441
+ let obj = {instId: instId, taskId: this.currentInst.taskId,};
1442
+ if(this.nowNode && this.nowNode.dealType && this.nowNode.dealType == 'multi'){
1443
+ this.$set(obj,'passCondition',this.nowNode.passCondition)
1444
+ }
1428
1445
  let params = {"SASP_FLOW_USE_VARIABLES":"yes"};
1429
1446
  Object.assign(params,flowParams || {},obj);
1430
- this.axios.post(this.api.plFlowInst.getNextUsers, params).then(res => {
1447
+ this.saspFlowAxios.post(this.api.plFlowInst.getNextUsers, params).then(res => {
1431
1448
  if(!res.data.operateSuccess){
1432
1449
  this.isDisabled['nextStep'] = true;
1433
1450
  if(res.data.resultObject === 'requestException'){
@@ -1440,6 +1457,9 @@
1440
1457
  let obj = {};
1441
1458
  if (res && res.data) {
1442
1459
  obj = res.data.operateObj || {};
1460
+ if(res.data.operateMap && res.data.operateMap.isPassCondition == 0){
1461
+ this.isProceedNext = false;
1462
+ }
1443
1463
  }
1444
1464
  this.nextNodeName = "";
1445
1465
  this.choosePosUserIds = "";
@@ -1696,7 +1716,7 @@
1696
1716
  dealerNames = this.chooseNextUserName;
1697
1717
  }
1698
1718
  if (this.nextNode.nodeType != 'EndEvent') {
1699
- if (!this.chooseNextUserId || this.chooseNextUserId.length == 0) {
1719
+ if ((!this.chooseNextUserId || this.chooseNextUserId.length == 0) && this.isProceedNext) {
1700
1720
  this.$message({type: "error", message: "请选择处理人!"});
1701
1721
  this.isDisabled1 = true;
1702
1722
  return;
@@ -1736,12 +1756,15 @@
1736
1756
  nextNodeId: this.nextNode.id,
1737
1757
  nextNodeKey: this.nextNode.nodeLinkId,
1738
1758
  }
1759
+ if(this.nowNode && this.nowNode.dealType && this.nowNode.dealType == 'multi'){
1760
+ this.$set(obj,'passCondition',this.nowNode.passCondition)
1761
+ }
1739
1762
  if(this.flowNextOperation) {
1740
1763
  this.flowNextOperation(obj.instId, obj.dealers, obj.dealerNames, obj.taskId);
1741
1764
  }
1742
1765
  let params = {"SASP_FLOW_USE_VARIABLES":"yes"};
1743
1766
  Object.assign(params,this.flowParams || {},obj);
1744
- this.axios.post(this.api.plFlowInst.executeNextStep,params).then(res => {
1767
+ this.saspFlowAxios.post(this.api.plFlowInst.executeNextStep,params).then(res => {
1745
1768
  if (res && res.data && res.data.operateSuccess) {
1746
1769
  this.initTabNum();
1747
1770
  this.$message({type: "success", message: "提交成功!"});
@@ -1782,7 +1805,7 @@
1782
1805
  dataId:this.formInfo.dataId,
1783
1806
  instType:"end"
1784
1807
  };
1785
- this.axios.post(this.api.plFlowInst.saveRemind,remindParam);
1808
+ this.saspFlowAxios.post(this.api.plFlowInst.saveRemind,remindParam);
1786
1809
  }
1787
1810
  }else{
1788
1811
  console.log("脚本异常")
@@ -1811,7 +1834,8 @@
1811
1834
  checkedUserArr.forEach(item => {
1812
1835
  userIds += "," + item.dataKey;
1813
1836
  });
1814
- this.axios.post(this.api.plFlowInst.completeSign, {
1837
+ this.disableSign = true;
1838
+ this.saspFlowAxios.post(this.api.plFlowInst.completeSign, {
1815
1839
  taskId: this.currentInst.taskId,
1816
1840
  dealers: userIds.substring(1)
1817
1841
  }).then(res => {
@@ -1824,6 +1848,7 @@
1824
1848
  } else {
1825
1849
  this.$message({type: "error", message: "加签失败!"});
1826
1850
  }
1851
+ this.disableSign = false;
1827
1852
  });
1828
1853
  },
1829
1854
 
@@ -1837,7 +1862,8 @@
1837
1862
  return;
1838
1863
  }
1839
1864
  let userId = checkedUserArr[0].dataKey;
1840
- this.axios.post(this.api.plFlowInst.turnSign, {
1865
+ this.disableSign = true;
1866
+ this.saspFlowAxios.post(this.api.plFlowInst.turnSign, {
1841
1867
  taskId: this.currentInst.taskId,
1842
1868
  dealers: userId
1843
1869
  }).then(res => {
@@ -1850,6 +1876,7 @@
1850
1876
  } else {
1851
1877
  this.$message({type: "error", message: "转签失败!"});
1852
1878
  }
1879
+ this.disableSign = false;
1853
1880
  });
1854
1881
 
1855
1882
  },
@@ -1870,7 +1897,7 @@
1870
1897
  cancelButtonText: '取消',
1871
1898
  inputType: 'textarea',
1872
1899
  }).then(({ value }) => {
1873
- this.axios.post(this.api.plFlowInst.backRewrite,
1900
+ this.saspFlowAxios.post(this.api.plFlowInst.backRewrite,
1874
1901
  {
1875
1902
  taskId:currentInst.taskId,
1876
1903
  remarks: value
@@ -1910,7 +1937,7 @@
1910
1937
  confirmButtonText: '确定',
1911
1938
  cancelButtonText: '取消',
1912
1939
  }).then(() => {
1913
- this.axios.post(this.api.plFlowInst.getBackRewrite,
1940
+ this.saspFlowAxios.post(this.api.plFlowInst.getBackRewrite,
1914
1941
  {
1915
1942
  flowInstId: currentInst.flowInstId,
1916
1943
  }).then(res => {
@@ -2107,7 +2134,7 @@
2107
2134
 
2108
2135
  // getDefaultUser(orgChargeField,supervisorField,levels,resolve){
2109
2136
  // if(orgChargeField.length > 0 && supervisorField.length > 0){
2110
- // this.axios.post(this.api.sysOrgPosUser.getDeptSupervisorByUserId,
2137
+ // this.saspFlowAxios.post(this.api.sysOrgPosUser.getDeptSupervisorByUserId,
2111
2138
  // {userId:this.loginUser.id}).then(res => {
2112
2139
  // if(res && res.data){
2113
2140
  // let userId = (res.data[0] || {}).id;
@@ -2116,7 +2143,7 @@
2116
2143
  // });
2117
2144
  // }
2118
2145
  //
2119
- // this.axios.post(this.api.sysOrgPosUser.getSupervisorByLevels,
2146
+ // this.saspFlowAxios.post(this.api.sysOrgPosUser.getSupervisorByLevels,
2120
2147
  // {userId:this.loginUser.id,levels:levels.substring(1)}).then(res => {
2121
2148
  // if(res && res.data){
2122
2149
  // let userIdMap = res.data || {};
@@ -2128,7 +2155,7 @@
2128
2155
  // });
2129
2156
  // });
2130
2157
  // }else if(orgChargeField.length > 0){
2131
- // this.axios.post(this.api.sysOrgPosUser.getDeptSupervisorByUserId,
2158
+ // this.saspFlowAxios.post(this.api.sysOrgPosUser.getDeptSupervisorByUserId,
2132
2159
  // {userId:this.loginUser.id}).then(res => {
2133
2160
  // if (res && res.data) {
2134
2161
  // let userId = (res.data[0] || {}).id;
@@ -2139,7 +2166,7 @@
2139
2166
  // }
2140
2167
  // });
2141
2168
  // }else if(supervisorField.length > 0){
2142
- // this.axios.post(this.api.sysOrgPosUser.getSupervisorByLevels,
2169
+ // this.saspFlowAxios.post(this.api.sysOrgPosUser.getSupervisorByLevels,
2143
2170
  // {userId:this.loginUser.id,levels:levels.substring(1)}).then(res => {
2144
2171
  // if(res && res.data){
2145
2172
  // let userIdMap = res.data || {};
@@ -2176,7 +2203,7 @@
2176
2203
  * 恢复方法
2177
2204
  */
2178
2205
  restoreFlow() {
2179
- this.axios.post(this.api.plFlowInst.stopFlow, {
2206
+ this.saspFlowAxios.post(this.api.plFlowInst.stopFlow, {
2180
2207
  instId: this.currentInst.flowInstId, type: "1",
2181
2208
  procInstId: this.currentInst.linkProcId,
2182
2209
  taskId: this.currentInst.taskId
@@ -2209,12 +2236,12 @@
2209
2236
 
2210
2237
  initTabNum() {
2211
2238
  this.initMessageFunc && this.initMessageFunc();
2212
- this.axios.all([
2213
- this.axios.post(this.api.plFlowInst.getTabsNum,
2239
+ this.saspFlowAxios.all([
2240
+ this.saspFlowAxios.post(this.api.plFlowInst.getTabsNum,
2214
2241
  {flowId: this.flowData.flowId, type: "1"}),
2215
- this.axios.post(this.api.plFlowInst.getTabsNum,
2242
+ this.saspFlowAxios.post(this.api.plFlowInst.getTabsNum,
2216
2243
  {flowId: this.flowData.flowId, type: "2"}),
2217
- ]).then(this.axios.spread((res1, res2) => {
2244
+ ]).then(this.saspFlowAxios.spread((res1, res2) => {
2218
2245
  Object.assign(this.numberObj, res1.data, res2.data);
2219
2246
  }));
2220
2247
  },
@@ -2355,10 +2382,10 @@
2355
2382
  */
2356
2383
  initFlowScript(){
2357
2384
  return new Promise(resolve => {
2358
- this.axios.all([
2359
- this.axios.post(this.api.plFlowScript.find,{"flowId":this.flowData.flowId}),
2360
- this.axios.post(this.api.plFlowEventDetail.findByFlowAndLeadFunc,{"flowId":this.flowData.flowId,"version":this.flowDefine.flowVersion||"1.0"})
2361
- ]).then(this.axios.spread((resScript, resEvent) => {
2385
+ this.saspFlowAxios.all([
2386
+ this.saspFlowAxios.post(this.api.plFlowScript.find,{"flowId":this.flowData.flowId}),
2387
+ this.saspFlowAxios.post(this.api.plFlowEventDetail.findByFlowAndLeadFunc,{"flowId":this.flowData.flowId,"version":this.flowDefine.flowVersion||"1.0"})
2388
+ ]).then(this.saspFlowAxios.spread((resScript, resEvent) => {
2362
2389
  // 流程脚本
2363
2390
  if(resScript){
2364
2391
  let scriptDatas = resScript.data || [];
@@ -2613,7 +2640,7 @@
2613
2640
  // }
2614
2641
  // let CTX = window.JAVA_URL;
2615
2642
  let CTX = "";
2616
- let paramValues = [this,this.axios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode,null]; // 入参
2643
+ let paramValues = [this,this.saspFlowAxios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode,null]; // 入参
2617
2644
  if(executePosition == "add" || executePosition == "update"){
2618
2645
  ((this.scriptObj[executePosition] || {})[executeTime] || []).forEach(event => {
2619
2646
  event && event(...paramValues); // 执行事件
@@ -2655,7 +2682,7 @@
2655
2682
  //执行自定义脚本
2656
2683
  // let CTX = window.JAVA_URL;
2657
2684
  let CTX = "";
2658
- let paramValues = [this,this.axios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode]; // 入参
2685
+ let paramValues = [this,this.saspFlowAxios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode]; // 入参
2659
2686
  if(executeType == "addAfter" || executeType == "editAfter"){ //新增或者修改后
2660
2687
  (this.newScriptObj[executeType] || []).forEach(event => {
2661
2688
  event && event(...paramValues); // 执行事件
@@ -2668,7 +2695,7 @@
2668
2695
  && this.installListObj[eventKey]["config"].methods.renderFlowConfig){
2669
2696
  let affectContentArr = this.newEventObj[executeType][eventKey] || [];
2670
2697
  affectContentArr.forEach(affectContent =>{
2671
- this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.axios,this.nextNode,formData,affectContent);
2698
+ this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.saspFlowAxios,this.nextNode,formData,affectContent);
2672
2699
  });
2673
2700
  }
2674
2701
  });
@@ -2691,7 +2718,7 @@
2691
2718
  && this.installListObj[eventKey]["config"].methods.renderFlowConfig){
2692
2719
  let affectContentArr = eventObj[eventKey] || [];
2693
2720
  affectContentArr.forEach(affectContent =>{
2694
- this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.axios,this.nextNode,formData,affectContent,executeType);
2721
+ this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.saspFlowAxios,this.nextNode,formData,affectContent,executeType);
2695
2722
  });
2696
2723
  }
2697
2724
  });
@@ -2706,7 +2733,7 @@
2706
2733
  // && this.installListObj[affect.eventKey]["config"].methods.renderTableViewConfig){
2707
2734
  // //调用渲染方法
2708
2735
  // this.$set(affect,"field",field);//当前响应控件
2709
- // this.installListObj[affect.eventKey]["config"].methods.renderTableViewConfig(this,this.CTX,this.axios,this.dataAllObj,affect);
2736
+ // this.installListObj[affect.eventKey]["config"].methods.renderTableViewConfig(this,this.CTX,this.saspFlowAxios,this.dataAllObj,affect);
2710
2737
  // }
2711
2738
 
2712
2739
 
@@ -2803,7 +2830,7 @@
2803
2830
  async getFlowAgent() {
2804
2831
  this.agentTitle = "\"" + this.flowDefine.flowName + "\"" + " 流程设置";
2805
2832
  this.agentFormObj.userId = this.loginUser.id;
2806
- let flowAgentRes = await this.axios.post(this.api.plFlowSetting.getByUserFlowId, {
2833
+ let flowAgentRes = await this.saspFlowAxios.post(this.api.plFlowSetting.getByUserFlowId, {
2807
2834
  flowId: this.flowData.flowId,
2808
2835
  userId: this.loginUser.id
2809
2836
  });
@@ -2861,7 +2888,7 @@
2861
2888
  */
2862
2889
  retSpecified(currentInst){
2863
2890
  let flowInstId = currentInst.flowInstId;
2864
- this.axios.post(this.api.plFlowInst.getBackData,{"flowInstId":flowInstId}).then(res => {
2891
+ this.saspFlowAxios.post(this.api.plFlowInst.getBackData,{"flowInstId":flowInstId}).then(res => {
2865
2892
  this.backNodeArr = [];
2866
2893
  if(res.data.operateSuccess){
2867
2894
  let result = res.data.resultObject || [];
@@ -2899,7 +2926,7 @@
2899
2926
  return;
2900
2927
  }
2901
2928
  this.isDisabled2 = false;
2902
- this.axios.post(this.api.plFlowInst.skipToNode,
2929
+ this.saspFlowAxios.post(this.api.plFlowInst.skipToNode,
2903
2930
  {"instId":this.currentInst.flowInstId,"skipNode":this.backNodeId,
2904
2931
  "backMsg":this.backMsg,"skipStatus":"skip"}).then(res => {
2905
2932
  if(res.data.operateSuccess){
@@ -275,7 +275,7 @@
275
275
  init() {
276
276
  this.flowInstNodeArr = [];
277
277
  this.loading = true;
278
- this.axios.post(this.api.plFlowInst.getHistoryActInst,{"flowInstId":this.instId}).then(res => {
278
+ this.saspFlowAxios.post(this.api.plFlowInst.getHistoryActInst,{"flowInstId":this.instId}).then(res => {
279
279
  if(!res.data.operateSuccess){
280
280
  this.$message.error(res.data.operateMessage);
281
281
  return;
@@ -209,7 +209,7 @@
209
209
  return;
210
210
  }
211
211
  this.loading = true;
212
- this.axios.post(this.api.plFlowInstNodeResult.listNoPageByResult, {
212
+ this.saspFlowAxios.post(this.api.plFlowInstNodeResult.listNoPageByResult, {
213
213
  "flowInstId": this.flowInstId
214
214
  }).then(res => {
215
215
  this.flowInstNodeArr = this.sortFlowInstNode(res.data);
@@ -564,4 +564,4 @@
564
564
  }
565
565
  }
566
566
  }
567
- </style>
567
+ </style>
@@ -113,7 +113,7 @@
113
113
  init(){
114
114
  this.loading = true;
115
115
  // 先载入系统接口数据
116
- this.axios.post(this.api.plFlowInterface.find,{interStatus:'1',interType:'sys'}).then(res => {
116
+ this.saspFlowAxios.post(this.api.plFlowInterface.find,{interStatus:'1',interType:'sys'}).then(res => {
117
117
  (res.data || []).forEach(item => {
118
118
  this.sysInterfaceObj[item.sysInterName] = item;
119
119
  })
@@ -130,7 +130,7 @@
130
130
  */
131
131
  loadUserData(){
132
132
  let dataInter = this.sysInterfaceObj['userData'];
133
- this.axios.post(this.api.plFlowDomain.findRealUrl,{status:'1'}).then(res => {
133
+ this.saspFlowAxios.post(this.api.plFlowDomain.findRealUrl,{status:'1'}).then(res => {
134
134
  (res.data || []).forEach(item => {
135
135
  this.doMainDatasObj[item.id] = item.domainUrl;
136
136
  })
@@ -380,7 +380,7 @@
380
380
  obj[item.key] = item.value || ""; // 注意这里要replace ${userCode}
381
381
  })
382
382
  if(dataInter.requestType === 'post'){
383
- this.axios.post(url,obj).then(res => {
383
+ this.saspFlowAxios.post(url,obj).then(res => {
384
384
  this.INTER_CACHE.setCacheInfo(dataInter.sysInterName,res.data);
385
385
  resolve(res.data || []);
386
386
  })
@@ -398,7 +398,7 @@
398
398
  url += "?" + params;
399
399
  }
400
400
  }
401
- this.axios(url).then(res => {
401
+ this.saspFlowAxios(url).then(res => {
402
402
  this.INTER_CACHE.setCacheInfo(dataInter.sysInterName,res.data);
403
403
  resolve(res.data || []);
404
404
  })
@@ -2,7 +2,8 @@
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" :getFormInfo="getFormInfo">
5
+ :flow-next-operation="flowNextOperation" :getFormInfo="getFormInfo" :formImpMethod="formImpMethod"
6
+ :flowImpParamObj="flowImpParamObj" :downloadTemplate="downloadTemplate">
6
7
  <template slot="formInfo">
7
8
  <slot name="formInfo"></slot>
8
9
  </template>
@@ -22,7 +23,10 @@
22
23
  initFormInfo:{type: Function,default:null}, // 添加修改打开表单时执行的事件
23
24
  saveFormInfo:{type: Function,default:null}, // 保存表单时执行的事件
24
25
  getFormInfo:{type: Function,default:null}, // 获取表单内容,以方便进行表单信息修改
25
- flowNextOperation:{type: Function,default:null} // 流程下一步时的参数回调事件
26
+ flowNextOperation:{type: Function,default:null}, // 流程下一步时的参数回调事件
27
+ formImpMethod:{type: Function,default:null},
28
+ flowImpParamObj: {type: Object,default: () => ({})},
29
+ downloadTemplate: {type: Function, default: null},
26
30
  },
27
31
  data(){
28
32
  return {
@@ -41,7 +45,7 @@
41
45
  },
42
46
  methods:{
43
47
  loadSkin() {
44
- this.axios.post(this.api.plFlowCss.find, {
48
+ this.saspFlowAxios.post(this.api.plFlowCss.find, {
45
49
  'useable': '1',
46
50
  'order': 'PRIORITY ASC,UPDATE_TIME ASC',
47
51
  "applyType":"0"
@@ -96,7 +100,7 @@
96
100
  this.userMap = this.INTER_CACHE.getUserMap();
97
101
  this.userArr = userArr;
98
102
  }else{
99
- this.axios.post(this.api.plFlowInterface.find,{sysInterName:'userData',interType:'sys',interStatus:'1'}).then(res => {
103
+ this.saspFlowAxios.post(this.api.plFlowInterface.find,{sysInterName:'userData',interType:'sys',interStatus:'1'}).then(res => {
100
104
  if((res.data || []).length == 0){
101
105
  return;
102
106
  }
@@ -106,7 +110,7 @@
106
110
  }
107
111
  },
108
112
  loadUserData(dataInter){
109
- this.axios.post(this.api.plFlowDomain.findRealUrl,{status:'1'}).then(res => {
113
+ this.saspFlowAxios.post(this.api.plFlowDomain.findRealUrl,{status:'1'}).then(res => {
110
114
  (res.data || []).forEach(item => {
111
115
  this.doMainDatasObj[item.id] = item.domainUrl;
112
116
  })
@@ -150,7 +154,7 @@
150
154
  obj[item.key] = item.value || ""; // 注意这里要replace ${userCode}
151
155
  })
152
156
  if(dataInter.requestType === 'post'){
153
- this.axios.post(url,obj).then(res => {
157
+ this.saspFlowAxios.post(url,obj).then(res => {
154
158
  this.INTER_CACHE.setCacheInfo(dataInter.sysInterName,res.data);
155
159
  resolve(res.data || []);
156
160
  })
@@ -168,7 +172,7 @@
168
172
  url += "?" + params;
169
173
  }
170
174
  }
171
- this.axios(url).then(res => {
175
+ this.saspFlowAxios(url).then(res => {
172
176
  this.INTER_CACHE.setCacheInfo(dataInter.sysInterName,res.data);
173
177
  resolve(res.data || []);
174
178
  })
@@ -94,7 +94,7 @@
94
94
  menuObj = window.menuIdToMenuObj[this.menuId];
95
95
  }else{
96
96
  //新窗口打开时查询菜单信息
97
- this.axios.post(this.api.menu.getById,{id:this.menuId}).then(function (res) {
97
+ this.saspFlowAxios.post(this.api.menu.getById,{id:this.menuId}).then(function (res) {
98
98
  if(res && res.data){
99
99
  menuObj = res.data;
100
100
  }
@@ -225,7 +225,7 @@
225
225
  // * 获取资源池对象
226
226
  // */
227
227
  // async getResources(){
228
- // let res = await this.axios.post(this.api.resources.findResources,{id:this.resourceId,rType:"page"}); //查询自定义表单中资源池数据
228
+ // let res = await this.saspFlowAxios.post(this.api.resources.findResources,{id:this.resourceId,rType:"page"}); //查询自定义表单中资源池数据
229
229
  // if(res.data && res.data.operateObj){
230
230
  // this.resourceObj = res.data.operateObj[0]; //当前资源池
231
231
  // }
@@ -242,7 +242,7 @@
242
242
 
243
243
  },
244
244
  async initReousrceObj(){
245
- let res = await vm.axios.post(this.api.resources.findResources,{'rSource':rSource,'rStatus':'1','rKey':this.rKey}); //获取绑定资源数据
245
+ let res = await this.saspFlowAxios.post(this.api.resources.findResources,{'rSource':rSource,'rStatus':'1','rKey':this.rKey}); //获取绑定资源数据
246
246
  if(res.data && res.data.operateObj){
247
247
  res.data.operateObj.forEach(item =>{
248
248
  this.sourcesObj[item.rkey] = item;
@@ -66,7 +66,7 @@
66
66
  let resourceObj = this.resourceObj;
67
67
  this.flowId = resourceObj.rkey || '';
68
68
  if(this.flowId){
69
- /*await this.axios.post(this.api.plFlowDefine.getById, {"id":this.flowId}).then(res=>{
69
+ /*await this.saspFlowAxios.post(this.api.plFlowDefine.getById, {"id":this.flowId}).then(res=>{
70
70
  if(res.data){
71
71
  this.flowObj=res.data;
72
72
  }
@@ -113,7 +113,7 @@
113
113
 
114
114
  this.isShow = true;
115
115
  }else{ //根据 resourceId查询当前用户是否存在 资源权限 resourceId 如果存在获取数据权限和操作权限
116
- this.axios.post(this.api.auth.getOwnMenuOpt,{userId:loginUser.id,userType:loginUser.userType,optType:'source'}).then(res =>{
116
+ this.saspFlowAxios.post(this.api.auth.getOwnMenuOpt,{userId:loginUser.id,userType:loginUser.userType,optType:'source'}).then(res =>{
117
117
  if(res && res.data){
118
118
  let roleOptArr = [];
119
119
  (res.data || []).forEach(item =>{
@@ -190,7 +190,7 @@
190
190
  // * 获取资源池对象
191
191
  // */
192
192
  // async getResources(){
193
- // let res = await this.axios.post(this.api.resources.findResources,{id:this.resourceId,rType:"page"}); //查询自定义表单中资源池数据
193
+ // let res = await this.saspFlowAxios.post(this.api.resources.findResources,{id:this.resourceId,rType:"page"}); //查询自定义表单中资源池数据
194
194
  // if(res.data && res.data.operateObj){
195
195
  // this.resourceObj = res.data.operateObj[0]; //当前资源池
196
196
  // }
@@ -207,7 +207,7 @@
207
207
 
208
208
  },
209
209
  async initReousrceObj(){
210
- let res = await vm.axios.post(this.api.resources.findResources,{'rSource':rSource,'rStatus':'1','rKey':this.rKey}); //获取绑定资源数据
210
+ let res = await this.saspFlowAxios.post(this.api.resources.findResources,{'rSource':rSource,'rStatus':'1','rKey':this.rKey}); //获取绑定资源数据
211
211
  if(res.data && res.data.operateObj){
212
212
  res.data.operateObj.forEach(item =>{
213
213
  this.sourcesObj[item.rkey] = item;
@@ -166,8 +166,8 @@ let eventObj = {}; //事件对象
166
166
 
167
167
  export default {
168
168
  name: "loadEventPlugin",
169
- installAll(Vue){
170
- axios.post(apiFlow.apis.eventRule.findByVersion,{"eventTypes":"flow"}).then(res =>{ //查询流程相关事件规则
169
+ installAll(Vue,opts){
170
+ opts.saspFlowAxios.post(apiFlow.apis.eventRule.findByVersion,{"eventTypes":"flow"}).then(res =>{ //查询流程相关事件规则
171
171
  let eventPlugin = Vue.prototype.EVENT_PLUGIN || {};
172
172
  if(res){
173
173
  Object.keys(diyEventObjs).forEach(key =>{
@@ -279,4 +279,4 @@ export default {
279
279
  });
280
280
 
281
281
  }
282
- }
282
+ }