eoss-mobiles 0.2.43 → 0.2.45
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.
- package/lib/action-sheet.js +2 -2
- package/lib/button-group.js +2 -2
- package/lib/button.js +2 -2
- package/lib/calendar.js +2 -2
- package/lib/cascader.js +2 -2
- package/lib/cell.js +2 -2
- package/lib/checkbox.js +5 -5
- package/lib/circle.js +2 -2
- package/lib/count-down.js +2 -2
- package/lib/date.js +2 -2
- package/lib/empty.js +2 -2
- package/lib/eoss-mobile.common.js +318 -39
- package/lib/esign.js +2 -2
- package/lib/field.js +2 -2
- package/lib/flow-btn.js +5 -5
- package/lib/flow-list.js +5 -5
- package/lib/flow.js +22 -21
- package/lib/form.js +2 -2
- package/lib/grid-item.js +2 -2
- package/lib/grid.js +289 -9
- package/lib/image-preview.js +2 -2
- package/lib/image.js +2 -2
- package/lib/index.js +1 -1
- package/lib/list.js +2 -2
- package/lib/loading.js +2 -2
- package/lib/nav-bar.js +2 -2
- package/lib/notice-bar.js +2 -2
- package/lib/pagination.js +2 -2
- package/lib/picker.js +6 -5
- package/lib/popover.js +2 -2
- package/lib/popup.js +2 -2
- package/lib/pull-refresh.js +2 -2
- package/lib/radio.js +6 -5
- package/lib/rate.js +2 -2
- package/lib/retrial-auth.js +5 -5
- package/lib/search.js +2 -2
- package/lib/selector.js +6 -5
- package/lib/skeleton.js +2 -2
- package/lib/stepper.js +2 -2
- package/lib/swipe.js +2 -2
- package/lib/switch.js +2 -2
- package/lib/tab.js +2 -2
- package/lib/table-column.js +6 -5
- package/lib/table.js +7 -7
- package/lib/tabs.js +2 -2
- package/lib/tag.js +2 -2
- package/lib/uploader.js +2 -2
- package/lib/utils/axios.js +3 -3
- package/package.json +3 -1
- package/packages/flow/src/components/StartFlow.vue +9 -9
- package/packages/grid/src/main.vue +84 -7
- package/src/index.js +1 -1
- package/src/utils/axios.js +3 -3
package/lib/utils/axios.js
CHANGED
|
@@ -30,14 +30,14 @@ var ajax = function ajax(url) {
|
|
|
30
30
|
baseURL: apiUrl,
|
|
31
31
|
timeout: 60000,
|
|
32
32
|
headers: {
|
|
33
|
-
|
|
33
|
+
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
34
34
|
},
|
|
35
35
|
withCredentials: false
|
|
36
36
|
});
|
|
37
37
|
http.interceptors.request.use(function (config) {
|
|
38
38
|
if ((params.params || params) instanceof FormData === false) {
|
|
39
39
|
if (type === 'post' && !format) {
|
|
40
|
-
config.
|
|
40
|
+
config.data = _qs2.default.stringify(params.params || params);
|
|
41
41
|
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
42
42
|
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
43
43
|
}
|
|
@@ -88,6 +88,7 @@ var ajax = function ajax(url) {
|
|
|
88
88
|
if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
|
|
89
89
|
delete config.headers.deviceId;
|
|
90
90
|
}
|
|
91
|
+
|
|
91
92
|
return config;
|
|
92
93
|
}, function (error) {
|
|
93
94
|
return Promise.error(error);
|
|
@@ -192,7 +193,6 @@ var base = {
|
|
|
192
193
|
}, headers, format);
|
|
193
194
|
},
|
|
194
195
|
post: function post(url, params, headers, format) {
|
|
195
|
-
console.log(params, 'params');
|
|
196
196
|
if (params.params) {
|
|
197
197
|
params.params.userId = params.params.userId || _util2.default.getStorage('userId');
|
|
198
198
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eoss-mobiles",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.45",
|
|
4
4
|
"description": "eoss内部移动端业务组件",
|
|
5
5
|
"main": "lib/eoss-mobile.common.js",
|
|
6
6
|
"files": [
|
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
"v-tap": "3.0.3",
|
|
70
70
|
"video.js": "^8.0.4",
|
|
71
71
|
"vue-esign": "^1.0.5",
|
|
72
|
+
"vue-touch-ripple": "^4.1.1",
|
|
73
|
+
"vuedraggable": "^2.24.3",
|
|
72
74
|
"wujie-vue2": "^1.0.5"
|
|
73
75
|
},
|
|
74
76
|
"peerDependencies": {
|
|
@@ -295,14 +295,14 @@ export default {
|
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
297
|
let formData = new FormData();
|
|
298
|
-
if (this.form.isImageOpinion == 1) {
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
for (let key in info) {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
298
|
+
// if (this.form.isImageOpinion == 1) {
|
|
299
|
+
// formData.append('file', this.file);
|
|
300
|
+
// }
|
|
301
|
+
// for (let key in info) {
|
|
302
|
+
// if (info[key] !== '' && info[key] !== undefined) {
|
|
303
|
+
// formData.append(key, info[key]);
|
|
304
|
+
// }
|
|
305
|
+
// }
|
|
306
306
|
this.$toast.loading({
|
|
307
307
|
message: '加载中...',
|
|
308
308
|
forbidClick: true,
|
|
@@ -314,7 +314,7 @@ export default {
|
|
|
314
314
|
request({
|
|
315
315
|
url: _that.apiBaseUrl ? _that.apiBaseUrl + registerNew : registerNew,
|
|
316
316
|
type: 'post',
|
|
317
|
-
params:
|
|
317
|
+
params: info,
|
|
318
318
|
format:false
|
|
319
319
|
}).then(res => {
|
|
320
320
|
this.$toast.clear();
|
|
@@ -1,16 +1,79 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="em-grid" @click="showHide = false">
|
|
3
3
|
<van-grid v-bind="$attrs" v-on="$listeners" :column-num="columnNum">
|
|
4
|
-
|
|
4
|
+
<draggable v-if="draggable" v-model="newData" style="width: 100%;" class="menu-list-draggable">
|
|
5
|
+
<transition-group class="menu-list-draggable-item" style="width: 100%;">
|
|
6
|
+
<div :style="`display: inline-block;width:${100/columnNum}%`" class="van-grid-item" v-for="(item, index) of newData" @click.stop="goView($event, item)" :key="item.id">
|
|
7
|
+
<div class="van-grid-item__content van-grid-item__content--center van-hairline">
|
|
8
|
+
|
|
9
|
+
<i
|
|
10
|
+
@touchstart="touchstart(item,index)"
|
|
11
|
+
@touchend="touchend(item,index)"
|
|
12
|
+
class="van-icon van-grid-item__icon"
|
|
13
|
+
:class="
|
|
14
|
+
item.icon.startsWith('http') && item.icon.indexOf('/') != -1
|
|
15
|
+
? ''
|
|
16
|
+
: `van-icon-${item.icon}`
|
|
17
|
+
"
|
|
18
|
+
:style="{ fontSize: item.iconSize || $attrs['icon-size'] ? item.iconSize || $attrs['icon-size'] : '' }"
|
|
19
|
+
>
|
|
20
|
+
<img
|
|
21
|
+
v-if="item.icon.startsWith('http') || item.icon.indexOf('/') != -1"
|
|
22
|
+
class="van-icon__image"
|
|
23
|
+
:src="item.icon"
|
|
24
|
+
:style="{
|
|
25
|
+
width: item.iconSize || $attrs['icon-size'] ? item.iconSize || $attrs['icon-size']: '',
|
|
26
|
+
height: item.iconSize || $attrs['icon-size'] ? item.iconSize || $attrs['icon-size'] : ''
|
|
27
|
+
}"
|
|
28
|
+
/>
|
|
29
|
+
<div
|
|
30
|
+
v-show="item.dot"
|
|
31
|
+
:style="{ background: item.dotColor || '' }"
|
|
32
|
+
class="van-info van-info--dot"
|
|
33
|
+
></div>
|
|
34
|
+
<div
|
|
35
|
+
class="van-info"
|
|
36
|
+
:style="{ background: badgeColor || '' }"
|
|
37
|
+
v-show="item.badge"
|
|
38
|
+
>
|
|
39
|
+
{{
|
|
40
|
+
maxBadge &&
|
|
41
|
+
!isNaN(item.badge) &&
|
|
42
|
+
Number(maxBadge) < Number(item.badge)
|
|
43
|
+
? maxBadge + '+'
|
|
44
|
+
: item.badge
|
|
45
|
+
}}
|
|
46
|
+
</div>
|
|
47
|
+
</i>
|
|
48
|
+
<span class="van-grid-item__text">{{ item.text }}</span>
|
|
49
|
+
<van-icon
|
|
50
|
+
v-if="showHide && item.menuType != 'add'"
|
|
51
|
+
@click.stop="handleHide(item)"
|
|
52
|
+
name="clear"
|
|
53
|
+
size="20px"
|
|
54
|
+
class="em-grid-del"
|
|
55
|
+
/>
|
|
56
|
+
<div v-if="item.showMenu" class="em-grid-select-box">
|
|
57
|
+
<van-icon size="30px" color="#fff" name="success" />
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
</transition-group>
|
|
62
|
+
</draggable>
|
|
63
|
+
<van-grid-item
|
|
5
64
|
v-bind="item"
|
|
65
|
+
v-for="(item, index) of newData" :key="index"
|
|
6
66
|
:class="{ 'em-grid-ellipsis': textEllipsis }"
|
|
7
67
|
:style="`width:${100 / columnNum}%;`"
|
|
8
68
|
@click.stop="goView($event, item)"
|
|
9
|
-
v-show="newData && newData.length > 0"
|
|
10
|
-
|
|
11
|
-
:key="index"
|
|
69
|
+
v-show="newData && newData.length > 0 && !draggable"
|
|
70
|
+
|
|
12
71
|
>
|
|
72
|
+
|
|
73
|
+
|
|
13
74
|
<i
|
|
75
|
+
@touchstart="touchstart(item,index)"
|
|
76
|
+
@touchend="touchend(item,index)"
|
|
14
77
|
class="van-icon van-grid-item__icon"
|
|
15
78
|
:class="
|
|
16
79
|
item.icon.startsWith('http') && item.icon.indexOf('/') != -1
|
|
@@ -69,7 +132,7 @@
|
|
|
69
132
|
:data="hideMenuList"
|
|
70
133
|
v-bind="$attrs"
|
|
71
134
|
:border="false"
|
|
72
|
-
:column-num="
|
|
135
|
+
:column-num="columnNum"
|
|
73
136
|
@click="selectMenu"
|
|
74
137
|
/>
|
|
75
138
|
<div class="em-grid-popup-button">
|
|
@@ -90,9 +153,11 @@
|
|
|
90
153
|
</template>
|
|
91
154
|
|
|
92
155
|
<script>
|
|
156
|
+
import draggable from 'vuedraggable';
|
|
93
157
|
export default {
|
|
94
158
|
name: 'EmGrid',
|
|
95
159
|
inheritAttrs: false,
|
|
160
|
+
components: { draggable },
|
|
96
161
|
props: {
|
|
97
162
|
data: {
|
|
98
163
|
type: Array,
|
|
@@ -137,6 +202,10 @@ export default {
|
|
|
137
202
|
addMenuIconSize: {
|
|
138
203
|
type: String,
|
|
139
204
|
default: '40px'
|
|
205
|
+
},
|
|
206
|
+
draggable:{
|
|
207
|
+
type:Boolean,
|
|
208
|
+
default:false
|
|
140
209
|
}
|
|
141
210
|
},
|
|
142
211
|
data() {
|
|
@@ -168,11 +237,18 @@ export default {
|
|
|
168
237
|
}
|
|
169
238
|
},
|
|
170
239
|
methods: {
|
|
240
|
+
touchstart(val,inexd){
|
|
241
|
+
console.log('点击了了')
|
|
242
|
+
},
|
|
243
|
+
touchend(val,a){
|
|
244
|
+
console.log('松开了')
|
|
245
|
+
},
|
|
171
246
|
hideDelIcon() {
|
|
172
247
|
this.showHide = false;
|
|
173
248
|
},
|
|
174
249
|
handleShowMenu() {
|
|
175
|
-
let str = this.selectMenuArr
|
|
250
|
+
let str = this.selectMenuArr;
|
|
251
|
+
// let str = this.selectMenuArr.join(',');
|
|
176
252
|
if (Array.isArray(this.hideMenu)) {
|
|
177
253
|
let hideArr = this.hideMenuList.filter(
|
|
178
254
|
x => str.indexOf(x[this.hideMenuKey]) == -1
|
|
@@ -199,7 +275,8 @@ export default {
|
|
|
199
275
|
defaultHide(val) {
|
|
200
276
|
if (this.isHideMenu && val != undefined) {
|
|
201
277
|
if (Array.isArray(val)) {
|
|
202
|
-
let menuKey = val.map(x => x.id)
|
|
278
|
+
let menuKey = val.map(x => x.id);
|
|
279
|
+
// let menuKey = val.map(x => x.id).join(',');
|
|
203
280
|
this.newData = this.data.filter(
|
|
204
281
|
x => menuKey.indexOf(x[this.hideMenuKey]) == -1
|
|
205
282
|
);
|
package/src/index.js
CHANGED
package/src/utils/axios.js
CHANGED
|
@@ -9,7 +9,7 @@ const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
|
|
|
9
9
|
baseURL: apiUrl,
|
|
10
10
|
timeout: 60000,
|
|
11
11
|
headers: {
|
|
12
|
-
|
|
12
|
+
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
|
|
13
13
|
},
|
|
14
14
|
withCredentials: false
|
|
15
15
|
});
|
|
@@ -17,7 +17,7 @@ const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
|
|
|
17
17
|
config => {
|
|
18
18
|
if ((params.params || params) instanceof FormData === false) {
|
|
19
19
|
if (type === 'post' && !format) {
|
|
20
|
-
config.
|
|
20
|
+
config.data = qs.stringify(params.params || params);
|
|
21
21
|
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
22
22
|
config.headers['content-type'] =
|
|
23
23
|
'application/x-www-form-urlencoded;charset=UTF-8';
|
|
@@ -77,6 +77,7 @@ const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
|
|
|
77
77
|
) {
|
|
78
78
|
delete config.headers.deviceId;
|
|
79
79
|
}
|
|
80
|
+
|
|
80
81
|
return config;
|
|
81
82
|
},
|
|
82
83
|
error => {
|
|
@@ -189,7 +190,6 @@ const base = {
|
|
|
189
190
|
);
|
|
190
191
|
},
|
|
191
192
|
post: (url, params, headers, format) => {
|
|
192
|
-
console.log(params, 'params');
|
|
193
193
|
if (params.params) {
|
|
194
194
|
params.params.userId = params.params.userId || $.getStorage('userId');
|
|
195
195
|
} else {
|