ui-process-h5 2.1.0-beta → 2.1.1-beta

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 (91) hide show
  1. package/README.md +204 -11
  2. package/package.json +25 -56
  3. package/v2/style.css +1 -0
  4. package/v2/ui-process-h5.js +9926 -0
  5. package/v2/ui-process-h5.umd.cjs +18 -0
  6. package/v2.7/style.css +1 -0
  7. package/v2.7/ui-process-h5.js +9303 -0
  8. package/v2.7/ui-process-h5.umd.cjs +18 -0
  9. package/v3/style.css +1 -0
  10. package/v3/ui-process-h5.js +6819 -0
  11. package/v3/ui-process-h5.umd.cjs +6 -0
  12. package/build/configure/README.md +0 -211
  13. package/build/configure/package.json +0 -32
  14. package/debug.js +0 -9
  15. package/index.html +0 -12
  16. package/src/App.vue +0 -233
  17. package/src/assets/font-icon/iconfont.scss +0 -57
  18. package/src/assets/font-icon/iconfont.ttf +0 -0
  19. package/src/assets/img/add-file.png +0 -0
  20. package/src/assets/img/arrow-right.png +0 -0
  21. package/src/assets/img/arrow.png +0 -0
  22. package/src/assets/img/check.png +0 -0
  23. package/src/assets/img/del.png +0 -0
  24. package/src/assets/img/doc.png +0 -0
  25. package/src/assets/img/file.png +0 -0
  26. package/src/assets/img/image.png +0 -0
  27. package/src/assets/img/pdf.png +0 -0
  28. package/src/assets/img/process.png +0 -0
  29. package/src/assets/img/xls.png +0 -0
  30. package/src/assets/img/zip.png +0 -0
  31. package/src/assets/js/auth.js +0 -65
  32. package/src/assets/js/errorCode.js +0 -6
  33. package/src/assets/js/message.js +0 -352
  34. package/src/assets/js/request.js +0 -99
  35. package/src/assets/js/toast.js +0 -239
  36. package/src/assets/js/top.js +0 -229
  37. package/src/assets/js/utils.js +0 -83
  38. package/src/assets/js/vuePopper.js +0 -123
  39. package/src/assets/query.png +0 -0
  40. package/src/assets/status/check.png +0 -0
  41. package/src/assets/status/del.png +0 -0
  42. package/src/assets/status/error.png +0 -0
  43. package/src/assets/status/loading.png +0 -0
  44. package/src/assets/status/success.png +0 -0
  45. package/src/main.js +0 -17
  46. package/src/packages/attchUpload/index.js +0 -375
  47. package/src/packages/attchUpload/index.scss +0 -143
  48. package/src/packages/attchUpload/index.vue +0 -173
  49. package/src/packages/downSelect/index.js +0 -119
  50. package/src/packages/downSelect/index.scss +0 -88
  51. package/src/packages/downSelect/index.vue +0 -62
  52. package/src/packages/index.js +0 -6
  53. package/src/packages/popup/index.js +0 -125
  54. package/src/packages/popup/index.scss +0 -178
  55. package/src/packages/popup/index.vue +0 -80
  56. package/src/packages/preview/index.js +0 -40
  57. package/src/packages/preview/index.vue +0 -15
  58. package/src/packages/previewImage/index.js +0 -286
  59. package/src/packages/previewImage/index.scss +0 -76
  60. package/src/packages/previewImage/index.vue +0 -53
  61. package/src/packages/process/index.js +0 -1016
  62. package/src/packages/process/index.scss +0 -188
  63. package/src/packages/process/index.vue +0 -291
  64. package/src/packages/process/operation/backNode.vue +0 -396
  65. package/src/packages/process/operation/cancel.vue +0 -425
  66. package/src/packages/process/operation/ccTask.vue +0 -256
  67. package/src/packages/process/operation/complete.vue +0 -1384
  68. package/src/packages/process/operation/counterSign.vue +0 -498
  69. package/src/packages/process/operation/delegateTask.vue +0 -493
  70. package/src/packages/process/operation/index.js +0 -8
  71. package/src/packages/process/operation/index.scss +0 -212
  72. package/src/packages/process/operation/msgList.vue +0 -174
  73. package/src/packages/process/operation/treeNode.vue +0 -901
  74. package/src/packages/process/operation/treePerson.vue +0 -304
  75. package/src/packages/submitPopup/index.js +0 -708
  76. package/src/packages/submitPopup/index.scss +0 -190
  77. package/src/packages/submitPopup/index.vue +0 -125
  78. package/src/packages/tab/index.js +0 -236
  79. package/src/packages/tab/index.scss +0 -177
  80. package/src/packages/tab/index.vue +0 -155
  81. package/src/packages/tip/index.js +0 -80
  82. package/src/packages/tip/index.scss +0 -121
  83. package/src/packages/tip/index.vue +0 -57
  84. package/src/packages/viewAttchList/index.js +0 -138
  85. package/src/packages/viewAttchList/index.scss +0 -76
  86. package/src/packages/viewAttchList/index.vue +0 -121
  87. package/src/style.css +0 -80
  88. package/vite.config.ts +0 -118
  89. /package/{build/scripts → scripts}/postinstall.mjs +0 -0
  90. /package/{build/scripts → scripts}/switch-cli.mjs +0 -0
  91. /package/{build/scripts → scripts}/utils.mjs +0 -0
