ui-process-h5 0.1.36 → 1.0.1

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.
Files changed (92) hide show
  1. package/build/configure/README.md +212 -0
  2. package/build/configure/package.json +28 -0
  3. package/build/scripts/postinstall.mjs +14 -0
  4. package/build/scripts/switch-cli.mjs +4 -0
  5. package/build/scripts/utils.mjs +60 -0
  6. package/index.html +12 -0
  7. package/package.json +51 -20
  8. package/src/App.vue +222 -0
  9. package/src/assets/font-icon/iconfont.scss +57 -0
  10. package/src/assets/font-icon/iconfont.ttf +0 -0
  11. package/src/assets/img/arrow-right.png +0 -0
  12. package/src/assets/img/arrow.png +0 -0
  13. package/src/assets/img/check.png +0 -0
  14. package/src/assets/js/auth.js +65 -0
  15. package/src/assets/js/errorCode.js +6 -0
  16. package/src/assets/js/message.js +352 -0
  17. package/src/assets/js/request.js +99 -0
  18. package/src/assets/js/toast.js +239 -0
  19. package/src/assets/js/top.js +229 -0
  20. package/src/assets/js/utils.js +83 -0
  21. package/src/assets/js/vuePopper.js +123 -0
  22. package/src/assets/query.png +0 -0
  23. package/src/assets/status/check.png +0 -0
  24. package/src/assets/status/del.png +0 -0
  25. package/src/main.js +17 -0
  26. package/src/packages/attchUpload/index.js +374 -0
  27. package/src/packages/attchUpload/index.scss +143 -0
  28. package/src/packages/attchUpload/index.vue +173 -0
  29. package/src/packages/downSelect/index.js +99 -0
  30. package/src/packages/downSelect/index.scss +86 -0
  31. package/src/packages/downSelect/index.vue +57 -0
  32. package/src/packages/index.js +6 -0
  33. package/src/packages/popup/index.js +73 -0
  34. package/src/packages/popup/index.scss +173 -0
  35. package/src/packages/popup/index.vue +80 -0
  36. package/src/packages/preview/index.js +36 -0
  37. package/src/packages/preview/index.vue +15 -0
  38. package/src/packages/previewImage/index.js +281 -0
  39. package/src/packages/previewImage/index.scss +76 -0
  40. package/src/packages/previewImage/index.vue +53 -0
  41. package/src/packages/process/index.js +923 -0
  42. package/src/packages/process/index.scss +175 -0
  43. package/src/packages/process/index.vue +263 -0
  44. package/src/packages/process/operation/backNode.vue +485 -0
  45. package/src/packages/process/operation/cancel.vue +518 -0
  46. package/src/packages/process/operation/ccTask.vue +473 -0
  47. package/src/packages/process/operation/complete.vue +1126 -0
  48. package/src/packages/process/operation/counterSign.vue +590 -0
  49. package/src/packages/process/operation/delegateTask.vue +587 -0
  50. package/src/packages/process/operation/msgList.vue +174 -0
  51. package/src/packages/process/operation/restart.vue +316 -0
  52. package/src/packages/submitPopup/index.js +644 -0
  53. package/src/packages/submitPopup/index.scss +88 -0
  54. package/src/packages/submitPopup/index.vue +154 -0
  55. package/src/packages/tab/index.js +236 -0
  56. package/src/packages/tab/index.scss +177 -0
  57. package/src/packages/tab/index.vue +155 -0
  58. package/src/packages/tip/index.js +80 -0
  59. package/src/packages/tip/index.scss +121 -0
  60. package/src/packages/tip/index.vue +57 -0
  61. package/src/packages/viewAttchList/index.js +134 -0
  62. package/src/packages/viewAttchList/index.scss +76 -0
  63. package/src/packages/viewAttchList/index.vue +112 -0
  64. package/src/style.css +80 -0
  65. package/vite.config.ts +107 -0
  66. package/packages/components/approval/index.js +0 -0
  67. package/packages/components/process/index.js +0 -8
  68. package/packages/components/process/src/attchlist-upload.vue +0 -585
  69. package/packages/components/process/src/operation/backNode.vue +0 -141
  70. package/packages/components/process/src/operation/cancel.vue +0 -170
  71. package/packages/components/process/src/operation/ccTask.vue +0 -170
  72. package/packages/components/process/src/operation/complete.vue +0 -224
  73. package/packages/components/process/src/operation/counterSign.vue +0 -178
  74. package/packages/components/process/src/operation/delegateTask.vue +0 -168
  75. package/packages/components/process/src/operation/restart.vue +0 -172
  76. package/packages/components/process/src/popup.vue +0 -230
  77. package/packages/components/process/src/process.vue +0 -900
  78. package/packages/components/process/src/tab.vue +0 -459
  79. package/packages/components/process/src/tip.vue +0 -207
  80. package/packages/index.js +0 -4
  81. /package/{packages/components/process/theme → src/assets}/img/add-file.png +0 -0
  82. /package/{packages/components/process/theme → src/assets}/img/del.png +0 -0
  83. /package/{packages/components/process/theme → src/assets}/img/doc.png +0 -0
  84. /package/{packages/components/process/theme → src/assets}/img/file.png +0 -0
  85. /package/{packages/components/process/theme → src/assets}/img/image.png +0 -0
  86. /package/{packages/components/process/theme → src/assets}/img/pdf.png +0 -0
  87. /package/{packages/components/process/theme → src/assets}/img/xls.png +0 -0
  88. /package/{packages/components/process/theme → src/assets}/img/zip.png +0 -0
  89. /package/{packages/components/process/theme → src/assets}/status/error.png +0 -0
  90. /package/{packages/components/process/theme → src/assets}/status/loading.png +0 -0
  91. /package/{packages/components/process/theme → src/assets}/status/success.png +0 -0
  92. /package/{packages/components/process/src → src/packages/process}/operation/index.js +0 -0
