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
@@ -1,459 +0,0 @@
1
- <template>
2
- <div class="tops-tab">
3
- <div class="tops-tab-header">
4
- <template v-for="(item, i) of isTapList">
5
- <div
6
- class="tops-tab-header-items"
7
- :class="[item.key === active ? 'active' : '']"
8
- @click="handleActive(item.key, i)"
9
- >
10
- {{ item.label }}
11
- </div>
12
- </template>
13
- <div class="bottom-line" v-if="isTapList.length"></div>
14
- </div>
15
- <div class="tops-tab-body">
16
- <div
17
- v-for="item in isTapList"
18
- :key="item.key"
19
- v-show="active === item.key"
20
- style="height: calc(100% - 45px);"
21
- >
22
- <!-- :taskNode="getTaskNode()" -->
23
- <slot
24
- v-if="item.key === 'a' && item.type === 'default'"
25
- name="default"
26
- ></slot>
27
- <slot
28
- v-if="item.key === 'b' && item.type === 'default'"
29
- :name="item.slot"
30
- >
31
- <iframe
32
- v-if="trackUrl"
33
- :src="trackUrl"
34
- style="width: 100%; height: 100%; border: none;"
35
- scrolling="no"
36
- frameborder="0"
37
- ></iframe>
38
- <div v-else class="textnone">
39
- 暂无流程图
40
- </div>
41
- </slot>
42
- <slot
43
- v-if="item.key === 'c' && item.type === 'default'"
44
- :name="item.slot"
45
- >
46
- <template v-if="taskCommentList.length > 0">
47
- <div
48
- v-for="(item, index) in taskCommentList"
49
- :key="item.id"
50
- class="seal-list__item"
51
- >
52
- <div>
53
- <div class="seal-list__item--option">
54
- <span>节点名称</span>
55
- <span>{{ item.activityName }}</span>
56
- </div>
57
- <div class="seal-list__item--option">
58
- <span>审批人</span>
59
- <span>{{ item.createUserName }}</span>
60
- </div>
61
- <div class="seal-list__item--option">
62
- <span>审批操作</span>
63
- <span>{{ item.actionName }}</span>
64
- </div>
65
- <div class="seal-list__item--option">
66
- <span>审批意见</span>
67
- <span v-html="item.msg"></span>
68
- </div>
69
- <div class="seal-list__item--option">
70
- <span>审批时间</span>
71
- <span>{{ item.createDate }}</span>
72
- </div>
73
- <div
74
- v-if="
75
- item.metaAnnexList &&
76
- item.metaAnnexList.length
77
- "
78
- class="seal-list__item--attch"
79
- >
80
- <span>查看附件</span>
81
- </div>
82
- </div>
83
- </div>
84
- </template>
85
- <div v-else class="textnone">暂无数据</div>
86
- </slot>
87
- <slot v-if="item.type == 'slot'" :name="item.slot"></slot>
88
- </div>
89
- </div>
90
- </div>
91
- </template>
92
-
93
- <script>
94
- export default {
95
- name: "TopTab",
96
- props: {
97
- /**
98
- * 根据参数插入自定义tab
99
- * label:选项卡title
100
- * key:选项卡ID 请勿重复defaultTabList内已拥有的默认key
101
- * type:插槽类型 "slot" "default"
102
- * sort:排序参数,无参数默认插入末尾
103
- * slot:插槽name
104
- */
105
- tapList: {
106
- type: Array,
107
- default: () => [],
108
- },
109
- // 自定义tab (传入后 默认tab,tapList,失效)
110
- selfTapList: {
111
- type: Array,
112
- default: () => [],
113
- },
114
- track: {
115
- type: String,
116
- default: "",
117
- },
118
- taskComment: {
119
- type: Array,
120
- default: () => [],
121
- },
122
- },
123
-
124
- data() {
125
- return {
126
- // 流程图
127
- trackUrl: "",
128
- // 审批信息
129
- taskCommentList: [],
130
- // 选中
131
- active: "",
132
-
133
- /* tab 渲染 */
134
- // 默认弹窗列表
135
- defaultTabList: [
136
- {
137
- label: "基本信息",
138
- key: "a",
139
- type: "default",
140
- slot: "default",
141
- },
142
- {
143
- label: "流程图",
144
- key: "b",
145
- type: "default",
146
- slot: "tab2",
147
- },
148
- {
149
- label: "审批记录",
150
- key: "c",
151
- type: "default",
152
- slot: "tab3",
153
- },
154
- ],
155
- // 弹窗操作
156
- isTapList: [
157
- {
158
- label: "基本信息",
159
- key: "a",
160
- type: "default",
161
- slot: "default",
162
- },
163
- {
164
- label: "流程图",
165
- key: "b",
166
- type: "default",
167
- slot: "tab2",
168
- },
169
- {
170
- label: "审批记录",
171
- key: "c",
172
- type: "default",
173
- slot: "tab3",
174
- },
175
- ],
176
- // 绑定tab块
177
- label: document.getElementsByClassName("tops-tab-header-items"),
178
- };
179
- },
180
- watch: {
181
- // 接受外部数组,渲染tab
182
- tapList: {
183
- handler(val, preVal) {
184
- if (!this.selfTapList.length) {
185
- this.isTapList = [].concat(this.defaultTabList);
186
- if (val.length > 0) {
187
- /* return [] */
188
- val.forEach((v, i) => {
189
- if (v.sort && v.sort > 1) {
190
- this.isTapList.splice(v.sort - 1, 0, v);
191
- } else if (v.sort == 1) {
192
- this.isTapList.unshift(v);
193
- } else {
194
- this.isTapList.push(v);
195
- }
196
- });
197
- }
198
- this.active = this.isTapList[0].key;
199
- console.log("isTapList", this.isTapList);
200
- }
201
- },
202
- immediate: true,
203
- deep: true,
204
- },
205
- // 自定义tab,覆盖默认项
206
- selfTapList: {
207
- handler(val, preVal) {
208
- if (val.length) {
209
- this.isTapList = [].concat(val);
210
- this.active = this.isTapList[0].key;
211
- }
212
- },
213
- immediate: true,
214
- deep: true,
215
- },
216
- // 流程图链接
217
- track: {
218
- handler(val, preVal) {
219
- if (val) {
220
- this.trackUrl = val;
221
- }
222
- },
223
- immediate: true,
224
- deep: true,
225
- },
226
- // 审批记录列表
227
- taskComment: {
228
- handler(val, preVal) {
229
- if (val) {
230
- this.taskCommentList = val;
231
- }
232
- },
233
- immediate: true,
234
- deep: true,
235
- },
236
- },
237
-
238
- mounted() {
239
- // 渲染后初始化为第一个位置
240
- this.tabAnimation(0);
241
- },
242
-
243
- methods: {
244
- // 选中
245
- handleActive(e, i) {
246
- if (e === this.active) {
247
- return;
248
- }
249
-
250
- this.active = e;
251
- this.tabAnimation(i);
252
- },
253
-
254
- // tab切换动画
255
- tabAnimation(i) {
256
- if (this.label.length) {
257
- let doc = document.getElementsByClassName("bottom-line")[0];
258
- let left;
259
- if (doc.offsetWidth < this.label[i].offsetWidth - 10) {
260
- let num =
261
- (this.label[i].offsetWidth - doc.offsetWidth - 10) / 2;
262
- left = `${this.label[i].offsetLeft + num}px`;
263
- } else if (doc.offsetWidth > this.label[i].offsetWidth - 10) {
264
- let num =
265
- (doc.offsetWidth - this.label[i].offsetWidth + 10) / 2;
266
- left = `${this.label[i].offsetLeft - num}px`;
267
- } else {
268
- left = `${this.label[i].offsetLeft}px`;
269
- }
270
- doc.style.transition = ".3s";
271
- doc.style.transform = `translateX(${left})`;
272
- }
273
- },
274
- },
275
- };
276
- </script>
277
-
278
- <style scoped>
279
- .tops-tab {
280
- height: 100%;
281
- }
282
- .tops-tab-header {
283
- display: flex;
284
- width: 100%;
285
- height: 45px;
286
- font-size: 14px;
287
- color: #333;
288
- padding: 10px 17px;
289
- font-weight: 500;
290
- box-sizing: border-box;
291
- overflow-x: auto;
292
- white-space: nowrap;
293
- flex-wrap: nowrap;
294
- flex-shrink: 0;
295
- -ms-overflow-style: none;
296
- position: relative;
297
- background-color: #fff;
298
- }
299
-
300
- .tops-tab-header::after {
301
- content: "";
302
- position: absolute;
303
- width: 100%;
304
- height: 1px;
305
- background-color: #f2f2f2;
306
- left: 0;
307
- bottom: 0;
308
- z-index: 10;
309
- }
310
-
311
- .tops-tab-header::-webkit-scrollbar {
312
- display: none;
313
- }
314
-
315
- .tops-tab-header-items {
316
- white-space: nowrap;
317
- padding-right: 10px;
318
- box-sizing: border-box;
319
- display: inline-block;
320
- height: 100%;
321
- text-align: center;
322
- margin-right: 32px;
323
- font-weight: 400;
324
- font-size: 15px;
325
- text-align: left;
326
- color: #333;
327
- display: flex;
328
- align-items: center;
329
- }
330
-
331
- .tops-tab-header-items:last-child {
332
- padding-right: 0;
333
- margin-right: 0;
334
- }
335
-
336
- .tops-tab-header .active {
337
- position: relative;
338
- color: #1389ff;
339
- font-family: "PingFang SC Bold";
340
- font-weight: 700;
341
- font-size: 15px;
342
- text-align: left;
343
- }
344
-
345
- .tops-tab-header .bottom-line {
346
- width: 30px;
347
- height: 3px;
348
- border-radius: 1.5px;
349
- background-color: #1389ff;
350
- position: absolute;
351
- bottom: 1px;
352
- left: 0;
353
- z-index: 12;
354
- }
355
- .tops-tab-body {
356
- height: calc(100% - 45px);
357
- }
358
-
359
- .seal-list__item {
360
- padding: 6px 10px;
361
- margin: 10px;
362
- margin-bottom: 0px;
363
- padding-bottom: 0px;
364
- background-color: #ffffff;
365
- border-radius: 10px;
366
- box-sizing: border-box;
367
- }
368
-
369
- .seal-list__item:last-child {
370
- margin-bottom: 70px;
371
- }
372
-
373
- .seal-list__item .seal-list__item--header {
374
- margin-bottom: 6px;
375
- display: flex;
376
- align-items: center;
377
- }
378
-
379
- .seal-list__item .seal-list__item--header span:first-of-type {
380
- font-size: 15px;
381
- margin-right: 6px;
382
- font-weight: bold;
383
- }
384
-
385
- .seal-list__item .seal-list__item--option {
386
- display: flex;
387
- justify-content: space-between;
388
- align-items: center;
389
- font-size: 14px;
390
- padding: 10px 0;
391
- color: #333;
392
- }
393
-
394
- .seal-list__item .seal-list__item--option {
395
- }
396
-
397
- .seal-list__item .seal-list__item--option span:last-child {
398
- max-width: 144px;
399
- overflow: hidden;
400
- white-space: nowrap;
401
- text-overflow: ellipsis;
402
- color: #888;
403
- }
404
-
405
- .seal-list__item .seal-list__item--option :last-child {
406
- /* padding-bottom: 14px; */
407
- }
408
- .seal-list__item .seal-list__item--attch {
409
- font-size: 14px;
410
- padding: 10px 0;
411
- color: #333;
412
- text-align: right;
413
- color: #1389ff;
414
- }
415
-
416
- .seal-list__item .seal-list__item--actions {
417
- margin-top: 12px;
418
- position: relative;
419
- display: flex;
420
- justify-content: space-around;
421
- align-items: center;
422
- }
423
-
424
- .seal-list__item .seal-list__item--actions ::before {
425
- content: "";
426
- top: 0;
427
- width: 100%;
428
- transform: scaleY(0.5);
429
- transform-origin: top;
430
- border-top: 1px #e8e8e8 solid;
431
- position: absolute;
432
- }
433
-
434
- .seal-list__item .seal-list__item--actions .van-button {
435
- width: 50%;
436
- }
437
-
438
- .seal-list__item .seal-list__item--actions .van-button ::after {
439
- content: "";
440
- height: 60%;
441
- border-left: 1px #e8e8e8 solid;
442
- position: absolute;
443
- left: 100%;
444
- top: 50%;
445
- transform: translate(-50%, -50%) scaleX(0.5);
446
- transform-origin: left;
447
- }
448
-
449
- .seal-list__item .seal-list__item--actions .van-button:last-child ::after {
450
- content: none;
451
- }
452
-
453
- .textnone {
454
- text-align: center;
455
- margin-top: 30px;
456
- color: #999;
457
- font-size: 14px;
458
- }
459
- </style>
@@ -1,207 +0,0 @@
1
- <template>
2
- <div>
3
- <div
4
- v-if="!statusTips"
5
- class="top-tipss"
6
- :style="
7
- show
8
- ? 'visibility: visible; opacity: 1;'
9
- : 'visibility: hidden; opacity: 0;'
10
- "
11
- >
12
- <div v-if="text" class="top-tipss-text">{{ text }}</div>
13
- </div>
14
- <div
15
- v-else
16
- class="top-tipss"
17
- :style="
18
- show
19
- ? 'visibility: visible; opacity: 1;'
20
- : 'visibility: hidden; opacity: 0;'
21
- "
22
- >
23
- <div class="top-tipss-status">
24
- <div :class="status" v-if="type == 'loading'">
25
- <img src="../theme/status/loading.png" />
26
- <div v-if="text" class="top-tipss-status-text">
27
- {{ text }}
28
- </div>
29
- </div>
30
- <div :class="status" v-if="type == 'success'">
31
- <img src="../theme/status/success.png" />
32
- <div v-if="text" class="top-tipss-status-text">
33
- {{ text }}
34
- </div>
35
- </div>
36
- <div :class="status" v-if="type == 'error'">
37
- <img src="../theme/status/error.png" />
38
- <div v-if="text" class="top-tipss-status-text">
39
- {{ text }}
40
- </div>
41
- </div>
42
- </div>
43
- </div>
44
- <div
45
- class="top-tipss-mask"
46
- :style="
47
- show && statusTips
48
- ? 'visibility: visible; opacity: .7;'
49
- : 'visibility: hidden; opacity: 0;'
50
- "
51
- ></div>
52
- </div>
53
- </template>
54
- <script>
55
- export default {
56
- props: {
57
- text: { default: "", type: String },
58
- type: { default: "default", type: String },
59
- statusTips: { default: false, type: Boolean },
60
- },
61
- data() {
62
- return {
63
- show: false,
64
- status: "",
65
- };
66
- },
67
- watch: {
68
- type: {
69
- handler(val, preVal) {
70
- switch (val) {
71
- case "loading":
72
- this.status = "top-tipss-loadinig";
73
- break;
74
- case "success":
75
- this.status = "top-tipss-success";
76
- setTimeout(() => {
77
- this.handleClose();
78
- }, 1500);
79
- break;
80
- case "error":
81
- this.status = "top-tipss-error";
82
- setTimeout(() => {
83
- this.handleClose();
84
- }, 1500);
85
- break;
86
- }
87
- },
88
- immediate: true,
89
- deep: true,
90
- },
91
- },
92
- mounted() {
93
- this.$nextTick(() => {
94
- const body = document.querySelector("body");
95
- if (body.append) {
96
- body.append(this.$el);
97
- } else {
98
- body.appendChild(this.$el);
99
- }
100
- });
101
- },
102
- methods: {
103
- handleOpen() {
104
- if (
105
- !this.show &&
106
- (this.type == "success" ||
107
- this.type == "error" ||
108
- this.type == "default")
109
- ) {
110
- this.show = true;
111
- setTimeout(() => {
112
- this.handleClose();
113
- }, 1500);
114
- } else {
115
- this.show = true;
116
- }
117
- },
118
- handleClose() {
119
- this.show = false;
120
- },
121
- },
122
- };
123
- </script>
124
- <style>
125
- .top-tipss {
126
- position: absolute;
127
- z-index: 2999;
128
- top: 50%;
129
- left: 50%;
130
- -webkit-transform: translate(-50%, -50%);
131
- transform: translate(-50%, -50%);
132
- text-align: center;
133
- max-width: 80%;
134
- transition: all 0.3s ease;
135
- }
136
-
137
- .top-tipss-mask {
138
- position: fixed;
139
- width: 100vw;
140
- height: 100vh;
141
- background-color: #000;
142
- opacity: 0.7;
143
- top: 0;
144
- left: 0;
145
- z-index: 1999;
146
- transition: all 0.3s ease;
147
- }
148
-
149
- .top-tipss-text {
150
- display: inline-block;
151
- vertical-align: middle;
152
- color: #fff;
153
- padding: 10px 20px;
154
- border-radius: 5px;
155
- font-size: 13px;
156
- text-align: center;
157
- max-width: 100%;
158
- word-break: break-all;
159
- white-space: normal;
160
- background-color: rgba(17, 17, 17, 0.7);
161
- }
162
- .top-tipss-status {
163
- width: 120px;
164
- height: 120px;
165
- border-radius: 12px;
166
- background-color: rgba(17, 17, 17, 0.7);
167
- display: flex;
168
- }
169
-
170
- .top-tipss-loadinig,
171
- .top-tipss-success,
172
- .top-tipss-error {
173
- width: 100%;
174
- height: 100%;
175
- display: flex;
176
- align-items: center;
177
- justify-content: center;
178
- flex-direction: column;
179
- }
180
-
181
- .top-tipss-loadinig img,
182
- .top-tipss-success img,
183
- .top-tipss-error img {
184
- width: 40px;
185
- height: 40px;
186
- }
187
-
188
- .top-tipss-loadinig img {
189
- -webkit-animation: rotation 0.8s linear infinite;
190
- animation: rotation 0.8s linear infinite;
191
- }
192
-
193
- .top-tipss-status-text {
194
- color: #fff;
195
- padding-top: 10px;
196
- font-size: 12px;
197
- }
198
-
199
- @-webkit-keyframes rotation {
200
- 0% {
201
- transform: rotate(0deg);
202
- }
203
- 100% {
204
- transform: rotate(360deg);
205
- }
206
- }
207
- </style>
package/packages/index.js DELETED
@@ -1,4 +0,0 @@
1
- import TopProcess from "./components/process/index";
2
-
3
- export default [TopProcess];
4
- // export { TopProcess };