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