@@ -0,0 +1,587 @@
1
+ <template>
2
+ <div class="process-popup-content">
3
+ <div v-if="param.isMsg">
4
+ <div
5
+ class="process-radio-item"
6
+ @click="handleOpenMsg()"
7
+ style="color: #1389ff; font-size: 14px;"
8
+ >
9
+ 常用意见
10
+ </div>
11
+ </div>
12
+ <div class="process-pc-label">
13
+ 转审理由:<span class="process-pc-label--re">*</span>
14
+ </div>
15
+ <div class="process-pc-value">
16
+ <div class="process-popup-textarea">
17
+ <textarea
18
+ v-model="commentMsg"
19
+ class="textarea-item"
20
+ name="description"
21
+ cols="40"
22
+ placeholder="请输入审批意见(200字以内)"
23
+ maxlength="200"
24
+ ></textarea>
25
+ </div>
26
+ <div class="msg-btn" v-if="param.isMsg">
27
+ <span class="msg-btn-click" @click="handleMakeMsg()"
28
+ >设置为常用意见</span
29
+ >
30
+ </div>
31
+ </div>
32
+
33
+ <template
34
+ v-if="
35
+ taskNode && taskNode.length > 0 && taskNode[0].taskState != 11
36
+ "
37
+ >
38
+ <template v-if="nextNodeData.length">
39
+ <template v-for="item in nextNodeData">
40
+ <template v-if="item.type != 'endEvent'">
41
+ <div>
42
+ {{ item.userTaskModelDTO.name }}
43
+ <br />
44
+ 审批人
45
+ <span class="process-pc-label--re">*</span>
46
+ </div>
47
+ <div
48
+ class="process-pc-value"
49
+ @click="handleOpenPopup(item.id)"
50
+ >
51
+ <div class="process-pc-value--people">
52
+ <div
53
+ class="process-pc-value--data"
54
+ v-if="
55
+ partNode[item.id] &&
56
+ partNode[item.id].length
57
+ "
58
+ >
59
+ <span v-for="(v, i) in partNode[item.id]">
60
+ {{ i == 0 ? v : `,${v}` }}
61
+ </span>
62
+ </div>
63
+ <div
64
+ v-else
65
+ class="process-pc-value--data"
66
+ style="color: #888;"
67
+ >
68
+ <span>
69
+ 请选择审批人
70
+ </span>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </template>
75
+ </template>
76
+ </template>
77
+
78
+ <template v-else-if="outGatewayUserTaskModel.length">
79
+ <template v-for="item in outGatewayUserTaskModel">
80
+ <template
81
+ v-if="
82
+ item.type != 'endEvent' &&
83
+ isOption(item.humanPerformerName)
84
+ "
85
+ >
86
+ <div class="process-pc-label">
87
+ {{ item.name }}
88
+ <br />
89
+ 审批人
90
+ <span class="process-pc-label--re">*</span>
91
+ </div>
92
+ <div
93
+ class="process-pc-value"
94
+ @click="handleOpenPopup(item.id)"
95
+ >
96
+ <div class="process-pc-value--people">
97
+ <div
98
+ class="process-pc-value--data"
99
+ v-if="
100
+ partNode[item.id] &&
101
+ partNode[item.id].length
102
+ "
103
+ >
104
+ <span v-for="(v, i) in partNode[item.id]">
105
+ {{ i == 0 ? v : `,${v}` }}
106
+ </span>
107
+ </div>
108
+ <div
109
+ v-else
110
+ class="process-pc-value--data"
111
+ style="color: #888;"
112
+ >
113
+ <span>
114
+ 请选择审批人
115
+ </span>
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </template>
120
+ </template>
121
+ </template>
122
+ </template>
123
+ <TopTips
124
+ ref="topTips"
125
+ :text="textTips"
126
+ :statusTips="statusTips"
127
+ :type="typeTips"
128
+ />
129
+ <TopPopup
130
+ v-bind:visible="visible"
131
+ v-on:update:visible="(val) => (visible = val)"
132
+ ref="TopPopup"
133
+ titleText="选人"
134
+ :isDrawer="true"
135
+ >
136
+ <departPerson
137
+ :isTitle="false"
138
+ :visible.sync="visible"
139
+ :request="param.request"
140
+ v-bind="entity"
141
+ @callback="handleCallback"
142
+ @cancel="handleCancel"
143
+ >
144
+ </departPerson>
145
+ <!-- 初始测试啊啊啊啊啊啊 -->
146
+ </TopPopup>
147
+
148
+ <attchViews
149
+ v-if="labels == '1'"
150
+ :limit="limit ? limit : -1"
151
+ :requires="requires"
152
+ :request="param.request"
153
+ :linkUrl="param.linkUrl"
154
+ @getValue="getValues"
155
+ />
156
+
157
+ <TopPopup
158
+ v-bind:visible="visibleListMsg"
159
+ v-on:update:visible="(val) => (visibleListMsg = val)"
160
+ ref="TopPopup"
161
+ titleText="常用意见"
162
+ :isDrawer="true"
163
+ >
164
+ <MsgList
165
+ :visible="visibleListMsg"
166
+ :request="param.request"
167
+ :useInfo="param.userInfo"
168
+ @handleTips="handleTips"
169
+ @handleMsg="handleMsg"
170
+ ></MsgList>
171
+ </TopPopup>
172
+
173
+ <TopPopup
174
+ titleText="操作消息提示"
175
+ :isTips="true"
176
+ :context="`将${commentMsg}设置为常用意见`"
177
+ :cancel="handleTipsCancel"
178
+ :comfig="handleTipsComfig"
179
+ v-bind:visible="visibleMsgComfig"
180
+ v-on:update:visible="(val) => (visibleMsgComfig = val)"
181
+ >
182
+ </TopPopup>
183
+ </div>
184
+ </template>
185
+ <script>
186
+ import TopTips from "../../tip/index.vue";
187
+ import attchViews from "../../attchUpload/index.vue";
188
+ import TopPopup from "../../popup/index.vue";
189
+ import { departPerson } from "checked-pick-app";
190
+ import MsgList from "./msgList.vue";
191
+ export default {
192
+ name: "delegateTask",
193
+ props: {
194
+ param: {
195
+ type: Object,
196
+ defalut: () => {},
197
+ },
198
+ },
199
+ components: {
200
+ TopTips,
201
+ attchViews,
202
+ TopPopup,
203
+ departPerson,
204
+ MsgList,
205
+ },
206
+ data() {
207
+ return {
208
+ commentMsg: "",
209
+ style: {
210
+ color: "#333",
211
+ disableColor: "#F7F6F6",
212
+ },
213
+ textTips: "",
214
+ statusTips: false,
215
+ typeTips: "success",
216
+ // annex 附件属性
217
+ limit: "",
218
+ requires: "",
219
+ labels: "",
220
+ otherList: "",
221
+ attchLists: [],
222
+ // next
223
+ nextNodeData: [],
224
+ taskNode: [],
225
+
226
+ outGatewayUserTaskModel: [],
227
+ formData: {},
228
+
229
+ // 选人组件
230
+ visible: false,
231
+ entity: {
232
+ source: "0",
233
+ type: "0",
234
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
235
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
236
+ multiple: true, // 是否多选
237
+ checkedArray: [],
238
+ },
239
+ /* {
240
+ source: "0",
241
+ type: "0",
242
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
243
+ businessId: "6a9aaf5742572e82b5d89d6f7e52e2f2",
244
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
245
+ multiple: true, // 是否多选
246
+ } */
247
+ // 存储选人信息
248
+ multiNodeParticipant: {},
249
+ // 当前评估对象
250
+ partObjId: [],
251
+ // 选中人员信息
252
+ partNode: {},
253
+ actionName: "",
254
+
255
+ visibleListMsg: false,
256
+ visibleMsgComfig: false,
257
+ };
258
+ },
259
+ watch: {
260
+ param: {
261
+ handler(val, preVal) {
262
+ this.nextNodeData = val.nextNodeData;
263
+ this.taskNode = val.taskNode;
264
+ this.outGatewayUserTaskModel = val.outGatewayUserTaskModel;
265
+ this.actionName = val.actionName;
266
+ if (val.nextNodeData.length) {
267
+ // console.log("handler::::", this.nextNodeData[0]);
268
+ if (
269
+ this.nextNodeData[0].type == "userTask" ||
270
+ this.nextNodeData[0].type == "UserTaskModel"
271
+ ) {
272
+ this.entity.multiple = true;
273
+ this.entity.codeType = [3];
274
+ this.entity.source = "1";
275
+ this.entity.checkedArray = [];
276
+ } else if (
277
+ this.nextNodeData[0].type == "ExclusiveGatewayModel"
278
+ ) {
279
+ } else if (
280
+ this.nextNodeData[0].type == "InclusiveGatewayModel"
281
+ ) {
282
+ }
283
+ } else if (val.outGatewayUserTaskModel.length) {
284
+ if (val.outGatewayUserTaskModel[0].type == "userTask") {
285
+ this.entity.multiple = true;
286
+ this.entity.codeType = [3];
287
+ this.entity.source = "1";
288
+ this.entity.checkedArray = [];
289
+ } else if (
290
+ val.outGatewayUserTaskModel[0].type ==
291
+ "ExclusiveGatewayModel"
292
+ ) {
293
+ } else if (
294
+ val.outGatewayUserTaskModel[0].type ==
295
+ "InclusiveGatewayModel"
296
+ ) {
297
+ } else if (
298
+ val.outGatewayUserTaskModel[0].type == "UserTaskModel"
299
+ ) {
300
+ this.entity.multiple = true;
301
+ this.entity.codeType = [3];
302
+ this.entity.source = "1";
303
+ this.entity.checkedArray = [];
304
+ }
305
+ }
306
+ },
307
+ immediate: true,
308
+ deep: true,
309
+ },
310
+ },
311
+ created() {
312
+ // console.log("isVue2", this.param);
313
+ this.makeDelegateTaskButtonAnnex();
314
+ },
315
+ methods: {
316
+ // 设置msg
317
+ handleMakeMsg() {
318
+ if (this.commentMsg == "" && !this.commentMsg.length) {
319
+ this.handleTips("请输入审批意见!", false, "success");
320
+ this.visibleMsgComfig = false;
321
+ } else {
322
+ this.visibleMsgComfig = true;
323
+ }
324
+ },
325
+ handleOpenMsg() {
326
+ this.visibleListMsg = true;
327
+ },
328
+ handleTipsCancel() {
329
+ this.visibleMsgComfig = false;
330
+ },
331
+ handleTipsComfig() {
332
+ this.handleTips("", true, "loading");
333
+ this.visibleMsgComfig = false;
334
+ this.param.request
335
+ .post("/auth//user/opinion/save", {
336
+ opinionName: this.commentMsg,
337
+ })
338
+ .then((res) => {
339
+ if (res.code === 200) {
340
+ this.handleTips("设置成功!", true, "success");
341
+ } else {
342
+ this.handleTips(res.msg, true, "error");
343
+ }
344
+ })
345
+ .catch((error) => {
346
+ this.handleTips(error.msg, true, "error");
347
+ });
348
+ },
349
+ handleMsg(val) {
350
+ this.commentMsg = val;
351
+ this.visibleListMsg = false;
352
+ },
353
+ handleOpenPopup(id) {
354
+ this.visible = true;
355
+ this.partObjId = id;
356
+ },
357
+ async confirm() {
358
+ if (!this.commentMsg) {
359
+ this.textTips = "请输入转审理由!";
360
+ this.$refs.topTips.handleOpen();
361
+ return;
362
+ }
363
+ let arr = "";
364
+ this.multiNodeParticipant[this.partObjId].map((v, i) => {
365
+ if (i == 0) {
366
+ arr = v;
367
+ } else {
368
+ arr = `${arr} ${v}`;
369
+ }
370
+ });
371
+
372
+ this.handleTips("", true, "loading");
373
+ await this.param.request
374
+ .post("/aws/tis/delegate", {
375
+ delegateReason: this.commentMsg,
376
+ taskInstId: this.param.taskInstId,
377
+ targetUID: arr,
378
+ })
379
+ .then((res) => {
380
+ if (res.code == 200) {
381
+ this.$emit("handleClosePopup1");
382
+ this.handleTips("提交成功!", false, "success");
383
+ this.handleFinal();
384
+ this.commentMsg = "";
385
+ } else {
386
+ this.handleTips(res.msg, true, "error");
387
+ }
388
+ });
389
+ },
390
+ makeDelegateTaskButtonAnnex() {
391
+ if (this.param.annex && this.param.annex.length) {
392
+ this.otherList = this.param.annex;
393
+ let str = this.otherList.split(";");
394
+ this.limit = str[2];
395
+ this.requires = JSON.parse(str[1]);
396
+ this.labels = str[0];
397
+ /* console.log(
398
+ "makeDelegateTaskButtonAnnex",
399
+ this.otherList,
400
+ this.limit,
401
+ this.requires,
402
+ this.labels
403
+ ); */
404
+ }
405
+ },
406
+
407
+ handleCallback(res) {
408
+ console.log("111:::", res);
409
+ this.visible = false;
410
+ this.multiNodeParticipant[this.partObjId] = [];
411
+ this.partNode[this.partObjId] = [];
412
+ res.map((v, i) => {
413
+ this.multiNodeParticipant[this.partObjId].push(v.uid);
414
+ this.partNode[this.partObjId].push(v.name);
415
+ this.entity.checkedArray.push({
416
+ type: 3,
417
+ uid: v.uid,
418
+ });
419
+ });
420
+ // console.log("callback_OK", res, this.multiNodeParticipant);
421
+ },
422
+ handleCancel() {
423
+ // console.log("cancel_No");
424
+ },
425
+
426
+ getValues(data) {
427
+ // console.log("获取当前附件信息::::", data);
428
+ this.attchLists = data;
429
+ },
430
+
431
+ async uploadAttch() {
432
+ if (this.attchLists.length > 0) {
433
+ this.attchLists.map((v, i) => {
434
+ v.size = v.fileSize;
435
+ v.format = v.originFileName.substring(
436
+ v.originFileName.lastIndexOf(".") + 1
437
+ );
438
+ v.uploadTime = v.createTime;
439
+ v.processInstId = this.param.processInstId;
440
+ v.taskInstId = this.param.taskInstId;
441
+ v.name = v.originFileName;
442
+ });
443
+
444
+ let param = this.attchLists;
445
+ const ress = await this.param.request.post(
446
+ "/aws/meta/annex/patchSave",
447
+ {
448
+ saveMetaAnnexCmdList: param,
449
+ }
450
+ );
451
+ // console.log("asd", ress);
452
+ if (ress.success) {
453
+ this.$emit("handleClosePopup1");
454
+ this.handleTips("提交成功!", false, "success");
455
+ this.handleFinal();
456
+ this.commentMsg = "";
457
+ } else {
458
+ this.handleTips("上传失败", true, "error");
459
+ }
460
+ }
461
+ },
462
+
463
+ isOption(humanPerformer) {
464
+ return (
465
+ humanPerformer == "任意指定" ||
466
+ humanPerformer == "固定部门" ||
467
+ humanPerformer == "固定单位" ||
468
+ humanPerformer == "与流程申请人所在组织结构的位置相关" ||
469
+ humanPerformer == "固定群组"
470
+ );
471
+ },
472
+
473
+ handleTips(text, status, type) {
474
+ this.textTips = text;
475
+ this.statusTips = status;
476
+ this.typeTips = type;
477
+ this.$refs.topTips.handleOpen();
478
+ },
479
+
480
+ handleFinal() {
481
+ if (this.param.endFunction) {
482
+ this.param.endFunction("delegateTask");
483
+ }
484
+ },
485
+ },
486
+ };
487
+ </script>
488
+ <style scoped>
489
+ .process-popup-content {
490
+ flex: 1;
491
+ }
492
+
493
+ .process-popup-content .process-pc-label {
494
+ font-size: 15px;
495
+ display: flex;
496
+ align-items: center;
497
+ font-weight: 400;
498
+ color: #333333;
499
+ padding-top: 20px;
500
+ padding-bottom: 5px;
501
+ }
502
+
503
+ .process-popup-content .process-pc-value .van-field {
504
+ border-bottom: 1px solid #e8e8e8;
505
+ padding: 0;
506
+ }
507
+
508
+ .input-padding {
509
+ padding: 0;
510
+ }
511
+
512
+ .process-popup-textarea {
513
+ position: relative;
514
+ width: 100%;
515
+ height: 62px;
516
+ min-height: 62px;
517
+ }
518
+
519
+ .process-popup-textarea::after {
520
+ position: absolute;
521
+ content: "";
522
+ width: 100%;
523
+ height: 1px;
524
+ background-color: #f2f2f2;
525
+ bottom: 0;
526
+ left: 0;
527
+ }
528
+
529
+ .process-popup-textarea .textarea-item {
530
+ resize: none;
531
+ background: none;
532
+ color: inherit;
533
+ opacity: 1;
534
+ font: inherit;
535
+ line-height: inherit;
536
+ letter-spacing: inherit;
537
+ text-align: inherit;
538
+ text-indent: inherit;
539
+ text-transform: inherit;
540
+ text-shadow: inherit;
541
+ outline: none;
542
+ border: none;
543
+ padding: 0;
544
+ margin: 0;
545
+ text-decoration: inherit;
546
+ height: 100%;
547
+ font-size: 14px;
548
+ }
549
+
550
+ .process-popup-textarea .textarea-item::placeholder {
551
+ line-height: 4;
552
+ }
553
+ .process-pc-label--re {
554
+ color: #ee0000;
555
+ }
556
+
557
+ .process-pc-value--people {
558
+ width: 100%;
559
+ min-height: 43px;
560
+ padding: 10px 26px 10px 0;
561
+ box-sizing: border-box;
562
+ position: relative;
563
+ font-size: 14px;
564
+ }
565
+
566
+ .process-pc-value--people::after {
567
+ position: absolute;
568
+ content: "";
569
+ width: 100%;
570
+ height: 1px;
571
+ background-color: #e8e8e8;
572
+ bottom: 0;
573
+ left: 0;
574
+ }
575
+
576
+ ::v-deep .departPerson-main {
577
+ width: 100% !important;
578
+ height: 100% !important;
579
+ }
580
+
581
+ .msg-btn {
582
+ font-size: 14px;
583
+ margin: 8px 0;
584
+ text-align: right;
585
+ color: #1890ff;
586
+ }
587
+ </style>