ui-process-h5 0.1.36 → 0.1.40

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 (102) hide show
  1. package/build/configure/README.md +171 -0
  2. package/build/configure/package.json +27 -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 +48 -20
  8. package/src/App.vue +151 -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 +41 -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 +90 -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 +82 -0
  21. package/src/assets/js/vuePopper.js +123 -0
  22. package/src/assets/query.png +0 -0
  23. package/src/main.js +15 -0
  24. package/src/packages/attchUpload/index.js +371 -0
  25. package/src/packages/attchUpload/index.scss +136 -0
  26. package/src/packages/attchUpload/index.vue +173 -0
  27. package/src/packages/downSelect/index.js +81 -0
  28. package/src/packages/downSelect/index.scss +82 -0
  29. package/src/packages/downSelect/index.vue +54 -0
  30. package/src/packages/index.js +6 -0
  31. package/src/packages/popup/index.js +61 -0
  32. package/src/packages/popup/index.scss +174 -0
  33. package/src/packages/popup/index.vue +79 -0
  34. package/src/packages/preview/index.js +36 -0
  35. package/src/packages/preview/index.vue +15 -0
  36. package/src/packages/previewImage/index.js +158 -0
  37. package/src/packages/previewImage/index.scss +59 -0
  38. package/src/packages/previewImage/index.vue +32 -0
  39. package/{packages/components/process/src/process.vue → src/packages/process/index.js} +219 -440
  40. package/src/packages/process/index.scss +164 -0
  41. package/src/packages/process/index.vue +189 -0
  42. package/src/packages/process/operation/backNode.vue +393 -0
  43. package/src/packages/process/operation/cancel.vue +399 -0
  44. package/src/packages/process/operation/ccTask.vue +461 -0
  45. package/src/packages/process/operation/complete.vue +488 -0
  46. package/src/packages/process/operation/counterSign.vue +485 -0
  47. package/src/packages/process/operation/delegateTask.vue +480 -0
  48. package/src/packages/process/operation/restart.vue +305 -0
  49. package/src/packages/submitPopup/index.js +296 -0
  50. package/src/packages/submitPopup/index.scss +83 -0
  51. package/src/packages/submitPopup/index.vue +138 -0
  52. package/src/packages/tab/index.js +207 -0
  53. package/src/packages/tab/index.scss +176 -0
  54. package/src/packages/tab/index.vue +155 -0
  55. package/src/packages/tip/index.js +74 -0
  56. package/src/packages/tip/index.scss +82 -0
  57. package/src/packages/tip/index.vue +57 -0
  58. package/src/packages/viewAttchList/index.js +132 -0
  59. package/src/packages/viewAttchList/index.scss +76 -0
  60. package/src/packages/viewAttchList/index.vue +112 -0
  61. package/src/style.css +80 -0
  62. package/ui-process-h5/README.md +171 -0
  63. package/ui-process-h5/package.json +27 -0
  64. package/ui-process-h5/scripts/postinstall.mjs +14 -0
  65. package/ui-process-h5/scripts/switch-cli.mjs +4 -0
  66. package/ui-process-h5/scripts/utils.mjs +60 -0
  67. package/ui-process-h5/v2/style.css +1 -0
  68. package/ui-process-h5/v2/ui-process-h5.js +13467 -0
  69. package/ui-process-h5/v2/ui-process-h5.umd.cjs +67 -0
  70. package/ui-process-h5/v2.7/style.css +1 -0
  71. package/ui-process-h5/v2.7/ui-process-h5.js +12844 -0
  72. package/ui-process-h5/v2.7/ui-process-h5.umd.cjs +67 -0
  73. package/ui-process-h5/v3/style.css +1 -0
  74. package/ui-process-h5/v3/ui-process-h5.js +10336 -0
  75. package/ui-process-h5/v3/ui-process-h5.umd.cjs +55 -0
  76. package/vite.config.ts +78 -0
  77. package/packages/components/approval/index.js +0 -0
  78. package/packages/components/process/index.js +0 -8
  79. package/packages/components/process/src/attchlist-upload.vue +0 -585
  80. package/packages/components/process/src/operation/backNode.vue +0 -141
  81. package/packages/components/process/src/operation/cancel.vue +0 -170
  82. package/packages/components/process/src/operation/ccTask.vue +0 -170
  83. package/packages/components/process/src/operation/complete.vue +0 -224
  84. package/packages/components/process/src/operation/counterSign.vue +0 -178
  85. package/packages/components/process/src/operation/delegateTask.vue +0 -168
  86. package/packages/components/process/src/operation/restart.vue +0 -172
  87. package/packages/components/process/src/popup.vue +0 -230
  88. package/packages/components/process/src/tab.vue +0 -459
  89. package/packages/components/process/src/tip.vue +0 -207
  90. package/packages/index.js +0 -4
  91. /package/{packages/components/process/theme → src/assets}/img/add-file.png +0 -0
  92. /package/{packages/components/process/theme → src/assets}/img/del.png +0 -0
  93. /package/{packages/components/process/theme → src/assets}/img/doc.png +0 -0
  94. /package/{packages/components/process/theme → src/assets}/img/file.png +0 -0
  95. /package/{packages/components/process/theme → src/assets}/img/image.png +0 -0
  96. /package/{packages/components/process/theme → src/assets}/img/pdf.png +0 -0
  97. /package/{packages/components/process/theme → src/assets}/img/xls.png +0 -0
  98. /package/{packages/components/process/theme → src/assets}/img/zip.png +0 -0
  99. /package/{packages/components/process/theme → src/assets}/status/error.png +0 -0
  100. /package/{packages/components/process/theme → src/assets}/status/loading.png +0 -0
  101. /package/{packages/components/process/theme → src/assets}/status/success.png +0 -0
  102. /package/{packages/components/process/src → src/packages/process}/operation/index.js +0 -0
