eoss-mobiles 0.2.45 → 0.2.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-mobiles",
3
- "version": "0.2.45",
3
+ "version": "0.2.47",
4
4
  "description": "eoss内部移动端业务组件",
5
5
  "main": "lib/eoss-mobile.common.js",
6
6
  "files": [
@@ -69,7 +69,7 @@
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",
72
+ "vue-touch": "^2.0.0-beta.4",
73
73
  "vuedraggable": "^2.24.3",
74
74
  "wujie-vue2": "^1.0.5"
75
75
  },
@@ -21,7 +21,9 @@
21
21
  :isOpinionRequired="isOpinionRequired"
22
22
  :disabled="isBanInputOpinion != 0"
23
23
  :baseUrl="baseUrl"
24
- :isForceDisplayDefaultOptionForPrefix="isForceDisplayDefaultOptionForPrefix"
24
+ :isForceDisplayDefaultOptionForPrefix="
25
+ isForceDisplayDefaultOptionForPrefix
26
+ "
25
27
  :nodeDefaultSubmitOpinion="nodeDefaultSubmitOpinion"
26
28
  :nodeFixedOpinionSelectList="nodeFixedOpinionSelectList"
27
29
  :isHiddenOftenOpinion="isHiddenOftenOpinion == 1 ? false : true"
@@ -444,7 +446,7 @@ import Opinion from './Opinion.vue';
444
446
  import Reject from './Reject.vue';
445
447
  import Message from './Message.vue';
446
448
  import FlowMix from '../flowMix';
