sasp-flow-render 1.1.2 → 1.1.5
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/index.js +47 -33
- package/package.json +2 -1
- package/router.js +0 -1
- package/src/assets/js/api/apiFlow.js +17 -0
- package/src/assets/js/global/cacheGlobal.js +1 -1
- package/src/assets/js/global/flowGlobal.js +1 -1
- package/src/assets/js/global/flowUserGlobal.js +1 -1
- package/src/components/flowChart.vue +4 -4
- package/src/components/flowInst/flowInstList.vue +160 -27
- package/src/components/flowInst/flowInstTab.vue +464 -63
- package/src/components/flowNewBatchDeal.vue +485 -0
- package/src/components/flowRoamRecords.vue +1 -1
- package/src/components/roamRecord.vue +2 -2
- package/src/components/userSelect.vue +4 -4
- package/src/views/flowInstView.vue +17 -8
- package/src/views/menuRouter/flowMenuRouter.vue +3 -3
- package/src/views/menuRouter/flowResRouter.vue +4 -4
- package/src/views/popup/event/js/loadFlowEventPlugin.js +3 -3
- package/src/components/messageMould/messageMould.vue +0 -547
|
@@ -32,14 +32,17 @@
|
|
|
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>
|
|
38
41
|
<el-tab-pane name="pending" v-if="tabShow('pending')" style="height: 100%;">
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{{tabTypeObj['showtTabText']? tabTypeObj['pending'].tabName : ''}}
|
|
42
|
-
|
|
42
|
+
<span slot="label">
|
|
43
|
+
<i v-if="tabTypeObj['showTabIcon']" :class="tabTypeObj['pending'].iconShow"></i>
|
|
44
|
+
{{ tabTypeObj['showtTabText'] ? tabTypeObj['pending'].tabName : '' }}
|
|
45
|
+
<span style="color: red">({{ numberObj['pending'] }})</span>
|
|
43
46
|
</span>
|
|
44
47
|
<flow-inst-list ref="pendingRef"
|
|
45
48
|
tab-type="pending"
|
|
@@ -55,11 +58,13 @@
|
|
|
55
58
|
:start-node-key-obj="startNodeKeyObj"
|
|
56
59
|
:flow-version-node-obj="flowVersionNodeObj"
|
|
57
60
|
@initTabNum="initTabNum"
|
|
58
|
-
|
|
61
|
+
:getFormDataByDataIds="getFormDataByDataIds"
|
|
59
62
|
:open-flow-chart="openFlowChart"
|
|
60
63
|
:open-flow-record="openFlowRecord"
|
|
61
64
|
:open-update-flow-form="openUpdateFlowForm"
|
|
62
65
|
:open-batch-update-flow-form="openBatchUpdateFlowForm"
|
|
66
|
+
:openNewBatchUpdateFlowForm="openNewBatchUpdateFlowForm"
|
|
67
|
+
@setDataValue="setDataValue"
|
|
63
68
|
>
|
|
64
69
|
</flow-inst-list>
|
|
65
70
|
</el-tab-pane>
|
|
@@ -217,7 +222,7 @@
|
|
|
217
222
|
<!-- </table-form-render>-->
|
|
218
223
|
|
|
219
224
|
<div slot="footer" style="height:31px;" class="dialog-footer">
|
|
220
|
-
<div>
|
|
225
|
+
<div v-if="!formSearchObj.isNewSelectBatchDeal">
|
|
221
226
|
<el-button v-for="btn in formBtnArr" @click="btn.method" :disabled="isDisabled[btn.btnType]?false:true"
|
|
222
227
|
v-show="btn.show && ((formInfo.opt != 'view') || (formInfo.opt=='view' && btn.isView))"
|
|
223
228
|
:key="btn.btnType"
|
|
@@ -227,6 +232,14 @@
|
|
|
227
232
|
{{btn.text}}
|
|
228
233
|
</el-button>
|
|
229
234
|
</div>
|
|
235
|
+
<div v-else>
|
|
236
|
+
<el-button v-for="btn in formNewBtnArr" @click="btn.method"
|
|
237
|
+
:key="btn.btnType"
|
|
238
|
+
:type="btn.type"
|
|
239
|
+
:icon="btn.icon"
|
|
240
|
+
size="small">{{btn.text}}
|
|
241
|
+
</el-button>
|
|
242
|
+
</div>
|
|
230
243
|
</div>
|
|
231
244
|
</el-dialog>
|
|
232
245
|
|
|
@@ -266,8 +279,23 @@
|
|
|
266
279
|
</div>
|
|
267
280
|
</el-dialog>
|
|
268
281
|
|
|
282
|
+
<!--新版批量处理信息弹窗-->
|
|
283
|
+
<el-dialog title="批量处理" :close-on-click-modal=false top="5vh" width="90%" height="90%" :visible.sync="flowBatchSelectPendingDialog"
|
|
284
|
+
@close="newBatchDealClose" class="batchSelectDialog" append-to-body>
|
|
285
|
+
<flow-new-batch-deal v-if="flowBatchSelectPendingDialog" :formSearchObj="formSearchObj" ref="flowNewBatchDealRef"
|
|
286
|
+
:formDataObj="formDataObj" :allNodeInfo="allNodeInfo" :newBatchDealSubmit="newBatchDealSubmit"
|
|
287
|
+
@openCurrUpdateFlowForm="openCurrUpdateFlowForm" :isRefreshGetNextUsers="isRefreshGetNextUsers"
|
|
288
|
+
:userMap="userMap" :fieldSysDataObj="fieldSysDataObj" :sysDataObj="sysDataObj" :formFieldObj="formFieldObj"
|
|
289
|
+
>
|
|
290
|
+
</flow-new-batch-deal>
|
|
291
|
+
<div slot="footer" class="dialog-footer">
|
|
292
|
+
<el-button type="primary" size="small" @click="newBatchDealAllSubmit">全部提交</el-button>
|
|
293
|
+
<el-button size="small" @click="flowBatchSelectPendingDialog = false">取消</el-button>
|
|
294
|
+
</div>
|
|
295
|
+
</el-dialog>
|
|
269
296
|
|
|
270
|
-
|
|
297
|
+
<!--流程下一步处理人选择弹窗-->
|
|
298
|
+
<el-dialog :close-on-click-modal=false :title="'下一步' + (nextNodeName ? (isProceedNext?' -> ' + nextNodeName:'->等待他人处理') : '')"
|
|
271
299
|
:top="nextNode.nextType != 'inclusiveGateway' ? '20vh': '10vh'" append-to-body
|
|
272
300
|
width="500px" :visible.sync="nextSteptUserDialog" @closed="closeNextSteptUserDialog">
|
|
273
301
|
<el-form label-width="100px" size="small" v-if="nextNode.nodeType != 'EndEvent'">
|
|
@@ -290,7 +318,7 @@
|
|
|
290
318
|
</div>
|
|
291
319
|
</el-form-item>
|
|
292
320
|
</fieldset>
|
|
293
|
-
<el-form-item label="下一步执行人" v-if="nextNode.nextType != 'inclusiveGateway'">
|
|
321
|
+
<el-form-item label="下一步执行人" v-if="nextNode.nextType != 'inclusiveGateway' && isProceedNext">
|
|
294
322
|
<el-select v-model="chooseNextUserId" v-if="nextSteptUserType != 'all' && nextSteptUserDialog"
|
|
295
323
|
:multiple="mulitiChooseUser" filterable style="width:100%">
|
|
296
324
|
<el-option v-for="item in nextSteptUserArr" :key="item.id" :value="item.id"
|
|
@@ -310,9 +338,12 @@
|
|
|
310
338
|
<el-input type="textarea" :rows="5" v-model="description"></el-input>
|
|
311
339
|
</el-form-item>
|
|
312
340
|
</fieldset>
|
|
313
|
-
<el-form-item label="附加说明" v-if="nextNode.nextType != 'inclusiveGateway'">
|
|
341
|
+
<el-form-item label="附加说明" v-if="nextNode.nextType != 'inclusiveGateway' && isProceedNext">
|
|
314
342
|
<el-input type="textarea" :rows="5" v-model="description"></el-input>
|
|
315
343
|
</el-form-item>
|
|
344
|
+
<el-form-item v-if="nextNode.nextType != 'inclusiveGateway' && !isProceedNext" label-width="0">
|
|
345
|
+
<div>请等待其他人员处理完成。</div>
|
|
346
|
+
</el-form-item>
|
|
316
347
|
</el-form>
|
|
317
348
|
<div v-if="nextNode.nodeType == 'EndEvent'">流程即将结束,是否继续?</div>
|
|
318
349
|
<div slot="footer" class="dialog-footer">
|
|
@@ -341,7 +372,7 @@
|
|
|
341
372
|
</el-dialog>
|
|
342
373
|
|
|
343
374
|
<el-dialog :close-on-click-modal=false title="选择加签人" top="5vh" width="80%" height="80%"
|
|
344
|
-
:visible.sync="completeSignDialog" append-to-body>
|
|
375
|
+
:visible.sync="completeSignDialog" append-to-body @closed="disableSign = false">
|
|
345
376
|
<!-- <sys-org-pos-user-select ref="completeSignRef"-->
|
|
346
377
|
<!-- :filterUserParam="{'commonUserType':'common','filterLoginUser':'Y'}"-->
|
|
347
378
|
<!-- :ognEnable="false"-->
|
|
@@ -354,13 +385,13 @@
|
|
|
354
385
|
v-if="completeSignDialog">
|
|
355
386
|
</user-select>
|
|
356
387
|
<div slot="footer" class="dialog-footer">
|
|
357
|
-
<el-button type="primary" size="small" @click="sureCompleteSign()">确定</el-button>
|
|
388
|
+
<el-button type="primary" size="small" @click="sureCompleteSign()" :disabled="disableSign">确定</el-button>
|
|
358
389
|
<el-button size="small" @click="completeSignDialog = false">取消</el-button>
|
|
359
390
|
</div>
|
|
360
391
|
</el-dialog>
|
|
361
392
|
|
|
362
393
|
<el-dialog :close-on-click-modal=false title="选择转签人" top="5vh" width="80%" height="80%"
|
|
363
|
-
:visible.sync="turnSignDialog" append-to-body>
|
|
394
|
+
:visible.sync="turnSignDialog" append-to-body @closed="disableSign = false">
|
|
364
395
|
<!-- <sys-org-pos-user-select ref="turnSignRef"-->
|
|
365
396
|
<!-- :filterUserParam="{'commonUserType':'common' }"-->
|
|
366
397
|
<!-- :ognEnable="false"-->
|
|
@@ -374,7 +405,7 @@
|
|
|
374
405
|
v-if="turnSignDialog">
|
|
375
406
|
</user-select>
|
|
376
407
|
<div slot="footer" class="dialog-footer">
|
|
377
|
-
<el-button type="primary" size="small" @click="sureTurnSign()">确定</el-button>
|
|
408
|
+
<el-button type="primary" size="small" @click="sureTurnSign()" :disabled="disableSign">确定</el-button>
|
|
378
409
|
<el-button size="small" @click="turnSignDialog = false">取消</el-button>
|
|
379
410
|
</div>
|
|
380
411
|
</el-dialog>
|
|
@@ -440,18 +471,17 @@
|
|
|
440
471
|
import FlowInstList from "./flowInstList";
|
|
441
472
|
import FlowChart from "../flowChart";
|
|
442
473
|
import FlowRoamRecord from "../flowRoamRecords";
|
|
443
|
-
import {AjaxUtil} from 'sasp-base';
|
|
444
|
-
|
|
445
|
-
// import {Replace} from "sasp-base";
|
|
474
|
+
import {AjaxUtil, Replace} from 'sasp-base';
|
|
446
475
|
import RoamRecord from "../roamRecord";
|
|
447
476
|
import UserSelect from "../userSelect";
|
|
477
|
+
import flowNewBatchDeal from "../../components/flowNewBatchDeal.vue";
|
|
448
478
|
export default {
|
|
449
479
|
name: "flow-inst-tab",
|
|
450
480
|
components: {
|
|
451
481
|
UserSelect,
|
|
452
482
|
RoamRecord,
|
|
453
483
|
FlowRoamRecord,
|
|
454
|
-
FlowChart, FlowInstList
|
|
484
|
+
FlowChart, FlowInstList, flowNewBatchDeal
|
|
455
485
|
},
|
|
456
486
|
props: {
|
|
457
487
|
flowId: {type: String, default: ''},
|
|
@@ -466,7 +496,14 @@
|
|
|
466
496
|
saveFormInfo:{type: Function,default:null}, // 保存表单时执行的事件
|
|
467
497
|
getFormInfo:{type: Function,default:null}, // 获取表单内容,以方便进行表单信息修改
|
|
468
498
|
dataPermis:{type:String,default:''},
|
|
469
|
-
flowNextOperation:{type: Function,default:null} // 流程下一步时的参数回调事件
|
|
499
|
+
flowNextOperation:{type: Function,default:null}, // 流程下一步时的参数回调事件
|
|
500
|
+
formImpMethod:{type: Function,default: null},
|
|
501
|
+
flowImpParamObj: {type: Object,default: () => ({})},
|
|
502
|
+
downloadTemplate: {type: Function, default: null},
|
|
503
|
+
getFormDataByDataIds: {type: Function, default: null},
|
|
504
|
+
saveBatchDealFormData: {type: Function, default: null},
|
|
505
|
+
formAboutInfoObj: {type: Object, default: () => ({})},
|
|
506
|
+
sysDataObj: {type: Object, default: () => ({})},
|
|
470
507
|
},
|
|
471
508
|
data() {
|
|
472
509
|
let vm = this;
|
|
@@ -508,6 +545,8 @@
|
|
|
508
545
|
|
|
509
546
|
// 批量处理
|
|
510
547
|
flowBatchPendingDialog: false,
|
|
548
|
+
// 选择性的批量多条一次性处理
|
|
549
|
+
flowBatchSelectPendingDialog: false,
|
|
511
550
|
batchUpdateFormInfo: {
|
|
512
551
|
formShow: false,
|
|
513
552
|
dataRows: [],
|
|
@@ -587,7 +626,7 @@
|
|
|
587
626
|
icon: "saspiconfont pl-icon-yizhongzhi",
|
|
588
627
|
show: false,
|
|
589
628
|
method: () => {
|
|
590
|
-
this.
|
|
629
|
+
this.saspFlowAxios.post(this.api.plFlowInst.stopFlow, {
|
|
591
630
|
instId: this.currentInst.flowInstId, type: "0",
|
|
592
631
|
procInstId: this.currentInst.linkProcId,
|
|
593
632
|
taskId: this.currentInst.taskId
|
|
@@ -612,7 +651,7 @@
|
|
|
612
651
|
dataId:this.formInfo.dataId,
|
|
613
652
|
instType:"stopped"
|
|
614
653
|
};
|
|
615
|
-
this.
|
|
654
|
+
this.saspFlowAxios.post(this.api.plFlowInst.saveRemind,remindParam);
|
|
616
655
|
|
|
617
656
|
//执行事件规则
|
|
618
657
|
let currentNodeObj = this.flowNodeIdToInfo[this.currentInst.currentNode] ||{};
|
|
@@ -634,7 +673,7 @@
|
|
|
634
673
|
show: false,
|
|
635
674
|
isView: true,
|
|
636
675
|
method: () => {
|
|
637
|
-
this.
|
|
676
|
+
this.saspFlowAxios.post(this.api.plFlowInst.revokeFlow, {
|
|
638
677
|
instId: this.currentInst.flowInstId,
|
|
639
678
|
taskId: this.currentInst.taskId
|
|
640
679
|
}).then(res => {
|
|
@@ -654,7 +693,7 @@
|
|
|
654
693
|
dataId:this.formInfo.dataId,
|
|
655
694
|
instType:"cancel"
|
|
656
695
|
};
|
|
657
|
-
this.
|
|
696
|
+
this.saspFlowAxios.post(this.api.plFlowInst.saveRemind,remindParam);
|
|
658
697
|
|
|
659
698
|
|
|
660
699
|
} else {
|
|
@@ -785,6 +824,8 @@
|
|
|
785
824
|
|
|
786
825
|
nextNodeName:"", // 下一个节点名称
|
|
787
826
|
nextNode: {},//下一个节点信息
|
|
827
|
+
nowNode: {},//本节点信息
|
|
828
|
+
isProceedNext:true,
|
|
788
829
|
description: "",//附加说明
|
|
789
830
|
|
|
790
831
|
// 处理、修改、查看流程信息弹窗
|
|
@@ -851,8 +892,44 @@
|
|
|
851
892
|
workListViews:{},
|
|
852
893
|
workTableViews:{},
|
|
853
894
|
currNodeName: "", //当前节点名称
|
|
854
|
-
nextUserInfo:{}, // 下一步处理人的信息
|
|
855
|
-
dataId:"", // 表单数据id
|
|
895
|
+
nextUserInfo: {}, // 下一步处理人的信息
|
|
896
|
+
dataId: "", // 表单数据id
|
|
897
|
+
disableSign: false, // 禁用加签转签按钮
|
|
898
|
+
formSearchObj: {
|
|
899
|
+
taskNode: "",
|
|
900
|
+
flowNewBatchDealArr: [],
|
|
901
|
+
isNewSelectBatchDeal: false,
|
|
902
|
+
loading: true
|
|
903
|
+
},
|
|
904
|
+
formDataObj: {},
|
|
905
|
+
formNewBtnArr: [],
|
|
906
|
+
newBatchDealBtnObj: {
|
|
907
|
+
close: {
|
|
908
|
+
text: "关闭",
|
|
909
|
+
type: "",
|
|
910
|
+
icon: "el-icon-close",
|
|
911
|
+
show: true,
|
|
912
|
+
isView: true,
|
|
913
|
+
method: () => {
|
|
914
|
+
this.flowInstDataDialog = false;
|
|
915
|
+
this.flowBatchPendingDialog = false;
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
newBatchDealSave: {
|
|
919
|
+
text: "保存",
|
|
920
|
+
type: "primary",
|
|
921
|
+
icon: "el-icon-check",
|
|
922
|
+
show: true,
|
|
923
|
+
isView: true,
|
|
924
|
+
method: () => {
|
|
925
|
+
this.saveNewBatchDealFormData();
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
newBatchDealCurrDataId: "", // 新批量处理当前点击行dataId
|
|
930
|
+
isRefreshGetNextUsers: [], // 是否要刷新下一步处理人的字段,网关字段,表单,变量
|
|
931
|
+
fieldSysDataObj: {},
|
|
932
|
+
flowNewBatchDealDataIds: "",
|
|
856
933
|
}
|
|
857
934
|
},
|
|
858
935
|
watch:{
|
|
@@ -883,13 +960,45 @@
|
|
|
883
960
|
|
|
884
961
|
this.getFlowInfo().then(res => {
|
|
885
962
|
this.initSuccess = true;
|
|
886
|
-
this.
|
|
963
|
+
this.initFlowObj();
|
|
887
964
|
this.getFlowAgent(); //加载流程代理
|
|
965
|
+
// this.initFieldSysData();
|
|
888
966
|
});
|
|
889
967
|
this.initTabNum();
|
|
890
968
|
// this.initWorkStageTurnOn();
|
|
891
969
|
},
|
|
892
970
|
methods: {
|
|
971
|
+
// 新批量处理关闭弹框时数据重做的回调
|
|
972
|
+
newBatchDealClose() {
|
|
973
|
+
Object.assign(this.formSearchObj, {isNewSelectBatchDeal: false});
|
|
974
|
+
// let flowInstListVm = this.$refs["pendingRef"];
|
|
975
|
+
// if (flowInstListVm) {
|
|
976
|
+
// flowInstListVm.initFormDataByDataIds();
|
|
977
|
+
// // flowInstListVm.initNewBatchDealFunc();
|
|
978
|
+
// }
|
|
979
|
+
},
|
|
980
|
+
|
|
981
|
+
setDataValue(key, value) {
|
|
982
|
+
if (key && typeof key === "string") {
|
|
983
|
+
this[key] = value;
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
|
|
987
|
+
initFieldSysData() {
|
|
988
|
+
this.formFieldObj = this.formAboutInfoObj["formFieldObj"] || {};
|
|
989
|
+
let configInfoArr = this.formAboutInfoObj["formControlConfigArr"] || [];
|
|
990
|
+
let controlTypeArr = ["radio", "checkbox", "select"];
|
|
991
|
+
configInfoArr.forEach(item => {
|
|
992
|
+
if (controlTypeArr.includes(item.controlType) && typeof item.specialSet === "string") {
|
|
993
|
+
let specialSet = JSON.parse(item.specialSet);
|
|
994
|
+
// console.log('specialSet', specialSet);
|
|
995
|
+
let paramsKey = item.controlType + "Type";
|
|
996
|
+
if (specialSet[paramsKey] === "sysData") {
|
|
997
|
+
this.fieldSysDataObj[item.fieldId] = true;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
});
|
|
1001
|
+
},
|
|
893
1002
|
|
|
894
1003
|
/**
|
|
895
1004
|
* 打开[添加]窗口
|
|
@@ -1064,6 +1173,270 @@
|
|
|
1064
1173
|
});
|
|
1065
1174
|
},
|
|
1066
1175
|
|
|
1176
|
+
// 新批量处理弹框回调事件
|
|
1177
|
+
openNewBatchUpdateFlowForm() {
|
|
1178
|
+
// console.log('this.sysDataObj', this.sysDataObj, this.loginUser);
|
|
1179
|
+
Object.assign(this.formSearchObj, {
|
|
1180
|
+
flowNewBatchDealArr: [],
|
|
1181
|
+
isNewSelectBatchDeal: false,
|
|
1182
|
+
loading:true
|
|
1183
|
+
});
|
|
1184
|
+
this.initFieldSysData();
|
|
1185
|
+
// 处理按钮渲染
|
|
1186
|
+
let btnTypeArr = ["newBatchDealSave", "close"];
|
|
1187
|
+
let btnArr = [];
|
|
1188
|
+
btnTypeArr.forEach(item => {
|
|
1189
|
+
btnArr.push(this.newBatchDealBtnObj[item]);
|
|
1190
|
+
});
|
|
1191
|
+
this.formNewBtnArr = btnArr;
|
|
1192
|
+
this.initNewBatchDeal().then(arr => {
|
|
1193
|
+
this.getFormDataByDataIds(this.formInfo.formId, this.flowNewBatchDealDataIds).then(res => {
|
|
1194
|
+
this.formDataObj = res || {};
|
|
1195
|
+
arr.forEach(flowInst => {
|
|
1196
|
+
let formData = this.formDataObj[flowInst.dataId] || {};
|
|
1197
|
+
// 解析自定义流程概要
|
|
1198
|
+
this.currentStartUser = this.userMap[flowInst.startUserId] || "";
|
|
1199
|
+
this.currentStartTime = flowInst.startTime;
|
|
1200
|
+
flowInst["outlineResult"] = this.getFlowSummary(formData, flowInst.outlineResult);
|
|
1201
|
+
if ((flowInst.settingInfo || []).length > 0) {
|
|
1202
|
+
flowInst.settingInfo.forEach(setInfo => {
|
|
1203
|
+
let defaultVal;
|
|
1204
|
+
let anyVariable = "";
|
|
1205
|
+
if (setInfo.fieldType === "checkbox") {
|
|
1206
|
+
anyVariable = [];
|
|
1207
|
+
if (formData[setInfo.field] && typeof formData[setInfo.field] === "string") {
|
|
1208
|
+
formData[setInfo.field] = JSON.parse(formData[setInfo.field]);
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
if (setInfo.defaultValue) {
|
|
1212
|
+
if (setInfo.defaultValueType === "formInfo") {
|
|
1213
|
+
setInfo.defaultValue = formData[setInfo.defaultValue];
|
|
1214
|
+
}
|
|
1215
|
+
if (setInfo.defaultValueType === "loginInfo") {
|
|
1216
|
+
let userInfo = Object.assign({}, this.loginUser, {"userId": this.loginUser.id});
|
|
1217
|
+
setInfo.defaultValue = userInfo[setInfo.defaultValue];
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
if (setInfo.defaultValueType === "sysDate") {
|
|
1221
|
+
anyVariable = this.DATE_UTIL.formaterDateOrTime(new Date(), setInfo.fieldFormat);
|
|
1222
|
+
}
|
|
1223
|
+
let defaultValue = formData[setInfo.field] || setInfo.defaultValue;
|
|
1224
|
+
defaultVal = defaultValue || anyVariable;
|
|
1225
|
+
// if (setInfo.defaultValueType === "sysDate") {
|
|
1226
|
+
// defaultVal = this.DATE_UTIL.formaterDateOrTime(new Date(), setInfo.fieldFormat);
|
|
1227
|
+
// }
|
|
1228
|
+
// 给列表审核信息赋默认值
|
|
1229
|
+
setInfo.defaultValue = defaultVal;
|
|
1230
|
+
formData[setInfo.field] = defaultVal;
|
|
1231
|
+
});
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1234
|
+
Object.assign(this.formSearchObj, {
|
|
1235
|
+
flowNewBatchDealArr: arr,
|
|
1236
|
+
isNewSelectBatchDeal: true,
|
|
1237
|
+
loading:false
|
|
1238
|
+
});
|
|
1239
|
+
});
|
|
1240
|
+
});
|
|
1241
|
+
this.flowBatchSelectPendingDialog = true;
|
|
1242
|
+
},
|
|
1243
|
+
|
|
1244
|
+
// 获取批量流程数据
|
|
1245
|
+
initNewBatchDeal() {
|
|
1246
|
+
return new Promise(resolve => {
|
|
1247
|
+
this.saspFlowAxios.post(this.api.plFlowInst.findInstPending, {
|
|
1248
|
+
flowId: this.flowDefine.id,
|
|
1249
|
+
currentNode: "",
|
|
1250
|
+
nodeType: "pending",
|
|
1251
|
+
dealUserId: this.loginUser.id,
|
|
1252
|
+
flowStatus: "1",
|
|
1253
|
+
flowVar: "1"
|
|
1254
|
+
}).then(res => {
|
|
1255
|
+
let flowNewBatchDeal = [];
|
|
1256
|
+
this.flowNewBatchDealDataIds = "";
|
|
1257
|
+
if (res.data && res.data.records.length > 0) {
|
|
1258
|
+
res.data.records.forEach((item, index) => {
|
|
1259
|
+
if (item.openBatch === "1") {
|
|
1260
|
+
item.settingInfo = JSON.parse(item.settingInfo);
|
|
1261
|
+
}
|
|
1262
|
+
item['isEdited'] = false;
|
|
1263
|
+
// item['isLoading'] = true;
|
|
1264
|
+
item['nextDealUsers'] = {};
|
|
1265
|
+
if (!index) {
|
|
1266
|
+
this.flowNewBatchDealDataIds += item.dataId;
|
|
1267
|
+
}else {
|
|
1268
|
+
this.flowNewBatchDealDataIds += "," + item.dataId;
|
|
1269
|
+
}
|
|
1270
|
+
flowNewBatchDeal.push(item);
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
resolve(flowNewBatchDeal);
|
|
1274
|
+
});
|
|
1275
|
+
});
|
|
1276
|
+
},
|
|
1277
|
+
|
|
1278
|
+
// 新批量处理当前行点击编辑按钮打开弹框回调事件
|
|
1279
|
+
openCurrUpdateFlowForm(row) {
|
|
1280
|
+
this.openUpdateFlowForm(row, "update");
|
|
1281
|
+
// this.openBatchUpdateFlowForm(arr);
|
|
1282
|
+
},
|
|
1283
|
+
|
|
1284
|
+
saveNewBatchDealFormData() {
|
|
1285
|
+
this.saveFormInfo().then(result => {
|
|
1286
|
+
// console.log('保存方法1', result);
|
|
1287
|
+
if (result) {
|
|
1288
|
+
let flowNewBatchDealVm = this.$refs.flowNewBatchDealRef;
|
|
1289
|
+
// 数据保存成功,更改行数据
|
|
1290
|
+
let formData = this.formDataObj[result.ID] || {};
|
|
1291
|
+
let flowObj = this.formSearchObj.flowNewBatchDealArr.filter(item => item.dataId === result.ID)[0];
|
|
1292
|
+
// 刷新行数据
|
|
1293
|
+
let keysArr = Object.keys(result);
|
|
1294
|
+
Object.keys(formData).forEach(key => {
|
|
1295
|
+
if(keysArr.indexOf(key) > -1){
|
|
1296
|
+
if(keysArr.indexOf(key + "_SASP_SYS_DATA_ID") > -1){
|
|
1297
|
+
formData[key] = result[key + "_SASP_SYS_DATA_ID"];
|
|
1298
|
+
}else{
|
|
1299
|
+
formData[key] = result[key];
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
})
|
|
1303
|
+
// 刷新配置信息
|
|
1304
|
+
if (flowObj.settingInfo && flowObj.settingInfo.length > 0) {
|
|
1305
|
+
flowObj.settingInfo.forEach(settingObj => {
|
|
1306
|
+
let defaultValue = result[settingObj.field] || settingObj.defaultValue;
|
|
1307
|
+
let defaultVal = defaultValue || (settingObj.options[0] || {}).value;
|
|
1308
|
+
// 给列表审核信息赋默认值
|
|
1309
|
+
// this.$set(settingObj, "defaultValue", defaultVal || "");
|
|
1310
|
+
settingObj.defaultValue = defaultVal || "";
|
|
1311
|
+
formData[settingObj.field] = defaultVal || "";
|
|
1312
|
+
});
|
|
1313
|
+
}
|
|
1314
|
+
this.$set(flowObj, "isEdited", true);
|
|
1315
|
+
// console.log('flowObj', flowObj, flowNewBatchDealVm);
|
|
1316
|
+
this.flowInstDataDialog = false;
|
|
1317
|
+
// 刷新下一步处理人
|
|
1318
|
+
if (flowNewBatchDealVm) {
|
|
1319
|
+
flowNewBatchDealVm.initFlowBatchDeal([flowObj]);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
});
|
|
1323
|
+
},
|
|
1324
|
+
|
|
1325
|
+
newBatchDealSubmit(selectionArr, submitType) {
|
|
1326
|
+
// console.log('提交',selectionArr);
|
|
1327
|
+
if (selectionArr.length === 0) {
|
|
1328
|
+
return this.$message.warning('请先勾选要提交的数据!');
|
|
1329
|
+
}
|
|
1330
|
+
let str = "即将提交" + selectionArr.length + "条数据";
|
|
1331
|
+
if(submitType === "all"){
|
|
1332
|
+
str = "即将全部提交(不包括正在loading加载的数据)";
|
|
1333
|
+
}
|
|
1334
|
+
this.$confirm(`${str}, 确认是否继续?`, '提示', {
|
|
1335
|
+
confirmButtonText: '确定',
|
|
1336
|
+
cancelButtonText: '取消',
|
|
1337
|
+
type: 'warning'
|
|
1338
|
+
}).then(() => {
|
|
1339
|
+
let params = [];
|
|
1340
|
+
let instIds = "";
|
|
1341
|
+
selectionArr.forEach(selectionObj => {
|
|
1342
|
+
let paramsObj = {dataId: selectionObj.dataId};
|
|
1343
|
+
let updateParams = {};
|
|
1344
|
+
(selectionObj.settingInfo || []).forEach(item => {
|
|
1345
|
+
updateParams[item.field] = item.defaultValue;
|
|
1346
|
+
});
|
|
1347
|
+
paramsObj["updateParams"] = updateParams;
|
|
1348
|
+
params.push(paramsObj);
|
|
1349
|
+
if (selectionObj.flowInstId) {
|
|
1350
|
+
instIds += `,${selectionObj.flowInstId}`;
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
// console.log(this.flowDefine, this.allNodeInfo, '提交', selectionArr);
|
|
1354
|
+
this.saveBatchDealFormData(this.formInfo.formId, JSON.stringify(params)).then(resData => {
|
|
1355
|
+
if (resData.operateSuccess) {
|
|
1356
|
+
// 更新工作流状态
|
|
1357
|
+
this.saspFlowAxios.post(this.api.plFlowInst.batchUpdateFlowStatus, {
|
|
1358
|
+
instIds: instIds.slice(1)
|
|
1359
|
+
}).then(updateFlowStatusRes => {
|
|
1360
|
+
let type = "error";
|
|
1361
|
+
let message = updateFlowStatusRes.data.operateMessage;
|
|
1362
|
+
if (updateFlowStatusRes && updateFlowStatusRes.data.operateSuccess) {
|
|
1363
|
+
type = "success";
|
|
1364
|
+
// 执行工作流下一步
|
|
1365
|
+
this.newBatchExecuteNextStep(selectionArr);
|
|
1366
|
+
let pendingRefVm = this.$refs["pendingRef"];
|
|
1367
|
+
pendingRefVm && pendingRefVm.init();
|
|
1368
|
+
this.flowBatchSelectPendingDialog = false;
|
|
1369
|
+
}
|
|
1370
|
+
this.$message({
|
|
1371
|
+
type,
|
|
1372
|
+
message
|
|
1373
|
+
});
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
});
|
|
1377
|
+
}).catch(() => {
|
|
1378
|
+
this.$message({
|
|
1379
|
+
type: 'info',
|
|
1380
|
+
message: '已取消提交'
|
|
1381
|
+
});
|
|
1382
|
+
});
|
|
1383
|
+
},
|
|
1384
|
+
|
|
1385
|
+
// 流程批量审批,全部提交
|
|
1386
|
+
newBatchDealAllSubmit() {
|
|
1387
|
+
let flowNewBatchDealVm = this.$refs.flowNewBatchDealRef;
|
|
1388
|
+
let selectArr = [];
|
|
1389
|
+
this.formSearchObj.flowNewBatchDealArr.forEach(item => {
|
|
1390
|
+
if (flowNewBatchDealVm.newBatchDealSelectable(item)) {
|
|
1391
|
+
selectArr.push(item);
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
// console.log('全部提交', selectArr);
|
|
1395
|
+
this.newBatchDealSubmit(selectArr, "all");
|
|
1396
|
+
},
|
|
1397
|
+
|
|
1398
|
+
newBatchExecuteNextStep(arr) {
|
|
1399
|
+
let params = [];
|
|
1400
|
+
arr.forEach(items => {
|
|
1401
|
+
let nextNodeObj = this.allNodeInfo[items.nextDealUsers.nextNodeId];
|
|
1402
|
+
let dealers = items.chooseNextUserId;
|
|
1403
|
+
let dealersObj = {};
|
|
1404
|
+
dealersObj[nextNodeObj["nodeLinkId"]] = dealers;
|
|
1405
|
+
|
|
1406
|
+
let nextStepBaseObj = {
|
|
1407
|
+
instId: items.flowInstId,
|
|
1408
|
+
dealers: dealers,
|
|
1409
|
+
// dealerNames: dealerNames,
|
|
1410
|
+
dealersObj: JSON.stringify(dealersObj),
|
|
1411
|
+
nextNodeType: nextNodeObj.nodeType,
|
|
1412
|
+
nextNodeId: nextNodeObj.id,
|
|
1413
|
+
nextNodeKey: nextNodeObj.nodeLinkId,
|
|
1414
|
+
taskId: items.taskId,
|
|
1415
|
+
}
|
|
1416
|
+
// if(this.flowNextOperation) {
|
|
1417
|
+
// this.flowNextOperation(obj.instId, obj.dealers, obj.dealerNames, obj.taskId);
|
|
1418
|
+
// }
|
|
1419
|
+
let paramsSourceObj = {"SASP_FLOW_USE_VARIABLES": "yes"};
|
|
1420
|
+
Object.assign(paramsSourceObj, {}, nextStepBaseObj);
|
|
1421
|
+
params.push(paramsSourceObj);
|
|
1422
|
+
});
|
|
1423
|
+
// console.log('params',params);
|
|
1424
|
+
this.saspFlowAxios.post(this.api.plFlowInst.batchExecuteNextStep, {
|
|
1425
|
+
params: JSON.stringify(params)
|
|
1426
|
+
}).then(res => {
|
|
1427
|
+
if (res.data.operateSuccess) {
|
|
1428
|
+
let message = res.data.operateMessage;
|
|
1429
|
+
this.$notify({
|
|
1430
|
+
title: '提示',
|
|
1431
|
+
message: `${message}`,
|
|
1432
|
+
type: 'info',
|
|
1433
|
+
position: 'bottom-right',
|
|
1434
|
+
duration: 10000,
|
|
1435
|
+
});
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
},
|
|
1439
|
+
|
|
1067
1440
|
/**
|
|
1068
1441
|
* 获取[添加、修改和处理]的操作按钮
|
|
1069
1442
|
*/
|
|
@@ -1265,7 +1638,7 @@
|
|
|
1265
1638
|
if(this.formInfo.opt == 'add' || this.tabActive == 'draft'){ //版本号也要随之更新
|
|
1266
1639
|
flowInst = Object.assign(flowInst,{"version":this.flowDefine.releaseVersion,"isRelease":this.flowDefine.isRelease})
|
|
1267
1640
|
}
|
|
1268
|
-
this.
|
|
1641
|
+
this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
|
|
1269
1642
|
this.runFlowEvt();
|
|
1270
1643
|
resolve(instRes.data.operateObj);
|
|
1271
1644
|
});
|
|
@@ -1290,7 +1663,7 @@
|
|
|
1290
1663
|
updated: this.loginUser.id,
|
|
1291
1664
|
};
|
|
1292
1665
|
}
|
|
1293
|
-
this.
|
|
1666
|
+
this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
|
|
1294
1667
|
this.runFlowEvt();
|
|
1295
1668
|
resolve(instRes.data.operateObj);
|
|
1296
1669
|
this.currentInst=instRes.data.operateObj;
|
|
@@ -1346,7 +1719,7 @@
|
|
|
1346
1719
|
// if(this.formInfo.opt == 'add' || this.tabActive == 'draft'){ //版本号也要随之更新
|
|
1347
1720
|
// flowInst = Object.assign(flowInst,{"version":this.flowDefine.releaseVersion,"isRelease":this.flowDefine.isRelease})
|
|
1348
1721
|
// }
|
|
1349
|
-
// this.
|
|
1722
|
+
// this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
|
|
1350
1723
|
// resolve(instRes.data);
|
|
1351
1724
|
// });
|
|
1352
1725
|
// }else{
|
|
@@ -1370,7 +1743,7 @@
|
|
|
1370
1743
|
// updated: this.loginUser.id,
|
|
1371
1744
|
// };
|
|
1372
1745
|
// }
|
|
1373
|
-
// this.
|
|
1746
|
+
// this.saspFlowAxios.post(this.api.plFlowInst.url + "/" + this.formInfo.opt, flowInst).then(instRes => {
|
|
1374
1747
|
// resolve(instRes.data);
|
|
1375
1748
|
// this.currentInst=instRes.data;
|
|
1376
1749
|
// });
|
|
@@ -1423,11 +1796,16 @@
|
|
|
1423
1796
|
this.currentInst.id = instId;
|
|
1424
1797
|
this.description = "";
|
|
1425
1798
|
this.saveInstId = instId;
|
|
1799
|
+
this.nowNode = this.allNodeInfo[currentNodeObj.id] || {};
|
|
1800
|
+
this.isProceedNext = true;
|
|
1426
1801
|
//获取处理人
|
|
1427
|
-
let obj = {instId: instId, taskId: this.currentInst.taskId};
|
|
1802
|
+
let obj = {instId: instId, taskId: this.currentInst.taskId,};
|
|
1803
|
+
if(this.nowNode && this.nowNode.dealType && this.nowNode.dealType == 'multi'){
|
|
1804
|
+
this.$set(obj,'passCondition',this.nowNode.passCondition)
|
|
1805
|
+
}
|
|
1428
1806
|
let params = {"SASP_FLOW_USE_VARIABLES":"yes"};
|
|
1429
1807
|
Object.assign(params,flowParams || {},obj);
|
|
1430
|
-
this.
|
|
1808
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getNextUsers, params).then(res => {
|
|
1431
1809
|
if(!res.data.operateSuccess){
|
|
1432
1810
|
this.isDisabled['nextStep'] = true;
|
|
1433
1811
|
if(res.data.resultObject === 'requestException'){
|
|
@@ -1440,6 +1818,9 @@
|
|
|
1440
1818
|
let obj = {};
|
|
1441
1819
|
if (res && res.data) {
|
|
1442
1820
|
obj = res.data.operateObj || {};
|
|
1821
|
+
if(res.data.operateMap && res.data.operateMap.isPassCondition == 0){
|
|
1822
|
+
this.isProceedNext = false;
|
|
1823
|
+
}
|
|
1443
1824
|
}
|
|
1444
1825
|
this.nextNodeName = "";
|
|
1445
1826
|
this.choosePosUserIds = "";
|
|
@@ -1696,7 +2077,7 @@
|
|
|
1696
2077
|
dealerNames = this.chooseNextUserName;
|
|
1697
2078
|
}
|
|
1698
2079
|
if (this.nextNode.nodeType != 'EndEvent') {
|
|
1699
|
-
if (!this.chooseNextUserId || this.chooseNextUserId.length == 0) {
|
|
2080
|
+
if ((!this.chooseNextUserId || this.chooseNextUserId.length == 0) && this.isProceedNext) {
|
|
1700
2081
|
this.$message({type: "error", message: "请选择处理人!"});
|
|
1701
2082
|
this.isDisabled1 = true;
|
|
1702
2083
|
return;
|
|
@@ -1736,12 +2117,15 @@
|
|
|
1736
2117
|
nextNodeId: this.nextNode.id,
|
|
1737
2118
|
nextNodeKey: this.nextNode.nodeLinkId,
|
|
1738
2119
|
}
|
|
2120
|
+
if(this.nowNode && this.nowNode.dealType && this.nowNode.dealType == 'multi'){
|
|
2121
|
+
this.$set(obj,'passCondition',this.nowNode.passCondition)
|
|
2122
|
+
}
|
|
1739
2123
|
if(this.flowNextOperation) {
|
|
1740
2124
|
this.flowNextOperation(obj.instId, obj.dealers, obj.dealerNames, obj.taskId);
|
|
1741
2125
|
}
|
|
1742
2126
|
let params = {"SASP_FLOW_USE_VARIABLES":"yes"};
|
|
1743
2127
|
Object.assign(params,this.flowParams || {},obj);
|
|
1744
|
-
this.
|
|
2128
|
+
this.saspFlowAxios.post(this.api.plFlowInst.executeNextStep,params).then(res => {
|
|
1745
2129
|
if (res && res.data && res.data.operateSuccess) {
|
|
1746
2130
|
this.initTabNum();
|
|
1747
2131
|
this.$message({type: "success", message: "提交成功!"});
|
|
@@ -1782,7 +2166,7 @@
|
|
|
1782
2166
|
dataId:this.formInfo.dataId,
|
|
1783
2167
|
instType:"end"
|
|
1784
2168
|
};
|
|
1785
|
-
this.
|
|
2169
|
+
this.saspFlowAxios.post(this.api.plFlowInst.saveRemind,remindParam);
|
|
1786
2170
|
}
|
|
1787
2171
|
}else{
|
|
1788
2172
|
console.log("脚本异常")
|
|
@@ -1811,7 +2195,8 @@
|
|
|
1811
2195
|
checkedUserArr.forEach(item => {
|
|
1812
2196
|
userIds += "," + item.dataKey;
|
|
1813
2197
|
});
|
|
1814
|
-
this.
|
|
2198
|
+
this.disableSign = true;
|
|
2199
|
+
this.saspFlowAxios.post(this.api.plFlowInst.completeSign, {
|
|
1815
2200
|
taskId: this.currentInst.taskId,
|
|
1816
2201
|
dealers: userIds.substring(1)
|
|
1817
2202
|
}).then(res => {
|
|
@@ -1824,6 +2209,7 @@
|
|
|
1824
2209
|
} else {
|
|
1825
2210
|
this.$message({type: "error", message: "加签失败!"});
|
|
1826
2211
|
}
|
|
2212
|
+
this.disableSign = false;
|
|
1827
2213
|
});
|
|
1828
2214
|
},
|
|
1829
2215
|
|
|
@@ -1837,7 +2223,8 @@
|
|
|
1837
2223
|
return;
|
|
1838
2224
|
}
|
|
1839
2225
|
let userId = checkedUserArr[0].dataKey;
|
|
1840
|
-
this.
|
|
2226
|
+
this.disableSign = true;
|
|
2227
|
+
this.saspFlowAxios.post(this.api.plFlowInst.turnSign, {
|
|
1841
2228
|
taskId: this.currentInst.taskId,
|
|
1842
2229
|
dealers: userId
|
|
1843
2230
|
}).then(res => {
|
|
@@ -1850,6 +2237,7 @@
|
|
|
1850
2237
|
} else {
|
|
1851
2238
|
this.$message({type: "error", message: "转签失败!"});
|
|
1852
2239
|
}
|
|
2240
|
+
this.disableSign = false;
|
|
1853
2241
|
});
|
|
1854
2242
|
|
|
1855
2243
|
},
|
|
@@ -1870,7 +2258,7 @@
|
|
|
1870
2258
|
cancelButtonText: '取消',
|
|
1871
2259
|
inputType: 'textarea',
|
|
1872
2260
|
}).then(({ value }) => {
|
|
1873
|
-
this.
|
|
2261
|
+
this.saspFlowAxios.post(this.api.plFlowInst.backRewrite,
|
|
1874
2262
|
{
|
|
1875
2263
|
taskId:currentInst.taskId,
|
|
1876
2264
|
remarks: value
|
|
@@ -1910,7 +2298,7 @@
|
|
|
1910
2298
|
confirmButtonText: '确定',
|
|
1911
2299
|
cancelButtonText: '取消',
|
|
1912
2300
|
}).then(() => {
|
|
1913
|
-
this.
|
|
2301
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getBackRewrite,
|
|
1914
2302
|
{
|
|
1915
2303
|
flowInstId: currentInst.flowInstId,
|
|
1916
2304
|
}).then(res => {
|
|
@@ -1943,10 +2331,10 @@
|
|
|
1943
2331
|
/**
|
|
1944
2332
|
* 获取流程概要
|
|
1945
2333
|
*/
|
|
1946
|
-
getFlowSummary(dataObj) {
|
|
2334
|
+
getFlowSummary(dataObj, summaryTemplate) {
|
|
1947
2335
|
let flowSummary = "";
|
|
1948
|
-
let summarySet = this.flowDefine.flowSummary;
|
|
1949
|
-
if (this.tabActive
|
|
2336
|
+
let summarySet = summaryTemplate || this.flowDefine.flowSummary;
|
|
2337
|
+
if (this.tabActive === "draft") {
|
|
1950
2338
|
flowSummary = this.platStringUtil.replaceAll(summarySet, "${startUserName*}", this.loginUser.userName);
|
|
1951
2339
|
flowSummary = this.platStringUtil.replaceAll(flowSummary, "${createTime*}", this.DATE_UTIL.getCurrentDateTime());
|
|
1952
2340
|
} else {
|
|
@@ -2107,7 +2495,7 @@
|
|
|
2107
2495
|
|
|
2108
2496
|
// getDefaultUser(orgChargeField,supervisorField,levels,resolve){
|
|
2109
2497
|
// if(orgChargeField.length > 0 && supervisorField.length > 0){
|
|
2110
|
-
// this.
|
|
2498
|
+
// this.saspFlowAxios.post(this.api.sysOrgPosUser.getDeptSupervisorByUserId,
|
|
2111
2499
|
// {userId:this.loginUser.id}).then(res => {
|
|
2112
2500
|
// if(res && res.data){
|
|
2113
2501
|
// let userId = (res.data[0] || {}).id;
|
|
@@ -2116,7 +2504,7 @@
|
|
|
2116
2504
|
// });
|
|
2117
2505
|
// }
|
|
2118
2506
|
//
|
|
2119
|
-
// this.
|
|
2507
|
+
// this.saspFlowAxios.post(this.api.sysOrgPosUser.getSupervisorByLevels,
|
|
2120
2508
|
// {userId:this.loginUser.id,levels:levels.substring(1)}).then(res => {
|
|
2121
2509
|
// if(res && res.data){
|
|
2122
2510
|
// let userIdMap = res.data || {};
|
|
@@ -2128,7 +2516,7 @@
|
|
|
2128
2516
|
// });
|
|
2129
2517
|
// });
|
|
2130
2518
|
// }else if(orgChargeField.length > 0){
|
|
2131
|
-
// this.
|
|
2519
|
+
// this.saspFlowAxios.post(this.api.sysOrgPosUser.getDeptSupervisorByUserId,
|
|
2132
2520
|
// {userId:this.loginUser.id}).then(res => {
|
|
2133
2521
|
// if (res && res.data) {
|
|
2134
2522
|
// let userId = (res.data[0] || {}).id;
|
|
@@ -2139,7 +2527,7 @@
|
|
|
2139
2527
|
// }
|
|
2140
2528
|
// });
|
|
2141
2529
|
// }else if(supervisorField.length > 0){
|
|
2142
|
-
// this.
|
|
2530
|
+
// this.saspFlowAxios.post(this.api.sysOrgPosUser.getSupervisorByLevels,
|
|
2143
2531
|
// {userId:this.loginUser.id,levels:levels.substring(1)}).then(res => {
|
|
2144
2532
|
// if(res && res.data){
|
|
2145
2533
|
// let userIdMap = res.data || {};
|
|
@@ -2176,7 +2564,7 @@
|
|
|
2176
2564
|
* 恢复方法
|
|
2177
2565
|
*/
|
|
2178
2566
|
restoreFlow() {
|
|
2179
|
-
this.
|
|
2567
|
+
this.saspFlowAxios.post(this.api.plFlowInst.stopFlow, {
|
|
2180
2568
|
instId: this.currentInst.flowInstId, type: "1",
|
|
2181
2569
|
procInstId: this.currentInst.linkProcId,
|
|
2182
2570
|
taskId: this.currentInst.taskId
|
|
@@ -2209,12 +2597,12 @@
|
|
|
2209
2597
|
|
|
2210
2598
|
initTabNum() {
|
|
2211
2599
|
this.initMessageFunc && this.initMessageFunc();
|
|
2212
|
-
this.
|
|
2213
|
-
this.
|
|
2600
|
+
this.saspFlowAxios.all([
|
|
2601
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getTabsNum,
|
|
2214
2602
|
{flowId: this.flowData.flowId, type: "1"}),
|
|
2215
|
-
this.
|
|
2603
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getTabsNum,
|
|
2216
2604
|
{flowId: this.flowData.flowId, type: "2"}),
|
|
2217
|
-
]).then(this.
|
|
2605
|
+
]).then(this.saspFlowAxios.spread((res1, res2) => {
|
|
2218
2606
|
Object.assign(this.numberObj, res1.data, res2.data);
|
|
2219
2607
|
}));
|
|
2220
2608
|
},
|
|
@@ -2355,10 +2743,10 @@
|
|
|
2355
2743
|
*/
|
|
2356
2744
|
initFlowScript(){
|
|
2357
2745
|
return new Promise(resolve => {
|
|
2358
|
-
this.
|
|
2359
|
-
this.
|
|
2360
|
-
this.
|
|
2361
|
-
]).then(this.
|
|
2746
|
+
this.saspFlowAxios.all([
|
|
2747
|
+
this.saspFlowAxios.post(this.api.plFlowScript.find,{"flowId":this.flowData.flowId}),
|
|
2748
|
+
this.saspFlowAxios.post(this.api.plFlowEventDetail.findByFlowAndLeadFunc,{"flowId":this.flowData.flowId,"version":this.flowDefine.flowVersion||"1.0"})
|
|
2749
|
+
]).then(this.saspFlowAxios.spread((resScript, resEvent) => {
|
|
2362
2750
|
// 流程脚本
|
|
2363
2751
|
if(resScript){
|
|
2364
2752
|
let scriptDatas = resScript.data || [];
|
|
@@ -2613,7 +3001,7 @@
|
|
|
2613
3001
|
// }
|
|
2614
3002
|
// let CTX = window.JAVA_URL;
|
|
2615
3003
|
let CTX = "";
|
|
2616
|
-
let paramValues = [this,this.
|
|
3004
|
+
let paramValues = [this,this.saspFlowAxios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode,null]; // 入参
|
|
2617
3005
|
if(executePosition == "add" || executePosition == "update"){
|
|
2618
3006
|
((this.scriptObj[executePosition] || {})[executeTime] || []).forEach(event => {
|
|
2619
3007
|
event && event(...paramValues); // 执行事件
|
|
@@ -2655,7 +3043,7 @@
|
|
|
2655
3043
|
//执行自定义脚本
|
|
2656
3044
|
// let CTX = window.JAVA_URL;
|
|
2657
3045
|
let CTX = "";
|
|
2658
|
-
let paramValues = [this,this.
|
|
3046
|
+
let paramValues = [this,this.saspFlowAxios,CTX,formData,this.loginUser,AjaxUtil,this.nextNode]; // 入参
|
|
2659
3047
|
if(executeType == "addAfter" || executeType == "editAfter"){ //新增或者修改后
|
|
2660
3048
|
(this.newScriptObj[executeType] || []).forEach(event => {
|
|
2661
3049
|
event && event(...paramValues); // 执行事件
|
|
@@ -2668,7 +3056,7 @@
|
|
|
2668
3056
|
&& this.installListObj[eventKey]["config"].methods.renderFlowConfig){
|
|
2669
3057
|
let affectContentArr = this.newEventObj[executeType][eventKey] || [];
|
|
2670
3058
|
affectContentArr.forEach(affectContent =>{
|
|
2671
|
-
this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.
|
|
3059
|
+
this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.saspFlowAxios,this.nextNode,formData,affectContent);
|
|
2672
3060
|
});
|
|
2673
3061
|
}
|
|
2674
3062
|
});
|
|
@@ -2691,7 +3079,7 @@
|
|
|
2691
3079
|
&& this.installListObj[eventKey]["config"].methods.renderFlowConfig){
|
|
2692
3080
|
let affectContentArr = eventObj[eventKey] || [];
|
|
2693
3081
|
affectContentArr.forEach(affectContent =>{
|
|
2694
|
-
this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.
|
|
3082
|
+
this.installListObj[eventKey]["config"].methods.renderFlowConfig(this,this.CTX,this.saspFlowAxios,this.nextNode,formData,affectContent,executeType);
|
|
2695
3083
|
});
|
|
2696
3084
|
}
|
|
2697
3085
|
});
|
|
@@ -2706,7 +3094,7 @@
|
|
|
2706
3094
|
// && this.installListObj[affect.eventKey]["config"].methods.renderTableViewConfig){
|
|
2707
3095
|
// //调用渲染方法
|
|
2708
3096
|
// this.$set(affect,"field",field);//当前响应控件
|
|
2709
|
-
// this.installListObj[affect.eventKey]["config"].methods.renderTableViewConfig(this,this.CTX,this.
|
|
3097
|
+
// this.installListObj[affect.eventKey]["config"].methods.renderTableViewConfig(this,this.CTX,this.saspFlowAxios,this.dataAllObj,affect);
|
|
2710
3098
|
// }
|
|
2711
3099
|
|
|
2712
3100
|
|
|
@@ -2777,7 +3165,20 @@
|
|
|
2777
3165
|
}
|
|
2778
3166
|
},
|
|
2779
3167
|
|
|
2780
|
-
|
|
3168
|
+
initFlowObj() {//处理流程定义对象
|
|
3169
|
+
let gatewayFields = this.flowDefine.gatewayFields || "";
|
|
3170
|
+
this.isRefreshGetNextUsers = gatewayFields.split(",");
|
|
3171
|
+
Object.keys(this.allNodeInfo).forEach(key => {
|
|
3172
|
+
let obj = this.allNodeInfo[key];
|
|
3173
|
+
if (obj.nodeType === "UserTask" && (!obj.nodeLinkId || obj.nodeLinkId.indexOf('Activity_draft') === -1)) {
|
|
3174
|
+
if (obj.dealerType === "form" && obj.formField) {
|
|
3175
|
+
this.isRefreshGetNextUsers.push(obj.formField);
|
|
3176
|
+
}
|
|
3177
|
+
if (obj.dealerType === "variable" && obj.variable) {
|
|
3178
|
+
this.isRefreshGetNextUsers.push(obj.variable);
|
|
3179
|
+
}
|
|
3180
|
+
}
|
|
3181
|
+
});
|
|
2781
3182
|
let tabSetting = JSON.parse(this.flowDefine.tabSetting);
|
|
2782
3183
|
tabSetting.forEach(data => {
|
|
2783
3184
|
this.$set(this.tabTypeObj, data.type, data);
|
|
@@ -2803,7 +3204,7 @@
|
|
|
2803
3204
|
async getFlowAgent() {
|
|
2804
3205
|
this.agentTitle = "\"" + this.flowDefine.flowName + "\"" + " 流程设置";
|
|
2805
3206
|
this.agentFormObj.userId = this.loginUser.id;
|
|
2806
|
-
let flowAgentRes = await this.
|
|
3207
|
+
let flowAgentRes = await this.saspFlowAxios.post(this.api.plFlowSetting.getByUserFlowId, {
|
|
2807
3208
|
flowId: this.flowData.flowId,
|
|
2808
3209
|
userId: this.loginUser.id
|
|
2809
3210
|
});
|
|
@@ -2861,7 +3262,7 @@
|
|
|
2861
3262
|
*/
|
|
2862
3263
|
retSpecified(currentInst){
|
|
2863
3264
|
let flowInstId = currentInst.flowInstId;
|
|
2864
|
-
this.
|
|
3265
|
+
this.saspFlowAxios.post(this.api.plFlowInst.getBackData,{"flowInstId":flowInstId}).then(res => {
|
|
2865
3266
|
this.backNodeArr = [];
|
|
2866
3267
|
if(res.data.operateSuccess){
|
|
2867
3268
|
let result = res.data.resultObject || [];
|
|
@@ -2899,7 +3300,7 @@
|
|
|
2899
3300
|
return;
|
|
2900
3301
|
}
|
|
2901
3302
|
this.isDisabled2 = false;
|
|
2902
|
-
this.
|
|
3303
|
+
this.saspFlowAxios.post(this.api.plFlowInst.skipToNode,
|
|
2903
3304
|
{"instId":this.currentInst.flowInstId,"skipNode":this.backNodeId,
|
|
2904
3305
|
"backMsg":this.backMsg,"skipStatus":"skip"}).then(res => {
|
|
2905
3306
|
if(res.data.operateSuccess){
|