cloud-web-corejs-haier 1.0.44 → 1.0.46
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/src/components/wf/wf.js
CHANGED
|
@@ -1,2325 +1,2325 @@
|
|
|
1
|
-
/**version-1.0*/
|
|
2
|
-
import { getToken } from "../../utils/auth";
|
|
3
|
-
import settingConfig from "@/settings.js";
|
|
4
|
-
import { selectDialogMixins } from "../../mixins/selectDialog";
|
|
5
|
-
|
|
6
|
-
let configUtil = {
|
|
7
|
-
baseUrl: process.env.VUE_APP_BASE_API,
|
|
8
|
-
getToken,
|
|
9
|
-
requireView: (url) => {
|
|
10
|
-
return require("@/views" + url).default;
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let wfIndexMixin,
|
|
15
|
-
wfStartMixin,
|
|
16
|
-
wfContentMixin,
|
|
17
|
-
wfModifyMixin,
|
|
18
|
-
wfUrgingMixin,
|
|
19
|
-
deleteTaskUserMixin,
|
|
20
|
-
addTaskUserMixin;
|
|
21
|
-
|
|
22
|
-
function getTarget(t, flag) {
|
|
23
|
-
let target;
|
|
24
|
-
if (t.parentVue) {
|
|
25
|
-
target = t.parentVue;
|
|
26
|
-
} else if (flag === 0) {
|
|
27
|
-
target = t.$parent.$parent;
|
|
28
|
-
} else {
|
|
29
|
-
target = t.$parent.$parent.$parent;
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function oaPublishEvent(that) {
|
|
35
|
-
let _closeWindowOnCheck =
|
|
36
|
-
that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
|
|
37
|
-
if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
|
|
38
|
-
let win = window.opener;
|
|
39
|
-
if (win && domain && domain.call) {
|
|
40
|
-
var event = { type: "topic", name: "successReloadPage" };
|
|
41
|
-
domain.call(win, "fireEvent", [event]);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
wfIndexMixin = {
|
|
47
|
-
name: "wfView",
|
|
48
|
-
props: {
|
|
49
|
-
objId: [String, Number],
|
|
50
|
-
wfCode: String,
|
|
51
|
-
serviceId: String,
|
|
52
|
-
},
|
|
53
|
-
data() {
|
|
54
|
-
return {
|
|
55
|
-
wfReloadFlag: false,
|
|
56
|
-
hasWf: false,
|
|
57
|
-
wfStartVisible: false,
|
|
58
|
-
paramData: "",
|
|
59
|
-
showModifyDialog: false,
|
|
60
|
-
showBillEdit: false,
|
|
61
|
-
content: "",
|
|
62
|
-
wfInfo: "",
|
|
63
|
-
currentTask: "",
|
|
64
|
-
taskParam: "",
|
|
65
|
-
};
|
|
66
|
-
},
|
|
67
|
-
computed: {
|
|
68
|
-
current_prefix() {
|
|
69
|
-
return this.serviceId ? "/" + this.serviceId : "";
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
created() {},
|
|
73
|
-
watch: {
|
|
74
|
-
wfCode(val) {
|
|
75
|
-
this.getWfInfo();
|
|
76
|
-
},
|
|
77
|
-
objId(val) {
|
|
78
|
-
this.getWfInfo();
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
async mounted() {
|
|
82
|
-
if (this.objId) {
|
|
83
|
-
let hasWf = false;
|
|
84
|
-
let wfInfo, currentTask, taskParam;
|
|
85
|
-
await this.initWfInfo().then((res) => {
|
|
86
|
-
if (res && res.type == "success") {
|
|
87
|
-
if (res.objx && res.objx.instanceId) {
|
|
88
|
-
hasWf = true;
|
|
89
|
-
wfInfo = res.objx;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
if (hasWf) {
|
|
95
|
-
/* await this.getCurrentTask(wfInfo).then(res1 => {
|
|
96
|
-
if (res1.type == 'success') {
|
|
97
|
-
currentTask = res1.objx;
|
|
98
|
-
}
|
|
99
|
-
}); */
|
|
100
|
-
/* if (wfInfo.taskId) {
|
|
101
|
-
await this.getTaskParams(currentTask).then(res2 => {
|
|
102
|
-
if (res2.type == 'success') {
|
|
103
|
-
taskParam = res2.objx;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
} */
|
|
107
|
-
}
|
|
108
|
-
this.paramData = taskParam;
|
|
109
|
-
this.wfInfo = wfInfo;
|
|
110
|
-
this.currentTask = currentTask;
|
|
111
|
-
this.taskParam = taskParam;
|
|
112
|
-
|
|
113
|
-
let flag = true;
|
|
114
|
-
this.$emit("onShow", {
|
|
115
|
-
wfInfo: wfInfo,
|
|
116
|
-
currentTask: currentTask,
|
|
117
|
-
taskParam: taskParam,
|
|
118
|
-
hasWf: hasWf,
|
|
119
|
-
callback: (val) => {
|
|
120
|
-
flag = false;
|
|
121
|
-
if (val !== false && hasWf) {
|
|
122
|
-
this.wfReloadFlag = true;
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
if (flag) {
|
|
127
|
-
if (hasWf) {
|
|
128
|
-
this.wfReloadFlag = true;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
this.$on("toDo", (option) => {
|
|
133
|
-
this.$emit(option.methd, option.param);
|
|
134
|
-
});
|
|
135
|
-
},
|
|
136
|
-
methods: {
|
|
137
|
-
getWfInfo() {
|
|
138
|
-
if (this.wfCode && this.objId) {
|
|
139
|
-
this.reload();
|
|
140
|
-
} else {
|
|
141
|
-
this.wfReloadFlag = false;
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
openStartWfDialog(code) {
|
|
145
|
-
this.wfStartVisible = true;
|
|
146
|
-
},
|
|
147
|
-
reload() {
|
|
148
|
-
this.wfReloadFlag = false;
|
|
149
|
-
this.$nextTick(() => {
|
|
150
|
-
this.wfReloadFlag = true;
|
|
151
|
-
});
|
|
152
|
-
},
|
|
153
|
-
manualCallback() {
|
|
154
|
-
this.$emit("manualCallback");
|
|
155
|
-
},
|
|
156
|
-
async getCurrentTask(obj) {
|
|
157
|
-
let that = getTarget(this, 0);
|
|
158
|
-
return that.$http({
|
|
159
|
-
url: "/agilebpm/wf_task/getCurrentTask",
|
|
160
|
-
data: {
|
|
161
|
-
instanceId: obj.instanceId,
|
|
162
|
-
},
|
|
163
|
-
method: "post",
|
|
164
|
-
async: false,
|
|
165
|
-
isLoading: true,
|
|
166
|
-
modalStrictly: true,
|
|
167
|
-
});
|
|
168
|
-
},
|
|
169
|
-
async initWfInfo() {
|
|
170
|
-
let that = getTarget(this, 0);
|
|
171
|
-
let id = this.objId;
|
|
172
|
-
let code = this.wfCode;
|
|
173
|
-
return that.$http({
|
|
174
|
-
url: this.current_prefix + "/wf/getWfInfo",
|
|
175
|
-
method: `post`,
|
|
176
|
-
data: {
|
|
177
|
-
objTypeCode: code,
|
|
178
|
-
objId: id,
|
|
179
|
-
},
|
|
180
|
-
isLoading: true,
|
|
181
|
-
modalStrictly: true,
|
|
182
|
-
});
|
|
183
|
-
},
|
|
184
|
-
async getTaskParams(data) {
|
|
185
|
-
let that = getTarget(this, 0);
|
|
186
|
-
return that.$http({
|
|
187
|
-
url: "/agilebpm/wf_task/getTaskParams",
|
|
188
|
-
method: `post`,
|
|
189
|
-
data: {
|
|
190
|
-
taskId: data.taskId,
|
|
191
|
-
},
|
|
192
|
-
isLoading: true,
|
|
193
|
-
modalStrictly: true,
|
|
194
|
-
});
|
|
195
|
-
},
|
|
196
|
-
openWfModifyDialog() {
|
|
197
|
-
let row = this.paramData;
|
|
198
|
-
let url = row.url + ".vue";
|
|
199
|
-
this.showModifyDialog = true;
|
|
200
|
-
this.content = configUtil.requireView(url);
|
|
201
|
-
this.$openEditView("showBillEdit");
|
|
202
|
-
},
|
|
203
|
-
modfyDialogClose() {
|
|
204
|
-
this.showBillEdit = false;
|
|
205
|
-
this.content = null;
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
wfContentMixin = {
|
|
211
|
-
name: "wfContent",
|
|
212
|
-
props: {
|
|
213
|
-
objId: [String, Number],
|
|
214
|
-
wfCode: String,
|
|
215
|
-
serviceId: String,
|
|
216
|
-
_wfInfo: Object,
|
|
217
|
-
_taskParam: Object,
|
|
218
|
-
parentVue: Object,
|
|
219
|
-
wfConfig: Object,
|
|
220
|
-
defaultShowWfContent: Boolean,
|
|
221
|
-
},
|
|
222
|
-
computed: {
|
|
223
|
-
current_prefix() {
|
|
224
|
-
return this.serviceId ? "/" + this.serviceId : "";
|
|
225
|
-
},
|
|
226
|
-
viewTarget() {
|
|
227
|
-
return getTarget(this);
|
|
228
|
-
},
|
|
229
|
-
isHideWf() {
|
|
230
|
-
let that = this.viewTarget;
|
|
231
|
-
let _hideWf = that._hideWf || that.$attrs._hideWf;
|
|
232
|
-
return _hideWf === true || _hideWf === "true";
|
|
233
|
-
},
|
|
234
|
-
},
|
|
235
|
-
data() {
|
|
236
|
-
let showWfFold =
|
|
237
|
-
settingConfig.showWfFold != null && settingConfig.showWfFold != undefined
|
|
238
|
-
? settingConfig.showWfFold
|
|
239
|
-
: false;
|
|
240
|
-
if (
|
|
241
|
-
this.wfConfig.showWfFold != null &&
|
|
242
|
-
this.wfConfig.showWfFold != undefined
|
|
243
|
-
) {
|
|
244
|
-
showWfFold = this.wfConfig.showWfFold;
|
|
245
|
-
}
|
|
246
|
-
let showWfContent =
|
|
247
|
-
showWfFold &&
|
|
248
|
-
settingConfig.defaultShowWfContent != null &&
|
|
249
|
-
settingConfig.defaultShowWfContent != undefined
|
|
250
|
-
? settingConfig.defaultShowWfContent
|
|
251
|
-
: true;
|
|
252
|
-
if (
|
|
253
|
-
this.defaultShowWfContent != null &&
|
|
254
|
-
this.defaultShowWfContent != undefined
|
|
255
|
-
) {
|
|
256
|
-
showWfContent = this.defaultShowWfContent;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return {
|
|
260
|
-
fileInfos: [],
|
|
261
|
-
showUserDialog: false,
|
|
262
|
-
showContent: true,
|
|
263
|
-
objTypeCode: "",
|
|
264
|
-
// objId: '',
|
|
265
|
-
wfInfo: {},
|
|
266
|
-
// currentTask: {},
|
|
267
|
-
taskParam: {},
|
|
268
|
-
wfImage: "",
|
|
269
|
-
wfStartBtn: false,
|
|
270
|
-
wfManualendBtn: false,
|
|
271
|
-
wfSubmitBtn: false,
|
|
272
|
-
wfRejectBtn: false,
|
|
273
|
-
changeHandlerBtn: false,
|
|
274
|
-
wftaskData: [],
|
|
275
|
-
allWfTaskOpinions: [],
|
|
276
|
-
vxeOption: {},
|
|
277
|
-
rejectNodes: [],
|
|
278
|
-
rejectDialogVisible: false,
|
|
279
|
-
rejectForm: {
|
|
280
|
-
rejectSubmitModel: null,
|
|
281
|
-
nodeCode: null,
|
|
282
|
-
opinion: null,
|
|
283
|
-
},
|
|
284
|
-
formLabelWidth: "120px",
|
|
285
|
-
agreeDialogVisible: false,
|
|
286
|
-
agreeForm: {
|
|
287
|
-
opinion: this.$t2("同意", "components.wf.defaultAgreeOption"),
|
|
288
|
-
nodeId: null,
|
|
289
|
-
},
|
|
290
|
-
changeWfDialogVisible: false,
|
|
291
|
-
changeWfForm: {},
|
|
292
|
-
changeUserRows: [],
|
|
293
|
-
statusTypeMap: {
|
|
294
|
-
START: "", //开始
|
|
295
|
-
END: "", //结束
|
|
296
|
-
TRANSFER: "blue", //转办
|
|
297
|
-
DEPUTE: "", //委派
|
|
298
|
-
ADD_SIGNATURE: "", //加签
|
|
299
|
-
REDUCTION_SIGNATURE: "", //减签
|
|
300
|
-
PASS: "green", //通过
|
|
301
|
-
REJECT: "red", //驳回
|
|
302
|
-
TOBESUBMIT: "orgn", //待审批
|
|
303
|
-
},
|
|
304
|
-
taskStatuses: {
|
|
305
|
-
start: {
|
|
306
|
-
class: "blue",
|
|
307
|
-
value: this.$t2("开始", "components.wf.startStatus"),
|
|
308
|
-
},
|
|
309
|
-
approve: {
|
|
310
|
-
class: "orgn",
|
|
311
|
-
value: this.$t2("待审批", "components.wf.approveStatus"),
|
|
312
|
-
},
|
|
313
|
-
submit: {
|
|
314
|
-
class: "green",
|
|
315
|
-
value: this.$t2("同意", "components.wf.submitStatus"),
|
|
316
|
-
},
|
|
317
|
-
reject: {
|
|
318
|
-
class: "red",
|
|
319
|
-
value: this.$t2("驳回", "components.wf.rejectStatus"),
|
|
320
|
-
},
|
|
321
|
-
transfer: {
|
|
322
|
-
class: "green",
|
|
323
|
-
value: this.$t2("转办", "components.wf.transferStatus"),
|
|
324
|
-
},
|
|
325
|
-
addIncreaseSign: {
|
|
326
|
-
class: "green",
|
|
327
|
-
value: this.$t2("加签", "components.wf.addIncreaseSignStatus"),
|
|
328
|
-
},
|
|
329
|
-
revoke: {
|
|
330
|
-
class: "red",
|
|
331
|
-
value: this.$t2("
|
|
332
|
-
},
|
|
333
|
-
end: {
|
|
334
|
-
class: "gray",
|
|
335
|
-
value: this.$t2("结束", "components.wf.endStatus"),
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
opinion: "",
|
|
339
|
-
showWfFold: showWfFold,
|
|
340
|
-
showWfContent: showWfContent,
|
|
341
|
-
|
|
342
|
-
urgingForm: {},
|
|
343
|
-
urgingDialogVisible: false,
|
|
344
|
-
urgingUserIds: [],
|
|
345
|
-
urgingUsers: [],
|
|
346
|
-
agreeNodes: [],
|
|
347
|
-
showWfManualDialog: false,
|
|
348
|
-
|
|
349
|
-
showDeleteTaskUserDialog: false,
|
|
350
|
-
showAddTaskUserDialog: false,
|
|
351
|
-
wfUserParam: {},
|
|
352
|
-
wfUserParamForTransfer: {}, //转办
|
|
353
|
-
wfUserParamForAddSign: {}, //加签
|
|
354
|
-
wfUserParamForTalk: {}, //沟通
|
|
355
|
-
tabIndex: "1",
|
|
356
|
-
linkupOption: {},
|
|
357
|
-
talkForm: {
|
|
358
|
-
receiverName: null,
|
|
359
|
-
content: null,
|
|
360
|
-
attachmentDTOs: [],
|
|
361
|
-
replyId: null,
|
|
362
|
-
},
|
|
363
|
-
showTalkUserDialog: false,
|
|
364
|
-
showTalkDialog: false,
|
|
365
|
-
showFlowImg: true,
|
|
366
|
-
operateType: null,
|
|
367
|
-
addIncreaseSignUsers: [],
|
|
368
|
-
addIncreaseSignForm: {
|
|
369
|
-
userNickNames: null,
|
|
370
|
-
opinion: null,
|
|
371
|
-
},
|
|
372
|
-
showAddIncreaseSignDialog: false,
|
|
373
|
-
showOpeaImg: true,
|
|
374
|
-
showSetCandidateDialog: false,
|
|
375
|
-
toTalk: false,
|
|
376
|
-
showAllWfOpinon: false,
|
|
377
|
-
|
|
378
|
-
revokeDialogVisible: false,
|
|
379
|
-
revokeForm: { opinion: null },
|
|
380
|
-
showWfInfoTab: false,
|
|
381
|
-
|
|
382
|
-
showWfMemo: false,
|
|
383
|
-
wfMemoOption: {},
|
|
384
|
-
wfMemoForm: {
|
|
385
|
-
receiverName: null,
|
|
386
|
-
content: null,
|
|
387
|
-
attachmentDTOs: [],
|
|
388
|
-
replyId: null,
|
|
389
|
-
},
|
|
390
|
-
showWfMemoDialog: false,
|
|
391
|
-
wfMemoData: [],
|
|
392
|
-
|
|
393
|
-
showCandidate: false,
|
|
394
|
-
candidateOption: {},
|
|
395
|
-
candidateDatas: [],
|
|
396
|
-
wfSendTaskId: null,
|
|
397
|
-
showAddOpinionButton: false,
|
|
398
|
-
|
|
399
|
-
addOpinionEnabled: false,
|
|
400
|
-
modifyCurrentCandidateEnabled: false,
|
|
401
|
-
|
|
402
|
-
//修改脚本
|
|
403
|
-
showWfFlowEleScriptDialog: false,
|
|
404
|
-
};
|
|
405
|
-
},
|
|
406
|
-
provide() {
|
|
407
|
-
return {
|
|
408
|
-
getParentVue: () => this.parentVue,
|
|
409
|
-
getWfInfo: () => this.wfInfo,
|
|
410
|
-
getCurrentPrefix: () => this.current_prefix,
|
|
411
|
-
getEditVueTarget: () => getTarget(this),
|
|
412
|
-
};
|
|
413
|
-
},
|
|
414
|
-
created() {
|
|
415
|
-
this.wfInfo = this._wfInfo;
|
|
416
|
-
this.showFlowImg = settingConfig.expandWfImage === false ? false : true;
|
|
417
|
-
this.showAllWfOpinon = settingConfig.showAllWfOpinon === true;
|
|
418
|
-
},
|
|
419
|
-
mounted() {
|
|
420
|
-
this.initOperateType();
|
|
421
|
-
this.initForAll();
|
|
422
|
-
},
|
|
423
|
-
methods: {
|
|
424
|
-
openWfFlowEleScriptDialog() {
|
|
425
|
-
this.showWfFlowEleScriptDialog = true;
|
|
426
|
-
},
|
|
427
|
-
initWfParam13() {
|
|
428
|
-
//初始化补充意见权限
|
|
429
|
-
let that = getTarget(this);
|
|
430
|
-
return that.$http({
|
|
431
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
432
|
-
method: `post`,
|
|
433
|
-
data: { attributeKey: "param13" },
|
|
434
|
-
success: (res) => {
|
|
435
|
-
this.addOpinionEnabled = res?.objx === true;
|
|
436
|
-
if (this.addOpinionEnabled) {
|
|
437
|
-
this.wfSendTaskId = this.getViewParam("wfSendTaskId");
|
|
438
|
-
this.showAddOpinionButton = !!this.wfSendTaskId;
|
|
439
|
-
}
|
|
440
|
-
},
|
|
441
|
-
});
|
|
442
|
-
},
|
|
443
|
-
|
|
444
|
-
initWfParam14() {
|
|
445
|
-
//初始化修改当前候选人权限
|
|
446
|
-
let that = getTarget(this);
|
|
447
|
-
return that.$http({
|
|
448
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
449
|
-
method: `post`,
|
|
450
|
-
data: { attributeKey: "param14" },
|
|
451
|
-
success: (res) => {
|
|
452
|
-
this.modifyCurrentCandidateEnabled = res?.objx === true;
|
|
453
|
-
},
|
|
454
|
-
});
|
|
455
|
-
},
|
|
456
|
-
getViewParam(key) {
|
|
457
|
-
let that = this.viewTarget;
|
|
458
|
-
let value = that[key] || that.$attrs[key];
|
|
459
|
-
return value;
|
|
460
|
-
},
|
|
461
|
-
initCandidate() {
|
|
462
|
-
// 是否显示"节点候选人"选项卡
|
|
463
|
-
let that = getTarget(this);
|
|
464
|
-
that.$http({
|
|
465
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
466
|
-
method: `post`,
|
|
467
|
-
data: { attributeKey: "param11" },
|
|
468
|
-
isLoading: true,
|
|
469
|
-
success: (res) => {
|
|
470
|
-
this.showCandidate = res?.objx === true;
|
|
471
|
-
if (this.showCandidate) {
|
|
472
|
-
this.$nextTick(() => {
|
|
473
|
-
this.initCandidateTable();
|
|
474
|
-
});
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
});
|
|
478
|
-
},
|
|
479
|
-
initCandidateTable() {
|
|
480
|
-
let that = this;
|
|
481
|
-
let tableOption = {
|
|
482
|
-
vue: that,
|
|
483
|
-
tableRef: "table-candidate",
|
|
484
|
-
tableName: "wf_candidate-list",
|
|
485
|
-
path: this.current_prefix + "/wf/getAllNodes",
|
|
486
|
-
param: () => {
|
|
487
|
-
return {
|
|
488
|
-
stringOne: this.wfInfo.uuid,
|
|
489
|
-
};
|
|
490
|
-
},
|
|
491
|
-
config: {
|
|
492
|
-
height: 350,
|
|
493
|
-
proxyConfig: {
|
|
494
|
-
props: {
|
|
495
|
-
result: "objx", // 配置响应结果列表字段
|
|
496
|
-
total: "objx.length", // 配置响应结果总页数字段
|
|
497
|
-
},
|
|
498
|
-
},
|
|
499
|
-
pagerConfig: {
|
|
500
|
-
autoHidden: true,
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
|
-
columns: [
|
|
504
|
-
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
505
|
-
{
|
|
506
|
-
title: this.$t2("节点名称", "components.wf.nodeName"),
|
|
507
|
-
field: "nodeName",
|
|
508
|
-
width: 250,
|
|
509
|
-
fixed: "left",
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
field: "wfTaskCandidates",
|
|
513
|
-
title: this.$t2("候选人", "components.wf.candidate"),
|
|
514
|
-
width: 450,
|
|
515
|
-
slots: {
|
|
516
|
-
default: ({ row, rowIndex }) => {
|
|
517
|
-
return row.wfTaskCandidateDTOs
|
|
518
|
-
? row.wfTaskCandidateDTOs.map((item) => item.name).join(",")
|
|
519
|
-
: null;
|
|
520
|
-
},
|
|
521
|
-
},
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
width: 47,
|
|
525
|
-
fixed: "right",
|
|
526
|
-
title: "",
|
|
527
|
-
sortable: false,
|
|
528
|
-
},
|
|
529
|
-
],
|
|
530
|
-
};
|
|
531
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
532
|
-
that.candidateOption = opts;
|
|
533
|
-
});
|
|
534
|
-
},
|
|
535
|
-
initOperateType() {
|
|
536
|
-
if (this.operateType) {
|
|
537
|
-
let wfInfo = this.wfInfo;
|
|
538
|
-
if (wfInfo.toSubmit) {
|
|
539
|
-
this.openAgreeDialog("submit");
|
|
540
|
-
} else if (wfInfo.toReject) {
|
|
541
|
-
this.rejectWfTask("reject");
|
|
542
|
-
} else if (wfInfo.toAddIncreaseSign) {
|
|
543
|
-
this.openAddIncreaseSign("addIncreaseSign");
|
|
544
|
-
} else if (wfInfo.toRevoke) {
|
|
545
|
-
this.openRevokeDialog("revoke");
|
|
546
|
-
} else if (wfInfo.toLinkup) {
|
|
547
|
-
this.openTalkDialog(null, null, "talk");
|
|
548
|
-
} else {
|
|
549
|
-
this.operateType = null;
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
},
|
|
553
|
-
initForAll() {
|
|
554
|
-
let that = getTarget(this);
|
|
555
|
-
this.initWf(() => {
|
|
556
|
-
if (this.wfInfo.instanceId) {
|
|
557
|
-
this.initCurrentTask(this.wfInfo.instanceId, () => {
|
|
558
|
-
this.initWftask(this.wfInfo.instanceId);
|
|
559
|
-
this.getAllWfTaskOpinions();
|
|
560
|
-
});
|
|
561
|
-
this.showWfInfoTab = true;
|
|
562
|
-
// this.initWfUserParam();
|
|
563
|
-
// this.initTabIndex();
|
|
564
|
-
// this.initShowTaskInfo();
|
|
565
|
-
//初始化附言
|
|
566
|
-
// this.getIsShowWfMemo();
|
|
567
|
-
// 是否显示"节点候选人"选项卡
|
|
568
|
-
// this.initCandidate()
|
|
569
|
-
|
|
570
|
-
//初始化补充意见权限
|
|
571
|
-
// this.initWfParam13();
|
|
572
|
-
|
|
573
|
-
//初始化修改当前候选人权限
|
|
574
|
-
// this.initWfParam14();
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
},
|
|
578
|
-
initTabIndex() {
|
|
579
|
-
let that = getTarget(this);
|
|
580
|
-
that.$http({
|
|
581
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
582
|
-
method: `post`,
|
|
583
|
-
data: { attributeKey: "param7" },
|
|
584
|
-
isLoading: true,
|
|
585
|
-
success: (res) => {
|
|
586
|
-
let val = res !== null ? res.objx === true : false;
|
|
587
|
-
this.toTalk = val;
|
|
588
|
-
let flag = false;
|
|
589
|
-
if (val) {
|
|
590
|
-
let flag1 =
|
|
591
|
-
that.$attrs._isNotifyMessage == true ||
|
|
592
|
-
that.$attrs._isNotifyMessage == "true";
|
|
593
|
-
if (flag1) {
|
|
594
|
-
this.tabIndex = "2";
|
|
595
|
-
}
|
|
596
|
-
if (settingConfig.autoOpenWfLinkup) {
|
|
597
|
-
flag = true;
|
|
598
|
-
let flag2 = that.$attrs._wfNotifyType == "wfLinkup";
|
|
599
|
-
let flag3 = flag1 && flag2;
|
|
600
|
-
if (flag3) {
|
|
601
|
-
this.$nextTick(() => {
|
|
602
|
-
let wfTabPane = this.$refs.wfTabPane;
|
|
603
|
-
if (!wfTabPane.showContent) {
|
|
604
|
-
wfTabPane.handleFold();
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
this.initLinkup(flag);
|
|
611
|
-
},
|
|
612
|
-
});
|
|
613
|
-
},
|
|
614
|
-
initWf(done) {
|
|
615
|
-
var data = this.wfInfo;
|
|
616
|
-
if (data && data.instanceId) {
|
|
617
|
-
/** 流程状态:0未启动,1审核中,2已完成,3驳回,4中断 */
|
|
618
|
-
var statuses = {
|
|
619
|
-
1:
|
|
620
|
-
'<span class="tag">' +
|
|
621
|
-
this.$t2("审核中", "components.wf.wfStatus1") +
|
|
622
|
-
"</span>",
|
|
623
|
-
3:
|
|
624
|
-
'<span class="tag red">' +
|
|
625
|
-
this.$t2("已驳回", "components.wf.wfStatus2") +
|
|
626
|
-
"</span>",
|
|
627
|
-
2:
|
|
628
|
-
'<span class="tag green">' +
|
|
629
|
-
this.$t2("已完成", "components.wf.wfStatus3") +
|
|
630
|
-
"</span>",
|
|
631
|
-
};
|
|
632
|
-
var statusStr = "";
|
|
633
|
-
if (data.stat != null) {
|
|
634
|
-
statusStr = statuses[data.stat] || "";
|
|
635
|
-
}
|
|
636
|
-
data.statusStr = statusStr;
|
|
637
|
-
this.wfInfo = data;
|
|
638
|
-
|
|
639
|
-
this.wfStartBtn = false;
|
|
640
|
-
if (data.status != 2 && data.starterId) {
|
|
641
|
-
this.wfManualendBtn = true;
|
|
642
|
-
}
|
|
643
|
-
this.wfSubmitBtn = false;
|
|
644
|
-
this.wfRejectBtn = false;
|
|
645
|
-
|
|
646
|
-
/* var url =
|
|
647
|
-
this.current_prefix +
|
|
648
|
-
"/wf/flowImage?instanceId=" +
|
|
649
|
-
data.instanceId +
|
|
650
|
-
"&_r=" +
|
|
651
|
-
Math.random() +
|
|
652
|
-
"&access_token=" +
|
|
653
|
-
configUtil.getToken();
|
|
654
|
-
this.wfImage = configUtil.baseUrl + url; */
|
|
655
|
-
let token = getToken();
|
|
656
|
-
let Authorization = `Bearer ${token}`;
|
|
657
|
-
let prefix = this.current_prefix.substring(1);
|
|
658
|
-
let baseApi = process.env.VUE_APP_BASE_API;
|
|
659
|
-
if (settingConfig.isTest) {
|
|
660
|
-
this.wfImage = `http://stdxx.sc.5mall.com/warm-flow-ui/index.html?id=${data.instanceId}&baseApi=${baseApi}&prefix=${prefix}&type=FlowChart&Authorization=${Authorization}`;
|
|
661
|
-
} else {
|
|
662
|
-
this.wfImage =
|
|
663
|
-
WEB_PREFIX +
|
|
664
|
-
`/warm-flow-ui/index.html?id=${data.instanceId}&baseApi=${baseApi}&prefix=${prefix}&type=FlowChart&Authorization=${Authorization}`;
|
|
665
|
-
}
|
|
666
|
-
done();
|
|
667
|
-
}
|
|
668
|
-
},
|
|
669
|
-
initCurrentTask(instanceId, done) {
|
|
670
|
-
if (this.wfInfo.taskId) {
|
|
671
|
-
this.wfSubmitBtn = true;
|
|
672
|
-
this.wfRejectBtn = true;
|
|
673
|
-
this.changeHandlerBtn = true;
|
|
674
|
-
}
|
|
675
|
-
done();
|
|
676
|
-
},
|
|
677
|
-
initWftask(instanceId) {
|
|
678
|
-
let that = getTarget(this);
|
|
679
|
-
that.$http({
|
|
680
|
-
url: this.current_prefix + "/wf/getWfHisTasks",
|
|
681
|
-
data: {
|
|
682
|
-
stringOne: this.wfInfo.uuid,
|
|
683
|
-
},
|
|
684
|
-
method: "post",
|
|
685
|
-
async: false,
|
|
686
|
-
isLoading: true,
|
|
687
|
-
modalStrictly: true,
|
|
688
|
-
success: (resultmsg) => {
|
|
689
|
-
var datas = resultmsg.objx || [];
|
|
690
|
-
this.wftaskData = datas;
|
|
691
|
-
},
|
|
692
|
-
});
|
|
693
|
-
},
|
|
694
|
-
getAllWfTaskOpinions() {
|
|
695
|
-
if (!this.showAllWfOpinon) {
|
|
696
|
-
return;
|
|
697
|
-
}
|
|
698
|
-
let that = getTarget(this);
|
|
699
|
-
let wfInfo = this.wfInfo;
|
|
700
|
-
that.$http({
|
|
701
|
-
url: this.current_prefix + "/wf/getAllWfTaskOpinions",
|
|
702
|
-
data: {
|
|
703
|
-
objId: wfInfo.objId,
|
|
704
|
-
objTypeCode: wfInfo.objTypeCode,
|
|
705
|
-
},
|
|
706
|
-
method: "post",
|
|
707
|
-
async: false,
|
|
708
|
-
isLoading: true,
|
|
709
|
-
modalStrictly: true,
|
|
710
|
-
success: (resultmsg) => {
|
|
711
|
-
var datas = resultmsg.objx || [];
|
|
712
|
-
this.allWfTaskOpinions = datas;
|
|
713
|
-
},
|
|
714
|
-
});
|
|
715
|
-
},
|
|
716
|
-
openManualDialog(operateType) {
|
|
717
|
-
this.operateType = operateType;
|
|
718
|
-
this.showWfManualDialog = true;
|
|
719
|
-
},
|
|
720
|
-
manualEndWf() {
|
|
721
|
-
this.showWfManualDialog = false;
|
|
722
|
-
let that = getTarget(this);
|
|
723
|
-
var instanceId = this.wfInfo.instanceId;
|
|
724
|
-
var taskId = this.wfInfo.taskId ? this.wfInfo.taskId : "";
|
|
725
|
-
var data = JSON.stringify({
|
|
726
|
-
uuid: this.wfInfo.uuid,
|
|
727
|
-
});
|
|
728
|
-
that.$http({
|
|
729
|
-
url: this.current_prefix + "/wf/interrupt",
|
|
730
|
-
data: data,
|
|
731
|
-
method: "post",
|
|
732
|
-
headers: {
|
|
733
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
734
|
-
},
|
|
735
|
-
isLoading: true,
|
|
736
|
-
success: (resultMsg) => {
|
|
737
|
-
that.$message({
|
|
738
|
-
message: resultMsg.content,
|
|
739
|
-
type: "success",
|
|
740
|
-
duration: 500,
|
|
741
|
-
onClose: (t) => {
|
|
742
|
-
this.reloadContent();
|
|
743
|
-
this.closeWinOnCheck(3);
|
|
744
|
-
},
|
|
745
|
-
});
|
|
746
|
-
},
|
|
747
|
-
});
|
|
748
|
-
},
|
|
749
|
-
async rejectWfTask(operateType) {
|
|
750
|
-
let that = getTarget(this);
|
|
751
|
-
var instanceId = this.wfInfo.instanceId;
|
|
752
|
-
var taskId = this.wfInfo.taskId;
|
|
753
|
-
var destinations = [];
|
|
754
|
-
|
|
755
|
-
await that.$http({
|
|
756
|
-
url: this.current_prefix + "/wf/getBackTaskNode",
|
|
757
|
-
data: {
|
|
758
|
-
id: taskId,
|
|
759
|
-
},
|
|
760
|
-
method: "post",
|
|
761
|
-
//contentType: 'application/json;charset=utf-8',
|
|
762
|
-
async: false,
|
|
763
|
-
isLoading: true,
|
|
764
|
-
success: (resultMsg) => {
|
|
765
|
-
destinations = (resultMsg.objx || []).reverse();
|
|
766
|
-
},
|
|
767
|
-
});
|
|
768
|
-
|
|
769
|
-
if (destinations == null) {
|
|
770
|
-
return false;
|
|
771
|
-
}
|
|
772
|
-
if (destinations.length == 0) {
|
|
773
|
-
that.$message({
|
|
774
|
-
message: this.$t2(
|
|
775
|
-
"无法驳回,没有目标节点",
|
|
776
|
-
"components.wf.rejectWarnMsg1"
|
|
777
|
-
),
|
|
778
|
-
type: "error",
|
|
779
|
-
duration: 2 * 1000,
|
|
780
|
-
});
|
|
781
|
-
return false;
|
|
782
|
-
}
|
|
783
|
-
this.operateType = operateType;
|
|
784
|
-
let rejectSubmitModel = null;
|
|
785
|
-
if (this.wfInfo.toNextNode === 1) {
|
|
786
|
-
rejectSubmitModel = this.wfInfo.toNextNode;
|
|
787
|
-
} else {
|
|
788
|
-
rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null;
|
|
789
|
-
}
|
|
790
|
-
this.rejectForm.rejectSubmitModel = rejectSubmitModel;
|
|
791
|
-
this.rejectForm.nodeCode = destinations[0].nodeCode;
|
|
792
|
-
this.rejectForm.opinion = "";
|
|
793
|
-
this.rejectNodes = destinations;
|
|
794
|
-
this.rejectDialogVisible = true;
|
|
795
|
-
},
|
|
796
|
-
subRejectForm() {
|
|
797
|
-
let that = getTarget(this);
|
|
798
|
-
var instanceId = this.wfInfo.instanceId;
|
|
799
|
-
var taskId = this.wfInfo.taskId;
|
|
800
|
-
|
|
801
|
-
if (!this.rejectForm.nodeCode) {
|
|
802
|
-
that.$message({
|
|
803
|
-
message: this.$t2("请选择驳回节点", "components.wf.rejectWarnMsg2"),
|
|
804
|
-
type: "error",
|
|
805
|
-
duration: 2 * 1000,
|
|
806
|
-
});
|
|
807
|
-
return false;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
if (!this.rejectForm.opinion) {
|
|
811
|
-
that.$message({
|
|
812
|
-
message: this.$t2("请输入驳回意见", "components.wf.rejectWarnMsg3"),
|
|
813
|
-
type: "error",
|
|
814
|
-
duration: 2 * 1000,
|
|
815
|
-
});
|
|
816
|
-
return false;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
var data = JSON.stringify({
|
|
820
|
-
taskId: taskId,
|
|
821
|
-
uuid: this.wfInfo.uuid,
|
|
822
|
-
nodeCode: this.rejectForm.nodeCode,
|
|
823
|
-
suggestion: this.rejectForm.opinion,
|
|
824
|
-
skipType: "REJECT",
|
|
825
|
-
// rejectSubmitModel: this.rejectForm.rejectSubmitModel
|
|
826
|
-
});
|
|
827
|
-
this.rejectDialogVisible = false;
|
|
828
|
-
that.$http({
|
|
829
|
-
url: this.current_prefix + "/wf/reject",
|
|
830
|
-
data: data,
|
|
831
|
-
method: "post",
|
|
832
|
-
headers: {
|
|
833
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
834
|
-
},
|
|
835
|
-
isLoading: true,
|
|
836
|
-
success: (resultMsg) => {
|
|
837
|
-
that.$message({
|
|
838
|
-
message: resultMsg.content,
|
|
839
|
-
type: "success",
|
|
840
|
-
duration: 500,
|
|
841
|
-
onClose: (t) => {
|
|
842
|
-
this.reloadContent();
|
|
843
|
-
this.closeWinOnCheck(2);
|
|
844
|
-
},
|
|
845
|
-
});
|
|
846
|
-
},
|
|
847
|
-
});
|
|
848
|
-
},
|
|
849
|
-
handleReminderContent(scriptType, callback) {
|
|
850
|
-
let that = getTarget(this);
|
|
851
|
-
that.$http({
|
|
852
|
-
url: this.current_prefix + "/wf/getReminderContent",
|
|
853
|
-
data: {
|
|
854
|
-
scriptType,
|
|
855
|
-
taskId: this.wfInfo.taskId,
|
|
856
|
-
uuid: this.wfInfo.uuid,
|
|
857
|
-
},
|
|
858
|
-
method: "post",
|
|
859
|
-
isLoading: true,
|
|
860
|
-
errorMsg: false,
|
|
861
|
-
success: (res) => {
|
|
862
|
-
if (res.objx) {
|
|
863
|
-
that.$baseConfirm(res.objx).then(() => {
|
|
864
|
-
callback && callback();
|
|
865
|
-
});
|
|
866
|
-
} else {
|
|
867
|
-
callback && callback();
|
|
868
|
-
}
|
|
869
|
-
},
|
|
870
|
-
error: (e) => {
|
|
871
|
-
if (e.response.status === 404) {
|
|
872
|
-
callback && callback();
|
|
873
|
-
} else {
|
|
874
|
-
that.$errorMsg({
|
|
875
|
-
content: e.message,
|
|
876
|
-
type: "error",
|
|
877
|
-
});
|
|
878
|
-
}
|
|
879
|
-
},
|
|
880
|
-
});
|
|
881
|
-
},
|
|
882
|
-
openAgreeDialog(operateType) {
|
|
883
|
-
const done = () => {
|
|
884
|
-
this.operateType = operateType;
|
|
885
|
-
let that = getTarget(this);
|
|
886
|
-
this.agreeForm = {
|
|
887
|
-
opinion: this.$t2("同意", "components.wf.defaultAgreeOption"),
|
|
888
|
-
nodeId: null,
|
|
889
|
-
};
|
|
890
|
-
this.agreeNodes = [];
|
|
891
|
-
this.agreeDialogVisible = true;
|
|
892
|
-
/* that.$http({
|
|
893
|
-
url: this.current_prefix + "/wf/getNextOutgoingNodes",
|
|
894
|
-
data: {
|
|
895
|
-
stringOne: this.wfInfo.taskId,
|
|
896
|
-
},
|
|
897
|
-
method: "post",
|
|
898
|
-
async: false,
|
|
899
|
-
isLoading: true,
|
|
900
|
-
success: (res) => {
|
|
901
|
-
let nodes = res.objx || [];
|
|
902
|
-
if (nodes.length) {
|
|
903
|
-
this.agreeForm.nodeId = nodes[0].nodeId;
|
|
904
|
-
}
|
|
905
|
-
this.agreeNodes = nodes;
|
|
906
|
-
this.agreeDialogVisible = true;
|
|
907
|
-
},
|
|
908
|
-
}); */
|
|
909
|
-
};
|
|
910
|
-
let wfConfig = this.wfConfig;
|
|
911
|
-
if (wfConfig.onClickAgree) {
|
|
912
|
-
wfConfig.onClickAgree(done);
|
|
913
|
-
} else {
|
|
914
|
-
done();
|
|
915
|
-
}
|
|
916
|
-
},
|
|
917
|
-
subAgreeForm() {
|
|
918
|
-
let wfConfig = this.wfConfig;
|
|
919
|
-
let done = () => {
|
|
920
|
-
this.subAgreeHandle();
|
|
921
|
-
};
|
|
922
|
-
if (wfConfig.onBeforeAgree) {
|
|
923
|
-
wfConfig.onBeforeAgree(done);
|
|
924
|
-
} else {
|
|
925
|
-
done();
|
|
926
|
-
}
|
|
927
|
-
},
|
|
928
|
-
|
|
929
|
-
subAgreeHandle() {
|
|
930
|
-
let that = getTarget(this);
|
|
931
|
-
let nodeId = null;
|
|
932
|
-
/* if (this.agreeNodes.length) {
|
|
933
|
-
if (!this.agreeForm.nodeId) {
|
|
934
|
-
that.$message({
|
|
935
|
-
message: this.$t2('请选择节点', 'components.wf.agreeWarnMsg1'),
|
|
936
|
-
type: "error",
|
|
937
|
-
duration: 2 * 1000,
|
|
938
|
-
});
|
|
939
|
-
return;
|
|
940
|
-
}
|
|
941
|
-
nodeId = this.agreeForm.nodeId;
|
|
942
|
-
} */
|
|
943
|
-
|
|
944
|
-
var instanceId = this.wfInfo.instanceId;
|
|
945
|
-
var taskId = this.wfInfo.taskId;
|
|
946
|
-
var memo =
|
|
947
|
-
this.agreeForm.opinion ||
|
|
948
|
-
this.$t2("同意", "components.wf.defaultAgreeOption");
|
|
949
|
-
var data = JSON.stringify({
|
|
950
|
-
taskId: taskId,
|
|
951
|
-
uuid: this.wfInfo.uuid,
|
|
952
|
-
suggestion: memo,
|
|
953
|
-
skipType: "PASS",
|
|
954
|
-
// nodeId: nodeId,
|
|
955
|
-
});
|
|
956
|
-
this.agreeDialogVisible = false;
|
|
957
|
-
that.$http({
|
|
958
|
-
url: this.current_prefix + "/wf/submit",
|
|
959
|
-
data: data,
|
|
960
|
-
method: "post",
|
|
961
|
-
headers: {
|
|
962
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
963
|
-
},
|
|
964
|
-
isLoading: true,
|
|
965
|
-
success: (resultMsg) => {
|
|
966
|
-
if (false && resultMsg.objx && resultMsg.objx.code == "999999") {
|
|
967
|
-
this.errorSubmit({
|
|
968
|
-
taskId: taskId,
|
|
969
|
-
uuid: this.wfInfo.uuid,
|
|
970
|
-
suggestion: memo,
|
|
971
|
-
errorMsg: resultMsg.objx.errorMsg,
|
|
972
|
-
});
|
|
973
|
-
} else {
|
|
974
|
-
that.$message({
|
|
975
|
-
message: resultMsg.content,
|
|
976
|
-
type: "success",
|
|
977
|
-
duration: 500,
|
|
978
|
-
onClose: (t) => {
|
|
979
|
-
this.reloadContent();
|
|
980
|
-
this.closeWinOnCheck(1);
|
|
981
|
-
},
|
|
982
|
-
});
|
|
983
|
-
}
|
|
984
|
-
},
|
|
985
|
-
});
|
|
986
|
-
},
|
|
987
|
-
errorSubmit(data) {
|
|
988
|
-
let that = getTarget(this);
|
|
989
|
-
that.$http({
|
|
990
|
-
url: this.current_prefix + "/wf/errorSubmit",
|
|
991
|
-
data: data,
|
|
992
|
-
method: "post",
|
|
993
|
-
isLoading: true,
|
|
994
|
-
success: (resultMsg) => {
|
|
995
|
-
that.$message({
|
|
996
|
-
message: resultMsg.content,
|
|
997
|
-
type: "success",
|
|
998
|
-
duration: 500,
|
|
999
|
-
onClose: (t) => {
|
|
1000
|
-
this.reloadContent();
|
|
1001
|
-
this.closeWinOnCheck(1);
|
|
1002
|
-
},
|
|
1003
|
-
});
|
|
1004
|
-
},
|
|
1005
|
-
});
|
|
1006
|
-
},
|
|
1007
|
-
openChangeWfForm(operateType) {
|
|
1008
|
-
this.operateType = operateType;
|
|
1009
|
-
this.changeWfDialogVisible = true;
|
|
1010
|
-
this.changeUserRows = [];
|
|
1011
|
-
this.changeWfForm = {
|
|
1012
|
-
userIds: [],
|
|
1013
|
-
userNickNames: null,
|
|
1014
|
-
opinion: null,
|
|
1015
|
-
};
|
|
1016
|
-
},
|
|
1017
|
-
subChangeWfForm() {
|
|
1018
|
-
let that = getTarget(this);
|
|
1019
|
-
var instanceId = this.wfInfo.instanceId;
|
|
1020
|
-
var taskId = this.wfInfo.taskId;
|
|
1021
|
-
|
|
1022
|
-
var userIds = this.changeWfForm.userIds || [];
|
|
1023
|
-
var opinion = this.changeWfForm.opinion || null;
|
|
1024
|
-
|
|
1025
|
-
if (!userIds.length) {
|
|
1026
|
-
that.$message({
|
|
1027
|
-
message: this.$t2("请选择转办人", "components.wf.transferWarnMsg1"),
|
|
1028
|
-
type: "error",
|
|
1029
|
-
duration: 2000,
|
|
1030
|
-
onClose: (t) => {},
|
|
1031
|
-
});
|
|
1032
|
-
return false;
|
|
1033
|
-
}
|
|
1034
|
-
let transferTo = userIds.map((userId) => {
|
|
1035
|
-
return userId + "";
|
|
1036
|
-
});
|
|
1037
|
-
|
|
1038
|
-
var data = JSON.stringify({
|
|
1039
|
-
taskId: taskId,
|
|
1040
|
-
uuid: this.wfInfo.uuid,
|
|
1041
|
-
transferTo: transferTo,
|
|
1042
|
-
suggestion: opinion,
|
|
1043
|
-
});
|
|
1044
|
-
this.changeWfDialogVisible = false;
|
|
1045
|
-
that.$http({
|
|
1046
|
-
url: this.current_prefix + "/wf/transfer",
|
|
1047
|
-
data: data,
|
|
1048
|
-
method: "post",
|
|
1049
|
-
headers: {
|
|
1050
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
1051
|
-
},
|
|
1052
|
-
isLoading: true,
|
|
1053
|
-
success: (resultMsg) => {
|
|
1054
|
-
that.$message({
|
|
1055
|
-
message: resultMsg.content,
|
|
1056
|
-
type: "success",
|
|
1057
|
-
duration: 500,
|
|
1058
|
-
onClose: (t) => {
|
|
1059
|
-
this.reloadContent();
|
|
1060
|
-
this.closeWinOnCheck(4);
|
|
1061
|
-
},
|
|
1062
|
-
});
|
|
1063
|
-
},
|
|
1064
|
-
});
|
|
1065
|
-
},
|
|
1066
|
-
userConfirm(rows) {
|
|
1067
|
-
if (rows.length > 0) {
|
|
1068
|
-
let changeUserRows = this.changeUserRows;
|
|
1069
|
-
let ids = changeUserRows.map((changeUserRow) => changeUserRow.id);
|
|
1070
|
-
let addRows = rows.filter((row) => !ids.includes(row.id));
|
|
1071
|
-
changeUserRows.push(...addRows);
|
|
1072
|
-
|
|
1073
|
-
let row = rows[0];
|
|
1074
|
-
this.changeWfForm.userIds = changeUserRows.map(
|
|
1075
|
-
(changeUserRow) => changeUserRow.id
|
|
1076
|
-
);
|
|
1077
|
-
this.changeWfForm.userNickNames = changeUserRows
|
|
1078
|
-
.map((changeUserRow) => changeUserRow.nickName)
|
|
1079
|
-
.join(",");
|
|
1080
|
-
}
|
|
1081
|
-
},
|
|
1082
|
-
reloadContent() {
|
|
1083
|
-
let that = getTarget(this);
|
|
1084
|
-
oaPublishEvent(that);
|
|
1085
|
-
that.$baseReload();
|
|
1086
|
-
},
|
|
1087
|
-
closeWinOnCheck(flag) {
|
|
1088
|
-
//_closeWindowOnCheck=true, 1提交,2驳回,3中断,4转办时,5沟通 关闭窗口
|
|
1089
|
-
let that = getTarget(this);
|
|
1090
|
-
let _closeWindowOnCheck =
|
|
1091
|
-
that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
|
|
1092
|
-
if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
|
|
1093
|
-
window.close && window.close();
|
|
1094
|
-
}
|
|
1095
|
-
let _handleCallback = that.$attrs._handleCallback || that._handleCallback;
|
|
1096
|
-
_handleCallback && _handleCallback(flag);
|
|
1097
|
-
},
|
|
1098
|
-
manualCallback() {
|
|
1099
|
-
this.$emit("manualCallback");
|
|
1100
|
-
},
|
|
1101
|
-
openUrgingDialog(operateType) {
|
|
1102
|
-
this.operateType = operateType;
|
|
1103
|
-
this.urgingDialogVisible = true;
|
|
1104
|
-
},
|
|
1105
|
-
openDeleteTaskUserDialog(operateType) {
|
|
1106
|
-
this.operateType = operateType;
|
|
1107
|
-
this.showDeleteTaskUserDialog = true;
|
|
1108
|
-
},
|
|
1109
|
-
openAddTaskUserDialog(operateType) {
|
|
1110
|
-
this.operateType = operateType;
|
|
1111
|
-
this.showAddTaskUserDialog = true;
|
|
1112
|
-
},
|
|
1113
|
-
openAddIncreaseSign(operateType) {
|
|
1114
|
-
this.operateType = operateType;
|
|
1115
|
-
this.addIncreaseSignUsers = [];
|
|
1116
|
-
this.addIncreaseSignForm = { userNickNames: null };
|
|
1117
|
-
this.showAddIncreaseSignDialog = true;
|
|
1118
|
-
},
|
|
1119
|
-
initWfUserParam(callback) {
|
|
1120
|
-
this.initTransferUserParam(); //转办
|
|
1121
|
-
this.initAddSignUserParam(); //加签
|
|
1122
|
-
this.initTalkUserParam(); //沟通
|
|
1123
|
-
},
|
|
1124
|
-
//
|
|
1125
|
-
initTransferUserParam(callback) {
|
|
1126
|
-
//初始化转办用户参数
|
|
1127
|
-
let that = getTarget(this);
|
|
1128
|
-
return that.$http({
|
|
1129
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1130
|
-
method: `post`,
|
|
1131
|
-
data: { attributeKey: "param1" },
|
|
1132
|
-
isLoading: true,
|
|
1133
|
-
modalStrictly: true,
|
|
1134
|
-
success: (res) => {
|
|
1135
|
-
this.wfUserParamForTransfer = res.objx || {};
|
|
1136
|
-
callback && callback();
|
|
1137
|
-
},
|
|
1138
|
-
});
|
|
1139
|
-
},
|
|
1140
|
-
initAddSignUserParam(callback) {
|
|
1141
|
-
//初始化加签用户参数
|
|
1142
|
-
let that = getTarget(this);
|
|
1143
|
-
return that.$http({
|
|
1144
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1145
|
-
method: `post`,
|
|
1146
|
-
data: { attributeKey: "param2" },
|
|
1147
|
-
isLoading: true,
|
|
1148
|
-
modalStrictly: true,
|
|
1149
|
-
success: (res) => {
|
|
1150
|
-
this.wfUserParamForAddSign = res.objx || {};
|
|
1151
|
-
callback && callback();
|
|
1152
|
-
},
|
|
1153
|
-
});
|
|
1154
|
-
},
|
|
1155
|
-
initTalkUserParam(callback) {
|
|
1156
|
-
//初始化沟通用户参数
|
|
1157
|
-
let that = getTarget(this);
|
|
1158
|
-
return that.$http({
|
|
1159
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1160
|
-
method: `post`,
|
|
1161
|
-
data: { attributeKey: "param3" },
|
|
1162
|
-
isLoading: true,
|
|
1163
|
-
modalStrictly: true,
|
|
1164
|
-
success: (res) => {
|
|
1165
|
-
this.wfUserParamForTalk = res.objx || {};
|
|
1166
|
-
callback && callback();
|
|
1167
|
-
},
|
|
1168
|
-
});
|
|
1169
|
-
},
|
|
1170
|
-
//
|
|
1171
|
-
resetLinkup() {
|
|
1172
|
-
this.formData = {};
|
|
1173
|
-
this.$refs["table-linkup"].commitProxy("reload");
|
|
1174
|
-
},
|
|
1175
|
-
searchLinkup() {
|
|
1176
|
-
this.$refs["table-linkup"].commitProxy("reload");
|
|
1177
|
-
},
|
|
1178
|
-
initLinkup(flag) {
|
|
1179
|
-
let h = this.$createElement;
|
|
1180
|
-
let statusMap = {
|
|
1181
|
-
0: this.$t2("未完成", "components.wf.talkStatus0"),
|
|
1182
|
-
1: this.$t2("已完成", "components.wf.talkStatus1"),
|
|
1183
|
-
2: this.$t2("已取消", "components.wf.talkStatus2"),
|
|
1184
|
-
};
|
|
1185
|
-
let tableOption = {
|
|
1186
|
-
vue: this,
|
|
1187
|
-
tableRef: "table-linkup",
|
|
1188
|
-
tableName: "wf_table-linkup",
|
|
1189
|
-
path: this.current_prefix + "/wf_linkup/listPage",
|
|
1190
|
-
param: () => {
|
|
1191
|
-
return {
|
|
1192
|
-
uuid: this.wfInfo.uuid,
|
|
1193
|
-
};
|
|
1194
|
-
},
|
|
1195
|
-
config: {
|
|
1196
|
-
height: 350,
|
|
1197
|
-
},
|
|
1198
|
-
columns: [
|
|
1199
|
-
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
1200
|
-
{
|
|
1201
|
-
title: this.$t2("任务名称", "components.wf.taskName"),
|
|
1202
|
-
field: "taskName",
|
|
1203
|
-
width: 150,
|
|
1204
|
-
fixed: "left",
|
|
1205
|
-
},
|
|
1206
|
-
{
|
|
1207
|
-
title: this.$t2("发送人", "components.wf.senderName"),
|
|
1208
|
-
field: "senderName",
|
|
1209
|
-
width: 150,
|
|
1210
|
-
slots: {
|
|
1211
|
-
default: "sender",
|
|
1212
|
-
},
|
|
1213
|
-
},
|
|
1214
|
-
{
|
|
1215
|
-
title: this.$t2("接收人", "components.wf.receiverName"),
|
|
1216
|
-
field: "receiverName",
|
|
1217
|
-
width: 150,
|
|
1218
|
-
slots: {
|
|
1219
|
-
default: "receiver",
|
|
1220
|
-
},
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
title: this.$t2("沟通内容", "components.wf.talkContent"),
|
|
1224
|
-
field: "content",
|
|
1225
|
-
width: 250,
|
|
1226
|
-
showOverflow: false,
|
|
1227
|
-
slots: {
|
|
1228
|
-
default: ({ row, rowIndex }) => {
|
|
1229
|
-
return row.replyId
|
|
1230
|
-
? "[" +
|
|
1231
|
-
this.$t2("回复", "components.wf.reply") +
|
|
1232
|
-
"]" +
|
|
1233
|
-
row.content
|
|
1234
|
-
: row.content;
|
|
1235
|
-
},
|
|
1236
|
-
},
|
|
1237
|
-
},
|
|
1238
|
-
{
|
|
1239
|
-
width: 150,
|
|
1240
|
-
title: this.$t2("沟通资料", "components.wf.talkAttachment"),
|
|
1241
|
-
field: "attachmentImage",
|
|
1242
|
-
sortable: false,
|
|
1243
|
-
slots: {
|
|
1244
|
-
default: ({ row, rowIndex }) => {
|
|
1245
|
-
let option = {
|
|
1246
|
-
title: this.$t2("沟通资料", "components.wf.talkAttachment"),
|
|
1247
|
-
edit: false,
|
|
1248
|
-
rows: (done) => {
|
|
1249
|
-
done(row.attachmentDTOs);
|
|
1250
|
-
},
|
|
1251
|
-
};
|
|
1252
|
-
return [
|
|
1253
|
-
h("base-attachment", {
|
|
1254
|
-
props: {
|
|
1255
|
-
option: option,
|
|
1256
|
-
imageLazy: false,
|
|
1257
|
-
},
|
|
1258
|
-
}),
|
|
1259
|
-
];
|
|
1260
|
-
},
|
|
1261
|
-
},
|
|
1262
|
-
},
|
|
1263
|
-
|
|
1264
|
-
{
|
|
1265
|
-
title: this.$t2("状态", "components.wf.status"),
|
|
1266
|
-
field: "status",
|
|
1267
|
-
width: 150,
|
|
1268
|
-
slots: {
|
|
1269
|
-
default: ({ row, rowIndex }) => {
|
|
1270
|
-
return statusMap[row.status] || "";
|
|
1271
|
-
},
|
|
1272
|
-
},
|
|
1273
|
-
},
|
|
1274
|
-
{
|
|
1275
|
-
title: this.$t2("创建时间", "system.label.createDate"),
|
|
1276
|
-
field: "createDate",
|
|
1277
|
-
width: 150,
|
|
1278
|
-
},
|
|
1279
|
-
{
|
|
1280
|
-
width: 80,
|
|
1281
|
-
fixed: "right",
|
|
1282
|
-
title: "",
|
|
1283
|
-
sortable: false,
|
|
1284
|
-
slots: {
|
|
1285
|
-
default: "operate",
|
|
1286
|
-
},
|
|
1287
|
-
},
|
|
1288
|
-
],
|
|
1289
|
-
callback: (rows) => {
|
|
1290
|
-
if (rows.length && flag) {
|
|
1291
|
-
let row = rows[0];
|
|
1292
|
-
if (row.replyToSender) {
|
|
1293
|
-
this.$nextTick(() => {
|
|
1294
|
-
this.tabIndex = "2";
|
|
1295
|
-
this.openTalkDialog(
|
|
1296
|
-
row.sender,
|
|
1297
|
-
row.senderName,
|
|
1298
|
-
"talk",
|
|
1299
|
-
1,
|
|
1300
|
-
row.id
|
|
1301
|
-
);
|
|
1302
|
-
});
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
},
|
|
1306
|
-
};
|
|
1307
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
1308
|
-
this.linkupOption = opts;
|
|
1309
|
-
});
|
|
1310
|
-
},
|
|
1311
|
-
cancelTalk(row) {
|
|
1312
|
-
let that = getTarget(this);
|
|
1313
|
-
that
|
|
1314
|
-
.$baseConfirm(
|
|
1315
|
-
this.$t2("您确定要取消沟通记录吗?", "components.wf.cancelTalkTip")
|
|
1316
|
-
)
|
|
1317
|
-
.then(() => {
|
|
1318
|
-
that.$http({
|
|
1319
|
-
url: this.current_prefix + "/wf_linkup/cancel",
|
|
1320
|
-
data: { id: row.id },
|
|
1321
|
-
method: "post",
|
|
1322
|
-
loadingTarget: document.body,
|
|
1323
|
-
isLoading: true,
|
|
1324
|
-
success: (resultMsg) => {
|
|
1325
|
-
that.$message({
|
|
1326
|
-
message: resultMsg.content,
|
|
1327
|
-
type: "success",
|
|
1328
|
-
duration: 500,
|
|
1329
|
-
onClose: (t) => {
|
|
1330
|
-
this.reloadContent();
|
|
1331
|
-
},
|
|
1332
|
-
});
|
|
1333
|
-
},
|
|
1334
|
-
});
|
|
1335
|
-
});
|
|
1336
|
-
},
|
|
1337
|
-
openTalkDialog(receiver, receiverName, operateType, flag, replyId) {
|
|
1338
|
-
this.operateType = operateType;
|
|
1339
|
-
/*this.talkForm.receiver = receiver || null;
|
|
1340
|
-
this.talkForm.receiverName = receiverName || null;
|
|
1341
|
-
this.talkForm.replyId = replyId || null;
|
|
1342
|
-
this.talkForm.content = null;
|
|
1343
|
-
this.talkForm.attachmentDTOs = [];*/
|
|
1344
|
-
this.initTalkForm(receiver, receiverName, replyId);
|
|
1345
|
-
this.showTalkDialog = true;
|
|
1346
|
-
if (flag == 1) {
|
|
1347
|
-
let opeaBtnDom = this.$refs.opeaBtn;
|
|
1348
|
-
opeaBtnDom && opeaBtnDom.scrollIntoView();
|
|
1349
|
-
}
|
|
1350
|
-
},
|
|
1351
|
-
initTalkForm(receiver, receiverName, replyId) {
|
|
1352
|
-
this.talkForm.receiver = receiver || null;
|
|
1353
|
-
this.talkForm.receiverName = receiverName || null;
|
|
1354
|
-
this.talkForm.replyId = replyId || null;
|
|
1355
|
-
this.talkForm.content = null;
|
|
1356
|
-
this.talkForm.attachmentDTOs = [];
|
|
1357
|
-
},
|
|
1358
|
-
submitTalkForm() {
|
|
1359
|
-
let that = getTarget(this);
|
|
1360
|
-
var instanceId = this.wfInfo.instanceId;
|
|
1361
|
-
var taskId = this.wfInfo.taskId;
|
|
1362
|
-
|
|
1363
|
-
if (!this.talkForm.receiver) {
|
|
1364
|
-
that.$message({
|
|
1365
|
-
message: this.$t2("请选择接收人", "components.wf.talkWarnMsg1"),
|
|
1366
|
-
type: "error",
|
|
1367
|
-
duration: 2 * 1000,
|
|
1368
|
-
});
|
|
1369
|
-
return false;
|
|
1370
|
-
}
|
|
1371
|
-
if (!this.talkForm.content) {
|
|
1372
|
-
that.$message({
|
|
1373
|
-
message: this.$t2("请输入沟通内容", "components.wf.talkWarnMsg2"),
|
|
1374
|
-
type: "error",
|
|
1375
|
-
duration: 2 * 1000,
|
|
1376
|
-
});
|
|
1377
|
-
return false;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
var data = {
|
|
1381
|
-
taskId: taskId,
|
|
1382
|
-
uuid: this.wfInfo.uuid,
|
|
1383
|
-
receiver: this.talkForm.receiver,
|
|
1384
|
-
receiverName: this.talkForm.receiverName,
|
|
1385
|
-
replyId: this.talkForm.replyId,
|
|
1386
|
-
content: this.talkForm.content,
|
|
1387
|
-
attachmentDTOs: this.talkForm.attachmentDTOs,
|
|
1388
|
-
notifyType: "wfLinkup",
|
|
1389
|
-
};
|
|
1390
|
-
this.showTalkDialog = false;
|
|
1391
|
-
that.$http({
|
|
1392
|
-
url: this.current_prefix + "/wf_linkup/save",
|
|
1393
|
-
data: data,
|
|
1394
|
-
method: "post",
|
|
1395
|
-
isLoading: true,
|
|
1396
|
-
success: (resultMsg) => {
|
|
1397
|
-
that.$message({
|
|
1398
|
-
message: resultMsg.content,
|
|
1399
|
-
type: "success",
|
|
1400
|
-
duration: 500,
|
|
1401
|
-
onClose: (t) => {
|
|
1402
|
-
this.reloadContent();
|
|
1403
|
-
this.closeWinOnCheck(5);
|
|
1404
|
-
},
|
|
1405
|
-
});
|
|
1406
|
-
},
|
|
1407
|
-
});
|
|
1408
|
-
},
|
|
1409
|
-
openTalkUserDialog() {
|
|
1410
|
-
this.showTalkUserDialog = true;
|
|
1411
|
-
},
|
|
1412
|
-
confirmTalkUserDialog(rows) {
|
|
1413
|
-
if (rows.length > 0) {
|
|
1414
|
-
let row = rows[0];
|
|
1415
|
-
if (this.talkForm.receiver != row.id) {
|
|
1416
|
-
this.talkForm.replyId = null;
|
|
1417
|
-
}
|
|
1418
|
-
this.talkForm.receiver = row.id;
|
|
1419
|
-
this.talkForm.receiverName = row.nickName;
|
|
1420
|
-
}
|
|
1421
|
-
},
|
|
1422
|
-
confirmUrging() {
|
|
1423
|
-
this.reloadContent();
|
|
1424
|
-
},
|
|
1425
|
-
confirmDeleteTaskUser() {
|
|
1426
|
-
this.reloadContent();
|
|
1427
|
-
},
|
|
1428
|
-
confirmAddTaskUser(rows) {
|
|
1429
|
-
this.addIncreaseSignUsers = rows;
|
|
1430
|
-
this.addIncreaseSignForm.userNickNames = rows
|
|
1431
|
-
.map((row) => row.nickName)
|
|
1432
|
-
.join(",");
|
|
1433
|
-
// this.reloadContent();
|
|
1434
|
-
},
|
|
1435
|
-
submitAddTaskUserForm(flag) {
|
|
1436
|
-
let that = getTarget(this);
|
|
1437
|
-
let userIds = this.addIncreaseSignUsers.map((checkRow) => checkRow.id);
|
|
1438
|
-
if (userIds.length == 0) {
|
|
1439
|
-
that.$message({
|
|
1440
|
-
message: this.$t2(
|
|
1441
|
-
"请选择候选人",
|
|
1442
|
-
"components.wf.addIncreaseSignWarnMsg1"
|
|
1443
|
-
),
|
|
1444
|
-
type: "error",
|
|
1445
|
-
duration: 2000,
|
|
1446
|
-
onClose: (t) => {},
|
|
1447
|
-
});
|
|
1448
|
-
return false;
|
|
1449
|
-
}
|
|
1450
|
-
let toDo = () => {
|
|
1451
|
-
var data = JSON.stringify({
|
|
1452
|
-
uuid: this.wfInfo.uuid,
|
|
1453
|
-
taskId: this.wfInfo.taskId,
|
|
1454
|
-
userIds: userIds,
|
|
1455
|
-
suggestion: this.addIncreaseSignForm.opinion,
|
|
1456
|
-
});
|
|
1457
|
-
this.agreeDialogVisible = false;
|
|
1458
|
-
that.$http({
|
|
1459
|
-
url: this.current_prefix + "/wf/addIncreaseSign",
|
|
1460
|
-
data: data,
|
|
1461
|
-
method: "post",
|
|
1462
|
-
loadingTarget: document.body,
|
|
1463
|
-
headers: {
|
|
1464
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
1465
|
-
},
|
|
1466
|
-
isLoading: true,
|
|
1467
|
-
success: (resultMsg) => {
|
|
1468
|
-
this.showAddIncreaseSignDialog = false;
|
|
1469
|
-
that.$message({
|
|
1470
|
-
message: resultMsg.content,
|
|
1471
|
-
type: "success",
|
|
1472
|
-
duration: 500,
|
|
1473
|
-
onClose: (t) => {
|
|
1474
|
-
this.reloadContent();
|
|
1475
|
-
},
|
|
1476
|
-
});
|
|
1477
|
-
},
|
|
1478
|
-
});
|
|
1479
|
-
};
|
|
1480
|
-
if (flag === 0) {
|
|
1481
|
-
toDo();
|
|
1482
|
-
} else {
|
|
1483
|
-
that
|
|
1484
|
-
.$baseConfirm(
|
|
1485
|
-
this.$t2(
|
|
1486
|
-
"您确定要加签吗?",
|
|
1487
|
-
"components.wf.addIncreaseSignConfirmTip"
|
|
1488
|
-
)
|
|
1489
|
-
)
|
|
1490
|
-
.then(() => {
|
|
1491
|
-
toDo();
|
|
1492
|
-
});
|
|
1493
|
-
}
|
|
1494
|
-
},
|
|
1495
|
-
openSetCandidateDialog(operateType) {
|
|
1496
|
-
this.operateType = operateType;
|
|
1497
|
-
this.showSetCandidateDialog = true;
|
|
1498
|
-
},
|
|
1499
|
-
closeSetCandidateDialog({ saved = false } = {}) {
|
|
1500
|
-
this.showSetCandidateDialog = false;
|
|
1501
|
-
if (saved) {
|
|
1502
|
-
this.reloadContent();
|
|
1503
|
-
}
|
|
1504
|
-
},
|
|
1505
|
-
openRevokeDialog(operateType) {
|
|
1506
|
-
this.operateType = operateType;
|
|
1507
|
-
this.revokeForm = { opinion: null };
|
|
1508
|
-
this.revokeDialogVisible = true;
|
|
1509
|
-
},
|
|
1510
|
-
subRevokeForm(flag) {
|
|
1511
|
-
|
|
1512
|
-
let that = getTarget(this);
|
|
1513
|
-
let toDo = () => {
|
|
1514
|
-
var data = JSON.stringify({
|
|
1515
|
-
uuid: this.wfInfo.uuid,
|
|
1516
|
-
taskId: this.wfInfo.taskId,
|
|
1517
|
-
suggestion: this.revokeForm.opinion,
|
|
1518
|
-
});
|
|
1519
|
-
this.revokeDialogVisible = false;
|
|
1520
|
-
that.$http({
|
|
1521
|
-
url: this.current_prefix + "/wf/revoke",
|
|
1522
|
-
data: data,
|
|
1523
|
-
method: "post",
|
|
1524
|
-
loadingTarget: document.body,
|
|
1525
|
-
headers: {
|
|
1526
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
1527
|
-
},
|
|
1528
|
-
isLoading: true,
|
|
1529
|
-
success: (resultMsg) => {
|
|
1530
|
-
that.$message({
|
|
1531
|
-
message: resultMsg.content,
|
|
1532
|
-
type: "success",
|
|
1533
|
-
duration: 500,
|
|
1534
|
-
onClose: (t) => {
|
|
1535
|
-
this.reloadContent();
|
|
1536
|
-
},
|
|
1537
|
-
});
|
|
1538
|
-
},
|
|
1539
|
-
});
|
|
1540
|
-
};
|
|
1541
|
-
if (flag === 0) {
|
|
1542
|
-
toDo();
|
|
1543
|
-
} else {
|
|
1544
|
-
that
|
|
1545
|
-
.$baseConfirm(
|
|
1546
|
-
this.$t2("
|
|
1547
|
-
)
|
|
1548
|
-
.then(() => {
|
|
1549
|
-
toDo();
|
|
1550
|
-
});
|
|
1551
|
-
}
|
|
1552
|
-
},
|
|
1553
|
-
initShowTaskInfo(callback) {
|
|
1554
|
-
//初始化转办用户参数
|
|
1555
|
-
let that = getTarget(this);
|
|
1556
|
-
return that.$http({
|
|
1557
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1558
|
-
method: `post`,
|
|
1559
|
-
data: { attributeKey: "param9" },
|
|
1560
|
-
isLoading: true,
|
|
1561
|
-
modalStrictly: true,
|
|
1562
|
-
success: (res) => {
|
|
1563
|
-
this.showWfInfoTab = res.objx !== 1;
|
|
1564
|
-
callback && callback();
|
|
1565
|
-
},
|
|
1566
|
-
});
|
|
1567
|
-
},
|
|
1568
|
-
getIsShowWfMemo() {
|
|
1569
|
-
let that = getTarget(this);
|
|
1570
|
-
that.$http({
|
|
1571
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1572
|
-
method: `post`,
|
|
1573
|
-
data: { attributeKey: "param10" },
|
|
1574
|
-
isLoading: true,
|
|
1575
|
-
success: (res) => {
|
|
1576
|
-
this.showWfMemo = res?.objx === true;
|
|
1577
|
-
if (this.showWfMemo) {
|
|
1578
|
-
this.$nextTick(() => {
|
|
1579
|
-
this.initWfMemo();
|
|
1580
|
-
});
|
|
1581
|
-
}
|
|
1582
|
-
},
|
|
1583
|
-
});
|
|
1584
|
-
},
|
|
1585
|
-
|
|
1586
|
-
initWfMemo() {
|
|
1587
|
-
this.wfMemoSearchEvent();
|
|
1588
|
-
/* let h = this.$createElement;
|
|
1589
|
-
let tableOption = {
|
|
1590
|
-
vue: this,
|
|
1591
|
-
tableRef: "table-wfMemo",
|
|
1592
|
-
tableName: "wf_table-wfMemo",
|
|
1593
|
-
path: this.current_prefix + "/wf_memo/listPage",
|
|
1594
|
-
param: () => {
|
|
1595
|
-
return {
|
|
1596
|
-
uuid: this.wfInfo.uuid,
|
|
1597
|
-
};
|
|
1598
|
-
},
|
|
1599
|
-
config: {
|
|
1600
|
-
height: 350
|
|
1601
|
-
},
|
|
1602
|
-
columns: [
|
|
1603
|
-
{type: "checkbox", width: 48, resizable: false, fixed: "left"},
|
|
1604
|
-
{
|
|
1605
|
-
title: this.$t1('操作人'),
|
|
1606
|
-
field: "operatorName",
|
|
1607
|
-
width: 150,
|
|
1608
|
-
fixed: "left",
|
|
1609
|
-
},
|
|
1610
|
-
{
|
|
1611
|
-
title: this.$t1('内容'),
|
|
1612
|
-
field: "content",
|
|
1613
|
-
width: 250,
|
|
1614
|
-
showOverflow: false
|
|
1615
|
-
},
|
|
1616
|
-
{
|
|
1617
|
-
width: 150,
|
|
1618
|
-
title: this.$t1('附件'),
|
|
1619
|
-
field: "attachmentImage",
|
|
1620
|
-
sortable: false,
|
|
1621
|
-
slots: {
|
|
1622
|
-
default: ({row, rowIndex}) => {
|
|
1623
|
-
let option = {
|
|
1624
|
-
title: this.$t1('附件'),
|
|
1625
|
-
edit: false,
|
|
1626
|
-
rows: (done) => {
|
|
1627
|
-
done(row.attachmentDTOs);
|
|
1628
|
-
},
|
|
1629
|
-
};
|
|
1630
|
-
return [
|
|
1631
|
-
h("base-attachment", {
|
|
1632
|
-
props: {
|
|
1633
|
-
option: option,
|
|
1634
|
-
imageLazy: false
|
|
1635
|
-
},
|
|
1636
|
-
}),
|
|
1637
|
-
];
|
|
1638
|
-
},
|
|
1639
|
-
},
|
|
1640
|
-
},
|
|
1641
|
-
{
|
|
1642
|
-
title: this.$t2('创建时间', 'system.label.createDate'),
|
|
1643
|
-
field: "createDate",
|
|
1644
|
-
width: 150,
|
|
1645
|
-
},
|
|
1646
|
-
{
|
|
1647
|
-
width: 80,
|
|
1648
|
-
fixed: "right",
|
|
1649
|
-
title: "",
|
|
1650
|
-
sortable: false
|
|
1651
|
-
},
|
|
1652
|
-
]
|
|
1653
|
-
};
|
|
1654
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
1655
|
-
this.wfMemoOption = opts;
|
|
1656
|
-
}); */
|
|
1657
|
-
},
|
|
1658
|
-
wfMemoSearchEvent() {
|
|
1659
|
-
// this.$refs['table-wfMemo'].commitProxy('reload');
|
|
1660
|
-
let that = getTarget(this);
|
|
1661
|
-
that.$http({
|
|
1662
|
-
url: this.current_prefix + "/wf_memo/listPage",
|
|
1663
|
-
method: `post`,
|
|
1664
|
-
data: {
|
|
1665
|
-
uuid: this.wfInfo.uuid,
|
|
1666
|
-
},
|
|
1667
|
-
isLoading: true,
|
|
1668
|
-
success: (res) => {
|
|
1669
|
-
let rows = res?.objx?.records || [];
|
|
1670
|
-
this.wfMemoData = rows;
|
|
1671
|
-
},
|
|
1672
|
-
});
|
|
1673
|
-
},
|
|
1674
|
-
openWfMemoDialog(row) {
|
|
1675
|
-
if (row) {
|
|
1676
|
-
this.wfMemoForm = this.$baseLodash.cloneDeep(row);
|
|
1677
|
-
} else {
|
|
1678
|
-
this.wfMemoForm = {
|
|
1679
|
-
uuid: this.wfInfo.uuid,
|
|
1680
|
-
content: null,
|
|
1681
|
-
attachmentDTOs: [],
|
|
1682
|
-
};
|
|
1683
|
-
}
|
|
1684
|
-
this.showWfMemoDialog = true;
|
|
1685
|
-
},
|
|
1686
|
-
submitWfMemoForm() {
|
|
1687
|
-
let that = getTarget(this);
|
|
1688
|
-
|
|
1689
|
-
if (!this.wfMemoForm.content) {
|
|
1690
|
-
that.$message({
|
|
1691
|
-
message: this.$t1("请输入内容"),
|
|
1692
|
-
type: "error",
|
|
1693
|
-
duration: 2 * 1000,
|
|
1694
|
-
});
|
|
1695
|
-
return false;
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
this.showWfMemoDialog = false;
|
|
1699
|
-
that.$http({
|
|
1700
|
-
url: this.current_prefix + "/wf_memo/save",
|
|
1701
|
-
data: this.wfMemoForm,
|
|
1702
|
-
method: "post",
|
|
1703
|
-
isLoading: true,
|
|
1704
|
-
success: (resultMsg) => {
|
|
1705
|
-
that.$message({
|
|
1706
|
-
message: resultMsg.content,
|
|
1707
|
-
type: "success",
|
|
1708
|
-
});
|
|
1709
|
-
this.wfMemoSearchEvent();
|
|
1710
|
-
},
|
|
1711
|
-
});
|
|
1712
|
-
},
|
|
1713
|
-
},
|
|
1714
|
-
};
|
|
1715
|
-
|
|
1716
|
-
wfStartMixin = {
|
|
1717
|
-
name: "wfStartDialog",
|
|
1718
|
-
props: {
|
|
1719
|
-
dataId: [String, Number],
|
|
1720
|
-
code: [String, Number],
|
|
1721
|
-
serviceId: String,
|
|
1722
|
-
startParam: Object,
|
|
1723
|
-
visible: Boolean,
|
|
1724
|
-
parentVue: Object,
|
|
1725
|
-
wfName: String,
|
|
1726
|
-
formCode: String,
|
|
1727
|
-
option: Object,
|
|
1728
|
-
},
|
|
1729
|
-
data() {
|
|
1730
|
-
return {
|
|
1731
|
-
showDialog: false,
|
|
1732
|
-
wfStartForm: {},
|
|
1733
|
-
wfDefItems: [],
|
|
1734
|
-
|
|
1735
|
-
startFormData: {},
|
|
1736
|
-
wfUserRangeEnabled: false,
|
|
1737
|
-
preStartResult: [],
|
|
1738
|
-
showSetCandidateDialog2: false,
|
|
1739
|
-
wfSubmitted: false,
|
|
1740
|
-
};
|
|
1741
|
-
},
|
|
1742
|
-
computed: {
|
|
1743
|
-
current_prefix() {
|
|
1744
|
-
return this.serviceId ? "/" + this.serviceId : "";
|
|
1745
|
-
},
|
|
1746
|
-
},
|
|
1747
|
-
mounted() {
|
|
1748
|
-
this.initWfInfo(this.code);
|
|
1749
|
-
// this.showDialog = true;
|
|
1750
|
-
},
|
|
1751
|
-
methods: {
|
|
1752
|
-
preStart() {
|
|
1753
|
-
let that = getTarget(this);
|
|
1754
|
-
return new Promise((resolve) => {
|
|
1755
|
-
return that.$http({
|
|
1756
|
-
url: this.current_prefix + "/wf/preStart",
|
|
1757
|
-
method: `post`,
|
|
1758
|
-
data: {
|
|
1759
|
-
...this.startFormData,
|
|
1760
|
-
preStart: 1,
|
|
1761
|
-
},
|
|
1762
|
-
success: (res) => {
|
|
1763
|
-
resolve(res.objx);
|
|
1764
|
-
},
|
|
1765
|
-
});
|
|
1766
|
-
});
|
|
1767
|
-
},
|
|
1768
|
-
initWfUserRangeParam() {
|
|
1769
|
-
let that = getTarget(this);
|
|
1770
|
-
return that.$http({
|
|
1771
|
-
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1772
|
-
method: `post`,
|
|
1773
|
-
data: { attributeKey: "param12" },
|
|
1774
|
-
success: (res) => {
|
|
1775
|
-
this.wfUserRangeEnabled = res?.objx === true;
|
|
1776
|
-
},
|
|
1777
|
-
});
|
|
1778
|
-
},
|
|
1779
|
-
openSetCandidateDialog() {
|
|
1780
|
-
this.showSetCandidateDialog2 = true;
|
|
1781
|
-
},
|
|
1782
|
-
confirmSetCandidateDialog(rows) {
|
|
1783
|
-
let formData = {
|
|
1784
|
-
...this.startFormData,
|
|
1785
|
-
wfNodeDTOs: rows,
|
|
1786
|
-
};
|
|
1787
|
-
this.startSubmitHanlde(formData);
|
|
1788
|
-
},
|
|
1789
|
-
async initWfInfo(code) {
|
|
1790
|
-
let that = getTarget(this);
|
|
1791
|
-
var wfDefItems = null;
|
|
1792
|
-
var objId = this.dataId;
|
|
1793
|
-
|
|
1794
|
-
await this.initWfUserRangeParam();
|
|
1795
|
-
await that.$http({
|
|
1796
|
-
url: this.current_prefix + "/wf_obj_config_item/list",
|
|
1797
|
-
data: {
|
|
1798
|
-
objTypeCode: code,
|
|
1799
|
-
enabled: true,
|
|
1800
|
-
published: true,
|
|
1801
|
-
objId: objId,
|
|
1802
|
-
},
|
|
1803
|
-
method: "post",
|
|
1804
|
-
async: false,
|
|
1805
|
-
isLoading: true,
|
|
1806
|
-
error: (error) => {
|
|
1807
|
-
this.close();
|
|
1808
|
-
},
|
|
1809
|
-
success: (resultMsg) => {
|
|
1810
|
-
wfDefItems = resultMsg.objx || [];
|
|
1811
|
-
},
|
|
1812
|
-
});
|
|
1813
|
-
|
|
1814
|
-
if (!wfDefItems || wfDefItems.length == 0) {
|
|
1815
|
-
that.$baseAlert(
|
|
1816
|
-
this.$t2("无法启动,没有流程单据", "components.wf.startWarnMsg1")
|
|
1817
|
-
);
|
|
1818
|
-
this.close();
|
|
1819
|
-
return false;
|
|
1820
|
-
}
|
|
1821
|
-
|
|
1822
|
-
(this.wfStartForm = {
|
|
1823
|
-
wfCode: code,
|
|
1824
|
-
}),
|
|
1825
|
-
(this.wfDefItems = wfDefItems);
|
|
1826
|
-
this.$set(this.wfStartForm, "flowCode", wfDefItems[0].flowCode);
|
|
1827
|
-
if (wfDefItems.length == 1) {
|
|
1828
|
-
if (
|
|
1829
|
-
settingConfig.withoutConfrimByOneWf === true ||
|
|
1830
|
-
(this.option && this.option.skipStartConfirm)
|
|
1831
|
-
) {
|
|
1832
|
-
this.startSubmit();
|
|
1833
|
-
} else {
|
|
1834
|
-
let wfStartOperateName =
|
|
1835
|
-
settingConfig.wfStartOperateName ||
|
|
1836
|
-
settingConfig.wfStartButtonName ||
|
|
1837
|
-
"启动流程";
|
|
1838
|
-
let startTip = "您确定要" + wfStartOperateName + "吗?";
|
|
1839
|
-
that
|
|
1840
|
-
.$baseConfirm(this.$t2(startTip, "components.wf.startTip"))
|
|
1841
|
-
.then(() => {
|
|
1842
|
-
this.startSubmit();
|
|
1843
|
-
});
|
|
1844
|
-
}
|
|
1845
|
-
} else {
|
|
1846
|
-
this.showDialog = true;
|
|
1847
|
-
}
|
|
1848
|
-
},
|
|
1849
|
-
startSubmit() {
|
|
1850
|
-
var flowCode = this.wfStartForm.flowCode;
|
|
1851
|
-
if (!flowCode) {
|
|
1852
|
-
this.$baseAlert(
|
|
1853
|
-
this.$t2("请选择流程模版", "components.wf.startWarnMsg2")
|
|
1854
|
-
);
|
|
1855
|
-
return false;
|
|
1856
|
-
}
|
|
1857
|
-
let option = this.option;
|
|
1858
|
-
if (option.onBeforeStartSubmit) {
|
|
1859
|
-
option.onBeforeStartSubmit(() => {
|
|
1860
|
-
this.subWfStartForm();
|
|
1861
|
-
});
|
|
1862
|
-
} else {
|
|
1863
|
-
this.subWfStartForm();
|
|
1864
|
-
}
|
|
1865
|
-
},
|
|
1866
|
-
async subWfStartForm() {
|
|
1867
|
-
let that = getTarget(this);
|
|
1868
|
-
var flowCode = this.wfStartForm.flowCode;
|
|
1869
|
-
if (!flowCode) {
|
|
1870
|
-
that.$baseAlert(
|
|
1871
|
-
this.$t2("请选择流程模版", "components.wf.startWarnMsg2")
|
|
1872
|
-
);
|
|
1873
|
-
return false;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
let option = this.option;
|
|
1877
|
-
|
|
1878
|
-
var objId = this.dataId;
|
|
1879
|
-
|
|
1880
|
-
let startParam = this.startParam || {};
|
|
1881
|
-
let formCode = this.formCode || null;
|
|
1882
|
-
|
|
1883
|
-
var data = {
|
|
1884
|
-
flowCode: flowCode,
|
|
1885
|
-
objTypeCode: this.code,
|
|
1886
|
-
objId: objId,
|
|
1887
|
-
formData: startParam,
|
|
1888
|
-
formCode: formCode,
|
|
1889
|
-
// name:this.wfName
|
|
1890
|
-
};
|
|
1891
|
-
this.startFormData = data;
|
|
1892
|
-
|
|
1893
|
-
if (this.wfUserRangeEnabled) {
|
|
1894
|
-
this.preStartResult = (await this.preStart()) || [];
|
|
1895
|
-
if (this.preStartResult.length) {
|
|
1896
|
-
this.openSetCandidateDialog();
|
|
1897
|
-
return;
|
|
1898
|
-
}
|
|
1899
|
-
}
|
|
1900
|
-
this.startSubmitHanlde(this.startFormData);
|
|
1901
|
-
},
|
|
1902
|
-
startSubmitHanlde(formData) {
|
|
1903
|
-
this.wfSubmitted = true; // 标记已进入提交,避免随后关闭弹框误判为「取消」
|
|
1904
|
-
this.showDialog = false;
|
|
1905
|
-
let that = getTarget(this);
|
|
1906
|
-
let option = this.option;
|
|
1907
|
-
that.$http({
|
|
1908
|
-
url: this.current_prefix + "/wf/start",
|
|
1909
|
-
data: formData,
|
|
1910
|
-
method: "post",
|
|
1911
|
-
/* headers: {
|
|
1912
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
1913
|
-
}, */
|
|
1914
|
-
isLoading: true,
|
|
1915
|
-
callback: (resultMsg) => {
|
|
1916
|
-
if (resultMsg.type == "success") {
|
|
1917
|
-
that.$message({
|
|
1918
|
-
message: resultMsg.content,
|
|
1919
|
-
type: "success",
|
|
1920
|
-
duration: 500,
|
|
1921
|
-
onClose: (t) => {
|
|
1922
|
-
if (!option.onStartSuccess) {
|
|
1923
|
-
that.$baseReload();
|
|
1924
|
-
} else {
|
|
1925
|
-
option.onStartSuccess();
|
|
1926
|
-
}
|
|
1927
|
-
if (resultMsg.objx) {
|
|
1928
|
-
that.$baseAlert(resultMsg.objx);
|
|
1929
|
-
}
|
|
1930
|
-
},
|
|
1931
|
-
});
|
|
1932
|
-
} else {
|
|
1933
|
-
option.onStartFail && option.onStartFail();
|
|
1934
|
-
}
|
|
1935
|
-
},
|
|
1936
|
-
});
|
|
1937
|
-
},
|
|
1938
|
-
handleWfCancel() {
|
|
1939
|
-
// 未进入提交就关闭 = 取消启动,回调通用 onCancel(一次性,避免多个弹框关闭重复触发)
|
|
1940
|
-
if (this.wfSubmitted) return;
|
|
1941
|
-
this.wfSubmitted = true;
|
|
1942
|
-
this.option && this.option.onCancel && this.option.onCancel();
|
|
1943
|
-
},
|
|
1944
|
-
close() {
|
|
1945
|
-
this.handleWfCancel();
|
|
1946
|
-
this.$emit("update:visible", false);
|
|
1947
|
-
},
|
|
1948
|
-
},
|
|
1949
|
-
watch: {
|
|
1950
|
-
showSetCandidateDialog2(val, oldVal) {
|
|
1951
|
-
// 候选人弹框未提交就关闭 = 取消启动
|
|
1952
|
-
if (oldVal && !val) this.handleWfCancel();
|
|
1953
|
-
},
|
|
1954
|
-
},
|
|
1955
|
-
};
|
|
1956
|
-
|
|
1957
|
-
wfModifyMixin = {
|
|
1958
|
-
name: "wfModifyMixin",
|
|
1959
|
-
props: {
|
|
1960
|
-
dataId: [String, Number],
|
|
1961
|
-
code: [String, Number],
|
|
1962
|
-
visible: Boolean,
|
|
1963
|
-
paramData: Object,
|
|
1964
|
-
parentVue: Object,
|
|
1965
|
-
wfInfo: Object,
|
|
1966
|
-
title: String,
|
|
1967
|
-
},
|
|
1968
|
-
data() {
|
|
1969
|
-
return {
|
|
1970
|
-
showModifyDialog: false,
|
|
1971
|
-
showBillEdit: false,
|
|
1972
|
-
content: "",
|
|
1973
|
-
};
|
|
1974
|
-
},
|
|
1975
|
-
async mounted() {
|
|
1976
|
-
this.openWfModifyDialog(this.code);
|
|
1977
|
-
},
|
|
1978
|
-
methods: {
|
|
1979
|
-
openWfModifyDialog() {
|
|
1980
|
-
let row = this.paramData;
|
|
1981
|
-
let url = row.url + ".vue";
|
|
1982
|
-
this.showModifyDialog = true;
|
|
1983
|
-
this.content = configUtil.requireView(url);
|
|
1984
|
-
this.$openEditView("showBillEdit");
|
|
1985
|
-
},
|
|
1986
|
-
modfyDialogClose() {
|
|
1987
|
-
this.showBillEdit = false;
|
|
1988
|
-
this.content = null;
|
|
1989
|
-
},
|
|
1990
|
-
refreshEdit() {
|
|
1991
|
-
this.showModifyDialog = false;
|
|
1992
|
-
this.parentVue.$baseReload();
|
|
1993
|
-
},
|
|
1994
|
-
},
|
|
1995
|
-
};
|
|
1996
|
-
|
|
1997
|
-
wfUrgingMixin = {
|
|
1998
|
-
props: ["visiable", "multi", "rows", "param", "current_prefix", "wfInfo"],
|
|
1999
|
-
mixins: [selectDialogMixins],
|
|
2000
|
-
created() {
|
|
2001
|
-
this.initSetting();
|
|
2002
|
-
},
|
|
2003
|
-
mounted() {
|
|
2004
|
-
this.initTableM1();
|
|
2005
|
-
},
|
|
2006
|
-
data() {
|
|
2007
|
-
return {
|
|
2008
|
-
showDialog: true,
|
|
2009
|
-
selectMulti: true,
|
|
2010
|
-
vxeOption: {},
|
|
2011
|
-
};
|
|
2012
|
-
},
|
|
2013
|
-
methods: {
|
|
2014
|
-
initTableM1() {
|
|
2015
|
-
var that = this;
|
|
2016
|
-
let tableOption = {
|
|
2017
|
-
vue: that,
|
|
2018
|
-
tableRef: "table-m1",
|
|
2019
|
-
tableName: "wf_urgingDialog-m1",
|
|
2020
|
-
path: this.current_prefix + "/wf/getTaskCandidates",
|
|
2021
|
-
param: () => {
|
|
2022
|
-
return { stringOne: this.wfInfo.uuid };
|
|
2023
|
-
},
|
|
2024
|
-
config: {
|
|
2025
|
-
checkboxConfig: {
|
|
2026
|
-
checkStrictly: true,
|
|
2027
|
-
showHeader: this.selectMulti,
|
|
2028
|
-
trigger: "row",
|
|
2029
|
-
},
|
|
2030
|
-
proxyConfig: {
|
|
2031
|
-
props: {
|
|
2032
|
-
result: "objx", // 配置响应结果列表字段
|
|
2033
|
-
total: "objx.length", // 配置响应结果总页数字段
|
|
2034
|
-
},
|
|
2035
|
-
},
|
|
2036
|
-
},
|
|
2037
|
-
columns: [
|
|
2038
|
-
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
2039
|
-
{
|
|
2040
|
-
title: this.$t2("催办人", "components.wf.urgingUser"),
|
|
2041
|
-
field: "name",
|
|
2042
|
-
width: 250,
|
|
2043
|
-
fixed: "left",
|
|
2044
|
-
},
|
|
2045
|
-
{
|
|
2046
|
-
title: this.$t2("催办人ID", "components.wf.urgingUserId"),
|
|
2047
|
-
field: "id",
|
|
2048
|
-
width: 150,
|
|
2049
|
-
},
|
|
2050
|
-
{
|
|
2051
|
-
width: 47,
|
|
2052
|
-
fixed: "right",
|
|
2053
|
-
title: "",
|
|
2054
|
-
sortable: false,
|
|
2055
|
-
},
|
|
2056
|
-
],
|
|
2057
|
-
};
|
|
2058
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
2059
|
-
that.vxeOption = opts;
|
|
2060
|
-
});
|
|
2061
|
-
},
|
|
2062
|
-
dialogConfirm() {
|
|
2063
|
-
this.dialogPrimary();
|
|
2064
|
-
this.$emit("confirm");
|
|
2065
|
-
},
|
|
2066
|
-
subUrgingForm() {
|
|
2067
|
-
let that = this;
|
|
2068
|
-
let urgingUserIds = this.checkRows.map((checkRow) => checkRow.id);
|
|
2069
|
-
if (urgingUserIds.length == 0) {
|
|
2070
|
-
that.$message({
|
|
2071
|
-
message: this.$t2("请选择催办人", "components.wf.urgingWarnMsg1"),
|
|
2072
|
-
type: "error",
|
|
2073
|
-
duration: 2000,
|
|
2074
|
-
onClose: (t) => {},
|
|
2075
|
-
});
|
|
2076
|
-
return false;
|
|
2077
|
-
}
|
|
2078
|
-
that
|
|
2079
|
-
.$baseConfirm(
|
|
2080
|
-
this.$t2("您确定要催办吗?", "components.wf.urgingConfirmTip")
|
|
2081
|
-
)
|
|
2082
|
-
.then(() => {
|
|
2083
|
-
var data = JSON.stringify({
|
|
2084
|
-
uuid: this.wfInfo.uuid,
|
|
2085
|
-
taskId: this.wfInfo.taskId,
|
|
2086
|
-
notifyType: "wfUrging",
|
|
2087
|
-
userIds: urgingUserIds,
|
|
2088
|
-
});
|
|
2089
|
-
this.agreeDialogVisible = false;
|
|
2090
|
-
that.$http({
|
|
2091
|
-
url: this.current_prefix + "/wf/urging",
|
|
2092
|
-
data: data,
|
|
2093
|
-
method: "post",
|
|
2094
|
-
loadingTarget: document.body,
|
|
2095
|
-
headers: {
|
|
2096
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
2097
|
-
},
|
|
2098
|
-
isLoading: true,
|
|
2099
|
-
success: (resultMsg) => {
|
|
2100
|
-
that.$message({
|
|
2101
|
-
message: resultMsg.content,
|
|
2102
|
-
type: "success",
|
|
2103
|
-
duration: 500,
|
|
2104
|
-
onClose: (t) => {
|
|
2105
|
-
// this.reloadContent();
|
|
2106
|
-
this.dialogConfirm();
|
|
2107
|
-
},
|
|
2108
|
-
});
|
|
2109
|
-
},
|
|
2110
|
-
});
|
|
2111
|
-
});
|
|
2112
|
-
},
|
|
2113
|
-
},
|
|
2114
|
-
};
|
|
2115
|
-
|
|
2116
|
-
deleteTaskUserMixin = {
|
|
2117
|
-
props: ["visiable", "multi", "rows", "param", "current_prefix", "wfInfo"],
|
|
2118
|
-
mixins: [selectDialogMixins],
|
|
2119
|
-
created() {
|
|
2120
|
-
this.initSetting();
|
|
2121
|
-
},
|
|
2122
|
-
mounted() {
|
|
2123
|
-
this.initTableM1();
|
|
2124
|
-
},
|
|
2125
|
-
data() {
|
|
2126
|
-
return {
|
|
2127
|
-
showDialog: true,
|
|
2128
|
-
selectMulti: true,
|
|
2129
|
-
vxeOption: {},
|
|
2130
|
-
};
|
|
2131
|
-
},
|
|
2132
|
-
methods: {
|
|
2133
|
-
initTableM1() {
|
|
2134
|
-
var that = this;
|
|
2135
|
-
let tableOption = {
|
|
2136
|
-
vue: that,
|
|
2137
|
-
tableRef: "table-m1",
|
|
2138
|
-
tableName: "wf_deleteTaskUserDialog-m1",
|
|
2139
|
-
path: this.current_prefix + "/wf/getIncreaseSign",
|
|
2140
|
-
param: () => {
|
|
2141
|
-
return {
|
|
2142
|
-
uuid: this.wfInfo.uuid,
|
|
2143
|
-
taskId: this.wfInfo.taskId,
|
|
2144
|
-
};
|
|
2145
|
-
},
|
|
2146
|
-
config: {
|
|
2147
|
-
checkboxConfig: {
|
|
2148
|
-
checkStrictly: true,
|
|
2149
|
-
showHeader: this.selectMulti,
|
|
2150
|
-
trigger: "row",
|
|
2151
|
-
},
|
|
2152
|
-
proxyConfig: {
|
|
2153
|
-
props: {
|
|
2154
|
-
result: "objx", // 配置响应结果列表字段
|
|
2155
|
-
total: "objx.length", // 配置响应结果总页数字段
|
|
2156
|
-
},
|
|
2157
|
-
},
|
|
2158
|
-
},
|
|
2159
|
-
columns: [
|
|
2160
|
-
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
2161
|
-
{
|
|
2162
|
-
title: this.$t2("候选人", "components.wf.candidate"),
|
|
2163
|
-
field: "name",
|
|
2164
|
-
width: 250,
|
|
2165
|
-
fixed: "left",
|
|
2166
|
-
},
|
|
2167
|
-
{
|
|
2168
|
-
title: this.$t2("候选人ID", "components.wf.candidateId"),
|
|
2169
|
-
field: "id",
|
|
2170
|
-
width: 150,
|
|
2171
|
-
},
|
|
2172
|
-
{
|
|
2173
|
-
width: 47,
|
|
2174
|
-
fixed: "right",
|
|
2175
|
-
title: "",
|
|
2176
|
-
sortable: false,
|
|
2177
|
-
},
|
|
2178
|
-
],
|
|
2179
|
-
};
|
|
2180
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
2181
|
-
that.vxeOption = opts;
|
|
2182
|
-
});
|
|
2183
|
-
},
|
|
2184
|
-
dialogConfirm() {
|
|
2185
|
-
this.dialogPrimary();
|
|
2186
|
-
// this.$emit("confirm");
|
|
2187
|
-
},
|
|
2188
|
-
subForm() {
|
|
2189
|
-
let that = this;
|
|
2190
|
-
let userIds = this.checkRows.map((checkRow) => checkRow.id);
|
|
2191
|
-
if (userIds.length == 0) {
|
|
2192
|
-
that.$message({
|
|
2193
|
-
message: this.$t2(
|
|
2194
|
-
"请选择候选人",
|
|
2195
|
-
"components.wf.deleteIncreaseSignWarnMsg1"
|
|
2196
|
-
),
|
|
2197
|
-
type: "error",
|
|
2198
|
-
duration: 2000,
|
|
2199
|
-
onClose: (t) => {},
|
|
2200
|
-
});
|
|
2201
|
-
return false;
|
|
2202
|
-
}
|
|
2203
|
-
that
|
|
2204
|
-
.$baseConfirm(
|
|
2205
|
-
this.$t2(
|
|
2206
|
-
"您确定要减签选中的候选人吗?",
|
|
2207
|
-
"components.wf.deleteIncreaseSignTip"
|
|
2208
|
-
)
|
|
2209
|
-
)
|
|
2210
|
-
.then(() => {
|
|
2211
|
-
var data = JSON.stringify({
|
|
2212
|
-
uuid: this.wfInfo.uuid,
|
|
2213
|
-
taskId: this.wfInfo.taskId,
|
|
2214
|
-
userIds: userIds,
|
|
2215
|
-
});
|
|
2216
|
-
this.agreeDialogVisible = false;
|
|
2217
|
-
that.$http({
|
|
2218
|
-
url: this.current_prefix + "/wf/deleteIncreaseSign",
|
|
2219
|
-
data: data,
|
|
2220
|
-
method: "post",
|
|
2221
|
-
loadingTarget: document.body,
|
|
2222
|
-
headers: {
|
|
2223
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
2224
|
-
},
|
|
2225
|
-
isLoading: true,
|
|
2226
|
-
success: (resultMsg) => {
|
|
2227
|
-
that.$message({
|
|
2228
|
-
message: resultMsg.content,
|
|
2229
|
-
type: "success",
|
|
2230
|
-
duration: 500,
|
|
2231
|
-
onClose: (t) => {
|
|
2232
|
-
this.dialogConfirm();
|
|
2233
|
-
},
|
|
2234
|
-
});
|
|
2235
|
-
},
|
|
2236
|
-
});
|
|
2237
|
-
});
|
|
2238
|
-
},
|
|
2239
|
-
},
|
|
2240
|
-
};
|
|
2241
|
-
|
|
2242
|
-
addTaskUserMixin = {
|
|
2243
|
-
props: ["visiable", "multi", "rows", "param", "current_prefix", "wfInfo"],
|
|
2244
|
-
mixins: [selectDialogMixins],
|
|
2245
|
-
data() {
|
|
2246
|
-
return {
|
|
2247
|
-
showDialog: true,
|
|
2248
|
-
selectMulti: true,
|
|
2249
|
-
vxeOption: {},
|
|
2250
|
-
};
|
|
2251
|
-
},
|
|
2252
|
-
created() {
|
|
2253
|
-
this.initSetting();
|
|
2254
|
-
},
|
|
2255
|
-
mounted() {
|
|
2256
|
-
this.initTableM1();
|
|
2257
|
-
},
|
|
2258
|
-
methods: {
|
|
2259
|
-
dialogConfirm() {
|
|
2260
|
-
this.dialogPrimary();
|
|
2261
|
-
// this.$emit('confirm');
|
|
2262
|
-
},
|
|
2263
|
-
subForm() {
|
|
2264
|
-
let that = this;
|
|
2265
|
-
let userIds = this.checkRows.map((checkRow) => checkRow.id);
|
|
2266
|
-
if (userIds.length == 0) {
|
|
2267
|
-
that.$message({
|
|
2268
|
-
message: this.$t2(
|
|
2269
|
-
"请选择候选人",
|
|
2270
|
-
"components.wf.addIncreaseSignWarnMsg1"
|
|
2271
|
-
),
|
|
2272
|
-
type: "error",
|
|
2273
|
-
duration: 2000,
|
|
2274
|
-
onClose: (t) => {},
|
|
2275
|
-
});
|
|
2276
|
-
return false;
|
|
2277
|
-
}
|
|
2278
|
-
that
|
|
2279
|
-
.$baseConfirm(
|
|
2280
|
-
this.$t2(
|
|
2281
|
-
"您确定要加签选中的候选人吗?",
|
|
2282
|
-
"components.wf.addIncreaseSignConfirmTip2"
|
|
2283
|
-
)
|
|
2284
|
-
)
|
|
2285
|
-
.then(() => {
|
|
2286
|
-
var data = JSON.stringify({
|
|
2287
|
-
uuid: this.wfInfo.uuid,
|
|
2288
|
-
taskId: this.wfInfo.taskId,
|
|
2289
|
-
userIds: userIds,
|
|
2290
|
-
});
|
|
2291
|
-
this.agreeDialogVisible = false;
|
|
2292
|
-
that.$http({
|
|
2293
|
-
url: this.current_prefix + "/wf/addIncreaseSign",
|
|
2294
|
-
data: data,
|
|
2295
|
-
method: "post",
|
|
2296
|
-
loadingTarget: document.body,
|
|
2297
|
-
headers: {
|
|
2298
|
-
"Content-Type": "application/json;charset=utf-8",
|
|
2299
|
-
},
|
|
2300
|
-
isLoading: true,
|
|
2301
|
-
success: (resultMsg) => {
|
|
2302
|
-
that.$message({
|
|
2303
|
-
message: resultMsg.content,
|
|
2304
|
-
type: "success",
|
|
2305
|
-
duration: 500,
|
|
2306
|
-
onClose: (t) => {
|
|
2307
|
-
this.dialogConfirm();
|
|
2308
|
-
},
|
|
2309
|
-
});
|
|
2310
|
-
},
|
|
2311
|
-
});
|
|
2312
|
-
});
|
|
2313
|
-
},
|
|
2314
|
-
},
|
|
2315
|
-
};
|
|
2316
|
-
|
|
2317
|
-
export {
|
|
2318
|
-
wfIndexMixin,
|
|
2319
|
-
wfStartMixin,
|
|
2320
|
-
wfContentMixin,
|
|
2321
|
-
wfModifyMixin,
|
|
2322
|
-
wfUrgingMixin,
|
|
2323
|
-
deleteTaskUserMixin,
|
|
2324
|
-
addTaskUserMixin,
|
|
2325
|
-
};
|
|
1
|
+
/**version-1.0*/
|
|
2
|
+
import { getToken } from "../../utils/auth";
|
|
3
|
+
import settingConfig from "@/settings.js";
|
|
4
|
+
import { selectDialogMixins } from "../../mixins/selectDialog";
|
|
5
|
+
|
|
6
|
+
let configUtil = {
|
|
7
|
+
baseUrl: process.env.VUE_APP_BASE_API,
|
|
8
|
+
getToken,
|
|
9
|
+
requireView: (url) => {
|
|
10
|
+
return require("@/views" + url).default;
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let wfIndexMixin,
|
|
15
|
+
wfStartMixin,
|
|
16
|
+
wfContentMixin,
|
|
17
|
+
wfModifyMixin,
|
|
18
|
+
wfUrgingMixin,
|
|
19
|
+
deleteTaskUserMixin,
|
|
20
|
+
addTaskUserMixin;
|
|
21
|
+
|
|
22
|
+
function getTarget(t, flag) {
|
|
23
|
+
let target;
|
|
24
|
+
if (t.parentVue) {
|
|
25
|
+
target = t.parentVue;
|
|
26
|
+
} else if (flag === 0) {
|
|
27
|
+
target = t.$parent.$parent;
|
|
28
|
+
} else {
|
|
29
|
+
target = t.$parent.$parent.$parent;
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function oaPublishEvent(that) {
|
|
35
|
+
let _closeWindowOnCheck =
|
|
36
|
+
that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
|
|
37
|
+
if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
|
|
38
|
+
let win = window.opener;
|
|
39
|
+
if (win && domain && domain.call) {
|
|
40
|
+
var event = { type: "topic", name: "successReloadPage" };
|
|
41
|
+
domain.call(win, "fireEvent", [event]);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
wfIndexMixin = {
|
|
47
|
+
name: "wfView",
|
|
48
|
+
props: {
|
|
49
|
+
objId: [String, Number],
|
|
50
|
+
wfCode: String,
|
|
51
|
+
serviceId: String,
|
|
52
|
+
},
|
|
53
|
+
data() {
|
|
54
|
+
return {
|
|
55
|
+
wfReloadFlag: false,
|
|
56
|
+
hasWf: false,
|
|
57
|
+
wfStartVisible: false,
|
|
58
|
+
paramData: "",
|
|
59
|
+
showModifyDialog: false,
|
|
60
|
+
showBillEdit: false,
|
|
61
|
+
content: "",
|
|
62
|
+
wfInfo: "",
|
|
63
|
+
currentTask: "",
|
|
64
|
+
taskParam: "",
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
computed: {
|
|
68
|
+
current_prefix() {
|
|
69
|
+
return this.serviceId ? "/" + this.serviceId : "";
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
created() {},
|
|
73
|
+
watch: {
|
|
74
|
+
wfCode(val) {
|
|
75
|
+
this.getWfInfo();
|
|
76
|
+
},
|
|
77
|
+
objId(val) {
|
|
78
|
+
this.getWfInfo();
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
async mounted() {
|
|
82
|
+
if (this.objId) {
|
|
83
|
+
let hasWf = false;
|
|
84
|
+
let wfInfo, currentTask, taskParam;
|
|
85
|
+
await this.initWfInfo().then((res) => {
|
|
86
|
+
if (res && res.type == "success") {
|
|
87
|
+
if (res.objx && res.objx.instanceId) {
|
|
88
|
+
hasWf = true;
|
|
89
|
+
wfInfo = res.objx;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
if (hasWf) {
|
|
95
|
+
/* await this.getCurrentTask(wfInfo).then(res1 => {
|
|
96
|
+
if (res1.type == 'success') {
|
|
97
|
+
currentTask = res1.objx;
|
|
98
|
+
}
|
|
99
|
+
}); */
|
|
100
|
+
/* if (wfInfo.taskId) {
|
|
101
|
+
await this.getTaskParams(currentTask).then(res2 => {
|
|
102
|
+
if (res2.type == 'success') {
|
|
103
|
+
taskParam = res2.objx;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
} */
|
|
107
|
+
}
|
|
108
|
+
this.paramData = taskParam;
|
|
109
|
+
this.wfInfo = wfInfo;
|
|
110
|
+
this.currentTask = currentTask;
|
|
111
|
+
this.taskParam = taskParam;
|
|
112
|
+
|
|
113
|
+
let flag = true;
|
|
114
|
+
this.$emit("onShow", {
|
|
115
|
+
wfInfo: wfInfo,
|
|
116
|
+
currentTask: currentTask,
|
|
117
|
+
taskParam: taskParam,
|
|
118
|
+
hasWf: hasWf,
|
|
119
|
+
callback: (val) => {
|
|
120
|
+
flag = false;
|
|
121
|
+
if (val !== false && hasWf) {
|
|
122
|
+
this.wfReloadFlag = true;
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
if (flag) {
|
|
127
|
+
if (hasWf) {
|
|
128
|
+
this.wfReloadFlag = true;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
this.$on("toDo", (option) => {
|
|
133
|
+
this.$emit(option.methd, option.param);
|
|
134
|
+
});
|
|
135
|
+
},
|
|
136
|
+
methods: {
|
|
137
|
+
getWfInfo() {
|
|
138
|
+
if (this.wfCode && this.objId) {
|
|
139
|
+
this.reload();
|
|
140
|
+
} else {
|
|
141
|
+
this.wfReloadFlag = false;
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
openStartWfDialog(code) {
|
|
145
|
+
this.wfStartVisible = true;
|
|
146
|
+
},
|
|
147
|
+
reload() {
|
|
148
|
+
this.wfReloadFlag = false;
|
|
149
|
+
this.$nextTick(() => {
|
|
150
|
+
this.wfReloadFlag = true;
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
manualCallback() {
|
|
154
|
+
this.$emit("manualCallback");
|
|
155
|
+
},
|
|
156
|
+
async getCurrentTask(obj) {
|
|
157
|
+
let that = getTarget(this, 0);
|
|
158
|
+
return that.$http({
|
|
159
|
+
url: "/agilebpm/wf_task/getCurrentTask",
|
|
160
|
+
data: {
|
|
161
|
+
instanceId: obj.instanceId,
|
|
162
|
+
},
|
|
163
|
+
method: "post",
|
|
164
|
+
async: false,
|
|
165
|
+
isLoading: true,
|
|
166
|
+
modalStrictly: true,
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
async initWfInfo() {
|
|
170
|
+
let that = getTarget(this, 0);
|
|
171
|
+
let id = this.objId;
|
|
172
|
+
let code = this.wfCode;
|
|
173
|
+
return that.$http({
|
|
174
|
+
url: this.current_prefix + "/wf/getWfInfo",
|
|
175
|
+
method: `post`,
|
|
176
|
+
data: {
|
|
177
|
+
objTypeCode: code,
|
|
178
|
+
objId: id,
|
|
179
|
+
},
|
|
180
|
+
isLoading: true,
|
|
181
|
+
modalStrictly: true,
|
|
182
|
+
});
|
|
183
|
+
},
|
|
184
|
+
async getTaskParams(data) {
|
|
185
|
+
let that = getTarget(this, 0);
|
|
186
|
+
return that.$http({
|
|
187
|
+
url: "/agilebpm/wf_task/getTaskParams",
|
|
188
|
+
method: `post`,
|
|
189
|
+
data: {
|
|
190
|
+
taskId: data.taskId,
|
|
191
|
+
},
|
|
192
|
+
isLoading: true,
|
|
193
|
+
modalStrictly: true,
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
openWfModifyDialog() {
|
|
197
|
+
let row = this.paramData;
|
|
198
|
+
let url = row.url + ".vue";
|
|
199
|
+
this.showModifyDialog = true;
|
|
200
|
+
this.content = configUtil.requireView(url);
|
|
201
|
+
this.$openEditView("showBillEdit");
|
|
202
|
+
},
|
|
203
|
+
modfyDialogClose() {
|
|
204
|
+
this.showBillEdit = false;
|
|
205
|
+
this.content = null;
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
wfContentMixin = {
|
|
211
|
+
name: "wfContent",
|
|
212
|
+
props: {
|
|
213
|
+
objId: [String, Number],
|
|
214
|
+
wfCode: String,
|
|
215
|
+
serviceId: String,
|
|
216
|
+
_wfInfo: Object,
|
|
217
|
+
_taskParam: Object,
|
|
218
|
+
parentVue: Object,
|
|
219
|
+
wfConfig: Object,
|
|
220
|
+
defaultShowWfContent: Boolean,
|
|
221
|
+
},
|
|
222
|
+
computed: {
|
|
223
|
+
current_prefix() {
|
|
224
|
+
return this.serviceId ? "/" + this.serviceId : "";
|
|
225
|
+
},
|
|
226
|
+
viewTarget() {
|
|
227
|
+
return getTarget(this);
|
|
228
|
+
},
|
|
229
|
+
isHideWf() {
|
|
230
|
+
let that = this.viewTarget;
|
|
231
|
+
let _hideWf = that._hideWf || that.$attrs._hideWf;
|
|
232
|
+
return _hideWf === true || _hideWf === "true";
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
data() {
|
|
236
|
+
let showWfFold =
|
|
237
|
+
settingConfig.showWfFold != null && settingConfig.showWfFold != undefined
|
|
238
|
+
? settingConfig.showWfFold
|
|
239
|
+
: false;
|
|
240
|
+
if (
|
|
241
|
+
this.wfConfig.showWfFold != null &&
|
|
242
|
+
this.wfConfig.showWfFold != undefined
|
|
243
|
+
) {
|
|
244
|
+
showWfFold = this.wfConfig.showWfFold;
|
|
245
|
+
}
|
|
246
|
+
let showWfContent =
|
|
247
|
+
showWfFold &&
|
|
248
|
+
settingConfig.defaultShowWfContent != null &&
|
|
249
|
+
settingConfig.defaultShowWfContent != undefined
|
|
250
|
+
? settingConfig.defaultShowWfContent
|
|
251
|
+
: true;
|
|
252
|
+
if (
|
|
253
|
+
this.defaultShowWfContent != null &&
|
|
254
|
+
this.defaultShowWfContent != undefined
|
|
255
|
+
) {
|
|
256
|
+
showWfContent = this.defaultShowWfContent;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return {
|
|
260
|
+
fileInfos: [],
|
|
261
|
+
showUserDialog: false,
|
|
262
|
+
showContent: true,
|
|
263
|
+
objTypeCode: "",
|
|
264
|
+
// objId: '',
|
|
265
|
+
wfInfo: {},
|
|
266
|
+
// currentTask: {},
|
|
267
|
+
taskParam: {},
|
|
268
|
+
wfImage: "",
|
|
269
|
+
wfStartBtn: false,
|
|
270
|
+
wfManualendBtn: false,
|
|
271
|
+
wfSubmitBtn: false,
|
|
272
|
+
wfRejectBtn: false,
|
|
273
|
+
changeHandlerBtn: false,
|
|
274
|
+
wftaskData: [],
|
|
275
|
+
allWfTaskOpinions: [],
|
|
276
|
+
vxeOption: {},
|
|
277
|
+
rejectNodes: [],
|
|
278
|
+
rejectDialogVisible: false,
|
|
279
|
+
rejectForm: {
|
|
280
|
+
rejectSubmitModel: null,
|
|
281
|
+
nodeCode: null,
|
|
282
|
+
opinion: null,
|
|
283
|
+
},
|
|
284
|
+
formLabelWidth: "120px",
|
|
285
|
+
agreeDialogVisible: false,
|
|
286
|
+
agreeForm: {
|
|
287
|
+
opinion: this.$t2("同意", "components.wf.defaultAgreeOption"),
|
|
288
|
+
nodeId: null,
|
|
289
|
+
},
|
|
290
|
+
changeWfDialogVisible: false,
|
|
291
|
+
changeWfForm: {},
|
|
292
|
+
changeUserRows: [],
|
|
293
|
+
statusTypeMap: {
|
|
294
|
+
START: "", //开始
|
|
295
|
+
END: "", //结束
|
|
296
|
+
TRANSFER: "blue", //转办
|
|
297
|
+
DEPUTE: "", //委派
|
|
298
|
+
ADD_SIGNATURE: "", //加签
|
|
299
|
+
REDUCTION_SIGNATURE: "", //减签
|
|
300
|
+
PASS: "green", //通过
|
|
301
|
+
REJECT: "red", //驳回
|
|
302
|
+
TOBESUBMIT: "orgn", //待审批
|
|
303
|
+
},
|
|
304
|
+
taskStatuses: {
|
|
305
|
+
start: {
|
|
306
|
+
class: "blue",
|
|
307
|
+
value: this.$t2("开始", "components.wf.startStatus"),
|
|
308
|
+
},
|
|
309
|
+
approve: {
|
|
310
|
+
class: "orgn",
|
|
311
|
+
value: this.$t2("待审批", "components.wf.approveStatus"),
|
|
312
|
+
},
|
|
313
|
+
submit: {
|
|
314
|
+
class: "green",
|
|
315
|
+
value: this.$t2("同意", "components.wf.submitStatus"),
|
|
316
|
+
},
|
|
317
|
+
reject: {
|
|
318
|
+
class: "red",
|
|
319
|
+
value: this.$t2("驳回", "components.wf.rejectStatus"),
|
|
320
|
+
},
|
|
321
|
+
transfer: {
|
|
322
|
+
class: "green",
|
|
323
|
+
value: this.$t2("转办", "components.wf.transferStatus"),
|
|
324
|
+
},
|
|
325
|
+
addIncreaseSign: {
|
|
326
|
+
class: "green",
|
|
327
|
+
value: this.$t2("加签", "components.wf.addIncreaseSignStatus"),
|
|
328
|
+
},
|
|
329
|
+
revoke: {
|
|
330
|
+
class: "red",
|
|
331
|
+
value: this.$t2("中断", "components.wf.revokeStatus"),
|
|
332
|
+
},
|
|
333
|
+
end: {
|
|
334
|
+
class: "gray",
|
|
335
|
+
value: this.$t2("结束", "components.wf.endStatus"),
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
opinion: "",
|
|
339
|
+
showWfFold: showWfFold,
|
|
340
|
+
showWfContent: showWfContent,
|
|
341
|
+
|
|
342
|
+
urgingForm: {},
|
|
343
|
+
urgingDialogVisible: false,
|
|
344
|
+
urgingUserIds: [],
|
|
345
|
+
urgingUsers: [],
|
|
346
|
+
agreeNodes: [],
|
|
347
|
+
showWfManualDialog: false,
|
|
348
|
+
|
|
349
|
+
showDeleteTaskUserDialog: false,
|
|
350
|
+
showAddTaskUserDialog: false,
|
|
351
|
+
wfUserParam: {},
|
|
352
|
+
wfUserParamForTransfer: {}, //转办
|
|
353
|
+
wfUserParamForAddSign: {}, //加签
|
|
354
|
+
wfUserParamForTalk: {}, //沟通
|
|
355
|
+
tabIndex: "1",
|
|
356
|
+
linkupOption: {},
|
|
357
|
+
talkForm: {
|
|
358
|
+
receiverName: null,
|
|
359
|
+
content: null,
|
|
360
|
+
attachmentDTOs: [],
|
|
361
|
+
replyId: null,
|
|
362
|
+
},
|
|
363
|
+
showTalkUserDialog: false,
|
|
364
|
+
showTalkDialog: false,
|
|
365
|
+
showFlowImg: true,
|
|
366
|
+
operateType: null,
|
|
367
|
+
addIncreaseSignUsers: [],
|
|
368
|
+
addIncreaseSignForm: {
|
|
369
|
+
userNickNames: null,
|
|
370
|
+
opinion: null,
|
|
371
|
+
},
|
|
372
|
+
showAddIncreaseSignDialog: false,
|
|
373
|
+
showOpeaImg: true,
|
|
374
|
+
showSetCandidateDialog: false,
|
|
375
|
+
toTalk: false,
|
|
376
|
+
showAllWfOpinon: false,
|
|
377
|
+
|
|
378
|
+
revokeDialogVisible: false,
|
|
379
|
+
revokeForm: { opinion: null },
|
|
380
|
+
showWfInfoTab: false,
|
|
381
|
+
|
|
382
|
+
showWfMemo: false,
|
|
383
|
+
wfMemoOption: {},
|
|
384
|
+
wfMemoForm: {
|
|
385
|
+
receiverName: null,
|
|
386
|
+
content: null,
|
|
387
|
+
attachmentDTOs: [],
|
|
388
|
+
replyId: null,
|
|
389
|
+
},
|
|
390
|
+
showWfMemoDialog: false,
|
|
391
|
+
wfMemoData: [],
|
|
392
|
+
|
|
393
|
+
showCandidate: false,
|
|
394
|
+
candidateOption: {},
|
|
395
|
+
candidateDatas: [],
|
|
396
|
+
wfSendTaskId: null,
|
|
397
|
+
showAddOpinionButton: false,
|
|
398
|
+
|
|
399
|
+
addOpinionEnabled: false,
|
|
400
|
+
modifyCurrentCandidateEnabled: false,
|
|
401
|
+
|
|
402
|
+
//修改脚本
|
|
403
|
+
showWfFlowEleScriptDialog: false,
|
|
404
|
+
};
|
|
405
|
+
},
|
|
406
|
+
provide() {
|
|
407
|
+
return {
|
|
408
|
+
getParentVue: () => this.parentVue,
|
|
409
|
+
getWfInfo: () => this.wfInfo,
|
|
410
|
+
getCurrentPrefix: () => this.current_prefix,
|
|
411
|
+
getEditVueTarget: () => getTarget(this),
|
|
412
|
+
};
|
|
413
|
+
},
|
|
414
|
+
created() {
|
|
415
|
+
this.wfInfo = this._wfInfo;
|
|
416
|
+
this.showFlowImg = settingConfig.expandWfImage === false ? false : true;
|
|
417
|
+
this.showAllWfOpinon = settingConfig.showAllWfOpinon === true;
|
|
418
|
+
},
|
|
419
|
+
mounted() {
|
|
420
|
+
this.initOperateType();
|
|
421
|
+
this.initForAll();
|
|
422
|
+
},
|
|
423
|
+
methods: {
|
|
424
|
+
openWfFlowEleScriptDialog() {
|
|
425
|
+
this.showWfFlowEleScriptDialog = true;
|
|
426
|
+
},
|
|
427
|
+
initWfParam13() {
|
|
428
|
+
//初始化补充意见权限
|
|
429
|
+
let that = getTarget(this);
|
|
430
|
+
return that.$http({
|
|
431
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
432
|
+
method: `post`,
|
|
433
|
+
data: { attributeKey: "param13" },
|
|
434
|
+
success: (res) => {
|
|
435
|
+
this.addOpinionEnabled = res?.objx === true;
|
|
436
|
+
if (this.addOpinionEnabled) {
|
|
437
|
+
this.wfSendTaskId = this.getViewParam("wfSendTaskId");
|
|
438
|
+
this.showAddOpinionButton = !!this.wfSendTaskId;
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
});
|
|
442
|
+
},
|
|
443
|
+
|
|
444
|
+
initWfParam14() {
|
|
445
|
+
//初始化修改当前候选人权限
|
|
446
|
+
let that = getTarget(this);
|
|
447
|
+
return that.$http({
|
|
448
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
449
|
+
method: `post`,
|
|
450
|
+
data: { attributeKey: "param14" },
|
|
451
|
+
success: (res) => {
|
|
452
|
+
this.modifyCurrentCandidateEnabled = res?.objx === true;
|
|
453
|
+
},
|
|
454
|
+
});
|
|
455
|
+
},
|
|
456
|
+
getViewParam(key) {
|
|
457
|
+
let that = this.viewTarget;
|
|
458
|
+
let value = that[key] || that.$attrs[key];
|
|
459
|
+
return value;
|
|
460
|
+
},
|
|
461
|
+
initCandidate() {
|
|
462
|
+
// 是否显示"节点候选人"选项卡
|
|
463
|
+
let that = getTarget(this);
|
|
464
|
+
that.$http({
|
|
465
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
466
|
+
method: `post`,
|
|
467
|
+
data: { attributeKey: "param11" },
|
|
468
|
+
isLoading: true,
|
|
469
|
+
success: (res) => {
|
|
470
|
+
this.showCandidate = res?.objx === true;
|
|
471
|
+
if (this.showCandidate) {
|
|
472
|
+
this.$nextTick(() => {
|
|
473
|
+
this.initCandidateTable();
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
});
|
|
478
|
+
},
|
|
479
|
+
initCandidateTable() {
|
|
480
|
+
let that = this;
|
|
481
|
+
let tableOption = {
|
|
482
|
+
vue: that,
|
|
483
|
+
tableRef: "table-candidate",
|
|
484
|
+
tableName: "wf_candidate-list",
|
|
485
|
+
path: this.current_prefix + "/wf/getAllNodes",
|
|
486
|
+
param: () => {
|
|
487
|
+
return {
|
|
488
|
+
stringOne: this.wfInfo.uuid,
|
|
489
|
+
};
|
|
490
|
+
},
|
|
491
|
+
config: {
|
|
492
|
+
height: 350,
|
|
493
|
+
proxyConfig: {
|
|
494
|
+
props: {
|
|
495
|
+
result: "objx", // 配置响应结果列表字段
|
|
496
|
+
total: "objx.length", // 配置响应结果总页数字段
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
pagerConfig: {
|
|
500
|
+
autoHidden: true,
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
columns: [
|
|
504
|
+
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
505
|
+
{
|
|
506
|
+
title: this.$t2("节点名称", "components.wf.nodeName"),
|
|
507
|
+
field: "nodeName",
|
|
508
|
+
width: 250,
|
|
509
|
+
fixed: "left",
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
field: "wfTaskCandidates",
|
|
513
|
+
title: this.$t2("候选人", "components.wf.candidate"),
|
|
514
|
+
width: 450,
|
|
515
|
+
slots: {
|
|
516
|
+
default: ({ row, rowIndex }) => {
|
|
517
|
+
return row.wfTaskCandidateDTOs
|
|
518
|
+
? row.wfTaskCandidateDTOs.map((item) => item.name).join(",")
|
|
519
|
+
: null;
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
width: 47,
|
|
525
|
+
fixed: "right",
|
|
526
|
+
title: "",
|
|
527
|
+
sortable: false,
|
|
528
|
+
},
|
|
529
|
+
],
|
|
530
|
+
};
|
|
531
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
532
|
+
that.candidateOption = opts;
|
|
533
|
+
});
|
|
534
|
+
},
|
|
535
|
+
initOperateType() {
|
|
536
|
+
if (this.operateType) {
|
|
537
|
+
let wfInfo = this.wfInfo;
|
|
538
|
+
if (wfInfo.toSubmit) {
|
|
539
|
+
this.openAgreeDialog("submit");
|
|
540
|
+
} else if (wfInfo.toReject) {
|
|
541
|
+
this.rejectWfTask("reject");
|
|
542
|
+
} else if (wfInfo.toAddIncreaseSign) {
|
|
543
|
+
this.openAddIncreaseSign("addIncreaseSign");
|
|
544
|
+
} else if (wfInfo.toRevoke) {
|
|
545
|
+
this.openRevokeDialog("revoke");
|
|
546
|
+
} else if (wfInfo.toLinkup) {
|
|
547
|
+
this.openTalkDialog(null, null, "talk");
|
|
548
|
+
} else {
|
|
549
|
+
this.operateType = null;
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
initForAll() {
|
|
554
|
+
let that = getTarget(this);
|
|
555
|
+
this.initWf(() => {
|
|
556
|
+
if (this.wfInfo.instanceId) {
|
|
557
|
+
this.initCurrentTask(this.wfInfo.instanceId, () => {
|
|
558
|
+
this.initWftask(this.wfInfo.instanceId);
|
|
559
|
+
this.getAllWfTaskOpinions();
|
|
560
|
+
});
|
|
561
|
+
this.showWfInfoTab = true;
|
|
562
|
+
// this.initWfUserParam();
|
|
563
|
+
// this.initTabIndex();
|
|
564
|
+
// this.initShowTaskInfo();
|
|
565
|
+
//初始化附言
|
|
566
|
+
// this.getIsShowWfMemo();
|
|
567
|
+
// 是否显示"节点候选人"选项卡
|
|
568
|
+
// this.initCandidate()
|
|
569
|
+
|
|
570
|
+
//初始化补充意见权限
|
|
571
|
+
// this.initWfParam13();
|
|
572
|
+
|
|
573
|
+
//初始化修改当前候选人权限
|
|
574
|
+
// this.initWfParam14();
|
|
575
|
+
}
|
|
576
|
+
});
|
|
577
|
+
},
|
|
578
|
+
initTabIndex() {
|
|
579
|
+
let that = getTarget(this);
|
|
580
|
+
that.$http({
|
|
581
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
582
|
+
method: `post`,
|
|
583
|
+
data: { attributeKey: "param7" },
|
|
584
|
+
isLoading: true,
|
|
585
|
+
success: (res) => {
|
|
586
|
+
let val = res !== null ? res.objx === true : false;
|
|
587
|
+
this.toTalk = val;
|
|
588
|
+
let flag = false;
|
|
589
|
+
if (val) {
|
|
590
|
+
let flag1 =
|
|
591
|
+
that.$attrs._isNotifyMessage == true ||
|
|
592
|
+
that.$attrs._isNotifyMessage == "true";
|
|
593
|
+
if (flag1) {
|
|
594
|
+
this.tabIndex = "2";
|
|
595
|
+
}
|
|
596
|
+
if (settingConfig.autoOpenWfLinkup) {
|
|
597
|
+
flag = true;
|
|
598
|
+
let flag2 = that.$attrs._wfNotifyType == "wfLinkup";
|
|
599
|
+
let flag3 = flag1 && flag2;
|
|
600
|
+
if (flag3) {
|
|
601
|
+
this.$nextTick(() => {
|
|
602
|
+
let wfTabPane = this.$refs.wfTabPane;
|
|
603
|
+
if (!wfTabPane.showContent) {
|
|
604
|
+
wfTabPane.handleFold();
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
this.initLinkup(flag);
|
|
611
|
+
},
|
|
612
|
+
});
|
|
613
|
+
},
|
|
614
|
+
initWf(done) {
|
|
615
|
+
var data = this.wfInfo;
|
|
616
|
+
if (data && data.instanceId) {
|
|
617
|
+
/** 流程状态:0未启动,1审核中,2已完成,3驳回,4中断 */
|
|
618
|
+
var statuses = {
|
|
619
|
+
1:
|
|
620
|
+
'<span class="tag">' +
|
|
621
|
+
this.$t2("审核中", "components.wf.wfStatus1") +
|
|
622
|
+
"</span>",
|
|
623
|
+
3:
|
|
624
|
+
'<span class="tag red">' +
|
|
625
|
+
this.$t2("已驳回", "components.wf.wfStatus2") +
|
|
626
|
+
"</span>",
|
|
627
|
+
2:
|
|
628
|
+
'<span class="tag green">' +
|
|
629
|
+
this.$t2("已完成", "components.wf.wfStatus3") +
|
|
630
|
+
"</span>",
|
|
631
|
+
};
|
|
632
|
+
var statusStr = "";
|
|
633
|
+
if (data.stat != null) {
|
|
634
|
+
statusStr = statuses[data.stat] || "";
|
|
635
|
+
}
|
|
636
|
+
data.statusStr = statusStr;
|
|
637
|
+
this.wfInfo = data;
|
|
638
|
+
|
|
639
|
+
this.wfStartBtn = false;
|
|
640
|
+
if (data.status != 2 && data.starterId) {
|
|
641
|
+
this.wfManualendBtn = true;
|
|
642
|
+
}
|
|
643
|
+
this.wfSubmitBtn = false;
|
|
644
|
+
this.wfRejectBtn = false;
|
|
645
|
+
|
|
646
|
+
/* var url =
|
|
647
|
+
this.current_prefix +
|
|
648
|
+
"/wf/flowImage?instanceId=" +
|
|
649
|
+
data.instanceId +
|
|
650
|
+
"&_r=" +
|
|
651
|
+
Math.random() +
|
|
652
|
+
"&access_token=" +
|
|
653
|
+
configUtil.getToken();
|
|
654
|
+
this.wfImage = configUtil.baseUrl + url; */
|
|
655
|
+
let token = getToken();
|
|
656
|
+
let Authorization = `Bearer ${token}`;
|
|
657
|
+
let prefix = this.current_prefix.substring(1);
|
|
658
|
+
let baseApi = process.env.VUE_APP_BASE_API;
|
|
659
|
+
if (settingConfig.isTest) {
|
|
660
|
+
this.wfImage = `http://stdxx.sc.5mall.com/warm-flow-ui/index.html?id=${data.instanceId}&baseApi=${baseApi}&prefix=${prefix}&type=FlowChart&Authorization=${Authorization}`;
|
|
661
|
+
} else {
|
|
662
|
+
this.wfImage =
|
|
663
|
+
WEB_PREFIX +
|
|
664
|
+
`/warm-flow-ui/index.html?id=${data.instanceId}&baseApi=${baseApi}&prefix=${prefix}&type=FlowChart&Authorization=${Authorization}`;
|
|
665
|
+
}
|
|
666
|
+
done();
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
initCurrentTask(instanceId, done) {
|
|
670
|
+
if (this.wfInfo.taskId) {
|
|
671
|
+
this.wfSubmitBtn = true;
|
|
672
|
+
this.wfRejectBtn = true;
|
|
673
|
+
this.changeHandlerBtn = true;
|
|
674
|
+
}
|
|
675
|
+
done();
|
|
676
|
+
},
|
|
677
|
+
initWftask(instanceId) {
|
|
678
|
+
let that = getTarget(this);
|
|
679
|
+
that.$http({
|
|
680
|
+
url: this.current_prefix + "/wf/getWfHisTasks",
|
|
681
|
+
data: {
|
|
682
|
+
stringOne: this.wfInfo.uuid,
|
|
683
|
+
},
|
|
684
|
+
method: "post",
|
|
685
|
+
async: false,
|
|
686
|
+
isLoading: true,
|
|
687
|
+
modalStrictly: true,
|
|
688
|
+
success: (resultmsg) => {
|
|
689
|
+
var datas = resultmsg.objx || [];
|
|
690
|
+
this.wftaskData = datas;
|
|
691
|
+
},
|
|
692
|
+
});
|
|
693
|
+
},
|
|
694
|
+
getAllWfTaskOpinions() {
|
|
695
|
+
if (!this.showAllWfOpinon) {
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
let that = getTarget(this);
|
|
699
|
+
let wfInfo = this.wfInfo;
|
|
700
|
+
that.$http({
|
|
701
|
+
url: this.current_prefix + "/wf/getAllWfTaskOpinions",
|
|
702
|
+
data: {
|
|
703
|
+
objId: wfInfo.objId,
|
|
704
|
+
objTypeCode: wfInfo.objTypeCode,
|
|
705
|
+
},
|
|
706
|
+
method: "post",
|
|
707
|
+
async: false,
|
|
708
|
+
isLoading: true,
|
|
709
|
+
modalStrictly: true,
|
|
710
|
+
success: (resultmsg) => {
|
|
711
|
+
var datas = resultmsg.objx || [];
|
|
712
|
+
this.allWfTaskOpinions = datas;
|
|
713
|
+
},
|
|
714
|
+
});
|
|
715
|
+
},
|
|
716
|
+
openManualDialog(operateType) {
|
|
717
|
+
this.operateType = operateType;
|
|
718
|
+
this.showWfManualDialog = true;
|
|
719
|
+
},
|
|
720
|
+
manualEndWf() {
|
|
721
|
+
this.showWfManualDialog = false;
|
|
722
|
+
let that = getTarget(this);
|
|
723
|
+
var instanceId = this.wfInfo.instanceId;
|
|
724
|
+
var taskId = this.wfInfo.taskId ? this.wfInfo.taskId : "";
|
|
725
|
+
var data = JSON.stringify({
|
|
726
|
+
uuid: this.wfInfo.uuid,
|
|
727
|
+
});
|
|
728
|
+
that.$http({
|
|
729
|
+
url: this.current_prefix + "/wf/interrupt",
|
|
730
|
+
data: data,
|
|
731
|
+
method: "post",
|
|
732
|
+
headers: {
|
|
733
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
734
|
+
},
|
|
735
|
+
isLoading: true,
|
|
736
|
+
success: (resultMsg) => {
|
|
737
|
+
that.$message({
|
|
738
|
+
message: resultMsg.content,
|
|
739
|
+
type: "success",
|
|
740
|
+
duration: 500,
|
|
741
|
+
onClose: (t) => {
|
|
742
|
+
this.reloadContent();
|
|
743
|
+
this.closeWinOnCheck(3);
|
|
744
|
+
},
|
|
745
|
+
});
|
|
746
|
+
},
|
|
747
|
+
});
|
|
748
|
+
},
|
|
749
|
+
async rejectWfTask(operateType) {
|
|
750
|
+
let that = getTarget(this);
|
|
751
|
+
var instanceId = this.wfInfo.instanceId;
|
|
752
|
+
var taskId = this.wfInfo.taskId;
|
|
753
|
+
var destinations = [];
|
|
754
|
+
|
|
755
|
+
await that.$http({
|
|
756
|
+
url: this.current_prefix + "/wf/getBackTaskNode",
|
|
757
|
+
data: {
|
|
758
|
+
id: taskId,
|
|
759
|
+
},
|
|
760
|
+
method: "post",
|
|
761
|
+
//contentType: 'application/json;charset=utf-8',
|
|
762
|
+
async: false,
|
|
763
|
+
isLoading: true,
|
|
764
|
+
success: (resultMsg) => {
|
|
765
|
+
destinations = (resultMsg.objx || []).reverse();
|
|
766
|
+
},
|
|
767
|
+
});
|
|
768
|
+
|
|
769
|
+
if (destinations == null) {
|
|
770
|
+
return false;
|
|
771
|
+
}
|
|
772
|
+
if (destinations.length == 0) {
|
|
773
|
+
that.$message({
|
|
774
|
+
message: this.$t2(
|
|
775
|
+
"无法驳回,没有目标节点",
|
|
776
|
+
"components.wf.rejectWarnMsg1"
|
|
777
|
+
),
|
|
778
|
+
type: "error",
|
|
779
|
+
duration: 2 * 1000,
|
|
780
|
+
});
|
|
781
|
+
return false;
|
|
782
|
+
}
|
|
783
|
+
this.operateType = operateType;
|
|
784
|
+
let rejectSubmitModel = null;
|
|
785
|
+
if (this.wfInfo.toNextNode === 1) {
|
|
786
|
+
rejectSubmitModel = this.wfInfo.toNextNode;
|
|
787
|
+
} else {
|
|
788
|
+
rejectSubmitModel = this.wfInfo.toRejectNode == false ? 2 : null;
|
|
789
|
+
}
|
|
790
|
+
this.rejectForm.rejectSubmitModel = rejectSubmitModel;
|
|
791
|
+
this.rejectForm.nodeCode = destinations[0].nodeCode;
|
|
792
|
+
this.rejectForm.opinion = "";
|
|
793
|
+
this.rejectNodes = destinations;
|
|
794
|
+
this.rejectDialogVisible = true;
|
|
795
|
+
},
|
|
796
|
+
subRejectForm() {
|
|
797
|
+
let that = getTarget(this);
|
|
798
|
+
var instanceId = this.wfInfo.instanceId;
|
|
799
|
+
var taskId = this.wfInfo.taskId;
|
|
800
|
+
|
|
801
|
+
if (!this.rejectForm.nodeCode) {
|
|
802
|
+
that.$message({
|
|
803
|
+
message: this.$t2("请选择驳回节点", "components.wf.rejectWarnMsg2"),
|
|
804
|
+
type: "error",
|
|
805
|
+
duration: 2 * 1000,
|
|
806
|
+
});
|
|
807
|
+
return false;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
if (!this.rejectForm.opinion) {
|
|
811
|
+
that.$message({
|
|
812
|
+
message: this.$t2("请输入驳回意见", "components.wf.rejectWarnMsg3"),
|
|
813
|
+
type: "error",
|
|
814
|
+
duration: 2 * 1000,
|
|
815
|
+
});
|
|
816
|
+
return false;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
var data = JSON.stringify({
|
|
820
|
+
taskId: taskId,
|
|
821
|
+
uuid: this.wfInfo.uuid,
|
|
822
|
+
nodeCode: this.rejectForm.nodeCode,
|
|
823
|
+
suggestion: this.rejectForm.opinion,
|
|
824
|
+
skipType: "REJECT",
|
|
825
|
+
// rejectSubmitModel: this.rejectForm.rejectSubmitModel
|
|
826
|
+
});
|
|
827
|
+
this.rejectDialogVisible = false;
|
|
828
|
+
that.$http({
|
|
829
|
+
url: this.current_prefix + "/wf/reject",
|
|
830
|
+
data: data,
|
|
831
|
+
method: "post",
|
|
832
|
+
headers: {
|
|
833
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
834
|
+
},
|
|
835
|
+
isLoading: true,
|
|
836
|
+
success: (resultMsg) => {
|
|
837
|
+
that.$message({
|
|
838
|
+
message: resultMsg.content,
|
|
839
|
+
type: "success",
|
|
840
|
+
duration: 500,
|
|
841
|
+
onClose: (t) => {
|
|
842
|
+
this.reloadContent();
|
|
843
|
+
this.closeWinOnCheck(2);
|
|
844
|
+
},
|
|
845
|
+
});
|
|
846
|
+
},
|
|
847
|
+
});
|
|
848
|
+
},
|
|
849
|
+
handleReminderContent(scriptType, callback) {
|
|
850
|
+
let that = getTarget(this);
|
|
851
|
+
that.$http({
|
|
852
|
+
url: this.current_prefix + "/wf/getReminderContent",
|
|
853
|
+
data: {
|
|
854
|
+
scriptType,
|
|
855
|
+
taskId: this.wfInfo.taskId,
|
|
856
|
+
uuid: this.wfInfo.uuid,
|
|
857
|
+
},
|
|
858
|
+
method: "post",
|
|
859
|
+
isLoading: true,
|
|
860
|
+
errorMsg: false,
|
|
861
|
+
success: (res) => {
|
|
862
|
+
if (res.objx) {
|
|
863
|
+
that.$baseConfirm(res.objx).then(() => {
|
|
864
|
+
callback && callback();
|
|
865
|
+
});
|
|
866
|
+
} else {
|
|
867
|
+
callback && callback();
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
error: (e) => {
|
|
871
|
+
if (e.response.status === 404) {
|
|
872
|
+
callback && callback();
|
|
873
|
+
} else {
|
|
874
|
+
that.$errorMsg({
|
|
875
|
+
content: e.message,
|
|
876
|
+
type: "error",
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
});
|
|
881
|
+
},
|
|
882
|
+
openAgreeDialog(operateType) {
|
|
883
|
+
const done = () => {
|
|
884
|
+
this.operateType = operateType;
|
|
885
|
+
let that = getTarget(this);
|
|
886
|
+
this.agreeForm = {
|
|
887
|
+
opinion: this.$t2("同意", "components.wf.defaultAgreeOption"),
|
|
888
|
+
nodeId: null,
|
|
889
|
+
};
|
|
890
|
+
this.agreeNodes = [];
|
|
891
|
+
this.agreeDialogVisible = true;
|
|
892
|
+
/* that.$http({
|
|
893
|
+
url: this.current_prefix + "/wf/getNextOutgoingNodes",
|
|
894
|
+
data: {
|
|
895
|
+
stringOne: this.wfInfo.taskId,
|
|
896
|
+
},
|
|
897
|
+
method: "post",
|
|
898
|
+
async: false,
|
|
899
|
+
isLoading: true,
|
|
900
|
+
success: (res) => {
|
|
901
|
+
let nodes = res.objx || [];
|
|
902
|
+
if (nodes.length) {
|
|
903
|
+
this.agreeForm.nodeId = nodes[0].nodeId;
|
|
904
|
+
}
|
|
905
|
+
this.agreeNodes = nodes;
|
|
906
|
+
this.agreeDialogVisible = true;
|
|
907
|
+
},
|
|
908
|
+
}); */
|
|
909
|
+
};
|
|
910
|
+
let wfConfig = this.wfConfig;
|
|
911
|
+
if (wfConfig.onClickAgree) {
|
|
912
|
+
wfConfig.onClickAgree(done);
|
|
913
|
+
} else {
|
|
914
|
+
done();
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
subAgreeForm() {
|
|
918
|
+
let wfConfig = this.wfConfig;
|
|
919
|
+
let done = () => {
|
|
920
|
+
this.subAgreeHandle();
|
|
921
|
+
};
|
|
922
|
+
if (wfConfig.onBeforeAgree) {
|
|
923
|
+
wfConfig.onBeforeAgree(done);
|
|
924
|
+
} else {
|
|
925
|
+
done();
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
|
|
929
|
+
subAgreeHandle() {
|
|
930
|
+
let that = getTarget(this);
|
|
931
|
+
let nodeId = null;
|
|
932
|
+
/* if (this.agreeNodes.length) {
|
|
933
|
+
if (!this.agreeForm.nodeId) {
|
|
934
|
+
that.$message({
|
|
935
|
+
message: this.$t2('请选择节点', 'components.wf.agreeWarnMsg1'),
|
|
936
|
+
type: "error",
|
|
937
|
+
duration: 2 * 1000,
|
|
938
|
+
});
|
|
939
|
+
return;
|
|
940
|
+
}
|
|
941
|
+
nodeId = this.agreeForm.nodeId;
|
|
942
|
+
} */
|
|
943
|
+
|
|
944
|
+
var instanceId = this.wfInfo.instanceId;
|
|
945
|
+
var taskId = this.wfInfo.taskId;
|
|
946
|
+
var memo =
|
|
947
|
+
this.agreeForm.opinion ||
|
|
948
|
+
this.$t2("同意", "components.wf.defaultAgreeOption");
|
|
949
|
+
var data = JSON.stringify({
|
|
950
|
+
taskId: taskId,
|
|
951
|
+
uuid: this.wfInfo.uuid,
|
|
952
|
+
suggestion: memo,
|
|
953
|
+
skipType: "PASS",
|
|
954
|
+
// nodeId: nodeId,
|
|
955
|
+
});
|
|
956
|
+
this.agreeDialogVisible = false;
|
|
957
|
+
that.$http({
|
|
958
|
+
url: this.current_prefix + "/wf/submit",
|
|
959
|
+
data: data,
|
|
960
|
+
method: "post",
|
|
961
|
+
headers: {
|
|
962
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
963
|
+
},
|
|
964
|
+
isLoading: true,
|
|
965
|
+
success: (resultMsg) => {
|
|
966
|
+
if (false && resultMsg.objx && resultMsg.objx.code == "999999") {
|
|
967
|
+
this.errorSubmit({
|
|
968
|
+
taskId: taskId,
|
|
969
|
+
uuid: this.wfInfo.uuid,
|
|
970
|
+
suggestion: memo,
|
|
971
|
+
errorMsg: resultMsg.objx.errorMsg,
|
|
972
|
+
});
|
|
973
|
+
} else {
|
|
974
|
+
that.$message({
|
|
975
|
+
message: resultMsg.content,
|
|
976
|
+
type: "success",
|
|
977
|
+
duration: 500,
|
|
978
|
+
onClose: (t) => {
|
|
979
|
+
this.reloadContent();
|
|
980
|
+
this.closeWinOnCheck(1);
|
|
981
|
+
},
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
});
|
|
986
|
+
},
|
|
987
|
+
errorSubmit(data) {
|
|
988
|
+
let that = getTarget(this);
|
|
989
|
+
that.$http({
|
|
990
|
+
url: this.current_prefix + "/wf/errorSubmit",
|
|
991
|
+
data: data,
|
|
992
|
+
method: "post",
|
|
993
|
+
isLoading: true,
|
|
994
|
+
success: (resultMsg) => {
|
|
995
|
+
that.$message({
|
|
996
|
+
message: resultMsg.content,
|
|
997
|
+
type: "success",
|
|
998
|
+
duration: 500,
|
|
999
|
+
onClose: (t) => {
|
|
1000
|
+
this.reloadContent();
|
|
1001
|
+
this.closeWinOnCheck(1);
|
|
1002
|
+
},
|
|
1003
|
+
});
|
|
1004
|
+
},
|
|
1005
|
+
});
|
|
1006
|
+
},
|
|
1007
|
+
openChangeWfForm(operateType) {
|
|
1008
|
+
this.operateType = operateType;
|
|
1009
|
+
this.changeWfDialogVisible = true;
|
|
1010
|
+
this.changeUserRows = [];
|
|
1011
|
+
this.changeWfForm = {
|
|
1012
|
+
userIds: [],
|
|
1013
|
+
userNickNames: null,
|
|
1014
|
+
opinion: null,
|
|
1015
|
+
};
|
|
1016
|
+
},
|
|
1017
|
+
subChangeWfForm() {
|
|
1018
|
+
let that = getTarget(this);
|
|
1019
|
+
var instanceId = this.wfInfo.instanceId;
|
|
1020
|
+
var taskId = this.wfInfo.taskId;
|
|
1021
|
+
|
|
1022
|
+
var userIds = this.changeWfForm.userIds || [];
|
|
1023
|
+
var opinion = this.changeWfForm.opinion || null;
|
|
1024
|
+
|
|
1025
|
+
if (!userIds.length) {
|
|
1026
|
+
that.$message({
|
|
1027
|
+
message: this.$t2("请选择转办人", "components.wf.transferWarnMsg1"),
|
|
1028
|
+
type: "error",
|
|
1029
|
+
duration: 2000,
|
|
1030
|
+
onClose: (t) => {},
|
|
1031
|
+
});
|
|
1032
|
+
return false;
|
|
1033
|
+
}
|
|
1034
|
+
let transferTo = userIds.map((userId) => {
|
|
1035
|
+
return userId + "";
|
|
1036
|
+
});
|
|
1037
|
+
|
|
1038
|
+
var data = JSON.stringify({
|
|
1039
|
+
taskId: taskId,
|
|
1040
|
+
uuid: this.wfInfo.uuid,
|
|
1041
|
+
transferTo: transferTo,
|
|
1042
|
+
suggestion: opinion,
|
|
1043
|
+
});
|
|
1044
|
+
this.changeWfDialogVisible = false;
|
|
1045
|
+
that.$http({
|
|
1046
|
+
url: this.current_prefix + "/wf/transfer",
|
|
1047
|
+
data: data,
|
|
1048
|
+
method: "post",
|
|
1049
|
+
headers: {
|
|
1050
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
1051
|
+
},
|
|
1052
|
+
isLoading: true,
|
|
1053
|
+
success: (resultMsg) => {
|
|
1054
|
+
that.$message({
|
|
1055
|
+
message: resultMsg.content,
|
|
1056
|
+
type: "success",
|
|
1057
|
+
duration: 500,
|
|
1058
|
+
onClose: (t) => {
|
|
1059
|
+
this.reloadContent();
|
|
1060
|
+
this.closeWinOnCheck(4);
|
|
1061
|
+
},
|
|
1062
|
+
});
|
|
1063
|
+
},
|
|
1064
|
+
});
|
|
1065
|
+
},
|
|
1066
|
+
userConfirm(rows) {
|
|
1067
|
+
if (rows.length > 0) {
|
|
1068
|
+
let changeUserRows = this.changeUserRows;
|
|
1069
|
+
let ids = changeUserRows.map((changeUserRow) => changeUserRow.id);
|
|
1070
|
+
let addRows = rows.filter((row) => !ids.includes(row.id));
|
|
1071
|
+
changeUserRows.push(...addRows);
|
|
1072
|
+
|
|
1073
|
+
let row = rows[0];
|
|
1074
|
+
this.changeWfForm.userIds = changeUserRows.map(
|
|
1075
|
+
(changeUserRow) => changeUserRow.id
|
|
1076
|
+
);
|
|
1077
|
+
this.changeWfForm.userNickNames = changeUserRows
|
|
1078
|
+
.map((changeUserRow) => changeUserRow.nickName)
|
|
1079
|
+
.join(",");
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
reloadContent() {
|
|
1083
|
+
let that = getTarget(this);
|
|
1084
|
+
oaPublishEvent(that);
|
|
1085
|
+
that.$baseReload();
|
|
1086
|
+
},
|
|
1087
|
+
closeWinOnCheck(flag) {
|
|
1088
|
+
//_closeWindowOnCheck=true, 1提交,2驳回,3中断,4转办时,5沟通 关闭窗口
|
|
1089
|
+
let that = getTarget(this);
|
|
1090
|
+
let _closeWindowOnCheck =
|
|
1091
|
+
that.$attrs._closeWindowOnCheck || that._closeWindowOnCheck;
|
|
1092
|
+
if (_closeWindowOnCheck === true || _closeWindowOnCheck === "true") {
|
|
1093
|
+
window.close && window.close();
|
|
1094
|
+
}
|
|
1095
|
+
let _handleCallback = that.$attrs._handleCallback || that._handleCallback;
|
|
1096
|
+
_handleCallback && _handleCallback(flag);
|
|
1097
|
+
},
|
|
1098
|
+
manualCallback() {
|
|
1099
|
+
this.$emit("manualCallback");
|
|
1100
|
+
},
|
|
1101
|
+
openUrgingDialog(operateType) {
|
|
1102
|
+
this.operateType = operateType;
|
|
1103
|
+
this.urgingDialogVisible = true;
|
|
1104
|
+
},
|
|
1105
|
+
openDeleteTaskUserDialog(operateType) {
|
|
1106
|
+
this.operateType = operateType;
|
|
1107
|
+
this.showDeleteTaskUserDialog = true;
|
|
1108
|
+
},
|
|
1109
|
+
openAddTaskUserDialog(operateType) {
|
|
1110
|
+
this.operateType = operateType;
|
|
1111
|
+
this.showAddTaskUserDialog = true;
|
|
1112
|
+
},
|
|
1113
|
+
openAddIncreaseSign(operateType) {
|
|
1114
|
+
this.operateType = operateType;
|
|
1115
|
+
this.addIncreaseSignUsers = [];
|
|
1116
|
+
this.addIncreaseSignForm = { userNickNames: null };
|
|
1117
|
+
this.showAddIncreaseSignDialog = true;
|
|
1118
|
+
},
|
|
1119
|
+
initWfUserParam(callback) {
|
|
1120
|
+
this.initTransferUserParam(); //转办
|
|
1121
|
+
this.initAddSignUserParam(); //加签
|
|
1122
|
+
this.initTalkUserParam(); //沟通
|
|
1123
|
+
},
|
|
1124
|
+
//
|
|
1125
|
+
initTransferUserParam(callback) {
|
|
1126
|
+
//初始化转办用户参数
|
|
1127
|
+
let that = getTarget(this);
|
|
1128
|
+
return that.$http({
|
|
1129
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1130
|
+
method: `post`,
|
|
1131
|
+
data: { attributeKey: "param1" },
|
|
1132
|
+
isLoading: true,
|
|
1133
|
+
modalStrictly: true,
|
|
1134
|
+
success: (res) => {
|
|
1135
|
+
this.wfUserParamForTransfer = res.objx || {};
|
|
1136
|
+
callback && callback();
|
|
1137
|
+
},
|
|
1138
|
+
});
|
|
1139
|
+
},
|
|
1140
|
+
initAddSignUserParam(callback) {
|
|
1141
|
+
//初始化加签用户参数
|
|
1142
|
+
let that = getTarget(this);
|
|
1143
|
+
return that.$http({
|
|
1144
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1145
|
+
method: `post`,
|
|
1146
|
+
data: { attributeKey: "param2" },
|
|
1147
|
+
isLoading: true,
|
|
1148
|
+
modalStrictly: true,
|
|
1149
|
+
success: (res) => {
|
|
1150
|
+
this.wfUserParamForAddSign = res.objx || {};
|
|
1151
|
+
callback && callback();
|
|
1152
|
+
},
|
|
1153
|
+
});
|
|
1154
|
+
},
|
|
1155
|
+
initTalkUserParam(callback) {
|
|
1156
|
+
//初始化沟通用户参数
|
|
1157
|
+
let that = getTarget(this);
|
|
1158
|
+
return that.$http({
|
|
1159
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1160
|
+
method: `post`,
|
|
1161
|
+
data: { attributeKey: "param3" },
|
|
1162
|
+
isLoading: true,
|
|
1163
|
+
modalStrictly: true,
|
|
1164
|
+
success: (res) => {
|
|
1165
|
+
this.wfUserParamForTalk = res.objx || {};
|
|
1166
|
+
callback && callback();
|
|
1167
|
+
},
|
|
1168
|
+
});
|
|
1169
|
+
},
|
|
1170
|
+
//
|
|
1171
|
+
resetLinkup() {
|
|
1172
|
+
this.formData = {};
|
|
1173
|
+
this.$refs["table-linkup"].commitProxy("reload");
|
|
1174
|
+
},
|
|
1175
|
+
searchLinkup() {
|
|
1176
|
+
this.$refs["table-linkup"].commitProxy("reload");
|
|
1177
|
+
},
|
|
1178
|
+
initLinkup(flag) {
|
|
1179
|
+
let h = this.$createElement;
|
|
1180
|
+
let statusMap = {
|
|
1181
|
+
0: this.$t2("未完成", "components.wf.talkStatus0"),
|
|
1182
|
+
1: this.$t2("已完成", "components.wf.talkStatus1"),
|
|
1183
|
+
2: this.$t2("已取消", "components.wf.talkStatus2"),
|
|
1184
|
+
};
|
|
1185
|
+
let tableOption = {
|
|
1186
|
+
vue: this,
|
|
1187
|
+
tableRef: "table-linkup",
|
|
1188
|
+
tableName: "wf_table-linkup",
|
|
1189
|
+
path: this.current_prefix + "/wf_linkup/listPage",
|
|
1190
|
+
param: () => {
|
|
1191
|
+
return {
|
|
1192
|
+
uuid: this.wfInfo.uuid,
|
|
1193
|
+
};
|
|
1194
|
+
},
|
|
1195
|
+
config: {
|
|
1196
|
+
height: 350,
|
|
1197
|
+
},
|
|
1198
|
+
columns: [
|
|
1199
|
+
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
1200
|
+
{
|
|
1201
|
+
title: this.$t2("任务名称", "components.wf.taskName"),
|
|
1202
|
+
field: "taskName",
|
|
1203
|
+
width: 150,
|
|
1204
|
+
fixed: "left",
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
title: this.$t2("发送人", "components.wf.senderName"),
|
|
1208
|
+
field: "senderName",
|
|
1209
|
+
width: 150,
|
|
1210
|
+
slots: {
|
|
1211
|
+
default: "sender",
|
|
1212
|
+
},
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
title: this.$t2("接收人", "components.wf.receiverName"),
|
|
1216
|
+
field: "receiverName",
|
|
1217
|
+
width: 150,
|
|
1218
|
+
slots: {
|
|
1219
|
+
default: "receiver",
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
title: this.$t2("沟通内容", "components.wf.talkContent"),
|
|
1224
|
+
field: "content",
|
|
1225
|
+
width: 250,
|
|
1226
|
+
showOverflow: false,
|
|
1227
|
+
slots: {
|
|
1228
|
+
default: ({ row, rowIndex }) => {
|
|
1229
|
+
return row.replyId
|
|
1230
|
+
? "[" +
|
|
1231
|
+
this.$t2("回复", "components.wf.reply") +
|
|
1232
|
+
"]" +
|
|
1233
|
+
row.content
|
|
1234
|
+
: row.content;
|
|
1235
|
+
},
|
|
1236
|
+
},
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
width: 150,
|
|
1240
|
+
title: this.$t2("沟通资料", "components.wf.talkAttachment"),
|
|
1241
|
+
field: "attachmentImage",
|
|
1242
|
+
sortable: false,
|
|
1243
|
+
slots: {
|
|
1244
|
+
default: ({ row, rowIndex }) => {
|
|
1245
|
+
let option = {
|
|
1246
|
+
title: this.$t2("沟通资料", "components.wf.talkAttachment"),
|
|
1247
|
+
edit: false,
|
|
1248
|
+
rows: (done) => {
|
|
1249
|
+
done(row.attachmentDTOs);
|
|
1250
|
+
},
|
|
1251
|
+
};
|
|
1252
|
+
return [
|
|
1253
|
+
h("base-attachment", {
|
|
1254
|
+
props: {
|
|
1255
|
+
option: option,
|
|
1256
|
+
imageLazy: false,
|
|
1257
|
+
},
|
|
1258
|
+
}),
|
|
1259
|
+
];
|
|
1260
|
+
},
|
|
1261
|
+
},
|
|
1262
|
+
},
|
|
1263
|
+
|
|
1264
|
+
{
|
|
1265
|
+
title: this.$t2("状态", "components.wf.status"),
|
|
1266
|
+
field: "status",
|
|
1267
|
+
width: 150,
|
|
1268
|
+
slots: {
|
|
1269
|
+
default: ({ row, rowIndex }) => {
|
|
1270
|
+
return statusMap[row.status] || "";
|
|
1271
|
+
},
|
|
1272
|
+
},
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
title: this.$t2("创建时间", "system.label.createDate"),
|
|
1276
|
+
field: "createDate",
|
|
1277
|
+
width: 150,
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
width: 80,
|
|
1281
|
+
fixed: "right",
|
|
1282
|
+
title: "",
|
|
1283
|
+
sortable: false,
|
|
1284
|
+
slots: {
|
|
1285
|
+
default: "operate",
|
|
1286
|
+
},
|
|
1287
|
+
},
|
|
1288
|
+
],
|
|
1289
|
+
callback: (rows) => {
|
|
1290
|
+
if (rows.length && flag) {
|
|
1291
|
+
let row = rows[0];
|
|
1292
|
+
if (row.replyToSender) {
|
|
1293
|
+
this.$nextTick(() => {
|
|
1294
|
+
this.tabIndex = "2";
|
|
1295
|
+
this.openTalkDialog(
|
|
1296
|
+
row.sender,
|
|
1297
|
+
row.senderName,
|
|
1298
|
+
"talk",
|
|
1299
|
+
1,
|
|
1300
|
+
row.id
|
|
1301
|
+
);
|
|
1302
|
+
});
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
};
|
|
1307
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
1308
|
+
this.linkupOption = opts;
|
|
1309
|
+
});
|
|
1310
|
+
},
|
|
1311
|
+
cancelTalk(row) {
|
|
1312
|
+
let that = getTarget(this);
|
|
1313
|
+
that
|
|
1314
|
+
.$baseConfirm(
|
|
1315
|
+
this.$t2("您确定要取消沟通记录吗?", "components.wf.cancelTalkTip")
|
|
1316
|
+
)
|
|
1317
|
+
.then(() => {
|
|
1318
|
+
that.$http({
|
|
1319
|
+
url: this.current_prefix + "/wf_linkup/cancel",
|
|
1320
|
+
data: { id: row.id },
|
|
1321
|
+
method: "post",
|
|
1322
|
+
loadingTarget: document.body,
|
|
1323
|
+
isLoading: true,
|
|
1324
|
+
success: (resultMsg) => {
|
|
1325
|
+
that.$message({
|
|
1326
|
+
message: resultMsg.content,
|
|
1327
|
+
type: "success",
|
|
1328
|
+
duration: 500,
|
|
1329
|
+
onClose: (t) => {
|
|
1330
|
+
this.reloadContent();
|
|
1331
|
+
},
|
|
1332
|
+
});
|
|
1333
|
+
},
|
|
1334
|
+
});
|
|
1335
|
+
});
|
|
1336
|
+
},
|
|
1337
|
+
openTalkDialog(receiver, receiverName, operateType, flag, replyId) {
|
|
1338
|
+
this.operateType = operateType;
|
|
1339
|
+
/*this.talkForm.receiver = receiver || null;
|
|
1340
|
+
this.talkForm.receiverName = receiverName || null;
|
|
1341
|
+
this.talkForm.replyId = replyId || null;
|
|
1342
|
+
this.talkForm.content = null;
|
|
1343
|
+
this.talkForm.attachmentDTOs = [];*/
|
|
1344
|
+
this.initTalkForm(receiver, receiverName, replyId);
|
|
1345
|
+
this.showTalkDialog = true;
|
|
1346
|
+
if (flag == 1) {
|
|
1347
|
+
let opeaBtnDom = this.$refs.opeaBtn;
|
|
1348
|
+
opeaBtnDom && opeaBtnDom.scrollIntoView();
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
initTalkForm(receiver, receiverName, replyId) {
|
|
1352
|
+
this.talkForm.receiver = receiver || null;
|
|
1353
|
+
this.talkForm.receiverName = receiverName || null;
|
|
1354
|
+
this.talkForm.replyId = replyId || null;
|
|
1355
|
+
this.talkForm.content = null;
|
|
1356
|
+
this.talkForm.attachmentDTOs = [];
|
|
1357
|
+
},
|
|
1358
|
+
submitTalkForm() {
|
|
1359
|
+
let that = getTarget(this);
|
|
1360
|
+
var instanceId = this.wfInfo.instanceId;
|
|
1361
|
+
var taskId = this.wfInfo.taskId;
|
|
1362
|
+
|
|
1363
|
+
if (!this.talkForm.receiver) {
|
|
1364
|
+
that.$message({
|
|
1365
|
+
message: this.$t2("请选择接收人", "components.wf.talkWarnMsg1"),
|
|
1366
|
+
type: "error",
|
|
1367
|
+
duration: 2 * 1000,
|
|
1368
|
+
});
|
|
1369
|
+
return false;
|
|
1370
|
+
}
|
|
1371
|
+
if (!this.talkForm.content) {
|
|
1372
|
+
that.$message({
|
|
1373
|
+
message: this.$t2("请输入沟通内容", "components.wf.talkWarnMsg2"),
|
|
1374
|
+
type: "error",
|
|
1375
|
+
duration: 2 * 1000,
|
|
1376
|
+
});
|
|
1377
|
+
return false;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
var data = {
|
|
1381
|
+
taskId: taskId,
|
|
1382
|
+
uuid: this.wfInfo.uuid,
|
|
1383
|
+
receiver: this.talkForm.receiver,
|
|
1384
|
+
receiverName: this.talkForm.receiverName,
|
|
1385
|
+
replyId: this.talkForm.replyId,
|
|
1386
|
+
content: this.talkForm.content,
|
|
1387
|
+
attachmentDTOs: this.talkForm.attachmentDTOs,
|
|
1388
|
+
notifyType: "wfLinkup",
|
|
1389
|
+
};
|
|
1390
|
+
this.showTalkDialog = false;
|
|
1391
|
+
that.$http({
|
|
1392
|
+
url: this.current_prefix + "/wf_linkup/save",
|
|
1393
|
+
data: data,
|
|
1394
|
+
method: "post",
|
|
1395
|
+
isLoading: true,
|
|
1396
|
+
success: (resultMsg) => {
|
|
1397
|
+
that.$message({
|
|
1398
|
+
message: resultMsg.content,
|
|
1399
|
+
type: "success",
|
|
1400
|
+
duration: 500,
|
|
1401
|
+
onClose: (t) => {
|
|
1402
|
+
this.reloadContent();
|
|
1403
|
+
this.closeWinOnCheck(5);
|
|
1404
|
+
},
|
|
1405
|
+
});
|
|
1406
|
+
},
|
|
1407
|
+
});
|
|
1408
|
+
},
|
|
1409
|
+
openTalkUserDialog() {
|
|
1410
|
+
this.showTalkUserDialog = true;
|
|
1411
|
+
},
|
|
1412
|
+
confirmTalkUserDialog(rows) {
|
|
1413
|
+
if (rows.length > 0) {
|
|
1414
|
+
let row = rows[0];
|
|
1415
|
+
if (this.talkForm.receiver != row.id) {
|
|
1416
|
+
this.talkForm.replyId = null;
|
|
1417
|
+
}
|
|
1418
|
+
this.talkForm.receiver = row.id;
|
|
1419
|
+
this.talkForm.receiverName = row.nickName;
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
confirmUrging() {
|
|
1423
|
+
this.reloadContent();
|
|
1424
|
+
},
|
|
1425
|
+
confirmDeleteTaskUser() {
|
|
1426
|
+
this.reloadContent();
|
|
1427
|
+
},
|
|
1428
|
+
confirmAddTaskUser(rows) {
|
|
1429
|
+
this.addIncreaseSignUsers = rows;
|
|
1430
|
+
this.addIncreaseSignForm.userNickNames = rows
|
|
1431
|
+
.map((row) => row.nickName)
|
|
1432
|
+
.join(",");
|
|
1433
|
+
// this.reloadContent();
|
|
1434
|
+
},
|
|
1435
|
+
submitAddTaskUserForm(flag) {
|
|
1436
|
+
let that = getTarget(this);
|
|
1437
|
+
let userIds = this.addIncreaseSignUsers.map((checkRow) => checkRow.id);
|
|
1438
|
+
if (userIds.length == 0) {
|
|
1439
|
+
that.$message({
|
|
1440
|
+
message: this.$t2(
|
|
1441
|
+
"请选择候选人",
|
|
1442
|
+
"components.wf.addIncreaseSignWarnMsg1"
|
|
1443
|
+
),
|
|
1444
|
+
type: "error",
|
|
1445
|
+
duration: 2000,
|
|
1446
|
+
onClose: (t) => {},
|
|
1447
|
+
});
|
|
1448
|
+
return false;
|
|
1449
|
+
}
|
|
1450
|
+
let toDo = () => {
|
|
1451
|
+
var data = JSON.stringify({
|
|
1452
|
+
uuid: this.wfInfo.uuid,
|
|
1453
|
+
taskId: this.wfInfo.taskId,
|
|
1454
|
+
userIds: userIds,
|
|
1455
|
+
suggestion: this.addIncreaseSignForm.opinion,
|
|
1456
|
+
});
|
|
1457
|
+
this.agreeDialogVisible = false;
|
|
1458
|
+
that.$http({
|
|
1459
|
+
url: this.current_prefix + "/wf/addIncreaseSign",
|
|
1460
|
+
data: data,
|
|
1461
|
+
method: "post",
|
|
1462
|
+
loadingTarget: document.body,
|
|
1463
|
+
headers: {
|
|
1464
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
1465
|
+
},
|
|
1466
|
+
isLoading: true,
|
|
1467
|
+
success: (resultMsg) => {
|
|
1468
|
+
this.showAddIncreaseSignDialog = false;
|
|
1469
|
+
that.$message({
|
|
1470
|
+
message: resultMsg.content,
|
|
1471
|
+
type: "success",
|
|
1472
|
+
duration: 500,
|
|
1473
|
+
onClose: (t) => {
|
|
1474
|
+
this.reloadContent();
|
|
1475
|
+
},
|
|
1476
|
+
});
|
|
1477
|
+
},
|
|
1478
|
+
});
|
|
1479
|
+
};
|
|
1480
|
+
if (flag === 0) {
|
|
1481
|
+
toDo();
|
|
1482
|
+
} else {
|
|
1483
|
+
that
|
|
1484
|
+
.$baseConfirm(
|
|
1485
|
+
this.$t2(
|
|
1486
|
+
"您确定要加签吗?",
|
|
1487
|
+
"components.wf.addIncreaseSignConfirmTip"
|
|
1488
|
+
)
|
|
1489
|
+
)
|
|
1490
|
+
.then(() => {
|
|
1491
|
+
toDo();
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1495
|
+
openSetCandidateDialog(operateType) {
|
|
1496
|
+
this.operateType = operateType;
|
|
1497
|
+
this.showSetCandidateDialog = true;
|
|
1498
|
+
},
|
|
1499
|
+
closeSetCandidateDialog({ saved = false } = {}) {
|
|
1500
|
+
this.showSetCandidateDialog = false;
|
|
1501
|
+
if (saved) {
|
|
1502
|
+
this.reloadContent();
|
|
1503
|
+
}
|
|
1504
|
+
},
|
|
1505
|
+
openRevokeDialog(operateType) {
|
|
1506
|
+
this.operateType = operateType;
|
|
1507
|
+
this.revokeForm = { opinion: null };
|
|
1508
|
+
this.revokeDialogVisible = true;
|
|
1509
|
+
},
|
|
1510
|
+
subRevokeForm(flag) {
|
|
1511
|
+
//中断
|
|
1512
|
+
let that = getTarget(this);
|
|
1513
|
+
let toDo = () => {
|
|
1514
|
+
var data = JSON.stringify({
|
|
1515
|
+
uuid: this.wfInfo.uuid,
|
|
1516
|
+
taskId: this.wfInfo.taskId,
|
|
1517
|
+
suggestion: this.revokeForm.opinion,
|
|
1518
|
+
});
|
|
1519
|
+
this.revokeDialogVisible = false;
|
|
1520
|
+
that.$http({
|
|
1521
|
+
url: this.current_prefix + "/wf/revoke",
|
|
1522
|
+
data: data,
|
|
1523
|
+
method: "post",
|
|
1524
|
+
loadingTarget: document.body,
|
|
1525
|
+
headers: {
|
|
1526
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
1527
|
+
},
|
|
1528
|
+
isLoading: true,
|
|
1529
|
+
success: (resultMsg) => {
|
|
1530
|
+
that.$message({
|
|
1531
|
+
message: resultMsg.content,
|
|
1532
|
+
type: "success",
|
|
1533
|
+
duration: 500,
|
|
1534
|
+
onClose: (t) => {
|
|
1535
|
+
this.reloadContent();
|
|
1536
|
+
},
|
|
1537
|
+
});
|
|
1538
|
+
},
|
|
1539
|
+
});
|
|
1540
|
+
};
|
|
1541
|
+
if (flag === 0) {
|
|
1542
|
+
toDo();
|
|
1543
|
+
} else {
|
|
1544
|
+
that
|
|
1545
|
+
.$baseConfirm(
|
|
1546
|
+
this.$t2("您确定要中断吗?", "components.wf.revokeConfirmTip")
|
|
1547
|
+
)
|
|
1548
|
+
.then(() => {
|
|
1549
|
+
toDo();
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
},
|
|
1553
|
+
initShowTaskInfo(callback) {
|
|
1554
|
+
//初始化转办用户参数
|
|
1555
|
+
let that = getTarget(this);
|
|
1556
|
+
return that.$http({
|
|
1557
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1558
|
+
method: `post`,
|
|
1559
|
+
data: { attributeKey: "param9" },
|
|
1560
|
+
isLoading: true,
|
|
1561
|
+
modalStrictly: true,
|
|
1562
|
+
success: (res) => {
|
|
1563
|
+
this.showWfInfoTab = res.objx !== 1;
|
|
1564
|
+
callback && callback();
|
|
1565
|
+
},
|
|
1566
|
+
});
|
|
1567
|
+
},
|
|
1568
|
+
getIsShowWfMemo() {
|
|
1569
|
+
let that = getTarget(this);
|
|
1570
|
+
that.$http({
|
|
1571
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1572
|
+
method: `post`,
|
|
1573
|
+
data: { attributeKey: "param10" },
|
|
1574
|
+
isLoading: true,
|
|
1575
|
+
success: (res) => {
|
|
1576
|
+
this.showWfMemo = res?.objx === true;
|
|
1577
|
+
if (this.showWfMemo) {
|
|
1578
|
+
this.$nextTick(() => {
|
|
1579
|
+
this.initWfMemo();
|
|
1580
|
+
});
|
|
1581
|
+
}
|
|
1582
|
+
},
|
|
1583
|
+
});
|
|
1584
|
+
},
|
|
1585
|
+
|
|
1586
|
+
initWfMemo() {
|
|
1587
|
+
this.wfMemoSearchEvent();
|
|
1588
|
+
/* let h = this.$createElement;
|
|
1589
|
+
let tableOption = {
|
|
1590
|
+
vue: this,
|
|
1591
|
+
tableRef: "table-wfMemo",
|
|
1592
|
+
tableName: "wf_table-wfMemo",
|
|
1593
|
+
path: this.current_prefix + "/wf_memo/listPage",
|
|
1594
|
+
param: () => {
|
|
1595
|
+
return {
|
|
1596
|
+
uuid: this.wfInfo.uuid,
|
|
1597
|
+
};
|
|
1598
|
+
},
|
|
1599
|
+
config: {
|
|
1600
|
+
height: 350
|
|
1601
|
+
},
|
|
1602
|
+
columns: [
|
|
1603
|
+
{type: "checkbox", width: 48, resizable: false, fixed: "left"},
|
|
1604
|
+
{
|
|
1605
|
+
title: this.$t1('操作人'),
|
|
1606
|
+
field: "operatorName",
|
|
1607
|
+
width: 150,
|
|
1608
|
+
fixed: "left",
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
title: this.$t1('内容'),
|
|
1612
|
+
field: "content",
|
|
1613
|
+
width: 250,
|
|
1614
|
+
showOverflow: false
|
|
1615
|
+
},
|
|
1616
|
+
{
|
|
1617
|
+
width: 150,
|
|
1618
|
+
title: this.$t1('附件'),
|
|
1619
|
+
field: "attachmentImage",
|
|
1620
|
+
sortable: false,
|
|
1621
|
+
slots: {
|
|
1622
|
+
default: ({row, rowIndex}) => {
|
|
1623
|
+
let option = {
|
|
1624
|
+
title: this.$t1('附件'),
|
|
1625
|
+
edit: false,
|
|
1626
|
+
rows: (done) => {
|
|
1627
|
+
done(row.attachmentDTOs);
|
|
1628
|
+
},
|
|
1629
|
+
};
|
|
1630
|
+
return [
|
|
1631
|
+
h("base-attachment", {
|
|
1632
|
+
props: {
|
|
1633
|
+
option: option,
|
|
1634
|
+
imageLazy: false
|
|
1635
|
+
},
|
|
1636
|
+
}),
|
|
1637
|
+
];
|
|
1638
|
+
},
|
|
1639
|
+
},
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
title: this.$t2('创建时间', 'system.label.createDate'),
|
|
1643
|
+
field: "createDate",
|
|
1644
|
+
width: 150,
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
width: 80,
|
|
1648
|
+
fixed: "right",
|
|
1649
|
+
title: "",
|
|
1650
|
+
sortable: false
|
|
1651
|
+
},
|
|
1652
|
+
]
|
|
1653
|
+
};
|
|
1654
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
1655
|
+
this.wfMemoOption = opts;
|
|
1656
|
+
}); */
|
|
1657
|
+
},
|
|
1658
|
+
wfMemoSearchEvent() {
|
|
1659
|
+
// this.$refs['table-wfMemo'].commitProxy('reload');
|
|
1660
|
+
let that = getTarget(this);
|
|
1661
|
+
that.$http({
|
|
1662
|
+
url: this.current_prefix + "/wf_memo/listPage",
|
|
1663
|
+
method: `post`,
|
|
1664
|
+
data: {
|
|
1665
|
+
uuid: this.wfInfo.uuid,
|
|
1666
|
+
},
|
|
1667
|
+
isLoading: true,
|
|
1668
|
+
success: (res) => {
|
|
1669
|
+
let rows = res?.objx?.records || [];
|
|
1670
|
+
this.wfMemoData = rows;
|
|
1671
|
+
},
|
|
1672
|
+
});
|
|
1673
|
+
},
|
|
1674
|
+
openWfMemoDialog(row) {
|
|
1675
|
+
if (row) {
|
|
1676
|
+
this.wfMemoForm = this.$baseLodash.cloneDeep(row);
|
|
1677
|
+
} else {
|
|
1678
|
+
this.wfMemoForm = {
|
|
1679
|
+
uuid: this.wfInfo.uuid,
|
|
1680
|
+
content: null,
|
|
1681
|
+
attachmentDTOs: [],
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
this.showWfMemoDialog = true;
|
|
1685
|
+
},
|
|
1686
|
+
submitWfMemoForm() {
|
|
1687
|
+
let that = getTarget(this);
|
|
1688
|
+
|
|
1689
|
+
if (!this.wfMemoForm.content) {
|
|
1690
|
+
that.$message({
|
|
1691
|
+
message: this.$t1("请输入内容"),
|
|
1692
|
+
type: "error",
|
|
1693
|
+
duration: 2 * 1000,
|
|
1694
|
+
});
|
|
1695
|
+
return false;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
this.showWfMemoDialog = false;
|
|
1699
|
+
that.$http({
|
|
1700
|
+
url: this.current_prefix + "/wf_memo/save",
|
|
1701
|
+
data: this.wfMemoForm,
|
|
1702
|
+
method: "post",
|
|
1703
|
+
isLoading: true,
|
|
1704
|
+
success: (resultMsg) => {
|
|
1705
|
+
that.$message({
|
|
1706
|
+
message: resultMsg.content,
|
|
1707
|
+
type: "success",
|
|
1708
|
+
});
|
|
1709
|
+
this.wfMemoSearchEvent();
|
|
1710
|
+
},
|
|
1711
|
+
});
|
|
1712
|
+
},
|
|
1713
|
+
},
|
|
1714
|
+
};
|
|
1715
|
+
|
|
1716
|
+
wfStartMixin = {
|
|
1717
|
+
name: "wfStartDialog",
|
|
1718
|
+
props: {
|
|
1719
|
+
dataId: [String, Number],
|
|
1720
|
+
code: [String, Number],
|
|
1721
|
+
serviceId: String,
|
|
1722
|
+
startParam: Object,
|
|
1723
|
+
visible: Boolean,
|
|
1724
|
+
parentVue: Object,
|
|
1725
|
+
wfName: String,
|
|
1726
|
+
formCode: String,
|
|
1727
|
+
option: Object,
|
|
1728
|
+
},
|
|
1729
|
+
data() {
|
|
1730
|
+
return {
|
|
1731
|
+
showDialog: false,
|
|
1732
|
+
wfStartForm: {},
|
|
1733
|
+
wfDefItems: [],
|
|
1734
|
+
|
|
1735
|
+
startFormData: {},
|
|
1736
|
+
wfUserRangeEnabled: false,
|
|
1737
|
+
preStartResult: [],
|
|
1738
|
+
showSetCandidateDialog2: false,
|
|
1739
|
+
wfSubmitted: false,
|
|
1740
|
+
};
|
|
1741
|
+
},
|
|
1742
|
+
computed: {
|
|
1743
|
+
current_prefix() {
|
|
1744
|
+
return this.serviceId ? "/" + this.serviceId : "";
|
|
1745
|
+
},
|
|
1746
|
+
},
|
|
1747
|
+
mounted() {
|
|
1748
|
+
this.initWfInfo(this.code);
|
|
1749
|
+
// this.showDialog = true;
|
|
1750
|
+
},
|
|
1751
|
+
methods: {
|
|
1752
|
+
preStart() {
|
|
1753
|
+
let that = getTarget(this);
|
|
1754
|
+
return new Promise((resolve) => {
|
|
1755
|
+
return that.$http({
|
|
1756
|
+
url: this.current_prefix + "/wf/preStart",
|
|
1757
|
+
method: `post`,
|
|
1758
|
+
data: {
|
|
1759
|
+
...this.startFormData,
|
|
1760
|
+
preStart: 1,
|
|
1761
|
+
},
|
|
1762
|
+
success: (res) => {
|
|
1763
|
+
resolve(res.objx);
|
|
1764
|
+
},
|
|
1765
|
+
});
|
|
1766
|
+
});
|
|
1767
|
+
},
|
|
1768
|
+
initWfUserRangeParam() {
|
|
1769
|
+
let that = getTarget(this);
|
|
1770
|
+
return that.$http({
|
|
1771
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
1772
|
+
method: `post`,
|
|
1773
|
+
data: { attributeKey: "param12" },
|
|
1774
|
+
success: (res) => {
|
|
1775
|
+
this.wfUserRangeEnabled = res?.objx === true;
|
|
1776
|
+
},
|
|
1777
|
+
});
|
|
1778
|
+
},
|
|
1779
|
+
openSetCandidateDialog() {
|
|
1780
|
+
this.showSetCandidateDialog2 = true;
|
|
1781
|
+
},
|
|
1782
|
+
confirmSetCandidateDialog(rows) {
|
|
1783
|
+
let formData = {
|
|
1784
|
+
...this.startFormData,
|
|
1785
|
+
wfNodeDTOs: rows,
|
|
1786
|
+
};
|
|
1787
|
+
this.startSubmitHanlde(formData);
|
|
1788
|
+
},
|
|
1789
|
+
async initWfInfo(code) {
|
|
1790
|
+
let that = getTarget(this);
|
|
1791
|
+
var wfDefItems = null;
|
|
1792
|
+
var objId = this.dataId;
|
|
1793
|
+
|
|
1794
|
+
await this.initWfUserRangeParam();
|
|
1795
|
+
await that.$http({
|
|
1796
|
+
url: this.current_prefix + "/wf_obj_config_item/list",
|
|
1797
|
+
data: {
|
|
1798
|
+
objTypeCode: code,
|
|
1799
|
+
enabled: true,
|
|
1800
|
+
published: true,
|
|
1801
|
+
objId: objId,
|
|
1802
|
+
},
|
|
1803
|
+
method: "post",
|
|
1804
|
+
async: false,
|
|
1805
|
+
isLoading: true,
|
|
1806
|
+
error: (error) => {
|
|
1807
|
+
this.close();
|
|
1808
|
+
},
|
|
1809
|
+
success: (resultMsg) => {
|
|
1810
|
+
wfDefItems = resultMsg.objx || [];
|
|
1811
|
+
},
|
|
1812
|
+
});
|
|
1813
|
+
|
|
1814
|
+
if (!wfDefItems || wfDefItems.length == 0) {
|
|
1815
|
+
that.$baseAlert(
|
|
1816
|
+
this.$t2("无法启动,没有流程单据", "components.wf.startWarnMsg1")
|
|
1817
|
+
);
|
|
1818
|
+
this.close();
|
|
1819
|
+
return false;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
(this.wfStartForm = {
|
|
1823
|
+
wfCode: code,
|
|
1824
|
+
}),
|
|
1825
|
+
(this.wfDefItems = wfDefItems);
|
|
1826
|
+
this.$set(this.wfStartForm, "flowCode", wfDefItems[0].flowCode);
|
|
1827
|
+
if (wfDefItems.length == 1) {
|
|
1828
|
+
if (
|
|
1829
|
+
settingConfig.withoutConfrimByOneWf === true ||
|
|
1830
|
+
(this.option && this.option.skipStartConfirm)
|
|
1831
|
+
) {
|
|
1832
|
+
this.startSubmit();
|
|
1833
|
+
} else {
|
|
1834
|
+
let wfStartOperateName =
|
|
1835
|
+
settingConfig.wfStartOperateName ||
|
|
1836
|
+
settingConfig.wfStartButtonName ||
|
|
1837
|
+
"启动流程";
|
|
1838
|
+
let startTip = "您确定要" + wfStartOperateName + "吗?";
|
|
1839
|
+
that
|
|
1840
|
+
.$baseConfirm(this.$t2(startTip, "components.wf.startTip"))
|
|
1841
|
+
.then(() => {
|
|
1842
|
+
this.startSubmit();
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1845
|
+
} else {
|
|
1846
|
+
this.showDialog = true;
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
startSubmit() {
|
|
1850
|
+
var flowCode = this.wfStartForm.flowCode;
|
|
1851
|
+
if (!flowCode) {
|
|
1852
|
+
this.$baseAlert(
|
|
1853
|
+
this.$t2("请选择流程模版", "components.wf.startWarnMsg2")
|
|
1854
|
+
);
|
|
1855
|
+
return false;
|
|
1856
|
+
}
|
|
1857
|
+
let option = this.option;
|
|
1858
|
+
if (option.onBeforeStartSubmit) {
|
|
1859
|
+
option.onBeforeStartSubmit(() => {
|
|
1860
|
+
this.subWfStartForm();
|
|
1861
|
+
});
|
|
1862
|
+
} else {
|
|
1863
|
+
this.subWfStartForm();
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
async subWfStartForm() {
|
|
1867
|
+
let that = getTarget(this);
|
|
1868
|
+
var flowCode = this.wfStartForm.flowCode;
|
|
1869
|
+
if (!flowCode) {
|
|
1870
|
+
that.$baseAlert(
|
|
1871
|
+
this.$t2("请选择流程模版", "components.wf.startWarnMsg2")
|
|
1872
|
+
);
|
|
1873
|
+
return false;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
let option = this.option;
|
|
1877
|
+
|
|
1878
|
+
var objId = this.dataId;
|
|
1879
|
+
|
|
1880
|
+
let startParam = this.startParam || {};
|
|
1881
|
+
let formCode = this.formCode || null;
|
|
1882
|
+
|
|
1883
|
+
var data = {
|
|
1884
|
+
flowCode: flowCode,
|
|
1885
|
+
objTypeCode: this.code,
|
|
1886
|
+
objId: objId,
|
|
1887
|
+
formData: startParam,
|
|
1888
|
+
formCode: formCode,
|
|
1889
|
+
// name:this.wfName
|
|
1890
|
+
};
|
|
1891
|
+
this.startFormData = data;
|
|
1892
|
+
|
|
1893
|
+
if (this.wfUserRangeEnabled) {
|
|
1894
|
+
this.preStartResult = (await this.preStart()) || [];
|
|
1895
|
+
if (this.preStartResult.length) {
|
|
1896
|
+
this.openSetCandidateDialog();
|
|
1897
|
+
return;
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
this.startSubmitHanlde(this.startFormData);
|
|
1901
|
+
},
|
|
1902
|
+
startSubmitHanlde(formData) {
|
|
1903
|
+
this.wfSubmitted = true; // 标记已进入提交,避免随后关闭弹框误判为「取消」
|
|
1904
|
+
this.showDialog = false;
|
|
1905
|
+
let that = getTarget(this);
|
|
1906
|
+
let option = this.option;
|
|
1907
|
+
that.$http({
|
|
1908
|
+
url: this.current_prefix + "/wf/start",
|
|
1909
|
+
data: formData,
|
|
1910
|
+
method: "post",
|
|
1911
|
+
/* headers: {
|
|
1912
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
1913
|
+
}, */
|
|
1914
|
+
isLoading: true,
|
|
1915
|
+
callback: (resultMsg) => {
|
|
1916
|
+
if (resultMsg.type == "success") {
|
|
1917
|
+
that.$message({
|
|
1918
|
+
message: resultMsg.content,
|
|
1919
|
+
type: "success",
|
|
1920
|
+
duration: 500,
|
|
1921
|
+
onClose: (t) => {
|
|
1922
|
+
if (!option.onStartSuccess) {
|
|
1923
|
+
that.$baseReload();
|
|
1924
|
+
} else {
|
|
1925
|
+
option.onStartSuccess();
|
|
1926
|
+
}
|
|
1927
|
+
if (resultMsg.objx) {
|
|
1928
|
+
that.$baseAlert(resultMsg.objx);
|
|
1929
|
+
}
|
|
1930
|
+
},
|
|
1931
|
+
});
|
|
1932
|
+
} else {
|
|
1933
|
+
option.onStartFail && option.onStartFail();
|
|
1934
|
+
}
|
|
1935
|
+
},
|
|
1936
|
+
});
|
|
1937
|
+
},
|
|
1938
|
+
handleWfCancel() {
|
|
1939
|
+
// 未进入提交就关闭 = 取消启动,回调通用 onCancel(一次性,避免多个弹框关闭重复触发)
|
|
1940
|
+
if (this.wfSubmitted) return;
|
|
1941
|
+
this.wfSubmitted = true;
|
|
1942
|
+
this.option && this.option.onCancel && this.option.onCancel();
|
|
1943
|
+
},
|
|
1944
|
+
close() {
|
|
1945
|
+
this.handleWfCancel();
|
|
1946
|
+
this.$emit("update:visible", false);
|
|
1947
|
+
},
|
|
1948
|
+
},
|
|
1949
|
+
watch: {
|
|
1950
|
+
showSetCandidateDialog2(val, oldVal) {
|
|
1951
|
+
// 候选人弹框未提交就关闭 = 取消启动
|
|
1952
|
+
if (oldVal && !val) this.handleWfCancel();
|
|
1953
|
+
},
|
|
1954
|
+
},
|
|
1955
|
+
};
|
|
1956
|
+
|
|
1957
|
+
wfModifyMixin = {
|
|
1958
|
+
name: "wfModifyMixin",
|
|
1959
|
+
props: {
|
|
1960
|
+
dataId: [String, Number],
|
|
1961
|
+
code: [String, Number],
|
|
1962
|
+
visible: Boolean,
|
|
1963
|
+
paramData: Object,
|
|
1964
|
+
parentVue: Object,
|
|
1965
|
+
wfInfo: Object,
|
|
1966
|
+
title: String,
|
|
1967
|
+
},
|
|
1968
|
+
data() {
|
|
1969
|
+
return {
|
|
1970
|
+
showModifyDialog: false,
|
|
1971
|
+
showBillEdit: false,
|
|
1972
|
+
content: "",
|
|
1973
|
+
};
|
|
1974
|
+
},
|
|
1975
|
+
async mounted() {
|
|
1976
|
+
this.openWfModifyDialog(this.code);
|
|
1977
|
+
},
|
|
1978
|
+
methods: {
|
|
1979
|
+
openWfModifyDialog() {
|
|
1980
|
+
let row = this.paramData;
|
|
1981
|
+
let url = row.url + ".vue";
|
|
1982
|
+
this.showModifyDialog = true;
|
|
1983
|
+
this.content = configUtil.requireView(url);
|
|
1984
|
+
this.$openEditView("showBillEdit");
|
|
1985
|
+
},
|
|
1986
|
+
modfyDialogClose() {
|
|
1987
|
+
this.showBillEdit = false;
|
|
1988
|
+
this.content = null;
|
|
1989
|
+
},
|
|
1990
|
+
refreshEdit() {
|
|
1991
|
+
this.showModifyDialog = false;
|
|
1992
|
+
this.parentVue.$baseReload();
|
|
1993
|
+
},
|
|
1994
|
+
},
|
|
1995
|
+
};
|
|
1996
|
+
|
|
1997
|
+
wfUrgingMixin = {
|
|
1998
|
+
props: ["visiable", "multi", "rows", "param", "current_prefix", "wfInfo"],
|
|
1999
|
+
mixins: [selectDialogMixins],
|
|
2000
|
+
created() {
|
|
2001
|
+
this.initSetting();
|
|
2002
|
+
},
|
|
2003
|
+
mounted() {
|
|
2004
|
+
this.initTableM1();
|
|
2005
|
+
},
|
|
2006
|
+
data() {
|
|
2007
|
+
return {
|
|
2008
|
+
showDialog: true,
|
|
2009
|
+
selectMulti: true,
|
|
2010
|
+
vxeOption: {},
|
|
2011
|
+
};
|
|
2012
|
+
},
|
|
2013
|
+
methods: {
|
|
2014
|
+
initTableM1() {
|
|
2015
|
+
var that = this;
|
|
2016
|
+
let tableOption = {
|
|
2017
|
+
vue: that,
|
|
2018
|
+
tableRef: "table-m1",
|
|
2019
|
+
tableName: "wf_urgingDialog-m1",
|
|
2020
|
+
path: this.current_prefix + "/wf/getTaskCandidates",
|
|
2021
|
+
param: () => {
|
|
2022
|
+
return { stringOne: this.wfInfo.uuid };
|
|
2023
|
+
},
|
|
2024
|
+
config: {
|
|
2025
|
+
checkboxConfig: {
|
|
2026
|
+
checkStrictly: true,
|
|
2027
|
+
showHeader: this.selectMulti,
|
|
2028
|
+
trigger: "row",
|
|
2029
|
+
},
|
|
2030
|
+
proxyConfig: {
|
|
2031
|
+
props: {
|
|
2032
|
+
result: "objx", // 配置响应结果列表字段
|
|
2033
|
+
total: "objx.length", // 配置响应结果总页数字段
|
|
2034
|
+
},
|
|
2035
|
+
},
|
|
2036
|
+
},
|
|
2037
|
+
columns: [
|
|
2038
|
+
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
2039
|
+
{
|
|
2040
|
+
title: this.$t2("催办人", "components.wf.urgingUser"),
|
|
2041
|
+
field: "name",
|
|
2042
|
+
width: 250,
|
|
2043
|
+
fixed: "left",
|
|
2044
|
+
},
|
|
2045
|
+
{
|
|
2046
|
+
title: this.$t2("催办人ID", "components.wf.urgingUserId"),
|
|
2047
|
+
field: "id",
|
|
2048
|
+
width: 150,
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
width: 47,
|
|
2052
|
+
fixed: "right",
|
|
2053
|
+
title: "",
|
|
2054
|
+
sortable: false,
|
|
2055
|
+
},
|
|
2056
|
+
],
|
|
2057
|
+
};
|
|
2058
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
2059
|
+
that.vxeOption = opts;
|
|
2060
|
+
});
|
|
2061
|
+
},
|
|
2062
|
+
dialogConfirm() {
|
|
2063
|
+
this.dialogPrimary();
|
|
2064
|
+
this.$emit("confirm");
|
|
2065
|
+
},
|
|
2066
|
+
subUrgingForm() {
|
|
2067
|
+
let that = this;
|
|
2068
|
+
let urgingUserIds = this.checkRows.map((checkRow) => checkRow.id);
|
|
2069
|
+
if (urgingUserIds.length == 0) {
|
|
2070
|
+
that.$message({
|
|
2071
|
+
message: this.$t2("请选择催办人", "components.wf.urgingWarnMsg1"),
|
|
2072
|
+
type: "error",
|
|
2073
|
+
duration: 2000,
|
|
2074
|
+
onClose: (t) => {},
|
|
2075
|
+
});
|
|
2076
|
+
return false;
|
|
2077
|
+
}
|
|
2078
|
+
that
|
|
2079
|
+
.$baseConfirm(
|
|
2080
|
+
this.$t2("您确定要催办吗?", "components.wf.urgingConfirmTip")
|
|
2081
|
+
)
|
|
2082
|
+
.then(() => {
|
|
2083
|
+
var data = JSON.stringify({
|
|
2084
|
+
uuid: this.wfInfo.uuid,
|
|
2085
|
+
taskId: this.wfInfo.taskId,
|
|
2086
|
+
notifyType: "wfUrging",
|
|
2087
|
+
userIds: urgingUserIds,
|
|
2088
|
+
});
|
|
2089
|
+
this.agreeDialogVisible = false;
|
|
2090
|
+
that.$http({
|
|
2091
|
+
url: this.current_prefix + "/wf/urging",
|
|
2092
|
+
data: data,
|
|
2093
|
+
method: "post",
|
|
2094
|
+
loadingTarget: document.body,
|
|
2095
|
+
headers: {
|
|
2096
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
2097
|
+
},
|
|
2098
|
+
isLoading: true,
|
|
2099
|
+
success: (resultMsg) => {
|
|
2100
|
+
that.$message({
|
|
2101
|
+
message: resultMsg.content,
|
|
2102
|
+
type: "success",
|
|
2103
|
+
duration: 500,
|
|
2104
|
+
onClose: (t) => {
|
|
2105
|
+
// this.reloadContent();
|
|
2106
|
+
this.dialogConfirm();
|
|
2107
|
+
},
|
|
2108
|
+
});
|
|
2109
|
+
},
|
|
2110
|
+
});
|
|
2111
|
+
});
|
|
2112
|
+
},
|
|
2113
|
+
},
|
|
2114
|
+
};
|
|
2115
|
+
|
|
2116
|
+
deleteTaskUserMixin = {
|
|
2117
|
+
props: ["visiable", "multi", "rows", "param", "current_prefix", "wfInfo"],
|
|
2118
|
+
mixins: [selectDialogMixins],
|
|
2119
|
+
created() {
|
|
2120
|
+
this.initSetting();
|
|
2121
|
+
},
|
|
2122
|
+
mounted() {
|
|
2123
|
+
this.initTableM1();
|
|
2124
|
+
},
|
|
2125
|
+
data() {
|
|
2126
|
+
return {
|
|
2127
|
+
showDialog: true,
|
|
2128
|
+
selectMulti: true,
|
|
2129
|
+
vxeOption: {},
|
|
2130
|
+
};
|
|
2131
|
+
},
|
|
2132
|
+
methods: {
|
|
2133
|
+
initTableM1() {
|
|
2134
|
+
var that = this;
|
|
2135
|
+
let tableOption = {
|
|
2136
|
+
vue: that,
|
|
2137
|
+
tableRef: "table-m1",
|
|
2138
|
+
tableName: "wf_deleteTaskUserDialog-m1",
|
|
2139
|
+
path: this.current_prefix + "/wf/getIncreaseSign",
|
|
2140
|
+
param: () => {
|
|
2141
|
+
return {
|
|
2142
|
+
uuid: this.wfInfo.uuid,
|
|
2143
|
+
taskId: this.wfInfo.taskId,
|
|
2144
|
+
};
|
|
2145
|
+
},
|
|
2146
|
+
config: {
|
|
2147
|
+
checkboxConfig: {
|
|
2148
|
+
checkStrictly: true,
|
|
2149
|
+
showHeader: this.selectMulti,
|
|
2150
|
+
trigger: "row",
|
|
2151
|
+
},
|
|
2152
|
+
proxyConfig: {
|
|
2153
|
+
props: {
|
|
2154
|
+
result: "objx", // 配置响应结果列表字段
|
|
2155
|
+
total: "objx.length", // 配置响应结果总页数字段
|
|
2156
|
+
},
|
|
2157
|
+
},
|
|
2158
|
+
},
|
|
2159
|
+
columns: [
|
|
2160
|
+
{ type: "checkbox", width: 50, resizable: false, fixed: "left" },
|
|
2161
|
+
{
|
|
2162
|
+
title: this.$t2("候选人", "components.wf.candidate"),
|
|
2163
|
+
field: "name",
|
|
2164
|
+
width: 250,
|
|
2165
|
+
fixed: "left",
|
|
2166
|
+
},
|
|
2167
|
+
{
|
|
2168
|
+
title: this.$t2("候选人ID", "components.wf.candidateId"),
|
|
2169
|
+
field: "id",
|
|
2170
|
+
width: 150,
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
width: 47,
|
|
2174
|
+
fixed: "right",
|
|
2175
|
+
title: "",
|
|
2176
|
+
sortable: false,
|
|
2177
|
+
},
|
|
2178
|
+
],
|
|
2179
|
+
};
|
|
2180
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
2181
|
+
that.vxeOption = opts;
|
|
2182
|
+
});
|
|
2183
|
+
},
|
|
2184
|
+
dialogConfirm() {
|
|
2185
|
+
this.dialogPrimary();
|
|
2186
|
+
// this.$emit("confirm");
|
|
2187
|
+
},
|
|
2188
|
+
subForm() {
|
|
2189
|
+
let that = this;
|
|
2190
|
+
let userIds = this.checkRows.map((checkRow) => checkRow.id);
|
|
2191
|
+
if (userIds.length == 0) {
|
|
2192
|
+
that.$message({
|
|
2193
|
+
message: this.$t2(
|
|
2194
|
+
"请选择候选人",
|
|
2195
|
+
"components.wf.deleteIncreaseSignWarnMsg1"
|
|
2196
|
+
),
|
|
2197
|
+
type: "error",
|
|
2198
|
+
duration: 2000,
|
|
2199
|
+
onClose: (t) => {},
|
|
2200
|
+
});
|
|
2201
|
+
return false;
|
|
2202
|
+
}
|
|
2203
|
+
that
|
|
2204
|
+
.$baseConfirm(
|
|
2205
|
+
this.$t2(
|
|
2206
|
+
"您确定要减签选中的候选人吗?",
|
|
2207
|
+
"components.wf.deleteIncreaseSignTip"
|
|
2208
|
+
)
|
|
2209
|
+
)
|
|
2210
|
+
.then(() => {
|
|
2211
|
+
var data = JSON.stringify({
|
|
2212
|
+
uuid: this.wfInfo.uuid,
|
|
2213
|
+
taskId: this.wfInfo.taskId,
|
|
2214
|
+
userIds: userIds,
|
|
2215
|
+
});
|
|
2216
|
+
this.agreeDialogVisible = false;
|
|
2217
|
+
that.$http({
|
|
2218
|
+
url: this.current_prefix + "/wf/deleteIncreaseSign",
|
|
2219
|
+
data: data,
|
|
2220
|
+
method: "post",
|
|
2221
|
+
loadingTarget: document.body,
|
|
2222
|
+
headers: {
|
|
2223
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
2224
|
+
},
|
|
2225
|
+
isLoading: true,
|
|
2226
|
+
success: (resultMsg) => {
|
|
2227
|
+
that.$message({
|
|
2228
|
+
message: resultMsg.content,
|
|
2229
|
+
type: "success",
|
|
2230
|
+
duration: 500,
|
|
2231
|
+
onClose: (t) => {
|
|
2232
|
+
this.dialogConfirm();
|
|
2233
|
+
},
|
|
2234
|
+
});
|
|
2235
|
+
},
|
|
2236
|
+
});
|
|
2237
|
+
});
|
|
2238
|
+
},
|
|
2239
|
+
},
|
|
2240
|
+
};
|
|
2241
|
+
|
|
2242
|
+
addTaskUserMixin = {
|
|
2243
|
+
props: ["visiable", "multi", "rows", "param", "current_prefix", "wfInfo"],
|
|
2244
|
+
mixins: [selectDialogMixins],
|
|
2245
|
+
data() {
|
|
2246
|
+
return {
|
|
2247
|
+
showDialog: true,
|
|
2248
|
+
selectMulti: true,
|
|
2249
|
+
vxeOption: {},
|
|
2250
|
+
};
|
|
2251
|
+
},
|
|
2252
|
+
created() {
|
|
2253
|
+
this.initSetting();
|
|
2254
|
+
},
|
|
2255
|
+
mounted() {
|
|
2256
|
+
this.initTableM1();
|
|
2257
|
+
},
|
|
2258
|
+
methods: {
|
|
2259
|
+
dialogConfirm() {
|
|
2260
|
+
this.dialogPrimary();
|
|
2261
|
+
// this.$emit('confirm');
|
|
2262
|
+
},
|
|
2263
|
+
subForm() {
|
|
2264
|
+
let that = this;
|
|
2265
|
+
let userIds = this.checkRows.map((checkRow) => checkRow.id);
|
|
2266
|
+
if (userIds.length == 0) {
|
|
2267
|
+
that.$message({
|
|
2268
|
+
message: this.$t2(
|
|
2269
|
+
"请选择候选人",
|
|
2270
|
+
"components.wf.addIncreaseSignWarnMsg1"
|
|
2271
|
+
),
|
|
2272
|
+
type: "error",
|
|
2273
|
+
duration: 2000,
|
|
2274
|
+
onClose: (t) => {},
|
|
2275
|
+
});
|
|
2276
|
+
return false;
|
|
2277
|
+
}
|
|
2278
|
+
that
|
|
2279
|
+
.$baseConfirm(
|
|
2280
|
+
this.$t2(
|
|
2281
|
+
"您确定要加签选中的候选人吗?",
|
|
2282
|
+
"components.wf.addIncreaseSignConfirmTip2"
|
|
2283
|
+
)
|
|
2284
|
+
)
|
|
2285
|
+
.then(() => {
|
|
2286
|
+
var data = JSON.stringify({
|
|
2287
|
+
uuid: this.wfInfo.uuid,
|
|
2288
|
+
taskId: this.wfInfo.taskId,
|
|
2289
|
+
userIds: userIds,
|
|
2290
|
+
});
|
|
2291
|
+
this.agreeDialogVisible = false;
|
|
2292
|
+
that.$http({
|
|
2293
|
+
url: this.current_prefix + "/wf/addIncreaseSign",
|
|
2294
|
+
data: data,
|
|
2295
|
+
method: "post",
|
|
2296
|
+
loadingTarget: document.body,
|
|
2297
|
+
headers: {
|
|
2298
|
+
"Content-Type": "application/json;charset=utf-8",
|
|
2299
|
+
},
|
|
2300
|
+
isLoading: true,
|
|
2301
|
+
success: (resultMsg) => {
|
|
2302
|
+
that.$message({
|
|
2303
|
+
message: resultMsg.content,
|
|
2304
|
+
type: "success",
|
|
2305
|
+
duration: 500,
|
|
2306
|
+
onClose: (t) => {
|
|
2307
|
+
this.dialogConfirm();
|
|
2308
|
+
},
|
|
2309
|
+
});
|
|
2310
|
+
},
|
|
2311
|
+
});
|
|
2312
|
+
});
|
|
2313
|
+
},
|
|
2314
|
+
},
|
|
2315
|
+
};
|
|
2316
|
+
|
|
2317
|
+
export {
|
|
2318
|
+
wfIndexMixin,
|
|
2319
|
+
wfStartMixin,
|
|
2320
|
+
wfContentMixin,
|
|
2321
|
+
wfModifyMixin,
|
|
2322
|
+
wfUrgingMixin,
|
|
2323
|
+
deleteTaskUserMixin,
|
|
2324
|
+
addTaskUserMixin,
|
|
2325
|
+
};
|