447
- import $ from '../../../../src/utils/util'
449
+ import $ from '../../../../src/utils/util';
448
450
  export default {
449
451
  name: 'Handle',
450
452
  inheritAttrs: false,
@@ -467,9 +469,9 @@ export default {
467
469
  type: [String, Number],
468
470
  default: 0
469
471
  },
470
- isAllCheck:{
471
- type:Boolean,
472
- default:false
472
+ isAllCheck: {
473
+ type: Boolean,
474
+ default: false
473
475
  },
474
476
  esign: {
475
477
  type: Boolean,
@@ -493,7 +495,7 @@ export default {
493
495
  objType: 'enterprise', //树点击对象
494
496
  selectType: 'employee', // 树 选择类型
495
497
  isNextBox: true, // 是否展开隐藏下步操作
496
- isForceDisplayDefaultOptionForPrefix:false,
498
+ isForceDisplayDefaultOptionForPrefix: false,
497
499
  isOtherUnit: true, //是否是外单位
498
500
  isShowNode: false,
499
501
  subProcessInfo: '',
@@ -738,7 +740,7 @@ export default {
738
740
  },
739
741
  type: 'post',
740
742
  params: formData,
741
- format:false
743
+ format: false
742
744
  })
743
745
  .then(res => {
744
746
  const { status, message } = res;
@@ -907,13 +909,22 @@ export default {
907
909
  : taskHandleHtml,
908
910
  type: 'post',
909
911
  params: formData,
910
- format:false
911
-
912
+ format: false
912
913
  }).then(res => {
913
914
  this.$toast.clear();
914
- if (res.status == 'success') {
915
- this.$toast('操作成功');
916
- this.$parent.$emit('success');
915
+ if (res.status == 'success' || res.status == 'readDealBackProcessing') {
916
+ if (res.status == 'readDealBackProcessing') {
917
+ this.$toast(
918
+ '由于阅办人数较多,任务后台执行中,稍后系统将为您推送阅办任务执行结果,请注意查收!'
919
+ );
920
+ setTimeout(() => {
921
+ this.$toast.clear();
922
+ this.$parent.$emit('success');
923
+ }, 1500);
924
+ } else {
925
+ this.$toast('操作成功');
926
+ this.$parent.$emit('success');
927
+ }
917
928
  } else {
918
929
  this.$emit('error');
919
930
  this.$toast(res.message);
@@ -1301,7 +1312,9 @@ export default {
1301
1312
  // that.isChooseNextNode = nodeInfoMap.nodeExtAttr.isChooseNextNode;
1302
1313
  that.isBanInputOpinion =
1303
1314
  nodeInfoMap.nodeExtAttr.isBanInputOpinion;
1304
- that.isForceDisplayDefaultOptionForPrefix = nodeInfoMap.nodeExtAttr.isForceDisplayDefaultOptionForPrefix == 1;
1315
+ that.isForceDisplayDefaultOptionForPrefix =
1316
+ nodeInfoMap.nodeExtAttr.isForceDisplayDefaultOptionForPrefix ==
1317
+ 1;
1305
1318
  }
1306
1319
  that.choiceOrgId = choiceOrgId;
1307
1320
  that.choiceDeptId = choiceDeptId;
@@ -1424,8 +1437,8 @@ export default {
1424
1437
  //如果当前为承办节点/会签节点,则展示本单位外单位办理人选择
1425
1438
  if (this.nodeType === 1 || this.nodeType === 2) {
1426
1439
  this.isMainSubProcess === true
1427
- ? (this.isNodeShowProcess = true)
1428
- : (this.isNodeShowProcess = false);
1440
+ ? (this.isNodeShowProcess = true)
1441
+ : (this.isNodeShowProcess = false);
1429
1442
  this.isMainSubProcess === true
1430
1443
  ? (this.isMainSubProcess = true)
1431
1444
  : (this.isMainSubProcess = false);
@@ -1438,7 +1451,7 @@ export default {
1438
1451
  this.isHideCurrentOrg = false;
1439
1452
  this.isHideOtherOrg = false;
1440
1453
  this.isMainSubProcess = false;
1441
- this.isNodeShowProcess = false
1454
+ this.isNodeShowProcess = false;
1442
1455
  this.isNextUser = true;
1443
1456
  // this.isMainSubProcess === true
1444
1457
  // ? (this.isMainSubProcess = true)
@@ -1,127 +1,191 @@
1
1
  <template>
2
2
  <div class="em-grid" @click="showHide = false">
3
- <van-grid v-bind="$attrs" v-on="$listeners" :column-num="columnNum">
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>
3
+ <van-grid v-bind="$attrs" v-on="$listeners" :border="border" :column-num="columnNum">
4
+ <draggable
5
+ v-if="draggable"
6
+ v-model="newData"
7
+ style="width: 100%;"
8
+ class="menu-list-draggable"
9
+ >
10
+ <transition-group class="menu-list-draggable-item" style="width: 100%;">
34
11
  <div
35
- class="van-info"
36
- :style="{ background: badgeColor || '' }"
37
- v-show="item.badge"
12
+ :style="`display: inline-block;width:${100 / columnNum}%`"
13
+ class="van-grid-item"
14
+ v-for="item of newData"
15
+ @mousedown.stop="onMouseDown(item)"
16
+ @mouseup.stop="onMouseUp($event, item)"
17
+ :key="item.id"
38
18
  >
39
- {{
40
- maxBadge &&
41
- !isNaN(item.badge) &&
42
- Number(maxBadge) < Number(item.badge)
43
- ? maxBadge + '+'
44
- : item.badge
45
- }}
19
+ <div
20
+ class="van-grid-item__content van-grid-item__content--center van-hairline"
21
+ >
22
+ <i
23
+ class="van-icon van-grid-item__icon"
24
+ :class="
25
+ item.icon.startsWith('http') && item.icon.indexOf('/') != -1
26
+ ? ''
27
+ : `van-icon-${item.icon}`
28
+ "
29
+ :style="{
30
+ fontSize:
31
+ item.iconSize || $attrs['icon-size']
32
+ ? item.iconSize || $attrs['icon-size']
33
+ : ''
34
+ }"
35
+ >
36
+ <img
37
+ v-if="
38
+ item.icon.startsWith('http') || item.icon.indexOf('/') != -1
39
+ "
40
+ class="van-icon__image"
41
+ :src="item.icon"
42
+ :style="{
43
+ width:
44
+ item.iconSize || $attrs['icon-size']
45
+ ? item.iconSize || $attrs['icon-size']
46
+ : '',
47
+ height:
48
+ item.iconSize || $attrs['icon-size']
49
+ ? item.iconSize || $attrs['icon-size']
50
+ : ''
51
+ }"
52
+ />
53
+ <div
54
+ v-show="item.dot"
55
+ :style="{ background: item.dotColor || '' }"
56
+ class="van-info van-info--dot"
57
+ ></div>
58
+ <div
59
+ class="van-info"
60
+ :style="{ background: badgeColor || '' }"
61
+ v-show="item.badge"
62
+ >
63
+ {{
64
+ maxBadge &&
65
+ !isNaN(item.badge) &&
66
+ Number(maxBadge) < Number(item.badge)
67
+ ? maxBadge + '+'
68
+ : item.badge
69
+ }}
70
+ </div>
71
+ </i>
72
+ <em-popover
73
+ v-model="item.showPopover"
74
+ :placement="placement"
75
+ :theme="popoverTheme"
76
+ @select="popoverSelect"
77
+ :actions="popoverActions"
78
+ ></em-popover>
79
+ <span class="van-grid-item__text">{{ item.text }}</span>
80
+ <van-icon
81
+ v-if="showHide && item.menuType != 'add'"
82
+ @click.stop="handleHide(item)"
83
+ name="clear"
84
+ size="20px"
85
+ class="em-grid-del"
86
+ />
87
+ <div v-if="item.showMenu" class="em-grid-select-box">
88
+ <van-icon size="30px" color="#fff" name="success" />
89
+ </div>
90
+ </div>
46
91
  </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
92
+ </transition-group>
93
+ </draggable>
94
+ <!-- <van-grid-item
64
95
  v-bind="item"
65
- v-for="(item, index) of newData" :key="index"
96
+ v-for="(item, index) of newData"
97
+ :key="index"
66
98
  :class="{ 'em-grid-ellipsis': textEllipsis }"
67
99
  :style="`width:${100 / columnNum}%;`"
100
+ @mousedown.stop="onMouseDown(item)"
101
+ @mouseup.stop="onMouseUp($event, item)"
102
+ v-show="newData && newData.length > 0 && !draggable"
103
+ > -->
104
+ <!-- @mousedown.stop="onMouseDown(item)"
105
+ @mouseup.stop="onMouseUp($event, item)" -->
106
+ <div
107
+ :style="`display: inline-block;width:${100 / columnNum}%`"
108
+ class="van-grid-item"
109
+ :class="{'border-none':!border}"
110
+ v-for="item of newData"
68
111
  @click.stop="goView($event, item)"
69
112
  v-show="newData && newData.length > 0 && !draggable"
70
-
113
+ :key="item.id"
71
114
  >
72
-
73
-
74
- <i
75
- @touchstart="touchstart(item,index)"
76
- @touchend="touchend(item,index)"
77
- class="van-icon van-grid-item__icon"
78
- :class="
79
- item.icon.startsWith('http') && item.icon.indexOf('/') != -1
80
- ? ''
81
- : `van-icon-${item.icon}`
82
- "
83
- :style="{ fontSize: item.iconSize || $attrs['icon-size'] ? item.iconSize || $attrs['icon-size'] : '' }"
115
+ <div
116
+ class="van-grid-item__content van-grid-item__content--center van-hairline"
84
117
  >
85
- <img
86
- v-if="item.icon.startsWith('http') || item.icon.indexOf('/') != -1"
87
- class="van-icon__image"
88
- :src="item.icon"
118
+ <i
119
+ class="van-icon van-grid-item__icon"
120
+ :class="
121
+ item.icon.startsWith('http') && item.icon.indexOf('/') != -1
122
+ ? ''
123
+ : `van-icon-${item.icon}`
124
+ "
89
125
  :style="{
90
- width: item.iconSize || $attrs['icon-size'] ? item.iconSize || $attrs['icon-size']: '',
91
- height: item.iconSize || $attrs['icon-size'] ? item.iconSize || $attrs['icon-size'] : ''
126
+ fontSize:
127
+ item.iconSize || $attrs['icon-size']
128
+ ? item.iconSize || $attrs['icon-size']
129
+ : ''
92
130
  }"
93
- />
94
- <div
95
- v-show="item.dot"
96
- :style="{ background: item.dotColor || '' }"
97
- class="van-info van-info--dot"
98
- ></div>
99
- <div
100
- class="van-info"
101
- :style="{ background: badgeColor || '' }"
102
- v-show="item.badge"
103
131
  >
104
- {{
105
- maxBadge &&
106
- !isNaN(item.badge) &&
107
- Number(maxBadge) < Number(item.badge)
108
- ? maxBadge + '+'
109
- : item.badge
110
- }}
132
+ <img
133
+ v-if="
134
+ item.icon.startsWith('http') || item.icon.indexOf('/') != -1
135
+ "
136
+ class="van-icon__image"
137
+ :src="item.icon"
138
+ :style="{
139
+ width:
140
+ item.iconSize || $attrs['icon-size']
141
+ ? item.iconSize || $attrs['icon-size']
142
+ : '',
143
+ height:
144
+ item.iconSize || $attrs['icon-size']
145
+ ? item.iconSize || $attrs['icon-size']
146
+ : ''
147
+ }"
148
+ />
149
+ <div
150
+ v-show="item.dot"
151
+ :style="{ background: item.dotColor || '' }"
152
+ class="van-info van-info--dot"
153
+ ></div>
154
+ <div
155
+ class="van-info"
156
+ :style="{ background: badgeColor || '' }"
157
+ v-show="item.badge"
158
+ >
159
+ {{
160
+ maxBadge &&
161
+ !isNaN(item.badge) &&
162
+ Number(maxBadge) < Number(item.badge)
163
+ ? maxBadge + '+'
164
+ : item.badge
165
+ }}
166
+ </div>
167
+ </i>
168
+ <em-popover
169
+ v-model="item.showPopover"
170
+ :placement="placement"
171
+ @select="popoverSelect($event,item)"
172
+ :theme="popoverTheme"
173
+ :actions="popoverActions"
174
+ ></em-popover>
175
+ <span class="van-grid-item__text">{{ item.text }}</span>
176
+ <van-icon
177
+ v-if="showHide && item.menuType != 'add'"
178
+ @click.stop="handleHide(item)"
179
+ name="clear"
180
+ size="20px"
181
+ class="em-grid-del"
182
+ />
183
+ <div v-if="item.showMenu" class="em-grid-select-box">
184
+ <van-icon size="30px" color="#fff" name="success" />
111
185
  </div>
112
- </i>
113
- <span class="van-grid-item__text">{{ item.text }}</span>
114
- <van-icon
115
- v-if="showHide && item.menuType != 'add'"
116
- @click.stop="handleHide(item)"
117
- name="clear"
118
- size="20px"
119
- class="em-grid-del"
120
- />
121
- <div v-if="item.showMenu" class="em-grid-select-box">
122
- <van-icon size="30px" color="#fff" name="success" />
123
186
  </div>
124
- </van-grid-item>
187
+ </div>
188
+ <!-- </van-grid-item> -->
125
189
  <slot v-show="newData && newData.length == 0" />
126
190
  </van-grid>
127
191
  <em-popup style="width:80%;height:50%" v-if="show" v-model="show">
@@ -203,18 +267,39 @@ export default {
203
267
  type: String,
204
268
  default: '40px'
205
269
  },
206
- draggable:{
270
+ draggable: {
271
+ type: Boolean,
272
+ default: false
273
+ },
274
+ popoverActions: {
275
+ type: Array,
276
+ default: () => [{ text: '隐藏菜单',type:'hideMenu' }]
277
+ },
278
+ isTouch: {
279
+ type: Boolean,
280
+ default: false
281
+ },
282
+ placement:{
283
+ type:String,
284
+ default:'top'
285
+ },
286
+ popoverTheme:{
287
+ type:String,
288
+ default:'dark'
289
+ },
290
+ border:{
207
291
  type:Boolean,
208
- default:false
209
- }
292
+ default:true
293
+ }
210
294
  },
211
295
  data() {
212
296
  return {
213
- lastTapTime: 0,
214
297
  timer: null,
215
298
  showHide: false,
299
+ isLongPress: false,
216
300
  newData: [],
217
301
  show: false,
302
+ showPopover: false,
218
303
  selectMenuArr: [],
219
304
  hideMenuList: []
220
305
  };
@@ -237,11 +322,34 @@ export default {
237
322
  }
238
323
  },
239
324
  methods: {
240
- touchstart(val,inexd){
241
- console.log('点击了了')
325
+ popoverSelect(val, item) {
326
+ if(val.type == 'hideMenu'){
327
+ this.handleHide(item)
328
+ }else{
329
+ this.$emit('touchSelect',{action:val,data:item})
330
+ }
242
331
  },
243
- touchend(val,a){
244
- console.log('松开了')
332
+ onMouseDown(item) {
333
+ // this.showPopover = true
334
+ if (this.draggable || !this.isTouch) return;
335
+ this.isLongPress = false;
336
+ this.timer = setTimeout(() => {
337
+ if (this.isLongPress === false) {
338
+ this.isLongPress = true;
339
+ this.lastTapTime = new Date().getTime();
340
+ this.$set(item, 'showPopover', true);
341
+ }
342
+ }, 500);
343
+ },
344
+ onMouseUp($event, item) {
345
+ if (this.isLongPress === false) {
346
+ this.lastTapTime = new Date().getTime();
347
+ this.$set(item, 'showPopover', false);
348
+ this.goView($event, item);
349
+ // 执行相应的操作
350
+ }
351
+ this.isLongPress = false;
352
+ clearTimeout(this.timer);
245
353
  },
246
354
  hideDelIcon() {
247
355
  this.showHide = false;
@@ -255,8 +363,10 @@ export default {
255
363
  );
256
364
  this.$emit('hide', hideArr);
257
365
  } else {
258
- let hide = this.hideMenuList.filter(x => str.indexOf(x[this.hideMenuKey]) == -1 );
259
- hide = hide.map(x => x[this.hideMenuKey])
366
+ let hide = this.hideMenuList.filter(
367
+ x => str.indexOf(x[this.hideMenuKey]) == -1
368
+ );
369
+ hide = hide.map(x => x[this.hideMenuKey]);
260
370
  this.$emit('hide', hide.join(','));
261
371
  }
262
372
  this.selectMenuArr = [];
@@ -334,6 +444,9 @@ export default {
334
444
  const currentTime = new Date().getTime();
335
445
  const tapLength = currentTime - this.lastTapTime;
336
446
  this.lastTapTime = currentTime;
447
+ // if (tapLength > 300) {
448
+ // return;
449
+ // }
337
450
  if (this.isHideMenu) {
338
451
  if (tapLength < 300) {
339
452
  this.handleDoubleClick(val);
@@ -345,8 +458,8 @@ export default {
345
458
  return;
346
459
  }
347
460
  this.timer = setTimeout(() => {
348
- this.$emit('click', val, event);
349
- this.targetStop && event.stopPropagation();
461
+ this.$emit('click', val, event);
462
+ this.targetStop && event.stopPropagation();
350
463
  }, 300);
351
464
  } else {
352
465
  this.$emit('click', val, event);
@@ -328,6 +328,7 @@ export default {
328
328
  },
329
329
  methods: {
330
330
  handleClick(val) {
331
+ if (this.disabled || this.readonly) return;
331
332
  if (this.linkTag) {
332
333
  this.$emit('tagClick', val);
333
334
  } else {
@@ -1 +1 @@
1
- .em-grid-popup,.em-grid-popup-button{display:-webkit-box;display:-ms-flexbox}.em-grid-del{position:absolute;top:5px;right:5px}.em-grid-popup{padding:10px;height:100%;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.em-grid-popup-label{text-align:center;font-size:16px;color:#000;font-weight:700;margin-bottom:10px}.em-grid-popup-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;overflow-x:hidden}.em-grid-popup-button{display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:10px}.em-grid-select-box{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.em-grid .van-popup{border-radius:5px}
1
+ .em-grid-popup,.em-grid-popup-button{display:-webkit-box;display:-ms-flexbox}.em-grid-del{position:absolute;top:5px;right:5px}.em-grid-popup{padding:10px;height:100%;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.em-grid-popup-label{text-align:center;font-size:16px;color:#000;font-weight:700;margin-bottom:10px}.em-grid-popup-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow-y:auto;overflow-x:hidden}.em-grid-popup-button{display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-top:10px}.em-grid-select-box{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.em-grid .van-popup{border-radius:5px}.em-grid .border-none .van-grid-item__content::after{border:none}