eoss-mobiles 0.2.45 → 0.2.46

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/picker.js CHANGED
@@ -2041,7 +2041,7 @@ module.exports = require("sm-crypto");
2041
2041
  // ESM COMPAT FLAG
2042
2042
  __webpack_require__.r(__webpack_exports__);
2043
2043
 
2044
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/picker/src/main.vue?vue&type=template&id=6f8d4ed8&
2044
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/picker/src/main.vue?vue&type=template&id=6b7f8129&
2045
2045
  var render = function () {
2046
2046
  var _vm = this
2047
2047
  var _h = _vm.$createElement
@@ -2313,7 +2313,7 @@ var staticRenderFns = []
2313
2313
  render._withStripped = true
2314
2314
 
2315
2315
 
2316
- // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=6f8d4ed8&
2316
+ // CONCATENATED MODULE: ./packages/picker/src/main.vue?vue&type=template&id=6b7f8129&
2317
2317
 
2318
2318
  // EXTERNAL MODULE: ./src/config/api.js
2319
2319
  var api = __webpack_require__(2);
@@ -2662,6 +2662,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
2662
2662
 
2663
2663
  methods: {
2664
2664
  handleClick: function handleClick(val) {
2665
+ if (this.disabled || this.readonly) return;
2665
2666
  if (this.linkTag) {
2666
2667
  this.$emit('tagClick', val);
2667
2668
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-mobiles",
3
- "version": "0.2.45",
3
+ "version": "0.2.46",
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,189 @@
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
- <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>
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}%;`"
68
- @click.stop="goView($event, item)"
100
+ @mousedown.stop="onMouseDown(item)"
101
+ @mouseup.stop="onMouseUp($event, item)"
69
102
  v-show="newData && newData.length > 0 && !draggable"
70
-
103
+ > -->
104
+ <div
105
+ :style="`display: inline-block;width:${100 / columnNum}%`"
106
+ class="van-grid-item"
107
+ v-for="item of newData"
108
+ @mousedown.stop="onMouseDown(item)"
109
+ @mouseup.stop="onMouseUp($event, item)"
110
+ v-show="newData && newData.length > 0 && !draggable"
111
+ :key="item.id"
71
112
  >
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'] : '' }"
113
+ <div
114
+ class="van-grid-item__content van-grid-item__content--center van-hairline"
84
115
  >
85
- <img
86
- v-if="item.icon.startsWith('http') || item.icon.indexOf('/') != -1"
87
- class="van-icon__image"
88
- :src="item.icon"
116
+ <i
117
+ class="van-icon van-grid-item__icon"
118
+ :class="
119
+ item.icon.startsWith('http') && item.icon.indexOf('/') != -1
120
+ ? ''
121
+ : `van-icon-${item.icon}`
122
+ "
89
123
  :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'] : ''
124
+ fontSize:
125
+ item.iconSize || $attrs['icon-size']
126
+ ? item.iconSize || $attrs['icon-size']
127
+ : ''
92
128
  }"
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
129
  >
104
- {{
105
- maxBadge &&
106
- !isNaN(item.badge) &&
107
- Number(maxBadge) < Number(item.badge)
108
- ? maxBadge + '+'
109
- : item.badge
110
- }}
130
+ <img
131
+ v-if="
132
+ item.icon.startsWith('http') || item.icon.indexOf('/') != -1
133
+ "
134
+ class="van-icon__image"
135
+ :src="item.icon"
136
+ :style="{
137
+ width:
138
+ item.iconSize || $attrs['icon-size']
139
+ ? item.iconSize || $attrs['icon-size']
140
+ : '',
141
+ height:
142
+ item.iconSize || $attrs['icon-size']
143
+ ? item.iconSize || $attrs['icon-size']
144
+ : ''
145
+ }"
146
+ />
147
+ <div
148
+ v-show="item.dot"
149
+ :style="{ background: item.dotColor || '' }"
150
+ class="van-info van-info--dot"
151
+ ></div>
152
+ <div
153
+ class="van-info"
154
+ :style="{ background: badgeColor || '' }"
155
+ v-show="item.badge"
156
+ >
157
+ {{
158
+ maxBadge &&
159
+ !isNaN(item.badge) &&
160
+ Number(maxBadge) < Number(item.badge)
161
+ ? maxBadge + '+'
162
+ : item.badge
163
+ }}
164
+ </div>
165
+ </i>
166
+ <em-popover
167
+ v-model="item.showPopover"
168
+ :placement="placement"
169
+ @select="popoverSelect($event,item)"
170
+ :theme="popoverTheme"
171
+ :actions="popoverActions"
172
+ ></em-popover>
173
+ <span class="van-grid-item__text">{{ item.text }}</span>
174
+ <van-icon
175
+ v-if="showHide && item.menuType != 'add'"
176
+ @click.stop="handleHide(item)"
177
+ name="clear"
178
+ size="20px"
179
+ class="em-grid-del"
180
+ />
181
+ <div v-if="item.showMenu" class="em-grid-select-box">
182
+ <van-icon size="30px" color="#fff" name="success" />
111
183
  </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
184
  </div>
124
- </van-grid-item>
185
+ </div>
186
+ <!-- </van-grid-item> -->
125
187
  <slot v-show="newData && newData.length == 0" />
126
188
  </van-grid>
127
189
  <em-popup style="width:80%;height:50%" v-if="show" v-model="show">
@@ -203,18 +265,35 @@ export default {
203
265
  type: String,
204
266
  default: '40px'
205
267
  },
206
- draggable:{
207
- type:Boolean,
208
- default:false
209
- }
268
+ draggable: {
269
+ type: Boolean,
270
+ default: false
271
+ },
272
+ popoverActions: {
273
+ type: Array,
274
+ default: () => [{ text: '隐藏菜单',type:'hideMenu' }]
275
+ },
276
+ isTouch: {
277
+ type: Boolean,
278
+ default: false
279
+ },
280
+ placement:{
281
+ type:String,
282
+ default:'top'
283
+ },
284
+ popoverTheme:{
285
+ type:String,
286
+ default:'dark'
287
+ }
210
288
  },
211
289
  data() {
212
290
  return {
213
- lastTapTime: 0,
214
291
  timer: null,
215
292
  showHide: false,
293
+ isLongPress: false,
216
294
  newData: [],
217
295
  show: false,
296
+ showPopover: false,
218
297
  selectMenuArr: [],
219
298
  hideMenuList: []
220
299
  };
@@ -237,11 +316,34 @@ export default {
237
316
  }
238
317
  },
239
318
  methods: {
240
- touchstart(val,inexd){
241
- console.log('点击了了')
319
+ popoverSelect(val, item) {
320
+ if(val.type == 'hideMenu'){
321
+ this.handleHide(item)
322
+ }else{
323
+ this.$emit('touchSelect',{action:val,data:item})
324
+ }
242
325
  },
243
- touchend(val,a){
244
- console.log('松开了')
326
+ onMouseDown(item) {
327
+ // this.showPopover = true
328
+ if (this.draggable || !this.isTouch) return;
329
+ this.isLongPress = false;
330
+ this.timer = setTimeout(() => {
331
+ if (this.isLongPress === false) {
332
+ this.isLongPress = true;
333
+ this.lastTapTime = new Date().getTime();
334
+ this.$set(item, 'showPopover', true);
335
+ }
336
+ }, 500);
337
+ },
338
+ onMouseUp($event, item) {
339
+ if (this.isLongPress === false) {
340
+ this.lastTapTime = new Date().getTime();
341
+ this.$set(item, 'showPopover', false);
342
+ this.goView($event, item);
343
+ // 执行相应的操作
344
+ }
345
+ this.isLongPress = false;
346
+ clearTimeout(this.timer);
245
347
  },
246
348
  hideDelIcon() {
247
349
  this.showHide = false;
@@ -255,8 +357,10 @@ export default {
255
357
  );
256
358
  this.$emit('hide', hideArr);
257
359
  } else {
258
- let hide = this.hideMenuList.filter(x => str.indexOf(x[this.hideMenuKey]) == -1 );
259
- hide = hide.map(x => x[this.hideMenuKey])
360
+ let hide = this.hideMenuList.filter(
361
+ x => str.indexOf(x[this.hideMenuKey]) == -1
362
+ );
363
+ hide = hide.map(x => x[this.hideMenuKey]);
260
364
  this.$emit('hide', hide.join(','));
261
365
  }
262
366
  this.selectMenuArr = [];
@@ -331,23 +435,26 @@ export default {
331
435
  this.show = true;
332
436
  return;
333
437
  }
334
- const currentTime = new Date().getTime();
335
- const tapLength = currentTime - this.lastTapTime;
336
- this.lastTapTime = currentTime;
438
+ // const currentTime = new Date().getTime();
439
+ // const tapLength = currentTime - this.lastTapTime;
440
+ // this.lastTapTime = currentTime;
441
+ // if (tapLength > 300) {
442
+ // return;
443
+ // }
337
444
  if (this.isHideMenu) {
338
- if (tapLength < 300) {
339
- this.handleDoubleClick(val);
340
- clearTimeout(this.timer);
341
- return;
342
- }
343
- if (this.showHide) {
344
- this.showHide = false;
345
- return;
346
- }
347
- this.timer = setTimeout(() => {
348
- this.$emit('click', val, event);
349
- this.targetStop && event.stopPropagation();
350
- }, 300);
445
+ // if (tapLength < 300) {
446
+ // this.handleDoubleClick(val);
447
+ // clearTimeout(this.timer);
448
+ // return;
449
+ // }
450
+ // if (this.showHide) {
451
+ // this.showHide = false;
452
+ // return;
453
+ // }
454
+ // this.timer = setTimeout(() => {
455
+ this.$emit('click', val, event);
456
+ this.targetStop && event.stopPropagation();
457
+ // }, 300);
351
458
  } else {
352
459
  this.$emit('click', val, event);
353
460
  this.targetStop && event.stopPropagation();
@@ -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 {
package/src/index.js CHANGED
@@ -105,7 +105,7 @@ if (typeof window !== 'undefined' && window.Vue) {
105
105
  }
106
106
 
107
107
  export default {
108
- version: '0.2.45',
108
+ version: '0.2.46',
109
109
  install,
110
110
  Button,
111
111
  ButtonGroup,