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