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,473 @@
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
+ "
14
+ >
15
+ <div>
16
+ 抄送人员
17
+ <span class="process-pc-label--re">*</span>
18
+ </div>
19
+ <div
20
+ class="process-pc-value"
21
+ @click="handleOpenPopup(item.id)"
22
+ >
23
+ <div class="process-pc-value--people">
24
+ <div
25
+ class="process-pc-value--data"
26
+ v-if="
27
+ partNode[item.id] &&
28
+ partNode[item.id].length
29
+ "
30
+ >
31
+ <span v-for="(v, i) in partNode[item.id]">
32
+ {{ i == 0 ? v : `,${v}` }}
33
+ </span>
34
+ </div>
35
+ <div
36
+ v-else
37
+ class="process-pc-value--data"
38
+ style="color: #888;"
39
+ >
40
+ <span>
41
+ 请选择抄送人员
42
+ </span>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ </template>
47
+ </template>
48
+ </template>
49
+
50
+ <template v-else-if="outGatewayUserTaskModel.length">
51
+ <template v-for="item in outGatewayUserTaskModel">
52
+ <template v-if="item.type != 'endEvent'">
53
+ <div>
54
+ 抄送人员
55
+ <span class="process-pc-label--re">*</span>
56
+ </div>
57
+ <div
58
+ class="process-pc-value"
59
+ @click="handleOpenPopup(item.id)"
60
+ >
61
+ <div class="process-pc-value--people">
62
+ <div
63
+ class="process-pc-value--data"
64
+ v-if="
65
+ partNode[item.id] &&
66
+ partNode[item.id].length
67
+ "
68
+ >
69
+ <span v-for="(v, i) in partNode[item.id]">
70
+ {{ i == 0 ? v : `;${v}` }}
71
+ </span>
72
+ </div>
73
+ <div
74
+ v-else
75
+ class="process-pc-value--data"
76
+ style="color: #888;"
77
+ >
78
+ <span>
79
+ 请选择抄送人员
80
+ </span>
81
+ </div>
82
+ </div>
83
+ </div>
84
+ </template>
85
+ </template>
86
+ </template>
87
+ </template>
88
+ <TopTips
89
+ ref="topTips"
90
+ :text="textTips"
91
+ :statusTips="statusTips"
92
+ :type="typeTips"
93
+ />
94
+ <TopPopup
95
+ v-bind:visible="visible"
96
+ v-on:update:visible="(val) => (visible = val)"
97
+ ref="TopPopup"
98
+ titleText="选人"
99
+ :isDrawer="true"
100
+ >
101
+ <departPerson
102
+ :isTitle="false"
103
+ :visible.sync="visible"
104
+ :request="param.request"
105
+ v-bind="entity"
106
+ @callback="handleCallback"
107
+ @cancel="handleCancel"
108
+ >
109
+ </departPerson>
110
+ <!-- 初始测试啊啊啊啊啊啊 -->
111
+ </TopPopup>
112
+
113
+ <attchViews
114
+ v-if="labels == '2'"
115
+ :limit="limit ? limit : -1"
116
+ :requires="requires"
117
+ :request="param.request"
118
+ :linkUrl="param.linkUrl"
119
+ @getValue="getValues"
120
+ />
121
+ </div>
122
+ </template>
123
+ <script>
124
+ import TopTips from "../../tip/index.vue";
125
+ import attchViews from "../../attchUpload/index.vue";
126
+ import TopPopup from "../../popup/index.vue";
127
+ import { departPerson } from "checked-pick-app";
128
+ export default {
129
+ name: "ccTask",
130
+ props: {
131
+ param: {
132
+ type: Object,
133
+ defalut: () => {},
134
+ },
135
+ },
136
+ components: {
137
+ TopTips,
138
+ attchViews,
139
+ TopPopup,
140
+ departPerson,
141
+ },
142
+ data() {
143
+ return {
144
+ commentMsg: "",
145
+ style: {
146
+ color: "#333",
147
+ disableColor: "#F7F6F6",
148
+ },
149
+ textTips: "",
150
+ statusTips: false,
151
+ typeTips: "success",
152
+ // annex 附件属性
153
+ limit: "",
154
+ requires: "",
155
+ labels: "",
156
+ otherList: "",
157
+ attchLists: [],
158
+ // next
159
+ nextNodeData: [],
160
+ taskNode: [],
161
+
162
+ outGatewayUserTaskModel: [],
163
+ formData: {},
164
+
165
+ // 选人组件
166
+ visible: false,
167
+ entity: {
168
+ source: "0",
169
+ type: "0",
170
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
171
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
172
+ multiple: true, // 是否多选
173
+ checkedArray: [],
174
+ },
175
+ /* {
176
+ source: "0",
177
+ type: "0",
178
+ request: this.param.request, //'http://59.53.91.231:2100' 0002
179
+ businessId: "6a9aaf5742572e82b5d89d6f7e52e2f2",
180
+ codeType: [3], // 可选类型 1-主体 2-部门 3-人员
181
+ multiple: true, // 是否多选
182
+ } */
183
+ // 存储选人信息
184
+ multiNodeParticipant: {},
185
+ // 当前评估对象
186
+ partObjId: [],
187
+ // 选中人员信息
188
+ partNode: {},
189
+ actionName: "",
190
+ };
191
+ },
192
+ watch: {
193
+ param: {
194
+ handler(val, preVal) {
195
+ this.nextNodeData = val.nextNodeData;
196
+ this.taskNode = val.taskNode;
197
+ this.outGatewayUserTaskModel = val.outGatewayUserTaskModel;
198
+ this.actionName = val.actionName;
199
+ if (val.nextNodeData.length) {
200
+ // console.log("handler::::", this.nextNodeData[0]);
201
+ if (
202
+ this.nextNodeData[0].type == "userTask" ||
203
+ this.nextNodeData[0].type == "UserTaskModel"
204
+ ) {
205
+ this.entity.multiple = true;
206
+ this.entity.codeType = [3];
207
+ this.entity.source = "1";
208
+ this.entity.checkedArray = [];
209
+ } else if (
210
+ this.nextNodeData[0].type == "ExclusiveGatewayModel"
211
+ ) {
212
+ } else if (
213
+ this.nextNodeData[0].type == "InclusiveGatewayModel"
214
+ ) {
215
+ }
216
+ } else if (val.outGatewayUserTaskModel.length) {
217
+ if (val.outGatewayUserTaskModel[0].type == "userTask") {
218
+ this.entity.multiple = true;
219
+ this.entity.codeType = [3];
220
+ this.entity.source = "1";
221
+ this.entity.checkedArray = [];
222
+ } else if (
223
+ val.outGatewayUserTaskModel[0].type ==
224
+ "ExclusiveGatewayModel"
225
+ ) {
226
+ } else if (
227
+ val.outGatewayUserTaskModel[0].type ==
228
+ "InclusiveGatewayModel"
229
+ ) {
230
+ } else if (
231
+ val.outGatewayUserTaskModel[0].type == "UserTaskModel"
232
+ ) {
233
+ this.entity.multiple = true;
234
+ this.entity.codeType = [3];
235
+ this.entity.checkedArray = [];
236
+ this.entity.source = "1";
237
+ }
238
+ }
239
+ },
240
+ immediate: true,
241
+ deep: true,
242
+ },
243
+ },
244
+ created() {
245
+ // console.log("isVue2", this.param);
246
+ this.makeDelegateTaskButtonAnnex();
247
+ },
248
+ methods: {
249
+ handleOpenPopup(id) {
250
+ this.visible = true;
251
+ this.partObjId = id;
252
+ },
253
+ async confirm() {
254
+ this.handleTips("", true, "loading");
255
+ let arr = "";
256
+ this.multiNodeParticipant[this.partObjId].map((v, i) => {
257
+ if (i == 0) {
258
+ arr = v;
259
+ } else {
260
+ arr = `${arr} ${v}`;
261
+ }
262
+ });
263
+ await this.param.request
264
+ .post("/aws/tis/createCCTask", {
265
+ processInstId: this.param.processInstId,
266
+ title:
267
+ this.param.formData.title ||
268
+ this.param.formData.reason ||
269
+ this.param.formData.meetingTheme,
270
+ parentTaskInstId: this.param.taskInstId,
271
+ participant: arr,
272
+ })
273
+ .then((res) => {
274
+ if (res.code == 200) {
275
+ this.$emit("handleClosePopup1");
276
+ this.handleTips("提交成功!", false, "success");
277
+ this.handleFinal();
278
+ } else {
279
+ this.handleTips(res.msg, true, "error");
280
+ }
281
+ });
282
+ },
283
+ makeDelegateTaskButtonAnnex() {
284
+ if (this.param.annex && this.param.annex.length) {
285
+ this.otherList = this.param.annex;
286
+ let str = this.otherList.split(";");
287
+ this.limit = str[2];
288
+ this.requires = JSON.parse(str[1]);
289
+ this.labels = str[0];
290
+ /* console.log(
291
+ "makeDelegateTaskButtonAnnex",
292
+ this.otherList,
293
+ this.limit,
294
+ this.requires,
295
+ this.labels
296
+ ); */
297
+ }
298
+ },
299
+
300
+ handleCallback(res) {
301
+ this.visible = false;
302
+ this.multiNodeParticipant[this.partObjId] = [];
303
+ this.partNode[this.partObjId] = [];
304
+ res.map((v, i) => {
305
+ this.multiNodeParticipant[this.partObjId].push(v.uid);
306
+ this.partNode[this.partObjId].push(v.name);
307
+ this.entity.checkedArray.push({
308
+ type: 3,
309
+ uid: v.uid,
310
+ });
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("ccTask");
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
+ font-size: 14px;
440
+ }
441
+
442
+ .process-popup-textarea .textarea-item::placeholder{
443
+ line-height: 4;
444
+ }
445
+
446
+ .process-pc-label--re {
447
+ color: #ee0000;
448
+ }
449
+
450
+ .process-pc-value--people {
451
+ width: 100%;
452
+ min-height: 43px;
453
+ padding: 10px 26px 10px 0;
454
+ box-sizing: border-box;
455
+ position: relative;
456
+ font-size: 14px;
457
+ }
458
+
459
+ .process-pc-value--people::after {
460
+ position: absolute;
461
+ content: "";
462
+ width: 100%;
463
+ height: 1px;
464
+ background-color: #e8e8e8;
465
+ bottom: 0;
466
+ left: 0;
467
+ }
468
+
469
+ ::v-deep .departPerson-main {
470
+ width: 100% !important;
471
+ height: 100% !important;
472
+ }
473
+ </style>