@@ -1,15 +0,0 @@
1
- <template>
2
- <div style="width: 100%; height: calc(100% - 40px);" v-if="url">
3
- <video style="height: 100%; width: 100%;" controls v-if="videoShow">
4
- <source :src="url" type="video/mp4" />
5
- </video>
6
-
7
- <iframe
8
- v-else
9
- style="height: 100%; border: unset; width: 100%;"
10
- :src="url"
11
- >
12
- </iframe>
13
- </div>
14
- </template>
15
- <script src="./index.js"></script>
@@ -1,286 +0,0 @@
1
- import { defineComponent } from "vue-demi";
2
-
3
- export default defineComponent({
4
- name: "preview-image",
5
- props: {
6
- // 图片列表
7
- images: {
8
- type: Array,
9
- defalut: () => [],
10
- },
11
- startPosition: {
12
- type: Number,
13
- defalut: 0,
14
- },
15
- // 展示
16
- visible: {
17
- type: Boolean,
18
- defalut: false,
19
- },
20
- // 当前位置
21
- indexd: {
22
- type: Number,
23
- defalut: 0,
24
- },
25
- // 单一展示
26
- isOne: {
27
- type: Boolean,
28
- defalut: false,
29
- },
30
- isStyle: {
31
- type: String,
32
- defalut: "",
33
- },
34
- },
35
- data() {
36
- return {
37
- imagesList: [],
38
-
39
- moveNum: 0,
40
- flag: false,
41
- // 当前屏幕宽度
42
- windowWidth: 0,
43
- windowHeight: 0,
44
- // 初始获取当前触摸位置
45
- startX: 0,
46
- startY: 0,
47
- // 移动计数
48
- move: 0,
49
- startMove: 0,
50
- // 阈值
51
- maxX: 0,
52
- duration:
53
- "transition-duration: 0.2s;transition-timing-function:ease;",
54
- isIndex: 1,
55
- show: false,
56
- displacement: {
57
- scale: 1,
58
- },
59
- styleZoom: "",
60
- styleOrigin: "",
61
- moveX: "-50%",
62
- moveY: "-50%",
63
- newScaleData: 1,
64
- };
65
- },
66
-
67
- watch: {
68
- images: {
69
- handler(val, preVal) {
70
- this.imagesList = val;
71
- // console.log("打印图片列表:::", this.imagesList);
72
- },
73
- //如果加了这个参数,值为true的话,就消除了惰性,watch会在创建后立即执行一次
74
- //那么首次执行,val为默认值,preVal为undefined
75
- immediate: true,
76
- //这个参数代表监听对象时,可以监听深度嵌套的对象属性
77
- deep: true,
78
- },
79
- visible: {
80
- handler(val, preVal) {
81
- this.show = val;
82
- // console.log("打印:::", val);
83
- },
84
- immediate: true,
85
- },
86
- indexd: {
87
- handler(val, preVal) {
88
- if (val >= 0) {
89
- this.isIndex = val + 1;
90
- this.move = val * 100 * -1;
91
- }
92
- },
93
- immediate: true,
94
- },
95
- },
96
-
97
- methods: {
98
- handelTouchstart(e) {
99
- let touches = e.touches;
100
- let events1 = touches[0];
101
- let events2 = touches[1];
102
-
103
- this.displacement.pageX = events1.pageX;
104
- this.displacement.pageY = events1.pageY;
105
-
106
- this.displacement.moveable = true;
107
-
108
- if (events2) {
109
- this.displacement.pageX2 = events2.pageX;
110
- this.displacement.pageY2 = events2.pageY;
111
- } else {
112
- /* this.touchstartView(); */
113
- this.duration =
114
- "transition-duration: 0.05s;transition-timing-function:linear";
115
- this.windowWidth =
116
- (document.documentElement.clientWidth ||
117
- document.body.clientWidth) / 100;
118
- this.windowHeight =
119
- (document.documentElement.clientHeight ||
120
- document.body.clientHeight) / 100;
121
- this.startX = e.touches[0].clientX;
122
- this.startY = e.touches[0].clientY;
123
- this.startMove = this.move;
124
- }
125
-
126
- /* console.log("touches", this.touches, this.events1, this.events2); */
127
- this.displacement.originScale = this.displacement.scale || 1;
128
- },
129
-
130
- handelTouchmove(e) {
131
- if (!this.displacement.moveable) {
132
- return;
133
- }
134
-
135
- e.preventDefault();
136
-
137
- let touches = e.touches;
138
- let events = touches[0];
139
- let events2 = touches[1];
140
-
141
- if (events2) {
142
- if (!this.displacement.pageX2) {
143
- this.displacement.pageX2 = events2.pageX;
144
- }
145
- if (!this.displacement.pageY2) {
146
- this.displacement.pageY2 = events2.pageY;
147
- }
148
-
149
- let zoom =
150
- this.getDistance(
151
- {
152
- x: events.pageX,
153
- y: events.pageY,
154
- },
155
- {
156
- x: events2.pageX,
157
- y: events2.pageY,
158
- }
159
- ) /
160
- this.getDistance(
161
- {
162
- x: this.displacement.pageX,
163
- y: this.displacement.pageY,
164
- },
165
- {
166
- x: this.displacement.pageX2,
167
- y: this.displacement.pageY2,
168
- }
169
- );
170
-
171
- let newScale = this.displacement.originScale * zoom;
172
- /* if (newScale > 1) {
173
- newScale = 1;
174
- } */
175
-
176
- if (newScale < 0.5) {
177
- newScale = 0.5;
178
- } else if (newScale > 3) {
179
- newScale = 3;
180
- }
181
-
182
- this.displacement.scale = newScale;
183
-
184
- this.styleZoom = `scale(${newScale})`;
185
- this.styleOrigin = `0 0`;
186
-
187
- console.log("styleZoom", newScale);
188
- } else {
189
- console.log(
190
- "移动",
191
- e.touches[0].clientX - this.startX,
192
- e.touches[0].clientY - this.startY
193
- );
194
-
195
- this.moveX = `calc(${
196
- (e.touches[0].clientX - this.startX) /
197
- this.displacement.scale
198
- }px - 50%)`;
199
-
200
- this.moveY = `calc(${
201
- (e.touches[0].clientY - this.startY) /
202
- this.displacement.scale
203
- }px - 50%)`;
204
- }
205
- },
206
-
207
- getDistance(start, stop) {
208
- // Math.hypot()计算参数的平方根
209
- return Math.hypot(stop.x - start.x, stop.y - start.y);
210
- },
211
-
212
- touchstartView(e) {
213
- if (this.isOne) return;
214
- // 获取元素
215
- this.duration =
216
- "transition-duration: 0.05s;transition-timing-function:linear";
217
- this.flag = true;
218
- this.windowWidth =
219
- (document.documentElement.clientWidth ||
220
- document.body.clientWidth) / 100;
221
- this.startX = e.touches[0].clientX;
222
- this.startMove = this.move;
223
- },
224
- touchmoveView(e) {
225
- if (this.isOne) return;
226
- // 判断当前操作方向
227
- if (this.startX > e.touches[0].clientX) {
228
- if (this.move <= -((this.imagesList.length - 1) * 100)) {
229
- this.move = -((this.imagesList.length - 1) * 100);
230
- } else {
231
- this.move =
232
- this.startMove +
233
- Math.ceil(
234
- (e.touches[0].clientX - this.startX) /
235
- this.windowWidth
236
- );
237
- }
238
- } else if (this.startX < e.touches[0].clientX && this.move < 0) {
239
- if (this.move >= 0) {
240
- this.move = 0;
241
- } else {
242
- this.move =
243
- this.startMove +
244
- Math.ceil(
245
- (e.touches[0].clientX - this.startX) /
246
- this.windowWidth
247
- );
248
- }
249
- }
250
- },
251
- touchendView() {
252
- if (this.isOne) return;
253
- this.duration =
254
- "transition-duration: 0.2s;transition-timing-function:ease";
255
- let paint = Math.floor(Math.abs(this.move / 100));
256
- let num = Math.abs((this.move / 100) % 1);
257
- if (num > 0.5) {
258
- this.isIndex = paint + 2;
259
- this.move = (paint + 1) * 100 * -1;
260
- } else {
261
- this.isIndex = paint + 1;
262
- this.move = paint * 100 * -1;
263
- }
264
- this.flag = false;
265
- },
266
- handleClose() {
267
- this.$emit("update:visible", false);
268
- },
269
- },
270
-
271
- mounted() {
272
- // 渲染组件到body
273
- this.$nextTick(() => {
274
- const body = document.getElementsByClassName("process-warp")[0]
275
- ? document.getElementsByClassName("process-warp")[0]
276
- : document
277
- .getElementsByClassName("sumbmitPopup-index-sumbit")[0]
278
- .getElementsByClassName("top-popup")[0];
279
- if (body.append) {
280
- body.append(this.$el);
281
- } else {
282
- body.appendChild(this.$el);
283
- }
284
- });
285
- },
286
- });
@@ -1,76 +0,0 @@
1
- .preview-image {
2
- position: absolute;
3
- top: 0;
4
- left: 0;
5
- width: 100vw;
6
- height: 100vh;
7
- z-index: 3999;
8
- }
9
-
10
- .preview-image-view {
11
- width: 100%;
12
- height: 100%;
13
-
14
- position: relative;
15
- }
16
-
17
- .preview-image-view--img {
18
- min-width: 100%;
19
- position: fixed;
20
- top: 50%;
21
- display: inline-flex;
22
- flex-wrap: nowrap;
23
- justify-content: flex-start;
24
- align-items: center;
25
- z-index: 2999;
26
- }
27
-
28
- .preview-image-view--img .img-view {
29
- width: 80%;
30
- box-sizing: border-box;
31
- margin: 0 10%;
32
- z-index: 2;
33
- position: relative;
34
- }
35
-
36
- .preview-image-mask {
37
- position: fixed;
38
- width: 100vw;
39
- height: 100vh;
40
- background-color: #000;
41
- opacity: 0.7;
42
- top: 0;
43
- left: 0;
44
- z-index: 1999;
45
- transition: all 0.2s ease;
46
- }
47
-
48
- .preview-image-view--page {
49
- position: absolute;
50
- width: 100%;
51
- bottom: 11px;
52
- z-index: 2999;
53
- display: flex;
54
- justify-content: center;
55
- }
56
-
57
- .preview-image-view--page .page-item {
58
- color: #fff;
59
- font-size: 15px;
60
- background-color: rgba(0, 0, 0, 0.5);
61
- padding: 1px 9px;
62
- border-radius: 11px;
63
- }
64
-
65
- .preview-image-view--one {
66
- position: absolute;
67
- z-index: 10000;
68
- width: 50%;
69
- left: 50%;
70
- top: 50%;
71
- transform: translate(-50%, -50%);
72
- }
73
-
74
- .preview-image-view--one .img-view {
75
- width: 100%;
76
- }
@@ -1,53 +0,0 @@
1
- <template>
2
- <div class="preview-image" v-if="visible">
3
- <div class="preview-image-mask" @click="handleClose"></div>
4
-
5
- <div
6
- v-if="!isOne"
7
- class="preview-image-view--img"
8
- :style="`transform: translate(${move}%,-50%);${duration}`"
9
- @touchstart="touchstartView"
10
- @touchmove="touchmoveView"
11
- @touchend="touchendView"
12
- >
13
- <div
14
- class="preview-image-mask"
15
- @click="handleClose"
16
- style="opacity: 0; z-index: 1;"
17
- ></div>
18
- <img
19
- class="img-view"
20
- v-for="(v, i) in imagesList"
21
- :key="i"
22
- :src="v"
23
- />
24
- <!-- :style="`transform: translateX(${i * 100}%);`" -->
25
- </div>
26
- <div
27
- v-else
28
- class="preview-image-view--one"
29
- @touchstart="handelTouchstart"
30
- @touchmove="handelTouchmove"
31
- :style="`transform:${styleZoom} translate(${moveX},${moveY});${duration};${
32
- styleOrigin ? `transformOrigin:${styleOrigin}` : ''
33
- };`"
34
- >
35
- <img
36
- class="img-view"
37
- v-for="(v, i) in imagesList"
38
- :key="i"
39
- :src="v"
40
- />
41
-
42
- <!-- :style="`transform: translateX(${i * 100}%);`" -->
43
- </div>
44
- <div class="preview-image-view--page" v-if="!isOne">
45
- <span class="page-item">{{ isIndex }}/{{ imagesList.length }}</span>
46
- </div>
47
- <div class="preview-image-view--close"></div>
48
- </div>
49
- </template>
50
- <script src="./index.js"></script>
51
- <style lang="scss" scoped>
52
- @import "./index.scss";
53
- </style>