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