@@ -0,0 +1,158 @@
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
+ // 初始获取当前触摸位置
44
+ startX: 0,
45
+ // 移动计数
46
+ move: 0,
47
+ startMove: 0,
48
+ // 阈值
49
+ maxX: 0,
50
+ duration:
51
+ "transition-duration: 0.2s;transition-timing-function:ease;",
52
+ isIndex: 1,
53
+ show: false,
54
+ };
55
+ },
56
+
57
+ watch: {
58
+ images: {
59
+ handler(val, preVal) {
60
+ this.imagesList = val;
61
+ console.log("打印图片列表:::", this.imagesList);
62
+ },
63
+ //如果加了这个参数,值为true的话,就消除了惰性,watch会在创建后立即执行一次
64
+ //那么首次执行,val为默认值,preVal为undefined
65
+ immediate: true,
66
+ //这个参数代表监听对象时,可以监听深度嵌套的对象属性
67
+ deep: true,
68
+ },
69
+ visible: {
70
+ handler(val, preVal) {
71
+ this.show = val;
72
+ console.log("打印:::", val);
73
+ },
74
+ immediate: true,
75
+ },
76
+ indexd: {
77
+ handler(val, preVal) {
78
+ if (val >= 0) {
79
+ this.isIndex = val + 1;
80
+ this.move = val * 100 * -1;
81
+ }
82
+ },
83
+ immediate: true,
84
+ },
85
+ },
86
+
87
+ methods: {
88
+ touchstartView(e) {
89
+ if (this.isOne) return;
90
+ // 获取元素
91
+ this.duration =
92
+ "transition-duration: 0.05s;transition-timing-function:linear";
93
+ this.flag = true;
94
+ this.windowWidth =
95
+ (document.documentElement.clientWidth ||
96
+ document.body.clientWidth) / 100;
97
+ this.startX = e.touches[0].clientX;
98
+ this.startMove = this.move;
99
+ },
100
+ touchmoveView(e) {
101
+ if (this.isOne) return;
102
+ // 判断当前操作方向
103
+ if (this.startX > e.touches[0].clientX) {
104
+ if (this.move <= -((this.imagesList.length - 1) * 100)) {
105
+ this.move = -((this.imagesList.length - 1) * 100);
106
+ } else {
107
+ this.move =
108
+ this.startMove +
109
+ Math.ceil(
110
+ (e.touches[0].clientX - this.startX) /
111
+ this.windowWidth
112
+ );
113
+ }
114
+ } else if (this.startX < e.touches[0].clientX && this.move < 0) {
115
+ if (this.move >= 0) {
116
+ this.move = 0;
117
+ } else {
118
+ this.move =
119
+ this.startMove +
120
+ Math.ceil(
121
+ (e.touches[0].clientX - this.startX) /
122
+ this.windowWidth
123
+ );
124
+ }
125
+ }
126
+ },
127
+ touchendView() {
128
+ if (this.isOne) return;
129
+ this.duration =
130
+ "transition-duration: 0.2s;transition-timing-function:ease";
131
+ let paint = Math.floor(Math.abs(this.move / 100));
132
+ let num = Math.abs((this.move / 100) % 1);
133
+ if (num > 0.5) {
134
+ this.isIndex = paint + 2;
135
+ this.move = (paint + 1) * 100 * -1;
136
+ } else {
137
+ this.isIndex = paint + 1;
138
+ this.move = paint * 100 * -1;
139
+ }
140
+ this.flag = false;
141
+ },
142
+ handleClose() {
143
+ this.$emit("update:visible", false);
144
+ },
145
+ },
146
+
147
+ mounted() {
148
+ // 渲染组件到body
149
+ this.$nextTick(() => {
150
+ const body = document.querySelector("body");
151
+ if (body.append) {
152
+ body.append(this.$el);
153
+ } else {
154
+ body.appendChild(this.$el);
155
+ }
156
+ });
157
+ },
158
+ });
@@ -0,0 +1,59 @@
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: 100%;
30
+ }
31
+
32
+ .preview-image-mask {
33
+ position: fixed;
34
+ width: 100vw;
35
+ height: 100vh;
36
+ background-color: #000;
37
+ opacity: 0.7;
38
+ top: 0;
39
+ left: 0;
40
+ z-index: 1999;
41
+ transition: all 0.2s ease;
42
+ }
43
+
44
+ .preview-image-view--page {
45
+ position: absolute;
46
+ width: 100%;
47
+ bottom: 11px;
48
+ z-index: 2999;
49
+ display: flex;
50
+ justify-content: center;
51
+ }
52
+
53
+ .preview-image-view--page .page-item {
54
+ color: #fff;
55
+ font-size: 15px;
56
+ background-color: rgba(0, 0, 0, 0.5);
57
+ padding: 1px 9px;
58
+ border-radius: 11px;
59
+ }
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <div class="preview-image" v-if="visible">
3
+ <div class="preview-image-mask" @click="handleClose"></div>
4
+
5
+ <div
6
+ class="preview-image-view--img"
7
+ :style="`transform: translate(${move}%,-50%);${duration}${
8
+ isOne ? 'justify-content: center;width:auto;' : ''
9
+ }`"
10
+ @touchstart="touchstartView"
11
+ @touchmove="touchmoveView"
12
+ @touchend="touchendView"
13
+ >
14
+ <img
15
+ class="img-view"
16
+ v-for="(v, i) in imagesList"
17
+ :key="i"
18
+ :src="v"
19
+ :style="isOne ? isStyle : ''"
20
+ />
21
+ <!-- :style="`transform: translateX(${i * 100}%);`" -->
22
+ </div>
23
+ <div class="preview-image-view--page" v-if="!isOne">
24
+ <span class="page-item">{{ isIndex }}/{{ imagesList.length }}</span>
25
+ </div>
26
+ <div class="preview-image-view--close"></div>
27
+ </div>
28
+ </template>
29
+ <script src="./index.js"></script>
30
+ <style lang="scss" scoped>
31
+ @import "./index.scss";
32
+ </style>