ui-process-h5 0.1.36 → 0.1.40

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