sasp-flow-render 1.1.5 → 1.1.6
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
|
<template>
|
|
2
2
|
<el-container style="height: 100%;">
|
|
3
|
-
<el-header style="height: auto;">
|
|
3
|
+
<el-header style="height: auto;" :class="[{'multiInstListHeader': flowIds.includes(',')}]">
|
|
4
4
|
<div class="search-form-parent el-card">
|
|
5
5
|
<el-form :inline="true" :model="crud.searchForm" size="small" class="demo-form-inline"
|
|
6
6
|
@keyup.enter.native="doSearch()" onSubmit="return false;">
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
<el-button type="primary" icon="el-icon-document-copy" size="small" round v-if="isShow('pending')"
|
|
83
83
|
@click="openFlowBatchPendingDialog">批量处理
|
|
84
84
|
</el-button>
|
|
85
|
-
<el-button type="warning" icon="el-icon-document-copy" size="small" round v-if="isShow('pending')"
|
|
85
|
+
<el-button type="warning" icon="el-icon-document-copy" size="small" round v-if="isShow('pending') && getFormDataByDataIds"
|
|
86
86
|
@click="openFlowBatchPendingDialogNew">快捷处理
|
|
87
87
|
</el-button>
|
|
88
88
|
</el-header>
|
|
@@ -296,6 +296,7 @@
|
|
|
296
296
|
}
|
|
297
297
|
},//工作流配置信息
|
|
298
298
|
formId: {type: String, default: ""},
|
|
299
|
+
flowIds: {type: String, default: ""},
|
|
299
300
|
startNodeKey: {type: String, default: ""},//开始节点key
|
|
300
301
|
flowNodeIdToInfo: {
|
|
301
302
|
type: Object, default: () => {
|
|
@@ -564,22 +565,22 @@
|
|
|
564
565
|
},
|
|
565
566
|
|
|
566
567
|
init() {
|
|
567
|
-
this.crud.searchForm["flowId"] = this.flowDefine.id;
|
|
568
|
+
this.crud.searchForm["flowId"] = this.flowIds || this.flowDefine.id;
|
|
568
569
|
this.$set(this.crud.searchForm,"currentNode","");
|
|
569
570
|
let flowStatus = this.flowStatusObj[this.tabType];
|
|
570
|
-
if(!flowStatus && flowStatus
|
|
571
|
+
if(!flowStatus && flowStatus !== 0){
|
|
571
572
|
flowStatus = "";
|
|
572
573
|
}
|
|
573
574
|
this.crud.searchForm["nodeType"] = this.tabType;
|
|
574
|
-
if (this.tabType
|
|
575
|
+
if (this.tabType === "draft") {
|
|
575
576
|
this.crud.searchForm["created"] = this.loginUser.id;
|
|
576
577
|
}
|
|
577
|
-
if (this.tabType
|
|
578
|
-
|| this.tabType
|
|
578
|
+
if (this.tabType === "pending" || this.tabType === "processed" || this.tabType === "finished"
|
|
579
|
+
|| this.tabType === "rescinded" || this.tabType === "discontinue") {
|
|
579
580
|
this.crud.searchForm["dealUserId"] = this.loginUser.id;
|
|
580
581
|
flowStatus = this.flowStatusObj[this.tabType] || "1";
|
|
581
582
|
}
|
|
582
|
-
if(this.tabType
|
|
583
|
+
if(this.tabType === "flowQuery"){
|
|
583
584
|
this.crud.searchForm["instQueryPower"] = this.instQueryPower;
|
|
584
585
|
this.crud.searchForm["created"] = this.loginUser.id;
|
|
585
586
|
this.crud.searchForm["queryOrderSetting"] = this.flowDefine.queryOrderSetting;
|
|
@@ -849,15 +850,20 @@
|
|
|
849
850
|
* 按钮操作事件
|
|
850
851
|
*/
|
|
851
852
|
listButtonOpt(buttonType, row, type) {
|
|
852
|
-
if (buttonType
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
853
|
+
if (buttonType === "update") {
|
|
854
|
+
//修改
|
|
855
|
+
this.openUpdateFlowForm(row, 'update');
|
|
856
|
+
} else if (buttonType === "deal") {
|
|
857
|
+
//处理
|
|
858
|
+
this.openUpdateFlowForm(row, 'handle');
|
|
859
|
+
} else if (buttonType === "view") {
|
|
860
|
+
//查看
|
|
857
861
|
this.openViewFlowForm(row);
|
|
858
|
-
} else if (buttonType
|
|
862
|
+
} else if (buttonType === "flowChart") {
|
|
863
|
+
//流程图
|
|
859
864
|
this.openFlowChart(row);
|
|
860
|
-
} else if (buttonType
|
|
865
|
+
} else if (buttonType === "flowRecord") {
|
|
866
|
+
// 流转记录
|
|
861
867
|
this.openFlowRecord(row);
|
|
862
868
|
}
|
|
863
869
|
},
|
|
@@ -1034,6 +1040,9 @@
|
|
|
1034
1040
|
|
|
1035
1041
|
<style scoped lang="scss">
|
|
1036
1042
|
@import "css/flowInstList";
|
|
1043
|
+
.multiInstListHeader {
|
|
1044
|
+
margin-top: 10px;
|
|
1045
|
+
}
|
|
1037
1046
|
</style>
|
|
1038
1047
|
<style lang="scss">
|
|
1039
1048
|
.el-tooltip__popper{
|
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="flow-inst" style="height: 100%;background-color: white;">
|
|
3
|
-
<div class="flow-chart" style="z-index:100;position:absolute;top:9px;right:0;text-align: right;">
|
|
3
|
+
<div class="flow-chart" style="z-index:100;position:absolute;top:9px;right:0;text-align: right;" v-if="!flowId.includes(',')">
|
|
4
4
|
<el-button size="mini" style="margin-right: 12px;"
|
|
5
5
|
type="warning" round icon="saspiconfont pl-icon-gongzuoliuchengtu"
|
|
6
6
|
@click="openFlowChart()">流程图
|
|
7
7
|
</el-button>
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
|
+
<div style="height: 100%" v-if="flowId.includes(',')">
|
|
11
|
+
<flow-inst-list ref="pendingRef"
|
|
12
|
+
v-if="initSuccess"
|
|
13
|
+
tab-type="pending"
|
|
14
|
+
:flow-define="flowDefine"
|
|
15
|
+
:flow-ids="flowId"
|
|
16
|
+
:userArr="userArr"
|
|
17
|
+
:userMap="userMap"
|
|
18
|
+
:form-id="formInfo.formId"
|
|
19
|
+
:flow-node-id-to-info="flowNodeIdToInfo"
|
|
20
|
+
:flow-node-name-obj="flowNodeNameObj"
|
|
21
|
+
:node-list-button-obj="nodeListButtonObj"
|
|
22
|
+
:opt-column-width="optColumnWidth"
|
|
23
|
+
:show-model="showModel"
|
|
24
|
+
:start-node-key-obj="startNodeKeyObj"
|
|
25
|
+
:flow-version-node-obj="flowVersionNodeObj"
|
|
26
|
+
@initTabNum="initTabNum"
|
|
27
|
+
:open-flow-chart="openFlowChart"
|
|
28
|
+
:open-flow-record="openFlowRecord"
|
|
29
|
+
:open-update-flow-form="openUpdateFlowForm"
|
|
30
|
+
:open-batch-update-flow-form="openBatchUpdateFlowForm"
|
|
31
|
+
:openNewBatchUpdateFlowForm="openNewBatchUpdateFlowForm"
|
|
32
|
+
@setDataValue="setDataValue"
|
|
33
|
+
>
|
|
34
|
+
</flow-inst-list>
|
|
35
|
+
</div>
|
|
36
|
+
<div style="height: 100%" v-else>
|
|
10
37
|
<el-tabs v-model="tabActive" v-if="initSuccess" type="border-card" @tab-click="tabClick"
|
|
11
38
|
style="width: 100%;height: 100%;">
|
|
12
39
|
<el-tab-pane name="draft" v-if="tabShow('draft')" style="height: 100%;" :lazy="true">
|
|
@@ -120,7 +147,7 @@
|
|
|
120
147
|
</flow-inst-list>
|
|
121
148
|
</el-tab-pane>
|
|
122
149
|
<el-tab-pane name="rescinded" v-if="tabShow('rescinded')" :lazy="true">
|
|
123
|
-
|
|
150
|
+
<span slot="label">
|
|
124
151
|
<i v-if="tabTypeObj['showTabIcon']" :class="tabTypeObj['rescinded'].iconShow"></i>
|
|
125
152
|
{{tabTypeObj['showtTabText']? tabTypeObj['rescinded'].tabName : ''}}
|
|
126
153
|
<span style="color: red">({{numberObj['rescinded']}})</span>
|
|
@@ -145,7 +172,7 @@
|
|
|
145
172
|
</flow-inst-list>
|
|
146
173
|
</el-tab-pane>
|
|
147
174
|
<el-tab-pane name="discontinue" v-if="tabShow('discontinue')" :lazy="true">
|
|
148
|
-
|
|
175
|
+
<span slot="label">
|
|
149
176
|
<i v-if="tabTypeObj['showTabIcon']" :class="tabTypeObj['discontinue'].iconShow"></i>
|
|
150
177
|
{{tabTypeObj['showtTabText']? tabTypeObj['discontinue'].tabName : ''}}
|
|
151
178
|
<span style="color: red">({{numberObj['discontinue']}})</span>
|
|
@@ -170,7 +197,7 @@
|
|
|
170
197
|
</flow-inst-list>
|
|
171
198
|
</el-tab-pane>
|
|
172
199
|
<el-tab-pane name="flowQuery" v-if="tabShow('flowQuery')" :lazy="true">
|
|
173
|
-
|
|
200
|
+
<span slot="label">
|
|
174
201
|
<i v-if="tabTypeObj['showTabIcon']" :class="tabTypeObj['flowQuery'].iconShow"></i>
|
|
175
202
|
{{tabTypeObj['showtTabText']? tabTypeObj['flowQuery'].tabName : ''}}
|
|
176
203
|
</span>
|
|
@@ -195,6 +222,7 @@
|
|
|
195
222
|
</flow-inst-list>
|
|
196
223
|
</el-tab-pane>
|
|
197
224
|
</el-tabs>
|
|
225
|
+
</div>
|
|
198
226
|
|
|
199
227
|
<!--处理、修改、查看流程信息弹窗-->
|
|
200
228
|
<el-dialog :close-on-click-modal=false top="5vh" width="90%" height="90%" :visible.sync="flowInstDataDialog" append-to-body
|
|
@@ -280,16 +308,17 @@
|
|
|
280
308
|
</el-dialog>
|
|
281
309
|
|
|
282
310
|
<!--新版批量处理信息弹窗-->
|
|
283
|
-
<el-dialog title="
|
|
311
|
+
<el-dialog title="快捷处理" :close-on-click-modal=false top="5vh" width="90%" height="90%" :visible.sync="flowBatchSelectPendingDialog"
|
|
284
312
|
@close="newBatchDealClose" class="batchSelectDialog" append-to-body>
|
|
285
313
|
<flow-new-batch-deal v-if="flowBatchSelectPendingDialog" :formSearchObj="formSearchObj" ref="flowNewBatchDealRef"
|
|
286
314
|
:formDataObj="formDataObj" :allNodeInfo="allNodeInfo" :newBatchDealSubmit="newBatchDealSubmit"
|
|
287
315
|
@openCurrUpdateFlowForm="openCurrUpdateFlowForm" :isRefreshGetNextUsers="isRefreshGetNextUsers"
|
|
288
316
|
:userMap="userMap" :fieldSysDataObj="fieldSysDataObj" :sysDataObj="sysDataObj" :formFieldObj="formFieldObj"
|
|
317
|
+
:currentPage="currentPage" :total="total" :pages="pages" @changePage="changePage"
|
|
289
318
|
>
|
|
290
319
|
</flow-new-batch-deal>
|
|
291
320
|
<div slot="footer" class="dialog-footer">
|
|
292
|
-
<el-button type="primary" size="small" @click="newBatchDealAllSubmit"
|
|
321
|
+
<el-button type="primary" size="small" @click="newBatchDealAllSubmit">快速提交</el-button>
|
|
293
322
|
<el-button size="small" @click="flowBatchSelectPendingDialog = false">取消</el-button>
|
|
294
323
|
</div>
|
|
295
324
|
</el-dialog>
|
|
@@ -415,7 +444,7 @@
|
|
|
415
444
|
:visible.sync="flowChartObj.dialogVisible"
|
|
416
445
|
width="90%" height="90%"
|
|
417
446
|
top="5vh">
|
|
418
|
-
<flow-chart :flow-id="flowId + ''" :inst-id="flowChartObj.instId + ''"
|
|
447
|
+
<flow-chart :flow-id="flowChartObj.flowId + ''" :inst-id="flowChartObj.instId + ''"
|
|
419
448
|
:link-proc-id="flowChartObj.linkProcId + ''"
|
|
420
449
|
:is-release="flowChartObj.isRelease"
|
|
421
450
|
v-if="flowChartObj.dialogVisible"></flow-chart>
|
|
@@ -519,6 +548,7 @@
|
|
|
519
548
|
loginUser: {},//当前登录用户
|
|
520
549
|
userDept: {},//当前登录用户所在部门信息
|
|
521
550
|
flowDefine: {},
|
|
551
|
+
flowDefineByFlowId: {},
|
|
522
552
|
flowNodeIdToInfo: {},//key为id
|
|
523
553
|
flowNodeNameObj:{}, //节点名称对应节点id分组
|
|
524
554
|
draftNodeId:"", // 草稿节点id
|
|
@@ -880,8 +910,10 @@
|
|
|
880
910
|
isShowAgentSet:false,//是否显示流程设置
|
|
881
911
|
loadAgentSuccess:false,//是否显示流程设置
|
|
882
912
|
|
|
883
|
-
startNodeKeyObj:{}, //当前开始节点 key 和对应版本号
|
|
884
|
-
|
|
913
|
+
startNodeKeyObj: {}, //当前开始节点 key 和对应版本号
|
|
914
|
+
startNodeKeyObjByFlowId: {},
|
|
915
|
+
flowVersionNodeObj: {}, //版本号对应的节点对象
|
|
916
|
+
flowVersionNodeObjByFlowId: {},
|
|
885
917
|
parentListViewId:"",
|
|
886
918
|
parentTableViewId:"",
|
|
887
919
|
scriptObj:{},
|
|
@@ -899,7 +931,8 @@
|
|
|
899
931
|
taskNode: "",
|
|
900
932
|
flowNewBatchDealArr: [],
|
|
901
933
|
isNewSelectBatchDeal: false,
|
|
902
|
-
loading: true
|
|
934
|
+
loading: true,
|
|
935
|
+
isInit: false
|
|
903
936
|
},
|
|
904
937
|
formDataObj: {},
|
|
905
938
|
formNewBtnArr: [],
|
|
@@ -930,6 +963,10 @@
|
|
|
930
963
|
isRefreshGetNextUsers: [], // 是否要刷新下一步处理人的字段,网关字段,表单,变量
|
|
931
964
|
fieldSysDataObj: {},
|
|
932
965
|
flowNewBatchDealDataIds: "",
|
|
966
|
+
currentPage: 1, //当前页
|
|
967
|
+
pages: 1, //总页数
|
|
968
|
+
total: 0, //总条数
|
|
969
|
+
pageSize: 50, //每页多少条
|
|
933
970
|
}
|
|
934
971
|
},
|
|
935
972
|
watch:{
|
|
@@ -956,21 +993,28 @@
|
|
|
956
993
|
this.isShowAgentSet = false;
|
|
957
994
|
this.loginUser = this.FLOW_CACHE_GLOBAL.getLoginUser();
|
|
958
995
|
this.userDept = this.FLOW_CACHE_GLOBAL.getLoginDept();
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
996
|
+
|
|
997
|
+
if (this.flowId.includes(",")) {
|
|
998
|
+
this.getMultiFlowInfo().then(() => {
|
|
999
|
+
this.initSuccess = true;
|
|
1000
|
+
this.getFlowAgent();
|
|
1001
|
+
});
|
|
1002
|
+
}else {
|
|
1003
|
+
this.initTabOpts(); // 初始化外部选项卡权限
|
|
1004
|
+
this.getFlowInfo().then(res => {
|
|
1005
|
+
this.initSuccess = true;
|
|
1006
|
+
this.initFlowObj();
|
|
1007
|
+
this.getFlowAgent(); //加载流程代理
|
|
1008
|
+
// this.initFieldSysData();
|
|
1009
|
+
});
|
|
1010
|
+
this.initTabNum();
|
|
1011
|
+
}
|
|
969
1012
|
},
|
|
970
1013
|
methods: {
|
|
971
1014
|
// 新批量处理关闭弹框时数据重做的回调
|
|
972
1015
|
newBatchDealClose() {
|
|
973
|
-
Object.assign(this.formSearchObj, {isNewSelectBatchDeal: false});
|
|
1016
|
+
Object.assign(this.formSearchObj, {isNewSelectBatchDeal: false, taskNode: ""});
|
|
1017
|
+
this.currentPage = 1;
|
|
974
1018
|
// let flowInstListVm = this.$refs["pendingRef"];
|
|
975
1019
|
// if (flowInstListVm) {
|
|
976
1020
|
// flowInstListVm.initFormDataByDataIds();
|
|
@@ -1080,6 +1124,12 @@
|
|
|
1080
1124
|
initUpdateFlowForm(row) {
|
|
1081
1125
|
this.currentRowData = row;
|
|
1082
1126
|
this.currNodeName = 'noEnd';
|
|
1127
|
+
if (this.flowId.includes(',')) {
|
|
1128
|
+
this.flowDefine = this.flowDefineByFlowId[row.flowId];
|
|
1129
|
+
this.startNodeKeyObj = this.startNodeKeyObjByFlowId[row.flowId];
|
|
1130
|
+
this.flowVersionNodeObj = this.flowVersionNodeObjByFlowId[row.flowId];
|
|
1131
|
+
// Object.assign(this.formInfo, this.formInfoByFlowId[row.flowId]);
|
|
1132
|
+
}
|
|
1083
1133
|
|
|
1084
1134
|
return new Promise(resolve => {
|
|
1085
1135
|
let startNodeKey = this.startNodeKeyObj[row.version];
|
|
@@ -1111,7 +1161,7 @@
|
|
|
1111
1161
|
this.$nextTick(() => {
|
|
1112
1162
|
this.exeFlowEvent(executePosition,"afterClick",row.currentNode);
|
|
1113
1163
|
let currentNodeObj = this.flowNodeIdToInfo[row.currentNode] ||{};
|
|
1114
|
-
if(currentNodeObj.openEvent
|
|
1164
|
+
if(currentNodeObj.openEvent === '1'){ //开启事件
|
|
1115
1165
|
this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
|
|
1116
1166
|
}
|
|
1117
1167
|
})
|
|
@@ -1179,7 +1229,8 @@
|
|
|
1179
1229
|
Object.assign(this.formSearchObj, {
|
|
1180
1230
|
flowNewBatchDealArr: [],
|
|
1181
1231
|
isNewSelectBatchDeal: false,
|
|
1182
|
-
loading:true
|
|
1232
|
+
loading: true,
|
|
1233
|
+
isInit: false
|
|
1183
1234
|
});
|
|
1184
1235
|
this.initFieldSysData();
|
|
1185
1236
|
// 处理按钮渲染
|
|
@@ -1190,6 +1241,9 @@
|
|
|
1190
1241
|
});
|
|
1191
1242
|
this.formNewBtnArr = btnArr;
|
|
1192
1243
|
this.initNewBatchDeal().then(arr => {
|
|
1244
|
+
Object.assign(this.formSearchObj, {
|
|
1245
|
+
isInit: true,
|
|
1246
|
+
});
|
|
1193
1247
|
this.getFormDataByDataIds(this.formInfo.formId, this.flowNewBatchDealDataIds).then(res => {
|
|
1194
1248
|
this.formDataObj = res || {};
|
|
1195
1249
|
arr.forEach(flowInst => {
|
|
@@ -1234,7 +1288,7 @@
|
|
|
1234
1288
|
Object.assign(this.formSearchObj, {
|
|
1235
1289
|
flowNewBatchDealArr: arr,
|
|
1236
1290
|
isNewSelectBatchDeal: true,
|
|
1237
|
-
loading:false
|
|
1291
|
+
loading: false
|
|
1238
1292
|
});
|
|
1239
1293
|
});
|
|
1240
1294
|
});
|
|
@@ -1246,12 +1300,17 @@
|
|
|
1246
1300
|
return new Promise(resolve => {
|
|
1247
1301
|
this.saspFlowAxios.post(this.api.plFlowInst.findInstPending, {
|
|
1248
1302
|
flowId: this.flowDefine.id,
|
|
1249
|
-
currentNode:
|
|
1303
|
+
currentNode: this.formSearchObj.taskNode,
|
|
1250
1304
|
nodeType: "pending",
|
|
1251
1305
|
dealUserId: this.loginUser.id,
|
|
1252
1306
|
flowStatus: "1",
|
|
1253
|
-
flowVar: "1"
|
|
1307
|
+
flowVar: "1",
|
|
1308
|
+
rows: this.pageSize,
|
|
1309
|
+
page: this.currentPage
|
|
1254
1310
|
}).then(res => {
|
|
1311
|
+
// console.log('initNewBatchDeal', res);
|
|
1312
|
+
this.total = res.data.total;
|
|
1313
|
+
this.pages = res.data.pages;
|
|
1255
1314
|
let flowNewBatchDeal = [];
|
|
1256
1315
|
this.flowNewBatchDealDataIds = "";
|
|
1257
1316
|
if (res.data && res.data.records.length > 0) {
|
|
@@ -1275,6 +1334,11 @@
|
|
|
1275
1334
|
});
|
|
1276
1335
|
},
|
|
1277
1336
|
|
|
1337
|
+
changePage(currPage) {
|
|
1338
|
+
this.currentPage = currPage;
|
|
1339
|
+
this.openNewBatchUpdateFlowForm();
|
|
1340
|
+
},
|
|
1341
|
+
|
|
1278
1342
|
// 新批量处理当前行点击编辑按钮打开弹框回调事件
|
|
1279
1343
|
openCurrUpdateFlowForm(row) {
|
|
1280
1344
|
this.openUpdateFlowForm(row, "update");
|
|
@@ -1327,9 +1391,10 @@
|
|
|
1327
1391
|
if (selectionArr.length === 0) {
|
|
1328
1392
|
return this.$message.warning('请先勾选要提交的数据!');
|
|
1329
1393
|
}
|
|
1394
|
+
// 判断是否选择了下一步处理人
|
|
1330
1395
|
let str = "即将提交" + selectionArr.length + "条数据";
|
|
1331
1396
|
if(submitType === "all"){
|
|
1332
|
-
str = "
|
|
1397
|
+
str = "即将提交当前显示内容(不包括正在加载的数据)";
|
|
1333
1398
|
}
|
|
1334
1399
|
this.$confirm(`${str}, 确认是否继续?`, '提示', {
|
|
1335
1400
|
confirmButtonText: '确定',
|
|
@@ -1338,42 +1403,33 @@
|
|
|
1338
1403
|
}).then(() => {
|
|
1339
1404
|
let params = [];
|
|
1340
1405
|
let instIds = "";
|
|
1406
|
+
let nextStepSelectionArr = [];
|
|
1341
1407
|
selectionArr.forEach(selectionObj => {
|
|
1342
1408
|
let paramsObj = {dataId: selectionObj.dataId};
|
|
1343
1409
|
let updateParams = {};
|
|
1344
1410
|
(selectionObj.settingInfo || []).forEach(item => {
|
|
1345
1411
|
updateParams[item.field] = item.defaultValue;
|
|
1346
1412
|
});
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
instIds += `,${selectionObj.flowInstId}`;
|
|
1413
|
+
if (Object.keys(updateParams).length > 0) {
|
|
1414
|
+
paramsObj["updateParams"] = updateParams;
|
|
1415
|
+
params.push(paramsObj);
|
|
1351
1416
|
}
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
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
|
-
});
|
|
1417
|
+
let flag = selectionObj.flowInstId;
|
|
1418
|
+
if (flag || selectionObj.isEndNode) {
|
|
1419
|
+
instIds += `,${selectionObj.flowInstId}`;
|
|
1420
|
+
nextStepSelectionArr.push(selectionObj);
|
|
1375
1421
|
}
|
|
1376
1422
|
});
|
|
1423
|
+
// console.log(this.flowDefine, this.allNodeInfo, '提交', selectionArr, nextStepSelectionArr);
|
|
1424
|
+
if (params.length > 0) {
|
|
1425
|
+
this.saveBatchDealFormData(this.formInfo.formId, JSON.stringify(params)).then(resData => {
|
|
1426
|
+
if (resData.operateSuccess) {
|
|
1427
|
+
this.batchUpdateFlow(instIds, nextStepSelectionArr);
|
|
1428
|
+
}
|
|
1429
|
+
});
|
|
1430
|
+
}else {
|
|
1431
|
+
this.batchUpdateFlow(instIds, nextStepSelectionArr);
|
|
1432
|
+
}
|
|
1377
1433
|
}).catch(() => {
|
|
1378
1434
|
this.$message({
|
|
1379
1435
|
type: 'info',
|
|
@@ -1382,6 +1438,35 @@
|
|
|
1382
1438
|
});
|
|
1383
1439
|
},
|
|
1384
1440
|
|
|
1441
|
+
batchUpdateFlow(instIds, nextStepSelectionArr) {
|
|
1442
|
+
if (!instIds) {
|
|
1443
|
+
return this.$message.warning("instIds不能为空!");
|
|
1444
|
+
}
|
|
1445
|
+
// 更新工作流状态
|
|
1446
|
+
this.saspFlowAxios.post(this.api.plFlowInst.batchUpdateFlowStatus, {
|
|
1447
|
+
instIds: instIds.slice(1)
|
|
1448
|
+
}).then(updateFlowStatusRes => {
|
|
1449
|
+
let type = "error";
|
|
1450
|
+
let message = updateFlowStatusRes.data.operateMessage;
|
|
1451
|
+
if (updateFlowStatusRes && updateFlowStatusRes.data.operateSuccess) {
|
|
1452
|
+
type = "success";
|
|
1453
|
+
// 执行工作流下一步
|
|
1454
|
+
this.newBatchExecuteNextStep(nextStepSelectionArr);
|
|
1455
|
+
// 提交完之后刷新页面,不关闭弹窗
|
|
1456
|
+
this.currentPage = 1;
|
|
1457
|
+
this.openNewBatchUpdateFlowForm();
|
|
1458
|
+
|
|
1459
|
+
let pendingRefVm = this.$refs["pendingRef"];
|
|
1460
|
+
pendingRefVm && pendingRefVm.init();
|
|
1461
|
+
// this.flowBatchSelectPendingDialog = false;
|
|
1462
|
+
}
|
|
1463
|
+
this.$message({
|
|
1464
|
+
type,
|
|
1465
|
+
message
|
|
1466
|
+
});
|
|
1467
|
+
});
|
|
1468
|
+
},
|
|
1469
|
+
|
|
1385
1470
|
// 流程批量审批,全部提交
|
|
1386
1471
|
newBatchDealAllSubmit() {
|
|
1387
1472
|
let flowNewBatchDealVm = this.$refs.flowNewBatchDealRef;
|
|
@@ -1392,6 +1477,9 @@
|
|
|
1392
1477
|
}
|
|
1393
1478
|
});
|
|
1394
1479
|
// console.log('全部提交', selectArr);
|
|
1480
|
+
if (selectArr.length === 0) {
|
|
1481
|
+
return this.$message.warning("暂无提交内容!");
|
|
1482
|
+
}
|
|
1395
1483
|
this.newBatchDealSubmit(selectArr, "all");
|
|
1396
1484
|
},
|
|
1397
1485
|
|
|
@@ -1400,24 +1488,38 @@
|
|
|
1400
1488
|
arr.forEach(items => {
|
|
1401
1489
|
let nextNodeObj = this.allNodeInfo[items.nextDealUsers.nextNodeId];
|
|
1402
1490
|
let dealers = items.chooseNextUserId;
|
|
1491
|
+
if (Array.isArray(items.chooseNextUserId)) {
|
|
1492
|
+
dealers = items.chooseNextUserId.join(",");
|
|
1493
|
+
}
|
|
1403
1494
|
let dealersObj = {};
|
|
1404
|
-
dealersObj[nextNodeObj["nodeLinkId"]] = dealers;
|
|
1405
|
-
|
|
1495
|
+
dealersObj[(nextNodeObj || {})["nodeLinkId"]] = dealers;
|
|
1406
1496
|
let nextStepBaseObj = {
|
|
1497
|
+
flowSaveSuccess: true,
|
|
1498
|
+
flowDataId: items.dataId,
|
|
1499
|
+
flowInstId: items.flowInstId,
|
|
1407
1500
|
instId: items.flowInstId,
|
|
1408
1501
|
dealers: dealers,
|
|
1409
1502
|
// dealerNames: dealerNames,
|
|
1410
1503
|
dealersObj: JSON.stringify(dealersObj),
|
|
1411
|
-
nextNodeType: nextNodeObj.nodeType,
|
|
1412
|
-
nextNodeId: nextNodeObj.id,
|
|
1413
|
-
nextNodeKey: nextNodeObj.nodeLinkId,
|
|
1414
1504
|
taskId: items.taskId,
|
|
1415
1505
|
}
|
|
1506
|
+
let nextNode = {};
|
|
1507
|
+
if (nextNodeObj) {
|
|
1508
|
+
nextNode = {
|
|
1509
|
+
nextNodeType: nextNodeObj.nodeType,
|
|
1510
|
+
nextNodeId: nextNodeObj.id,
|
|
1511
|
+
nextNodeKey: nextNodeObj.nodeLinkId,
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
let nowNodeObj = this.allNodeInfo[items.currentNode];
|
|
1515
|
+
if (nowNodeObj && nowNodeObj.dealType === 'multi') {
|
|
1516
|
+
this.$set(nextStepBaseObj, 'passCondition', nowNodeObj.passCondition);
|
|
1517
|
+
}
|
|
1416
1518
|
// if(this.flowNextOperation) {
|
|
1417
1519
|
// this.flowNextOperation(obj.instId, obj.dealers, obj.dealerNames, obj.taskId);
|
|
1418
1520
|
// }
|
|
1419
1521
|
let paramsSourceObj = {"SASP_FLOW_USE_VARIABLES": "yes"};
|
|
1420
|
-
Object.assign(paramsSourceObj,
|
|
1522
|
+
Object.assign(paramsSourceObj, nextStepBaseObj, nextNode);
|
|
1421
1523
|
params.push(paramsSourceObj);
|
|
1422
1524
|
});
|
|
1423
1525
|
// console.log('params',params);
|
|
@@ -1526,18 +1628,20 @@
|
|
|
1526
1628
|
|
|
1527
1629
|
/**
|
|
1528
1630
|
* 打开流程图窗口
|
|
1529
|
-
* @param
|
|
1631
|
+
* @param row 流程实例ID
|
|
1530
1632
|
*/
|
|
1531
1633
|
openFlowChart(row) {
|
|
1634
|
+
let flowId = "";
|
|
1532
1635
|
let instId = "";
|
|
1533
1636
|
let linkProcId = "";
|
|
1534
1637
|
let isRelease = "";
|
|
1535
|
-
if(row){
|
|
1638
|
+
if (row) {
|
|
1639
|
+
flowId = row.flowId;
|
|
1536
1640
|
instId = row.flowInstId;
|
|
1537
1641
|
linkProcId = row.linkProcId;
|
|
1538
1642
|
isRelease = row.isRelease;
|
|
1539
1643
|
}
|
|
1540
|
-
this.flowChartObj = {instId: instId,linkProcId:linkProcId,isRelease:isRelease, dialogVisible: true};
|
|
1644
|
+
this.flowChartObj = {flowId: flowId,instId: instId,linkProcId:linkProcId,isRelease:isRelease, dialogVisible: true};
|
|
1541
1645
|
},
|
|
1542
1646
|
|
|
1543
1647
|
/**
|
|
@@ -1545,10 +1649,11 @@
|
|
|
1545
1649
|
* @param row 流程行数据
|
|
1546
1650
|
*/
|
|
1547
1651
|
openFlowRecord(row) {
|
|
1548
|
-
|
|
1549
|
-
|
|
1652
|
+
console.log('流转记录',row);
|
|
1653
|
+
let arr = ["2", "3", "4"]; // 旧版本的已办结已撤销以及已中止数据通过旧版接口查询流转记录
|
|
1654
|
+
if (arr.indexOf(row.flowStatus) > -1 && row.isOldData === "1") {
|
|
1550
1655
|
this.flowRecordObj = {instId: row.flowInstId || "", oldDialogVisible: true};
|
|
1551
|
-
}else{
|
|
1656
|
+
} else {
|
|
1552
1657
|
this.flowRecordObj = {instId: row.flowInstId || "", dialogVisible: true};
|
|
1553
1658
|
}
|
|
1554
1659
|
},
|
|
@@ -1804,7 +1909,20 @@
|
|
|
1804
1909
|
this.$set(obj,'passCondition',this.nowNode.passCondition)
|
|
1805
1910
|
}
|
|
1806
1911
|
let params = {"SASP_FLOW_USE_VARIABLES":"yes"};
|
|
1807
|
-
Object.assign(params,flowParams || {},obj);
|
|
1912
|
+
// Object.assign(params,flowParams || {},obj);
|
|
1913
|
+
Object.assign(params,obj);
|
|
1914
|
+
let allParamKeys = Object.keys(flowParams || {});
|
|
1915
|
+
allParamKeys.forEach(templateKey => {
|
|
1916
|
+
if(this.isRefreshGetNextUsers.indexOf(templateKey) > -1){
|
|
1917
|
+
params[templateKey] = flowParams[templateKey];
|
|
1918
|
+
if(allParamKeys.indexOf(templateKey + "_SASP_SYS_DATA") > -1){
|
|
1919
|
+
params[templateKey + "_SASP_SYS_DATA"] = flowParams[templateKey + "_SASP_SYS_DATA"];
|
|
1920
|
+
}
|
|
1921
|
+
if(allParamKeys.indexOf(templateKey + "_SASP_SYS_DATA_ID") > -1){
|
|
1922
|
+
params[templateKey + "_SASP_SYS_DATA_ID"] = flowParams[templateKey + "_SASP_SYS_DATA_ID"];
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
})
|
|
1808
1926
|
this.saspFlowAxios.post(this.api.plFlowInst.getNextUsers, params).then(res => {
|
|
1809
1927
|
if(!res.data.operateSuccess){
|
|
1810
1928
|
this.isDisabled['nextStep'] = true;
|
|
@@ -1923,6 +2041,9 @@
|
|
|
1923
2041
|
this.chooseNextUserId = userInfo.id;
|
|
1924
2042
|
this.chooseNextUserName = userInfo.userName;
|
|
1925
2043
|
}
|
|
2044
|
+
if(this.nextNode.dealType === "multi" && this.nextSteptUserArr.length === 1){
|
|
2045
|
+
this.chooseNextUserId = [userInfo.id];
|
|
2046
|
+
}
|
|
1926
2047
|
}
|
|
1927
2048
|
});
|
|
1928
2049
|
});
|
|
@@ -2725,7 +2846,7 @@
|
|
|
2725
2846
|
this.$forceUpdate();
|
|
2726
2847
|
}
|
|
2727
2848
|
// 加载工作流脚本与工作流事件规则
|
|
2728
|
-
this.initFlowScript().then(() => {
|
|
2849
|
+
this.initFlowScript(this.flowData.flowId).then(() => {
|
|
2729
2850
|
resolve(true);
|
|
2730
2851
|
})
|
|
2731
2852
|
});
|
|
@@ -2738,14 +2859,84 @@
|
|
|
2738
2859
|
});
|
|
2739
2860
|
},
|
|
2740
2861
|
|
|
2862
|
+
getMultiFlowInfo() {
|
|
2863
|
+
return new Promise(resolve => {
|
|
2864
|
+
let flowIdArr = this.flowId.split(",").filter(item => item);
|
|
2865
|
+
flowIdArr.forEach(flowId => {
|
|
2866
|
+
this.FLOW_GLOBAL.getFlowDefineById(flowId).then(flowDefine => {
|
|
2867
|
+
this.flowDefineByFlowId[flowId] = flowDefine;
|
|
2868
|
+
});
|
|
2869
|
+
});
|
|
2870
|
+
|
|
2871
|
+
const initFlowNodeFunc = flowIdArr.map(flowId => (() => this.FLOW_GLOBAL.getFlowNodesByFlowId(flowId)));
|
|
2872
|
+
Promise.all(initFlowNodeFunc.map(func => func())).then(allFlowNodeArr => {
|
|
2873
|
+
//工作流节点
|
|
2874
|
+
this.startNodeKey = "Activity_draft";
|
|
2875
|
+
for (const allFlowNode of allFlowNodeArr) {
|
|
2876
|
+
this.startNodeKeyObj = {};
|
|
2877
|
+
this.flowVersionNodeObj = {};
|
|
2878
|
+
(allFlowNode || []).forEach(item => {
|
|
2879
|
+
if (item.nodeLinkId.indexOf("Activity_draft") > -1) {
|
|
2880
|
+
this.startNodeKey = item.nodeLinkId;
|
|
2881
|
+
this.startNodeKeyObj[item.version] = item.nodeLinkId; //开始节点对应版本号
|
|
2882
|
+
}
|
|
2883
|
+
if (!this.flowVersionNodeObj[item.version]) {
|
|
2884
|
+
this.$set(this.flowVersionNodeObj, item.version, {});
|
|
2885
|
+
}
|
|
2886
|
+
this.$set(this.flowVersionNodeObj[item.version], item.nodeLinkId, item); //版本节点对象
|
|
2887
|
+
|
|
2888
|
+
this.allNodeInfo[item.id] = item;
|
|
2889
|
+
this.flowNodeIdToInfo[item.id] = item;
|
|
2890
|
+
let nodeArr = ['StartEvent', 'ParallelGateway', 'SequenceFlow', 'ExclusiveGateway', 'InclusiveGateway'];
|
|
2891
|
+
if (item.nodeType && nodeArr.indexOf(item.nodeType) === -1) {
|
|
2892
|
+
if (!this.flowNodeNameObj[item.nodeLinkId]) {
|
|
2893
|
+
this.$set(this.flowNodeNameObj, item.nodeLinkId, item.nodeName);
|
|
2894
|
+
} else {
|
|
2895
|
+
if (this.flowNodeNameObj[item.nodeLinkId] !== item.nodeName) {
|
|
2896
|
+
this.flowNodeNameObj[item.nodeLinkId] = this.flowNodeNameObj[item.nodeLinkId] + "," + item.nodeName;
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
if (item.nodeType === "UserTask" && (item.nodeLinkId || "").indexOf("Activity_draft") > -1) {
|
|
2901
|
+
this.draftNodeId = item.id; // 草稿节点id
|
|
2902
|
+
}
|
|
2903
|
+
// 行按钮
|
|
2904
|
+
let listButton = JSON.parse(item.listButton || "[]") || [];
|
|
2905
|
+
listButton.forEach(button => {
|
|
2906
|
+
button.showName = button.showName ? button.showName : this.listButtonObj[button.type];
|
|
2907
|
+
});
|
|
2908
|
+
this.nodeListButtonObj[item.id] = listButton;
|
|
2909
|
+
|
|
2910
|
+
// 表单按钮
|
|
2911
|
+
let formButton = JSON.parse(item.formButton || "[]") || [];
|
|
2912
|
+
formButton.forEach(button => {
|
|
2913
|
+
button.showName = button.showName ? button.showName : this.formButtonObj[button.type];
|
|
2914
|
+
});
|
|
2915
|
+
|
|
2916
|
+
this.nodeFormButtonObj[item.id] = this.sortButtonArr(formButton);
|
|
2917
|
+
this.nodeFormBtnObj[item.id] = this.formatterFormButton(formButton);
|
|
2918
|
+
});
|
|
2919
|
+
let flowId = allFlowNode[0].flowId;
|
|
2920
|
+
this.$set(this.startNodeKeyObjByFlowId, flowId, this.startNodeKeyObj);
|
|
2921
|
+
this.$set(this.flowVersionNodeObjByFlowId, flowId, this.flowVersionNodeObj);
|
|
2922
|
+
// 加载工作流脚本与工作流事件规则
|
|
2923
|
+
this.flowDefine = this.flowDefineByFlowId[flowId];
|
|
2924
|
+
this.initFlowScript(flowId).then(() => {
|
|
2925
|
+
resolve(true);
|
|
2926
|
+
});
|
|
2927
|
+
}
|
|
2928
|
+
});
|
|
2929
|
+
});
|
|
2930
|
+
},
|
|
2931
|
+
|
|
2741
2932
|
/**
|
|
2742
2933
|
* 加载工作流脚本与工作流事件规则
|
|
2743
2934
|
*/
|
|
2744
|
-
initFlowScript(){
|
|
2935
|
+
initFlowScript(flowId){
|
|
2745
2936
|
return new Promise(resolve => {
|
|
2746
2937
|
this.saspFlowAxios.all([
|
|
2747
|
-
this.saspFlowAxios.post(this.api.plFlowScript.find,{"flowId":
|
|
2748
|
-
this.saspFlowAxios.post(this.api.plFlowEventDetail.findByFlowAndLeadFunc,{"flowId":
|
|
2938
|
+
this.saspFlowAxios.post(this.api.plFlowScript.find,{"flowId": flowId}),
|
|
2939
|
+
this.saspFlowAxios.post(this.api.plFlowEventDetail.findByFlowAndLeadFunc,{"flowId": flowId,"version":this.flowDefine.flowVersion || "1.0"})
|
|
2749
2940
|
]).then(this.saspFlowAxios.spread((resScript, resEvent) => {
|
|
2750
2941
|
// 流程脚本
|
|
2751
2942
|
if(resScript){
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-container style="height: 100%">
|
|
3
3
|
<el-header style="height: auto">
|
|
4
|
-
<el-form inline size="small" class="search-form-parent el-card"
|
|
4
|
+
<el-form inline size="small" class="search-form-parent el-card">
|
|
5
5
|
<el-form-item label="任务节点筛选">
|
|
6
6
|
<el-select v-model="formSearchObj.taskNode" style="width: 97%;"
|
|
7
7
|
clearable filterable @change="taskNodeChange">
|
|
8
8
|
<el-option v-for="item in taskNodeArr" :key="item.currentNode"
|
|
9
9
|
:label="item.currentNodeName"
|
|
10
|
-
:value="item.
|
|
10
|
+
:value="item.nodeKey">
|
|
11
11
|
</el-option>
|
|
12
12
|
</el-select>
|
|
13
13
|
</el-form-item>
|
|
14
|
+
<el-form-item>
|
|
15
|
+
<el-button type="primary" icon="el-icon-search" @click="doSearch()">查询</el-button>
|
|
16
|
+
<el-button icon="el-icon-close" @click="clearSearch()">清空</el-button>
|
|
17
|
+
</el-form-item>
|
|
14
18
|
</el-form>
|
|
15
19
|
</el-header>
|
|
16
20
|
<el-main style="padding-top: 10px;padding-bottom: 0">
|
|
17
21
|
<div style="margin-bottom: 10px;">
|
|
18
22
|
<el-button type="primary" size="small" @click="partSubmit">提交</el-button>
|
|
19
23
|
</div>
|
|
20
|
-
<el-form size="small" style="height: calc(100% - 42px)">
|
|
24
|
+
<el-form size="small" style="height: calc(100% - 42px);position: relative">
|
|
21
25
|
<el-table
|
|
22
26
|
v-loading="formSearchObj.loading"
|
|
23
27
|
element-loading-text="正在加载,请稍等..."
|
|
@@ -196,6 +200,15 @@
|
|
|
196
200
|
</el-table>
|
|
197
201
|
</el-form>
|
|
198
202
|
</el-main>
|
|
203
|
+
<el-footer style="height: auto;text-align: right;padding-top: 15px;margin-bottom: -7px" v-show="isShowPage">
|
|
204
|
+
<el-button-group>
|
|
205
|
+
<el-button size="small" icon="el-icon-arrow-left" :disabled="prevDisabled" @click="prevClick">上一页</el-button>
|
|
206
|
+
<el-button size="small" :disabled="nextDisabled" @click="nextClick">下一页<i class="el-icon-arrow-right el-icon--right"></i></el-button>
|
|
207
|
+
</el-button-group>
|
|
208
|
+
<div style="display: inline-block;vertical-align: middle">
|
|
209
|
+
<span style="padding-left: 10px">第{{ currentPage }}页,</span><span>共{{ total }}条</span>
|
|
210
|
+
</div>
|
|
211
|
+
</el-footer>
|
|
199
212
|
</el-container>
|
|
200
213
|
</template>
|
|
201
214
|
|
|
@@ -212,6 +225,9 @@ export default {
|
|
|
212
225
|
fieldSysDataObj: {type: Object, default: () => ({})},
|
|
213
226
|
sysDataObj: {type: Object, default: () => ({})},
|
|
214
227
|
formFieldObj: {type: Object, default: () => ({})},
|
|
228
|
+
currentPage: {type: Number, default: 1},
|
|
229
|
+
pages: {type: Number, default: 1},
|
|
230
|
+
total: {type: Number, default: 0},
|
|
215
231
|
},
|
|
216
232
|
data() {
|
|
217
233
|
return {
|
|
@@ -220,6 +236,9 @@ export default {
|
|
|
220
236
|
shLabelWidth: "100px",
|
|
221
237
|
taskNodeArr: [],
|
|
222
238
|
taskNodeClickNum: 0,
|
|
239
|
+
prevDisabled: true,
|
|
240
|
+
nextDisabled: true,
|
|
241
|
+
isShowPage: false,
|
|
223
242
|
// dateTypeObj: {
|
|
224
243
|
// "yyyy-MM-dd HH:mm:ss": {category: "date",type: "datetime", value: "yyyy-MM-dd HH:mm:ss", label: "年-月-日 时:分:秒"},
|
|
225
244
|
// "yyyy-MM-dd": {category: "date",type: "date", value: "yyyy-MM-dd", label: "年-月-日"},
|
|
@@ -240,11 +259,31 @@ export default {
|
|
|
240
259
|
if(!this.formSearchObj.loading){ // 等到列表数据加载完毕后,即loading消失后初始化数据
|
|
241
260
|
let flowNewBatchDealArr = JSON.parse(JSON.stringify(this.formSearchObj.flowNewBatchDealArr));
|
|
242
261
|
flowNewBatchDealArr.forEach(item => {
|
|
243
|
-
let obj = {currentNode: item.currentNode, currentNodeName: item.currentNodeName};
|
|
262
|
+
let obj = {currentNode: item.currentNode, currentNodeName: item.currentNodeName, nodeKey: item.nodeKey};
|
|
244
263
|
!this.taskNodeArr.some(taskNodeObj => taskNodeObj.currentNode === obj.currentNode) && this.taskNodeArr.push(obj);
|
|
245
264
|
});
|
|
246
265
|
this.initFlowBatchDeal(this.formSearchObj.flowNewBatchDealArr);
|
|
247
266
|
}
|
|
267
|
+
},
|
|
268
|
+
'formSearchObj.isInit'() {
|
|
269
|
+
if (this.formSearchObj.isInit) {
|
|
270
|
+
// console.log(this.currentPage,this.pages);
|
|
271
|
+
// 判断是否要分页
|
|
272
|
+
if (this.pages <= 1) {
|
|
273
|
+
this.isShowPage = false;
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
this.isShowPage = true;
|
|
277
|
+
|
|
278
|
+
this.prevDisabled = false;
|
|
279
|
+
this.nextDisabled = false;
|
|
280
|
+
if (this.currentPage === 1) {
|
|
281
|
+
this.prevDisabled = true;
|
|
282
|
+
}
|
|
283
|
+
if (this.currentPage >= this.pages) {
|
|
284
|
+
this.nextDisabled = true;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
248
287
|
}
|
|
249
288
|
},
|
|
250
289
|
methods: {
|
|
@@ -299,11 +338,16 @@ export default {
|
|
|
299
338
|
this.saspFlowAxios.post(this.api.plFlowInst.getNextUsers, paramsMap).then(res => {
|
|
300
339
|
// console.log('getNextUsers-request' + index, res);
|
|
301
340
|
if (res.data.operateSuccess) {
|
|
341
|
+
let operateObj = res.data.operateObj || {nextNodeName: "", userArr: []};
|
|
342
|
+
|
|
302
343
|
let operateMap = JSON.parse(JSON.stringify(res.data.operateMap));
|
|
303
|
-
if (operateMap && operateMap.isPassCondition === 0) {
|
|
344
|
+
if (operateMap && operateMap.isPassCondition === 0 && !operateObj.nextNodeName) {
|
|
304
345
|
Object.assign(operateMap, {nextNodeName: "会签中...等待其他人处理完毕"});
|
|
346
|
+
}else {
|
|
347
|
+
if (operateMap && operateMap.hasOwnProperty('isPassCondition')) {
|
|
348
|
+
delete operateMap.isPassCondition;
|
|
349
|
+
}
|
|
305
350
|
}
|
|
306
|
-
let operateObj = res.data.operateObj || {nextNodeName: "", userArr: []};
|
|
307
351
|
//获取下一个节点信息
|
|
308
352
|
let nextNodeObj = this.allNodeInfo[operateObj.nextNodeId] || {};
|
|
309
353
|
operateObj["multiChooseUser"] = nextNodeObj.dealType === "multi";
|
|
@@ -317,6 +361,7 @@ export default {
|
|
|
317
361
|
}
|
|
318
362
|
} else if (nextNodeObj.nodeType === "EndEvent") {
|
|
319
363
|
isEndNode = true;
|
|
364
|
+
operateObj.nextNodeName = nextNodeObj.nodeName || "结束";
|
|
320
365
|
}
|
|
321
366
|
let userArr = operateObj.userArr || [];
|
|
322
367
|
if (userArr.length > 0) {
|
|
@@ -344,6 +389,15 @@ export default {
|
|
|
344
389
|
});
|
|
345
390
|
},
|
|
346
391
|
|
|
392
|
+
doSearch() {
|
|
393
|
+
this.$emit("changePage", 1);
|
|
394
|
+
},
|
|
395
|
+
|
|
396
|
+
clearSearch() {
|
|
397
|
+
this.$set(this.formSearchObj, "taskNode", "");
|
|
398
|
+
this.$emit("changePage", 1);
|
|
399
|
+
},
|
|
400
|
+
|
|
347
401
|
// 选择提交
|
|
348
402
|
partSubmit() {
|
|
349
403
|
this.newBatchDealSubmit(this.multipleSelection);
|
|
@@ -395,46 +449,62 @@ export default {
|
|
|
395
449
|
// console.log('是否禁用勾选', row, index);
|
|
396
450
|
let flag = true;
|
|
397
451
|
flag = (row.nextDealUsers.userArr || []).length > 0;
|
|
398
|
-
return !row.isLoading
|
|
452
|
+
return !row.isLoading;
|
|
453
|
+
// return (!row.isLoading && flag) || row.isEndNode;
|
|
399
454
|
},
|
|
400
455
|
|
|
401
456
|
taskNodeChange(val) {
|
|
402
|
-
if (!this.taskNodeClickNum) {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
let arr = [];
|
|
407
|
-
if (val) {
|
|
408
|
-
|
|
409
|
-
}else {
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
this.$set(this.formSearchObj, "flowNewBatchDealArr", arr);
|
|
457
|
+
// if (!this.taskNodeClickNum) {
|
|
458
|
+
// this.backNewBatchDealArr = JSON.parse(JSON.stringify(this.formSearchObj.flowNewBatchDealArr));
|
|
459
|
+
// this.taskNodeClickNum++;
|
|
460
|
+
// }
|
|
461
|
+
// let arr = [];
|
|
462
|
+
// if (val) {
|
|
463
|
+
// arr = this.backNewBatchDealArr.filter(item => item.currentNode === val);
|
|
464
|
+
// }else {
|
|
465
|
+
// arr = this.backNewBatchDealArr;
|
|
466
|
+
// }
|
|
467
|
+
// this.$set(this.formSearchObj, "flowNewBatchDealArr", arr);
|
|
468
|
+
},
|
|
469
|
+
|
|
470
|
+
// 上一页事件
|
|
471
|
+
prevClick() {
|
|
472
|
+
this.$emit("changePage", this.currentPage - 1);
|
|
473
|
+
},
|
|
474
|
+
|
|
475
|
+
nextClick() {
|
|
476
|
+
this.$emit("changePage", this.currentPage + 1);
|
|
413
477
|
},
|
|
414
478
|
}
|
|
415
479
|
}
|
|
416
480
|
</script>
|
|
417
481
|
|
|
418
482
|
<style scoped>
|
|
419
|
-
.el-form .el-form-item {
|
|
483
|
+
.el-form > .el-table .el-form-item {
|
|
420
484
|
margin-bottom: 0;
|
|
421
485
|
}
|
|
422
486
|
|
|
423
487
|
.el-table::v-deep {
|
|
424
488
|
tr > td.checkInfo .cell {
|
|
425
|
-
display: flex;
|
|
489
|
+
//display: flex;
|
|
490
|
+
position: relative;
|
|
426
491
|
|
|
427
492
|
.sh-left-box {
|
|
428
493
|
//width: 255px;
|
|
429
|
-
flex-grow: 1;
|
|
494
|
+
//flex-grow: 1;
|
|
495
|
+
padding-left: 16px;
|
|
496
|
+
padding-right: 16px;
|
|
430
497
|
}
|
|
431
498
|
|
|
432
499
|
.sh-right-box {
|
|
433
|
-
|
|
434
|
-
|
|
500
|
+
position: absolute;
|
|
501
|
+
top: 0;
|
|
502
|
+
right: 0;
|
|
503
|
+
//flex-shrink: 0;
|
|
504
|
+
//width: 80px;
|
|
435
505
|
font-size: 26px;
|
|
436
506
|
text-align: right;
|
|
437
|
-
margin-left: 20px;
|
|
507
|
+
//margin-left: 20px;
|
|
438
508
|
|
|
439
509
|
.icon-edit {
|
|
440
510
|
color: #cccccc;
|
|
@@ -478,7 +548,8 @@ export default {
|
|
|
478
548
|
user-select: none;
|
|
479
549
|
|
|
480
550
|
&.isEndNode {
|
|
481
|
-
color: #FABDBD;
|
|
551
|
+
//color: #FABDBD;
|
|
552
|
+
color: #ffafaf;
|
|
482
553
|
}
|
|
483
554
|
}
|
|
484
555
|
}
|