ui-process-h5 2.1.0-beta → 2.1.1-beta
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/README.md +204 -11
- package/package.json +25 -56
- package/v2/style.css +1 -0
- package/v2/ui-process-h5.js +9926 -0
- package/v2/ui-process-h5.umd.cjs +18 -0
- package/v2.7/style.css +1 -0
- package/v2.7/ui-process-h5.js +9303 -0
- package/v2.7/ui-process-h5.umd.cjs +18 -0
- package/v3/style.css +1 -0
- package/v3/ui-process-h5.js +6819 -0
- package/v3/ui-process-h5.umd.cjs +6 -0
- package/build/configure/README.md +0 -211
- package/build/configure/package.json +0 -32
- package/debug.js +0 -9
- package/index.html +0 -12
- package/src/App.vue +0 -233
- package/src/assets/font-icon/iconfont.scss +0 -57
- package/src/assets/font-icon/iconfont.ttf +0 -0
- package/src/assets/img/add-file.png +0 -0
- package/src/assets/img/arrow-right.png +0 -0
- package/src/assets/img/arrow.png +0 -0
- package/src/assets/img/check.png +0 -0
- package/src/assets/img/del.png +0 -0
- package/src/assets/img/doc.png +0 -0
- package/src/assets/img/file.png +0 -0
- package/src/assets/img/image.png +0 -0
- package/src/assets/img/pdf.png +0 -0
- package/src/assets/img/process.png +0 -0
- package/src/assets/img/xls.png +0 -0
- package/src/assets/img/zip.png +0 -0
- package/src/assets/js/auth.js +0 -65
- package/src/assets/js/errorCode.js +0 -6
- package/src/assets/js/message.js +0 -352
- package/src/assets/js/request.js +0 -99
- package/src/assets/js/toast.js +0 -239
- package/src/assets/js/top.js +0 -229
- package/src/assets/js/utils.js +0 -83
- package/src/assets/js/vuePopper.js +0 -123
- package/src/assets/query.png +0 -0
- package/src/assets/status/check.png +0 -0
- package/src/assets/status/del.png +0 -0
- package/src/assets/status/error.png +0 -0
- package/src/assets/status/loading.png +0 -0
- package/src/assets/status/success.png +0 -0
- package/src/main.js +0 -17
- package/src/packages/attchUpload/index.js +0 -375
- package/src/packages/attchUpload/index.scss +0 -143
- package/src/packages/attchUpload/index.vue +0 -173
- package/src/packages/downSelect/index.js +0 -119
- package/src/packages/downSelect/index.scss +0 -88
- package/src/packages/downSelect/index.vue +0 -62
- package/src/packages/index.js +0 -6
- package/src/packages/popup/index.js +0 -125
- package/src/packages/popup/index.scss +0 -178
- package/src/packages/popup/index.vue +0 -80
- package/src/packages/preview/index.js +0 -40
- package/src/packages/preview/index.vue +0 -15
- package/src/packages/previewImage/index.js +0 -286
- package/src/packages/previewImage/index.scss +0 -76
- package/src/packages/previewImage/index.vue +0 -53
- package/src/packages/process/index.js +0 -1016
- package/src/packages/process/index.scss +0 -188
- package/src/packages/process/index.vue +0 -291
- package/src/packages/process/operation/backNode.vue +0 -396
- package/src/packages/process/operation/cancel.vue +0 -425
- package/src/packages/process/operation/ccTask.vue +0 -256
- package/src/packages/process/operation/complete.vue +0 -1384
- package/src/packages/process/operation/counterSign.vue +0 -498
- package/src/packages/process/operation/delegateTask.vue +0 -493
- package/src/packages/process/operation/index.js +0 -8
- package/src/packages/process/operation/index.scss +0 -212
- package/src/packages/process/operation/msgList.vue +0 -174
- package/src/packages/process/operation/treeNode.vue +0 -901
- package/src/packages/process/operation/treePerson.vue +0 -304
- package/src/packages/submitPopup/index.js +0 -708
- package/src/packages/submitPopup/index.scss +0 -190
- package/src/packages/submitPopup/index.vue +0 -125
- package/src/packages/tab/index.js +0 -236
- package/src/packages/tab/index.scss +0 -177
- package/src/packages/tab/index.vue +0 -155
- package/src/packages/tip/index.js +0 -80
- package/src/packages/tip/index.scss +0 -121
- package/src/packages/tip/index.vue +0 -57
- package/src/packages/viewAttchList/index.js +0 -138
- package/src/packages/viewAttchList/index.scss +0 -76
- package/src/packages/viewAttchList/index.vue +0 -121
- package/src/style.css +0 -80
- package/vite.config.ts +0 -118
- /package/{build/scripts → scripts}/postinstall.mjs +0 -0
- /package/{build/scripts → scripts}/switch-cli.mjs +0 -0
- /package/{build/scripts → scripts}/utils.mjs +0 -0
|
@@ -1,708 +0,0 @@
|
|
|
1
|
-
import { defineComponent } from "vue-demi";
|
|
2
|
-
import TopPopup from "../popup/index.vue";
|
|
3
|
-
import TopDownSelect from "../downSelect/index.vue";
|
|
4
|
-
import PreviewImage from "../previewImage/index.vue";
|
|
5
|
-
import { departPerson } from "checked-pick-app";
|
|
6
|
-
import TopTips from "../tip/index.vue";
|
|
7
|
-
import processImg from "../../assets/img/process.png";
|
|
8
|
-
|
|
9
|
-
export default defineComponent({
|
|
10
|
-
name: "TopSubmitPopup",
|
|
11
|
-
components: {
|
|
12
|
-
TopPopup,
|
|
13
|
-
TopDownSelect,
|
|
14
|
-
PreviewImage,
|
|
15
|
-
departPerson,
|
|
16
|
-
TopTips,
|
|
17
|
-
},
|
|
18
|
-
props: {
|
|
19
|
-
// isCheckType
|
|
20
|
-
isCheckType: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: "0",
|
|
23
|
-
},
|
|
24
|
-
visible: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
|
-
// 请求
|
|
29
|
-
request: {
|
|
30
|
-
type: [Function, Object],
|
|
31
|
-
default: () => {
|
|
32
|
-
return { get: () => { }, post: () => { }, upload: () => { } };
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
// appid
|
|
36
|
-
appId: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "",
|
|
39
|
-
},
|
|
40
|
-
// 区分
|
|
41
|
-
processName: {
|
|
42
|
-
type: String,
|
|
43
|
-
default: "",
|
|
44
|
-
},
|
|
45
|
-
// 是否为重新提交
|
|
46
|
-
resubmit: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
// 业务id
|
|
51
|
-
id: {
|
|
52
|
-
type: String,
|
|
53
|
-
default: "",
|
|
54
|
-
},
|
|
55
|
-
// 业务
|
|
56
|
-
businessType: {
|
|
57
|
-
type: [String, Number],
|
|
58
|
-
},
|
|
59
|
-
// todoParameter
|
|
60
|
-
todoParameter: {
|
|
61
|
-
type: Object,
|
|
62
|
-
default() {
|
|
63
|
-
return {};
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
// 是否清除送审记录
|
|
67
|
-
isClearHistory: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: false,
|
|
70
|
-
},
|
|
71
|
-
// title
|
|
72
|
-
title: {
|
|
73
|
-
type: String,
|
|
74
|
-
default: "测试",
|
|
75
|
-
},
|
|
76
|
-
// 送审
|
|
77
|
-
showType: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: "all",
|
|
80
|
-
},
|
|
81
|
-
beforeFunction: {
|
|
82
|
-
type: Function,
|
|
83
|
-
default: null,
|
|
84
|
-
},
|
|
85
|
-
manual: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: false,
|
|
88
|
-
},
|
|
89
|
-
// 自定义参数列表
|
|
90
|
-
selfList: {
|
|
91
|
-
type: Array,
|
|
92
|
-
default: () => [],
|
|
93
|
-
},
|
|
94
|
-
//
|
|
95
|
-
//isorgType
|
|
96
|
-
isOrgType: {
|
|
97
|
-
type: Array,
|
|
98
|
-
default: () => [0],
|
|
99
|
-
},
|
|
100
|
-
isCodeType: {
|
|
101
|
-
type: Array,
|
|
102
|
-
default: () => [3],
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
data() {
|
|
106
|
-
return {
|
|
107
|
-
show: false,
|
|
108
|
-
option: [],
|
|
109
|
-
checkedItem: {},
|
|
110
|
-
personList: [],
|
|
111
|
-
trackUrl: [],
|
|
112
|
-
taskurlshow: false,
|
|
113
|
-
isStyle: "width:35%",
|
|
114
|
-
visiblePerson: false,
|
|
115
|
-
entity: {
|
|
116
|
-
source: "0",
|
|
117
|
-
type: this.isCheckType || "0",
|
|
118
|
-
orgType: this.isOrgType || [0],
|
|
119
|
-
request: this.request, //'http://59.53.91.231:2100' 0002
|
|
120
|
-
/* businessId: this.businessKey, */
|
|
121
|
-
codeType: this.isCodeType || [3], // 可选类型 1-主体 2-部门 3-人员
|
|
122
|
-
multiple: false, // 是否多选
|
|
123
|
-
checkedArray: [],
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
multiNodeParticipant: {},
|
|
127
|
-
personListCopy: {},
|
|
128
|
-
partNode: {},
|
|
129
|
-
personObjId: "",
|
|
130
|
-
|
|
131
|
-
// 流程id
|
|
132
|
-
processId: "",
|
|
133
|
-
|
|
134
|
-
// 提示弹窗
|
|
135
|
-
textTips: "",
|
|
136
|
-
statusTips: false,
|
|
137
|
-
typeTips: "success",
|
|
138
|
-
firstPerson: [],
|
|
139
|
-
selectDefaultValue: "",
|
|
140
|
-
|
|
141
|
-
// 监听复制
|
|
142
|
-
businessTypeData: "",
|
|
143
|
-
idData: "",
|
|
144
|
-
processNameData: "",
|
|
145
|
-
titleData: "",
|
|
146
|
-
todoParameterData: {},
|
|
147
|
-
|
|
148
|
-
humanPerformerName: "",
|
|
149
|
-
btnLoading: false,
|
|
150
|
-
};
|
|
151
|
-
},
|
|
152
|
-
watch: {
|
|
153
|
-
visible: {
|
|
154
|
-
async handler(val, preVal) {
|
|
155
|
-
this.show = val;
|
|
156
|
-
this.$emit("update:visible", this.show);
|
|
157
|
-
if (val) {
|
|
158
|
-
this.handleOption();
|
|
159
|
-
} else {
|
|
160
|
-
this.$refs.TopDownSelect.handleClose();
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
show: {
|
|
165
|
-
handler(val, preVal) {
|
|
166
|
-
if (!val) {
|
|
167
|
-
this.$refs.TopDownSelect.handleClose();
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
// 业务类型
|
|
172
|
-
businessType: {
|
|
173
|
-
handler(val, preVal) {
|
|
174
|
-
this.businessTypeData = val;
|
|
175
|
-
},
|
|
176
|
-
immediate: true,
|
|
177
|
-
},
|
|
178
|
-
// 业务id
|
|
179
|
-
id: {
|
|
180
|
-
handler(val, preVal) {
|
|
181
|
-
if (val) {
|
|
182
|
-
this.idData = val;
|
|
183
|
-
this.getProcessInstance();
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
immediate: true,
|
|
187
|
-
},
|
|
188
|
-
// 业务查询
|
|
189
|
-
processName: {
|
|
190
|
-
handler(val, preVal) {
|
|
191
|
-
this.processNameData = val;
|
|
192
|
-
},
|
|
193
|
-
immediate: true,
|
|
194
|
-
},
|
|
195
|
-
// 标题
|
|
196
|
-
title: {
|
|
197
|
-
handler(val, preVal) {
|
|
198
|
-
this.titleData = val;
|
|
199
|
-
},
|
|
200
|
-
immediate: true,
|
|
201
|
-
},
|
|
202
|
-
//
|
|
203
|
-
todoParameter: {
|
|
204
|
-
handler(val, preVal) {
|
|
205
|
-
this.todoParameterData = val;
|
|
206
|
-
},
|
|
207
|
-
immediate: true,
|
|
208
|
-
deep: true,
|
|
209
|
-
},
|
|
210
|
-
// 自定义流程选择
|
|
211
|
-
selfList: {
|
|
212
|
-
handler(val, preVal) {
|
|
213
|
-
if (val && val.length) {
|
|
214
|
-
this.option = val;
|
|
215
|
-
this.checkedItem = this.option[0];
|
|
216
|
-
this.selectDefaultValue = this.checkedItem.id;
|
|
217
|
-
this.$emit("change", this.checkedItem, this.option);
|
|
218
|
-
this.handlefirstNode(this.checkedItem.id);
|
|
219
|
-
this.getDiagramUrl();
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
immediate: true,
|
|
223
|
-
deep: true,
|
|
224
|
-
},
|
|
225
|
-
resubmit: {
|
|
226
|
-
handler(val, preVal) {
|
|
227
|
-
if (val) {
|
|
228
|
-
this.getProcessInstance();
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
},
|
|
233
|
-
|
|
234
|
-
computed: {
|
|
235
|
-
ProcessImg() {
|
|
236
|
-
return processImg;
|
|
237
|
-
},
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
methods: {
|
|
241
|
-
handleSelect() {
|
|
242
|
-
this.$refs.TopDownSelect.handleExpand();
|
|
243
|
-
},
|
|
244
|
-
async handleOption() {
|
|
245
|
-
// 流程列表 getProcessInstanceByBusinessKey
|
|
246
|
-
this.checkedItem = {};
|
|
247
|
-
this.firstPerson = [];
|
|
248
|
-
this.personList = [];
|
|
249
|
-
|
|
250
|
-
if (this.selfList && this.selfList.length) {
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
this.handleTips("", true, "loading");
|
|
255
|
-
await this.request
|
|
256
|
-
.get("/aws/repository/getProcessDefList", {
|
|
257
|
-
params: {
|
|
258
|
-
appId: this.appId,
|
|
259
|
-
processGroupName: this.processNameData,
|
|
260
|
-
},
|
|
261
|
-
})
|
|
262
|
-
.then((res) => {
|
|
263
|
-
if (res.code == 200) {
|
|
264
|
-
this.option = res.data;
|
|
265
|
-
if (res.data && res.data.length) {
|
|
266
|
-
this.handleTips("", false, "success");
|
|
267
|
-
this.checkedItem = this.option[0];
|
|
268
|
-
this.selectDefaultValue = this.checkedItem.id;
|
|
269
|
-
this.$emit("change", this.checkedItem, this.option);
|
|
270
|
-
this.handlefirstNode(this.checkedItem.id);
|
|
271
|
-
this.getProcessInstance();
|
|
272
|
-
this.getDiagramUrl();
|
|
273
|
-
} else {
|
|
274
|
-
this.handleTips("暂无流程节点信息", true, "error");
|
|
275
|
-
this.option = [];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
},
|
|
280
|
-
|
|
281
|
-
async getProcessInstance() {
|
|
282
|
-
if (this.id) {
|
|
283
|
-
await this.request
|
|
284
|
-
.get("/aws/pis/getProcessInstanceByBusinessKey", {
|
|
285
|
-
params: { businessKey: this.id },
|
|
286
|
-
})
|
|
287
|
-
.then((res) => {
|
|
288
|
-
if (res.code == 200) {
|
|
289
|
-
this.processId = res.data.id;
|
|
290
|
-
if (this.processId) {
|
|
291
|
-
this.option.map((v, i) => {
|
|
292
|
-
// console.log("sc:::", v , res.data);
|
|
293
|
-
if (v.id === res.data.processDefId) {
|
|
294
|
-
this.checkedItem = v;
|
|
295
|
-
this.selectDefaultValue = this.checkedItem.id;
|
|
296
|
-
this.$emit(
|
|
297
|
-
"change",
|
|
298
|
-
this.checkedItem,
|
|
299
|
-
this.option
|
|
300
|
-
);
|
|
301
|
-
this.handlefirstNode(
|
|
302
|
-
this.checkedItem.id
|
|
303
|
-
);
|
|
304
|
-
this.getDiagramUrl();
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
async handlefirstNode(data) {
|
|
313
|
-
// 第一个流程节点
|
|
314
|
-
if (data) {
|
|
315
|
-
this.handleTips("", true, "loading");
|
|
316
|
-
await this.request
|
|
317
|
-
.get("/aws/repository/getFirstProcessNode", {
|
|
318
|
-
params: {
|
|
319
|
-
processDefId: data,
|
|
320
|
-
},
|
|
321
|
-
})
|
|
322
|
-
.then((res) => {
|
|
323
|
-
// console.log("getFirstProcessNode", res);
|
|
324
|
-
if (res.code === 200) {
|
|
325
|
-
this.firstPerson = res.data;
|
|
326
|
-
this.getAfferentParticipantNodeList();
|
|
327
|
-
} else {
|
|
328
|
-
this.firstPerson = [];
|
|
329
|
-
this.getAfferentParticipantNodeList();
|
|
330
|
-
}
|
|
331
|
-
})
|
|
332
|
-
.catch((error) => {
|
|
333
|
-
this.firstPerson = [];
|
|
334
|
-
this.getAfferentParticipantNodeList();
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
async handleChange(item, items) {
|
|
339
|
-
this.handleTips("", true, "loading");
|
|
340
|
-
this.checkedItem = {};
|
|
341
|
-
this.firstPerson = [];
|
|
342
|
-
this.personList = [];
|
|
343
|
-
// console.log("当前选择::::", item, items);
|
|
344
|
-
this.checkedItem = item;
|
|
345
|
-
this.handlefirstNode(this.checkedItem.id);
|
|
346
|
-
this.getDiagramUrl();
|
|
347
|
-
this.$emit("change", item, items);
|
|
348
|
-
},
|
|
349
|
-
// 获取当前流程下所有节点
|
|
350
|
-
async getAfferentParticipantNodeList() {
|
|
351
|
-
await this.request
|
|
352
|
-
.get("/aws/repository/getAfferentParticipantNodeList", {
|
|
353
|
-
params: {
|
|
354
|
-
processDefId: this.checkedItem.id,
|
|
355
|
-
},
|
|
356
|
-
})
|
|
357
|
-
.then((res) => {
|
|
358
|
-
if (res.code == 200) {
|
|
359
|
-
if (this.firstPerson && this.firstPerson.length) {
|
|
360
|
-
// console.log(
|
|
361
|
-
// "选中节点L::",
|
|
362
|
-
// this.personList,
|
|
363
|
-
// this.firstPerson
|
|
364
|
-
// );
|
|
365
|
-
this.personList = res.data.filter(
|
|
366
|
-
(item) =>
|
|
367
|
-
!this.firstPerson.some(
|
|
368
|
-
(item2) => item2.id == item.id
|
|
369
|
-
)
|
|
370
|
-
);
|
|
371
|
-
}
|
|
372
|
-
this.$emit("change", this.checkedItem, this.option);
|
|
373
|
-
}
|
|
374
|
-
this.$refs.topTips.handleClose();
|
|
375
|
-
});
|
|
376
|
-
},
|
|
377
|
-
// 获取流程图
|
|
378
|
-
getDiagramUrl() {
|
|
379
|
-
this.request
|
|
380
|
-
.get("/aws/repository/getDiagramUrl", {
|
|
381
|
-
params: {
|
|
382
|
-
processDefId: this.checkedItem.id,
|
|
383
|
-
diagramType: 1,
|
|
384
|
-
type: "pc",
|
|
385
|
-
},
|
|
386
|
-
})
|
|
387
|
-
.then((res) => {
|
|
388
|
-
if (res.code == 200) {
|
|
389
|
-
this.trackUrl = [res.data];
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
},
|
|
393
|
-
// 呼出选人
|
|
394
|
-
handleOpenPerson(item) {
|
|
395
|
-
// console.log("选人弹窗", item);
|
|
396
|
-
this.visiblePerson = true;
|
|
397
|
-
this.personObjId = item.id;
|
|
398
|
-
this.humanPerformerName = item.humanPerformerName;
|
|
399
|
-
if (item.humanPerformerName === "任意指定") {
|
|
400
|
-
this.entity = {
|
|
401
|
-
source: "1",
|
|
402
|
-
type: this.isCheckType || "0",
|
|
403
|
-
orgType: this.isOrgType || [0],
|
|
404
|
-
request: this.request,
|
|
405
|
-
codeType: this.isCodeType || [3],
|
|
406
|
-
multiple: item.loopCardinality != 1,
|
|
407
|
-
maxMultiple:
|
|
408
|
-
item.loopCardinality > 0 ? item.loopCardinality : 0,
|
|
409
|
-
checkedArray: [],
|
|
410
|
-
};
|
|
411
|
-
// console.log(this.multiNodeParticipant[item.id]);
|
|
412
|
-
if (
|
|
413
|
-
!(
|
|
414
|
-
this.multiNodeParticipant[item.id] &&
|
|
415
|
-
this.multiNodeParticipant[item.id].length
|
|
416
|
-
)
|
|
417
|
-
) {
|
|
418
|
-
this.entity.checkedArray = [];
|
|
419
|
-
} else {
|
|
420
|
-
this.entity.checkedArray = this.personListCopy[item.id].map(
|
|
421
|
-
(e) => ({
|
|
422
|
-
uid: e.uid,
|
|
423
|
-
type: e.type,
|
|
424
|
-
deptId: this.handleLastStr(
|
|
425
|
-
e.ancestors,
|
|
426
|
-
e.subjectId
|
|
427
|
-
),
|
|
428
|
-
})
|
|
429
|
-
);
|
|
430
|
-
}
|
|
431
|
-
} else if (item.humanPerformerName === "固定部门") {
|
|
432
|
-
let deptCode;
|
|
433
|
-
let deptCodeArray = [];
|
|
434
|
-
|
|
435
|
-
if (
|
|
436
|
-
item.routeTxt.departmentIds &&
|
|
437
|
-
item.routeTxt.departmentIds.length > 1
|
|
438
|
-
) {
|
|
439
|
-
item.routeTxt.departmentIds.forEach((v, i) => {
|
|
440
|
-
deptCodeArray.push(v.rangeId);
|
|
441
|
-
// deptCode = v.rangeId;
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
this.entity = {
|
|
445
|
-
source: "1",
|
|
446
|
-
type: this.isCheckType || "0",
|
|
447
|
-
orgType: this.isOrgType || "0",
|
|
448
|
-
request: this.request,
|
|
449
|
-
codeType: this.isCodeType || [3],
|
|
450
|
-
deptCodeArray: deptCodeArray,
|
|
451
|
-
// deptCode: deptCode,
|
|
452
|
-
multiple: item.loopCardinality != 1,
|
|
453
|
-
maxMultiple:
|
|
454
|
-
item.loopCardinality > 0 ? item.loopCardinality : 0,
|
|
455
|
-
};
|
|
456
|
-
} else if (
|
|
457
|
-
item.routeTxt.departmentIds &&
|
|
458
|
-
item.routeTxt.departmentIds.length == 1
|
|
459
|
-
) {
|
|
460
|
-
item.routeTxt.departmentIds.forEach((v, i) => {
|
|
461
|
-
deptCode = v.rangeId;
|
|
462
|
-
});
|
|
463
|
-
|
|
464
|
-
this.entity = {
|
|
465
|
-
source: "1",
|
|
466
|
-
type: this.isCheckType || "0",
|
|
467
|
-
orgType: this.isOrgType || "0",
|
|
468
|
-
request: this.request,
|
|
469
|
-
codeType: this.isCodeType || [3],
|
|
470
|
-
deptCode: deptCode,
|
|
471
|
-
multiple: item.loopCardinality != 1,
|
|
472
|
-
maxMultiple:
|
|
473
|
-
item.loopCardinality > 0 ? item.loopCardinality : 0,
|
|
474
|
-
};
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
if (
|
|
478
|
-
!(
|
|
479
|
-
this.multiNodeParticipant[item.id] &&
|
|
480
|
-
this.multiNodeParticipant[item.id].length
|
|
481
|
-
)
|
|
482
|
-
) {
|
|
483
|
-
this.entity.checkedArray = [];
|
|
484
|
-
} else {
|
|
485
|
-
this.entity.checkedArray = this.personListCopy[item.id].map(
|
|
486
|
-
(e) => ({
|
|
487
|
-
uid: e.uid,
|
|
488
|
-
type: e.type,
|
|
489
|
-
deptId: deptCode,
|
|
490
|
-
})
|
|
491
|
-
);
|
|
492
|
-
}
|
|
493
|
-
} else if (item.humanPerformerName === "固定单位") {
|
|
494
|
-
let subjectName;
|
|
495
|
-
|
|
496
|
-
item.routeTxt.companyIds.map((v, i) => {
|
|
497
|
-
subjectName = v.name;
|
|
498
|
-
});
|
|
499
|
-
|
|
500
|
-
this.entity = {
|
|
501
|
-
source: "1",
|
|
502
|
-
type: this.isCheckType || "0",
|
|
503
|
-
orgType: this.isOrgType || "0",
|
|
504
|
-
request: this.request,
|
|
505
|
-
codeType: this.isCodeType || [3],
|
|
506
|
-
multiple: item.loopCardinality != 1,
|
|
507
|
-
maxMultiple:
|
|
508
|
-
item.loopCardinality > 0 ? item.loopCardinality : 0,
|
|
509
|
-
subjectName: subjectName,
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
if (
|
|
513
|
-
!(
|
|
514
|
-
this.multiNodeParticipant[item.id] &&
|
|
515
|
-
this.multiNodeParticipant[item.id].length
|
|
516
|
-
)
|
|
517
|
-
) {
|
|
518
|
-
this.entity.checkedArray = [];
|
|
519
|
-
} else {
|
|
520
|
-
this.entity.checkedArray = this.personListCopy[item.id].map(
|
|
521
|
-
(e) => ({
|
|
522
|
-
uid: e.uid,
|
|
523
|
-
type: e.type,
|
|
524
|
-
deptId: this.handleLastStr(
|
|
525
|
-
e.ancestors,
|
|
526
|
-
e.subjectId
|
|
527
|
-
),
|
|
528
|
-
subjectName: e.ancestorNames.slice(
|
|
529
|
-
0,
|
|
530
|
-
e.ancestorNames.indexOf("/")
|
|
531
|
-
),
|
|
532
|
-
})
|
|
533
|
-
);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
},
|
|
537
|
-
handleCallback(res) {
|
|
538
|
-
// console.log("参数::::", res);
|
|
539
|
-
this.personListCopy[this.personObjId] = res;
|
|
540
|
-
this.entity.checkedArray = res.map((e) => ({
|
|
541
|
-
uid: e.uid,
|
|
542
|
-
type: e.type,
|
|
543
|
-
deptId: this.handleLastStr(e.ancestors, e.subjectId),
|
|
544
|
-
subjectName:
|
|
545
|
-
this.humanPerformerName === "固定单位"
|
|
546
|
-
? e.ancestorNames.slice(0, e.ancestorNames.indexOf("/"))
|
|
547
|
-
: "",
|
|
548
|
-
}));
|
|
549
|
-
|
|
550
|
-
this.multiNodeParticipant[this.personObjId] = [];
|
|
551
|
-
this.partNode[this.personObjId] = [];
|
|
552
|
-
res.map((v, i) => {
|
|
553
|
-
this.multiNodeParticipant[this.personObjId].push(v.uid);
|
|
554
|
-
this.partNode[this.personObjId].push(v.name);
|
|
555
|
-
});
|
|
556
|
-
this.visiblePerson = false;
|
|
557
|
-
// console.log("callback_OK", res, this.multiNodeParticipant);
|
|
558
|
-
},
|
|
559
|
-
handleCancel() {
|
|
560
|
-
// console.log("cancel_No");
|
|
561
|
-
},
|
|
562
|
-
handleLastStr(str, subjectId) {
|
|
563
|
-
return str.split(",")[str.split(",").length - 1] !== subjectId
|
|
564
|
-
? str.split(",")[str.split(",").length - 1]
|
|
565
|
-
: "";
|
|
566
|
-
},
|
|
567
|
-
async handleSumbit() {
|
|
568
|
-
if (this.btnLoading) {
|
|
569
|
-
return;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
this.btnLoading = true;
|
|
573
|
-
// 验证
|
|
574
|
-
if (
|
|
575
|
-
this.firstPerson &&
|
|
576
|
-
this.firstPerson.length &&
|
|
577
|
-
!this.firstPerson[0].routeTxt.userNames &&
|
|
578
|
-
this.firstPerson[0].humanPerformerName !== "固定账户" &&
|
|
579
|
-
this.firstPerson[0].humanPerformerName !== "与流程申请人相关" &&
|
|
580
|
-
(!this.multiNodeParticipant[this.firstPerson[0].id] ||
|
|
581
|
-
!this.multiNodeParticipant[this.firstPerson[0].id].length)
|
|
582
|
-
) {
|
|
583
|
-
this.handleTips(
|
|
584
|
-
`${this.firstPerson[0].name}节点未选择审批人`,
|
|
585
|
-
true,
|
|
586
|
-
"error"
|
|
587
|
-
);
|
|
588
|
-
this.btnLoading = false;
|
|
589
|
-
return;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
// 送审前执行事件
|
|
593
|
-
if (this.beforeFunction) {
|
|
594
|
-
await this.beforeFunction();
|
|
595
|
-
if (this.manual) {
|
|
596
|
-
this.btnLoading = false;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
if (!this.manual) {
|
|
600
|
-
this.$nextTick(async () => {
|
|
601
|
-
await this.handleSongshen();
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
},
|
|
605
|
-
handleSongshen() {
|
|
606
|
-
// 送审
|
|
607
|
-
this.btnLoading = true;
|
|
608
|
-
if (this.resubmit) {
|
|
609
|
-
// console.log("送审重新提交", this.multiNodeParticipant);
|
|
610
|
-
this.handleTips("", true, "loading");
|
|
611
|
-
this.request
|
|
612
|
-
.post("/aws/pis/reactivate", {
|
|
613
|
-
processInstId: this.processId,
|
|
614
|
-
isClearHistory: this.isClearHistory,
|
|
615
|
-
reactivateReason: "重新提交",
|
|
616
|
-
multiNodeParticipant: this.multiNodeParticipant,
|
|
617
|
-
})
|
|
618
|
-
.then((res) => {
|
|
619
|
-
if (res.code == 200) {
|
|
620
|
-
this.show = false;
|
|
621
|
-
this.$emit("update:visible", this.show);
|
|
622
|
-
this.handleTips("提交成功!", false, "success");
|
|
623
|
-
this.$emit("successFn");
|
|
624
|
-
this.btnLoading = false;
|
|
625
|
-
} else {
|
|
626
|
-
this.handleTips(res.msg, true, "error");
|
|
627
|
-
this.btnLoading = false;
|
|
628
|
-
}
|
|
629
|
-
})
|
|
630
|
-
.catch((error) => {
|
|
631
|
-
this.handleTips(error.msg, true, "error");
|
|
632
|
-
this.btnLoading = false;
|
|
633
|
-
});
|
|
634
|
-
} else {
|
|
635
|
-
this.handleTips("", true, "loading");
|
|
636
|
-
let params = {
|
|
637
|
-
title: this.titleData,
|
|
638
|
-
processDefId: this.checkedItem.id,
|
|
639
|
-
processBusinessKey: this.idData,
|
|
640
|
-
showType: this.showType,
|
|
641
|
-
businessType: this.businessTypeData,
|
|
642
|
-
multiNodeParticipant: this.multiNodeParticipant,
|
|
643
|
-
todoParameter: this.todoParameterData,
|
|
644
|
-
};
|
|
645
|
-
if (!this.checkedItem.id) {
|
|
646
|
-
this.$refs.topTips.handleClose();
|
|
647
|
-
this.btnLoading = false;
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
this.request
|
|
651
|
-
.post("/aws/pis/createAndStart", params)
|
|
652
|
-
.then((res) => {
|
|
653
|
-
if (res.code === 200) {
|
|
654
|
-
this.show = false;
|
|
655
|
-
this.$emit("update:visible", this.show);
|
|
656
|
-
this.handleTips("提交成功!", false, "success");
|
|
657
|
-
this.$emit("successFn");
|
|
658
|
-
this.btnLoading = false;
|
|
659
|
-
} else if (res.code == 499) {
|
|
660
|
-
this.request
|
|
661
|
-
.post("/aws/pis/reactivate", {
|
|
662
|
-
processInstId: this.processId,
|
|
663
|
-
isClearHistory: this.isClearHistory,
|
|
664
|
-
reactivateReason: "重新提交",
|
|
665
|
-
multiNodeParticipant: this
|
|
666
|
-
.multiNodeParticipant,
|
|
667
|
-
})
|
|
668
|
-
.then((res) => {
|
|
669
|
-
if (res.code == 200) {
|
|
670
|
-
this.show = false;
|
|
671
|
-
this.$emit("update:visible", this.show);
|
|
672
|
-
this.handleTips(
|
|
673
|
-
"提交成功!",
|
|
674
|
-
false,
|
|
675
|
-
"success"
|
|
676
|
-
);
|
|
677
|
-
this.$emit("successFn");
|
|
678
|
-
this.btnLoading = false;
|
|
679
|
-
} else {
|
|
680
|
-
this.handleTips(res.msg, true, "error");
|
|
681
|
-
this.btnLoading = false;
|
|
682
|
-
}
|
|
683
|
-
})
|
|
684
|
-
.catch((error) => {
|
|
685
|
-
this.handleTips(error.msg, true, "error");
|
|
686
|
-
this.btnLoading = false;
|
|
687
|
-
});
|
|
688
|
-
} else {
|
|
689
|
-
this.handleTips(res.msg, true, "error");
|
|
690
|
-
this.btnLoading = false;
|
|
691
|
-
}
|
|
692
|
-
})
|
|
693
|
-
.catch((error) => {
|
|
694
|
-
this.handleTips(error.msg, true, "error");
|
|
695
|
-
this.btnLoading = false;
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
},
|
|
699
|
-
handleTips(text, status, type) {
|
|
700
|
-
this.textTips = text;
|
|
701
|
-
this.statusTips = status;
|
|
702
|
-
this.typeTips = type;
|
|
703
|
-
if (this.$refs.topTips) {
|
|
704
|
-
this.$refs.topTips.handleOpen();
|
|
705
|
-
}
|
|
706
|
-
},
|
|
707
|
-
},
|
|
708
|
-
});
|