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,229 +0,0 @@
1
- /**
2
- * 通用js方法封装处理
3
- * Copyright (c) 2019 top
4
- */
5
-
6
-
7
- // 日期格式化
8
- export function parseTime(time, pattern) {
9
- if (arguments.length === 0 || !time) {
10
- return null
11
- }
12
- const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'
13
- let date
14
- if (typeof time === 'object') {
15
- date = time
16
- } else {
17
- if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
18
- time = parseInt(time)
19
- } else if (typeof time === 'string') {
20
- time = time.replace(new RegExp(/-/gm), '/');
21
- }
22
- if ((typeof time === 'number') && (time.toString().length === 10)) {
23
- time = time * 1000
24
- }
25
- date = new Date(time)
26
- }
27
- const formatObj = {
28
- y: date.getFullYear(),
29
- m: date.getMonth() + 1,
30
- d: date.getDate(),
31
- h: date.getHours(),
32
- i: date.getMinutes(),
33
- s: date.getSeconds(),
34
- a: date.getDay()
35
- }
36
- const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
37
- let value = formatObj[key]
38
- // Note: getDay() returns 0 on Sunday
39
- if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
40
- if (result.length > 0 && value < 10) {
41
- value = '0' + value
42
- }
43
- return value || 0
44
- })
45
- return time_str
46
- }
47
-
48
- // 表单重置
49
- export function resetForm(refName) {
50
- if (this.$refs[refName]) {
51
- this.$refs[refName].resetFields();
52
- }
53
- }
54
-
55
- // 添加日期范围
56
- export function addDateRange(params, dateRange, propName) {
57
- var search = params;
58
- search.params = {};
59
- if (null != dateRange && '' != dateRange) {
60
- if (typeof (propName) === "undefined") {
61
- search.params["beginTime"] = dateRange[0];
62
- search.params["endTime"] = dateRange[1];
63
- } else {
64
- search.params["begin" + propName] = dateRange[0];
65
- search.params["end" + propName] = dateRange[1];
66
- }
67
- }
68
- return search;
69
- }
70
-
71
- // 回显数据字典
72
- export function selectDictLabel(datas, value) {
73
- var actions = [];
74
- Object.keys(datas).some((key) => {
75
- if (datas[key].dictValue == ('' + value)) {
76
- actions.push(datas[key].dictLabel);
77
- return true;
78
- }
79
- })
80
- return actions.join('');
81
- }
82
-
83
- // 回显数据字典(字符串数组)
84
- export function selectDictLabels(datas, value, separator) {
85
- var actions = [];
86
- var currentSeparator = undefined === separator ? "," : separator;
87
- var temp = value.split(currentSeparator);
88
- Object.keys(value.split(currentSeparator)).some((val) => {
89
- Object.keys(datas).some((key) => {
90
- if (datas[key].dictValue == ('' + temp[val])) {
91
- actions.push(datas[key].dictLabel + currentSeparator);
92
- }
93
- })
94
- })
95
- return actions.join('').substring(0, actions.join('').length - 1);
96
- }
97
-
98
-
99
-
100
- // 字符串格式化(%s )
101
- export function sprintf(str) {
102
- var args = arguments, flag = true, i = 1;
103
- str = str.replace(/%s/g, function () {
104
- var arg = args[i++];
105
- if (typeof arg === 'undefined') {
106
- flag = false;
107
- return '';
108
- }
109
- return arg;
110
- });
111
- return flag ? str : '';
112
- }
113
-
114
- // 转换字符串,undefined,null等转化为""
115
- export function praseStrEmpty(str) {
116
- if (!str || str == "undefined" || str == "null") {
117
- return "";
118
- }
119
- return str;
120
- }
121
-
122
- /**
123
- * 构造树型结构数据
124
- * @param {*} data 数据源
125
- * @param {*} id id字段 默认 'id'
126
- * @param {*} parentId 父节点字段 默认 'parentId'
127
- * @param {*} children 孩子节点字段 默认 'children'
128
- */
129
- export function handleTree(data, id, parentId, children) {
130
- let config = {
131
- id: id || 'id',
132
- parentId: parentId || 'parentId',
133
- childrenList: children || 'children'
134
- };
135
-
136
- var childrenListMap = {};
137
- var nodeIds = {};
138
- var tree = [];
139
-
140
- for (let d of data) {
141
- let parentId = d[config.parentId];
142
- if (childrenListMap[parentId] == null) {
143
- childrenListMap[parentId] = [];
144
- }
145
- nodeIds[d[config.id]] = d;
146
- childrenListMap[parentId].push(d);
147
- }
148
-
149
- for (let d of data) {
150
- let parentId = d[config.parentId];
151
- if (nodeIds[parentId] == null) {
152
- tree.push(d);
153
- }
154
- }
155
-
156
- for (let t of tree) {
157
- adaptToChildrenList(t);
158
- }
159
-
160
- function adaptToChildrenList(o) {
161
- if (childrenListMap[o[config.id]] !== null) {
162
- o[config.childrenList] = childrenListMap[o[config.id]];
163
- }
164
- if (o[config.childrenList]) {
165
- for (let c of o[config.childrenList]) {
166
- adaptToChildrenList(c);
167
- }
168
- }
169
- }
170
- return tree;
171
- }
172
-
173
- /**
174
- * 参数处理
175
- * @param {*} params 参数
176
- */
177
- export function tansParams(params) {
178
- let result = ''
179
- for (const propName of Object.keys(params)) {
180
- const value = params[propName];
181
- var part = encodeURIComponent(propName) + "=";
182
- if (value !== null && typeof (value) !== "undefined") {
183
- if (typeof value === 'object') {
184
- for (const key of Object.keys(value)) {
185
- if (value[key] !== null && typeof (value[key]) !== 'undefined') {
186
- let params = propName + '[' + key + ']';
187
- var subPart = encodeURIComponent(params) + "=";
188
- result += subPart + encodeURIComponent(value[key]) + "&";
189
- }
190
- }
191
- } else {
192
- result += part + encodeURIComponent(value) + "&";
193
- }
194
- }
195
- }
196
- return result
197
- }
198
-
199
-
200
- export function digitUppercase(n) {
201
- let fraction = ['角', '分'];
202
- let digit = [
203
- '零', '壹', '贰', '叁', '肆',
204
- '伍', '陆', '柒', '捌', '玖'
205
- ];
206
- let unit = [
207
- ['元', '万', '亿'],
208
- ['', '拾', '佰', '仟']
209
- ];
210
- let head = n < 0 ? '欠' : '';
211
- n = Math.abs(n);
212
- let s = '';
213
- for (let i = 0; i < fraction.length; i++) {
214
- s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
215
- }
216
- s = s || '整';
217
- n = Math.floor(n);
218
- for (let i = 0; i < unit[0].length && n > 0; i++) {
219
- var p = '';
220
- for (let j = 0; j < unit[1].length && n > 0; j++) {
221
- p = digit[n % 10] + unit[1][j] + p;
222
- n = Math.floor(n / 10);
223
- }
224
- s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
225
- }
226
- return head + s.replace(/(零.)*零元/, '元')
227
- .replace(/(零.)+/g, '零')
228
- .replace(/^整$/, '零元整');
229
- }
@@ -1,83 +0,0 @@
1
- export function getScrollOffset() {
2
- if (window.pageXOffset) {
3
- return {
4
- left: window.pageXOffset,
5
- top: window.pageYOffset
6
- };
7
- } else {
8
- // 问题: 为什么要相加
9
- // 因为这两个属性只有一个有用, 另一个肯定是0, 索性直接相加
10
- return {
11
- left: document.body.scrollLeft + document.documentElement.scrollLeft,
12
- top: document.body.scrollTop + document.documentElement.scrollTop
13
- };
14
- }
15
- }
16
- // 添加事件, element-ui判断是不是服务器环境
17
- export function on(element, event, handler) {
18
- if (element && event && handler) {
19
- element.addEventListener(event, handler, false);
20
- }
21
- }
22
- // 移除事件
23
- export function off(element, event, handler) {
24
- if (element && event) {
25
- element.removeEventListener(event, handler, false);
26
- }
27
- }
28
-
29
- export function isTooltip(el) {
30
- if (el.scrollWidth > el.offsetWidth) {
31
- el.addEventListener('mouseenter', (e) => {
32
- const vcTooltipDom = document.createElement("div");
33
- vcTooltipDom.className = "dc-tooltip"
34
- vcTooltipDom.setAttribute("id", "vc-tooltip");
35
- document.body.appendChild(vcTooltipDom);
36
-
37
- const tooltip = document.getElementById("vc-tooltip")
38
- const client = e.currentTarget.getBoundingClientRect()
39
- const top = client.top + 30
40
- const left = client.left + 20 - tooltip.offsetWidth / 2
41
- tooltip.style.cssText = ` top: ${top}px; left:${left}px; `;
42
- tooltip.innerHTML = e.currentTarget.getAttribute('tips')
43
- });
44
- el.addEventListener('mouseleave', function () {
45
- const vcTooltipDom = document.getElementById("vc-tooltip");
46
- vcTooltipDom && document.body.removeChild(vcTooltipDom);
47
- });
48
- }
49
- }
50
- // 判断是否为空
51
- function isNull(str) {
52
- if (str === null) return true;
53
- if (str === undefined) return true;
54
- if (str === "null") return true;
55
- if (str === "NaN") return true;
56
- if (str === "undefined") return true;
57
- if (str.length === 0) return true;
58
- // if (/^\s*$/i.test(str)) return true;
59
- return false;
60
- }
61
- // 隐藏手机号码中间四位
62
- function phoneNumberHiding(mobile) {
63
- if (isNull(mobile)) {
64
- return '';
65
- } else {
66
- if (!mobile) return;
67
- return (mobile + '').replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2")
68
- }
69
- }
70
- // 获取string最后几位
71
- function lastNumber(str, number) {
72
- return isNull(str) ? '' : str.substring(str.length - number)
73
- }
74
- // 获取最后一个指定字符之后的字符
75
- export function lastString(str, unit) {
76
- if (isNull(str)) return ''
77
- return str.slice(str.lastIndexOf(unit) + 1)
78
- }
79
- const baseConfig = {
80
- apiUrl: '/prod-api'
81
- // apiUrl: '/stage-api'
82
- }
83
- export { lastNumber, phoneNumberHiding, isNull, baseConfig }
@@ -1,123 +0,0 @@
1
- // 流体bug未解决, 需要多次获取dom, 感觉完全没必要
2
- import { getScrollOffset } from './utils';
3
- export function getPopoverPosition(popover, content, direction, CONTANT) {
4
- // 只负责启动, 自己去检测
5
- // 优化一些, 参数获取函数
6
- let result = { show: true };
7
- getOptions(result, popover, content, direction, CONTANT);
8
- let { left, top } = getScrollOffset();
9
- result.left += left;
10
- result.top += top;
11
- return result;
12
- }
13
- // 手打比 循环省性能
14
- const list = [
15
- 'top-end',
16
- 'left-end',
17
- 'top-start',
18
- 'right-end',
19
- 'top-middle',
20
- 'bottom-end',
21
- 'left-start',
22
- 'right-start',
23
- 'left-middle',
24
- 'right-middle',
25
- 'bottom-start',
26
- 'bottom-middle'
27
- ];
28
- // 只要获取一次就行, 不要浪费性能
29
- function getOptions(result, popover, content, direction, CONTANT = 10) {
30
- let myList = list.concat(),
31
- client = popover.getBoundingClientRect();
32
-
33
- // 判断 当前点击的内容区域是否在可视区域内 不在的话就自动按top显示
34
- const array = direction.split('-');
35
- let height = popover.offsetTop + popover.offsetHeight
36
- const clientHeight = popover.parentElement.clientHeight
37
- const scrollTop = popover.parentNode.scrollTop
38
- height = height - scrollTop
39
- if (height > clientHeight && array[0] === 'bottom') direction = 'top-' + array[1]
40
-
41
- myList.splice(list.indexOf(direction), 1);
42
- getDirection(result, {
43
- myList,
44
- direction,
45
- CONTANT,
46
- top: client.top,
47
- left: client.left,
48
- popoverWidth: popover.offsetWidth,
49
- contentWidth: content.offsetWidth,
50
- popoverHeight: popover.offsetHeight,
51
- contentHeight: content.offsetHeight
52
- });
53
- }
54
- function getDirection(result, options) {
55
- let {
56
- top,
57
- left,
58
- CONTANT,
59
- direction,
60
- contentWidth,
61
- popoverWidth,
62
- contentHeight,
63
- popoverHeight
64
- } = options;
65
- result.options = options;
66
- let main = direction.split('-')[0],
67
- around = direction.split('-')[1];
68
-
69
-
70
- if (main === 'top' || main === 'bottom') {
71
- if (around === 'start') {
72
- result.left = left;
73
- } else if (around === 'end') {
74
- result.left = left + popoverWidth - contentWidth;
75
- } else if (around === 'middle') {
76
- result.left = left + popoverWidth / 2 - contentWidth / 2;
77
- }
78
- if (main === 'top') {
79
- result.top = top - contentHeight - CONTANT;
80
- } else {
81
- result.top = top + popoverHeight + CONTANT;
82
- }
83
- } else if (main === 'left' || main === 'right') {
84
- if (around === 'start') {
85
- result.top = top;
86
- } else if (around === 'end') {
87
- result.top = top + popoverHeight - contentHeight;
88
- } else if (around === 'middle') {
89
- result.top = top + popoverHeight / 2 - contentHeight / 2;
90
- }
91
- if (main === 'left') {
92
- result.left = left - contentWidth - CONTANT;
93
- } else {
94
- result.left = left + popoverWidth + CONTANT;
95
- }
96
- }
97
-
98
- testDirection(result, options);
99
- }
100
-
101
- function testDirection(result, options) {
102
- let { left, top } = result,
103
- width = document.documentElement.clientWidth,
104
- height = document.documentElement.clientHeight;
105
- if (
106
- top < 0 ||
107
- left < 0 ||
108
- top + options.contentHeight > height ||
109
- left + options.contentWidth > width
110
- ) {
111
- // 还有可以循环的
112
- if (options.myList.length) {
113
- options.direction = options.myList.shift();
114
- getDirection(result, options);
115
- } else {
116
- // 实在不行就在父级身上
117
- result.left = options.left;
118
- result.right = options.right;
119
- }
120
- } else {
121
- result.show = true;
122
- }
123
- }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/src/main.js DELETED
@@ -1,17 +0,0 @@
1
- import { version } from "vue-demi";
2
- import App from "./App.vue";
3
- import { createApp } from "vue3";
4
- import Vue2 from "vue2";
5
- import Vue27 from "vue2.7";
6
- import Vconsole from "vconsole";
7
- if (version.startsWith("2.7.")) {
8
- new Vue2({ render: (h) => h(App) }).$mount("#app");
9
- } else if (version.startsWith("2.")) {
10
- new Vue27({ render: (h) => h(App) }).$mount("#app");
11
- } else {
12
- const app = createApp(App);
13
- app.mount("#app");
14
- }
15
-
16
- /* let vConsole = new Vconsole();
17
- export default vConsole */