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