eoss-mobiles 0.2.7 → 0.2.9

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 (41) hide show
  1. package/lib/checkbox.js +20 -17
  2. package/lib/config/api.js +3 -1
  3. package/lib/eoss-mobile.common.js +374 -92
  4. package/lib/flow.js +173 -113
  5. package/lib/index.js +1 -1
  6. package/lib/picker.js +20 -17
  7. package/lib/pull-refresh.js +305 -0
  8. package/lib/radio.js +20 -17
  9. package/lib/selector.js +30 -24
  10. package/lib/swipe.js +327 -0
  11. package/lib/table.js +11 -11
  12. package/lib/theme-chalk/index.css +1 -1
  13. package/lib/theme-chalk/pull-refresh.css +0 -0
  14. package/lib/theme-chalk/selector.css +1 -1
  15. package/lib/theme-chalk/swipe.css +0 -0
  16. package/lib/utils/axios.js +2 -2
  17. package/package.json +1 -1
  18. package/packages/flow/src/components/Handle.vue +51 -24
  19. package/packages/flow/src/components/Message.vue +5 -1
  20. package/packages/flow/src/components/Opinion.vue +6 -2
  21. package/packages/flow/src/components/Reject.vue +7 -1
  22. package/packages/flow/src/components/StartFlow.vue +9 -3
  23. package/packages/flow/src/components/TaskRead.vue +12 -4
  24. package/packages/flow/src/components/taskUnionExamine.vue +17 -14
  25. package/packages/pull-refresh/index.js +5 -0
  26. package/packages/pull-refresh/src/main.vue +31 -0
  27. package/packages/selector/src/selector-tree.vue +2 -0
  28. package/packages/swipe/index.js +5 -0
  29. package/packages/swipe/src/main.vue +42 -0
  30. package/packages/theme-chalk/lib/index.css +1 -1
  31. package/packages/theme-chalk/lib/pull-refresh.css +0 -0
  32. package/packages/theme-chalk/lib/selector.css +1 -1
  33. package/packages/theme-chalk/lib/swipe.css +0 -0
  34. package/packages/theme-chalk/src/flow.scss +1 -0
  35. package/packages/theme-chalk/src/index.scss +2 -0
  36. package/packages/theme-chalk/src/pull-refresh.scss +0 -0
  37. package/packages/theme-chalk/src/selector.scss +6 -0
  38. package/packages/theme-chalk/src/swipe.scss +0 -0
  39. package/src/config/api.js +2 -0
  40. package/src/index.js +10 -4
  41. package/src/utils/axios.js +2 -2
@@ -118,19 +118,25 @@
118
118
  class="item"
119
119
  v-if="!isHiddenNextStepInfo && isChooseNextNode == 1"
120
120
  >
121
- <em-input
122
- value="下步操作"
123
- label="下步操作"
124
- required
125
- :disabled="true"
126
- label-position="top"
127
- >
128
- <template slot="input">
129
- <span class="em-flow-tag" :class="{'em-flow-tag-active':tagKey === item.key}" @click="changeNextOperate(item)" v-for="item in taskOperations" :key="item.key">
130
- {{item.value}}
131
- </span>
132
- </template>
133
- </em-input>
121
+ <em-input
122
+ value="下步操作"
123
+ label="下步操作"
124
+ required
125
+ :disabled="true"
126
+ label-position="top"
127
+ >
128
+ <template slot="input">
129
+ <span
130
+ class="em-flow-tag"
131
+ :class="{ 'em-flow-tag-active': tagKey === item.key }"
132
+ @click="changeNextOperate(item)"
133
+ v-for="item in taskOperations"
134
+ :key="item.key"
135
+ >
136
+ {{ item.value }}
137
+ </span>
138
+ </template>
139
+ </em-input>
134
140
  <!-- <em-picker
135
141
  title="下步操作"
136
142
  label="下步操作"
@@ -421,7 +427,8 @@ import {
421
427
  toStartTaskReadHtml,
422
428
  taskReadHtml,
423
429
  getNodeInfoHtml,
424
- taskHandleHtml
430
+ taskHandleHtml,
431
+ taskHandleHtmlImg
425
432
  } from '../../../../src/config/api.js';
426
433
  import request from '../../../../src/utils/http.js';
427
434
  import Opinion from './Opinion.vue';
@@ -453,6 +460,10 @@ export default {
453
460
  esign: {
454
461
  type: Boolean,
455
462
  default: false
463
+ },
464
+ userId: {
465
+ type: String,
466
+ default: ''
456
467
  }
457
468
  },
458
469
  data() {
@@ -584,8 +595,9 @@ export default {
584
595
  nodeInfoMapInfo: {},
585
596
  file: '',
586
597
  isEndUserTask: '',
587
- tagKey:'',
588
- pOrgId: ''
598
+ tagKey: '',
599
+ pOrgId: '',
600
+ needRetrialAuth: false
589
601
  };
590
602
  },
591
603
  created() {
@@ -684,9 +696,10 @@ export default {
684
696
  processDefinitionId,
685
697
  pendingId,
686
698
  opinion: this.form.opinion,
687
- taskAction: 'complete'
699
+ taskAction: 'complete',
700
+ userId: this.userId
688
701
  };
689
- let formData = new FormData();
702
+ let formData = new FormData();
690
703
  if (this.form.isImageOpinion == 1) {
691
704
  formData.append('file', this.file);
692
705
  }
@@ -837,11 +850,13 @@ export default {
837
850
  choiceDeptId,
838
851
  pOrgId,
839
852
  taskExamineInfo,
853
+ needRetrialAuth,
840
854
  nodeInfoMapInfo
841
855
  } = this;
842
856
  _that.form.isEndUserTask = isEndUserTask;
843
857
  _that.form.choiceOrgId = choiceOrgId;
844
858
  _that.form.choiceDeptId = choiceDeptId;
859
+ _that.form.needRetrialAuth = needRetrialAuth;
845
860
  _that.form.pOrgId = pOrgId;
846
861
  _that.form.processType = taskExamineInfo.processType;
847
862
  _that.form.businessId = taskExamineInfo.businessId;
@@ -849,6 +864,7 @@ export default {
849
864
  _that.form.processDefinitionId = taskExamineInfo.processDefinitionId;
850
865
  _that.form.isSubFlow = taskExamineInfo.isSubFlow;
851
866
  _that.form.nodeId = taskExamineInfo.nodeId;
867
+ _that.form.userId = _that.userId;
852
868
  _that.form.nextNodeId =
853
869
  _that.form.nextOperate == 0 || _that.form.nextOperate == 1
854
870
  ? _that.form.nextNodeId || nodeInfoMapInfo.nodeExtAttr.defaultNextNode
@@ -864,7 +880,14 @@ export default {
864
880
  }
865
881
  }
866
882
  request({
867
- url: _that.baseUrl ? _that.baseUrl + taskHandleHtml : taskHandleHtml,
883
+ url: _that.baseUrl
884
+ ? _that.baseUrl +
885
+ (_that.form.isImageOpinion == 1
886
+ ? taskHandleHtmlImg
887
+ : taskHandleHtml)
888
+ : _that.form.isImageOpinion == 1
889
+ ? taskHandleHtmlImg
890
+ : taskHandleHtml,
868
891
  type: 'post',
869
892
  params: formData
870
893
  }).then(res => {
@@ -913,8 +936,8 @@ export default {
913
936
  },
914
937
  // 切换下一步操作
915
938
  changeNextOperate(val, isDef) {
916
- if(!isDef && val.key === this.tagKey) return
917
- this.tagKey = val.key
939
+ if (!isDef && val.key === this.tagKey) return;
940
+ this.tagKey = val.key;
918
941
  //恢复默认
919
942
  this.isNextUser = false;
920
943
  this.isShowNode = false;
@@ -1109,7 +1132,8 @@ export default {
1109
1132
  ? that.baseUrl + getHandleInfoHtml
1110
1133
  : getHandleInfoHtml,
1111
1134
  params: {
1112
- pendingId: that.pendingId
1135
+ pendingId: that.pendingId,
1136
+ userId: that.userId
1113
1137
  }
1114
1138
  }).then(res => {
1115
1139
  if (res.status == 'success') {
@@ -1234,6 +1258,8 @@ export default {
1234
1258
  }
1235
1259
  }
1236
1260
  if (nodeInfoMap && JSON.stringify(nodeInfoMap) != '{}') {
1261
+ that.needRetrialAuth = !!nodeInfoMap.nodeExtAttr
1262
+ .isCurrentNodeSubmitNeedRetrialAuth;
1237
1263
  if (nodeInfoMap.nodeExtAttr.nodeFixedOpinionSelectList) {
1238
1264
  let notice = JSON.parse(
1239
1265
  nodeInfoMap.nodeExtAttr.nodeFixedOpinionSelectList
@@ -1298,7 +1324,7 @@ export default {
1298
1324
  url: this.baseUrl
1299
1325
  ? this.baseUrl + toStartTaskReadHtml
1300
1326
  : toStartTaskReadHtml,
1301
- params: { pendingId: this.pendingId }
1327
+ params: { pendingId: this.pendingId, userId: this.userId }
1302
1328
  })
1303
1329
  .then(res => {
1304
1330
  const {
@@ -1334,7 +1360,8 @@ export default {
1334
1360
  nextNodeId: res,
1335
1361
  taskId: this.processObj.taskExamine.taskId,
1336
1362
  pendingId: this.pendingId,
1337
- businessId: this.taskExamineInfo.businessId
1363
+ businessId: this.taskExamineInfo.businessId,
1364
+ userId: this.userId
1338
1365
  }
1339
1366
  }).then(res => {
1340
1367
  this.$toast.clear();
@@ -63,7 +63,11 @@ export default {
63
63
  type: Boolean,
64
64
  default: true,
65
65
  },
66
- baseUrl:String
66
+ baseUrl:String,
67
+ userId:{
68
+ type:String,
69
+ default:''
70
+ }
67
71
  },
68
72
  data() {
69
73
  return {
@@ -135,6 +135,10 @@ export default {
135
135
  esign: {
136
136
  type: Boolean,
137
137
  default: false
138
+ },
139
+ userId: {
140
+ type: String,
141
+ default: ''
138
142
  }
139
143
  },
140
144
  // components: {
@@ -171,7 +175,7 @@ export default {
171
175
  this.$emit('onInputOpintion', {
172
176
  opinion: this.opinion,
173
177
  isImageOpinion,
174
- file:info.file
178
+ file: info.file
175
179
  });
176
180
  },
177
181
  handleChange() {
@@ -190,7 +194,7 @@ export default {
190
194
  const _that = this;
191
195
  request({
192
196
  url: _that.baseUrl ? _that.baseUrl + commonOpion : commonOpion,
193
- params: {}
197
+ params: { userId: this.userId }
194
198
  }).then(res => {
195
199
  if (res.status == 'success') {
196
200
  this.opinionList = res.data.list;
@@ -57,6 +57,10 @@ export default {
57
57
  esign: {
58
58
  type: Boolean,
59
59
  default: false
60
+ },
61
+ userId:{
62
+ type:String,
63
+ default:''
60
64
  }
61
65
  },
62
66
  data() {
@@ -131,6 +135,7 @@ export default {
131
135
  formData.append('file', this.file);
132
136
  }
133
137
  formData.append('pendingId', this.pendingId);
138
+ this.form.userId = this.userId
134
139
  for (let key in this.form) {
135
140
  if (this.form[key] !== '' && this.form[key] !== undefined) {
136
141
  formData.append(key, this.form[key]);
@@ -179,7 +184,8 @@ export default {
179
184
  params: {
180
185
  pendingId: this.pendingId,
181
186
  isSinglePage: false,
182
- opinion: this.form.opinion
187
+ opinion: this.form.opinion,
188
+ userId: this.userId
183
189
  }
184
190
  }).then(res => {
185
191
  if (res.status == 'success') {
@@ -138,6 +138,10 @@ export default {
138
138
  esign: {
139
139
  type: Boolean,
140
140
  default: false
141
+ },
142
+ userId:{
143
+ type:String,
144
+ default:''
141
145
  }
142
146
  },
143
147
  data() {
@@ -278,7 +282,8 @@ export default {
278
282
  userId: sessionStorage.getItem('userId'),
279
283
  notificationMsg: this.form.notificationMsg,
280
284
  loginType: 2, //登录方式
281
- isImageOpinion:this.form.isImageOpinion
285
+ isImageOpinion:this.form.isImageOpinion,
286
+ userId: this.userId
282
287
  };
283
288
  if (this.beforeSubmit) {
284
289
  this.beforeSubmit(info);
@@ -405,7 +410,7 @@ export default {
405
410
  return new Promise(function(resolve, reiect) {
406
411
  request({
407
412
  url: that.apiBaseUrl ? that.apiBaseUrl + toStartFlow : toStartFlow,
408
- params: res
413
+ params: {...res,userId:this.userId}
409
414
  }).then(res => {
410
415
  if (res.rCode == 0) {
411
416
  res.results.nodeExtr.submitTipsMsg &&
@@ -467,7 +472,8 @@ export default {
467
472
  params: {
468
473
  processDefinitionId: this.flowObj.processDefinitionId,
469
474
  nodeId: res,
470
- taskId: this.processObj.taskId
475
+ taskId: this.processObj.taskId,
476
+ userId: this.userId
471
477
  }
472
478
  }).then(res => {
473
479
  this.$toast.clear();
@@ -131,6 +131,10 @@ export default {
131
131
  paddingTop: {
132
132
  type: [String, Number],
133
133
  default: 0
134
+ },
135
+ userId:{
136
+ type:String,
137
+ default:''
134
138
  }
135
139
  },
136
140
  computed: {
@@ -203,7 +207,8 @@ export default {
203
207
  opinion,
204
208
  pendingId,
205
209
  isSubFlow: taskExamine.isSubFlow,
206
- isSinglePage: taskExamine.isSinglePage
210
+ isSinglePage: taskExamine.isSinglePage,
211
+ userId: this.userId
207
212
  }
208
213
  };
209
214
  request(params)
@@ -267,7 +272,8 @@ export default {
267
272
  const _that = this;
268
273
  let params = {
269
274
  pendingId: this.pendingId,
270
- taskAction: _that.newType
275
+ taskAction: _that.newType,
276
+ userId: _that.userId
271
277
  };
272
278
  if (_that.newType != 'taskReadAndEnd') delete params.taskAction;
273
279
 
@@ -321,7 +327,8 @@ export default {
321
327
  notificationMsg: this.form.notificationMsg,
322
328
  isImageOpinion: 0,
323
329
  loginType: 2,
324
- taskAction: this.type
330
+ taskAction: this.type,
331
+ userId: this.userId
325
332
  }
326
333
  };
327
334
  if (this.beforeSubmit) {
@@ -354,7 +361,7 @@ export default {
354
361
  url: this.baseUrl
355
362
  ? this.baseUrl + getHandleInfoHtml
356
363
  : getHandleInfoHtml,
357
- params: { pendingId: this.pendingId }
364
+ params: { pendingId: this.pendingId,userId: this.userId }
358
365
  }).then(res => {
359
366
  let {
360
367
  status,
@@ -417,6 +424,7 @@ export default {
417
424
  currentOrgProcessKey: processDefinitionId,
418
425
  noticeType: this.form.notificationMsgType,
419
426
  taskAction: 'create',
427
+ userId: this.userId,
420
428
  // notificationMsg: this.form.notificationMsg,
421
429
  nextReadUserId: ids
422
430
  }
@@ -111,6 +111,7 @@ export default {
111
111
  inevitableNode: { type: String, default: '' },
112
112
  appId: { type: String, default: '' },
113
113
  defaultOpinion: { type: String, default: '' },
114
+ userId:{type:String,default:''},
114
115
  // disabled: { type: Boolean, default: false },
115
116
  // multiple: { type: Boolean, default: true },
116
117
  baseUrl: { type: String, default: '' },
@@ -202,7 +203,8 @@ export default {
202
203
  url: isCanStartSubFlow,
203
204
  params: {
204
205
  appId: this.appId,
205
- inevitableNode: this.inevitableNode
206
+ inevitableNode: this.inevitableNode,
207
+ userId: this.userId
206
208
  },
207
209
  type: 'post',
208
210
  headers: { Accept: 'application/json,text/plain' }
@@ -221,7 +223,8 @@ export default {
221
223
  //获取通知信息
222
224
  getMessage() {
223
225
  let params = {
224
- pendingId: this.pendingId
226
+ pendingId: this.pendingId,
227
+ userId: this.userId
225
228
  };
226
229
  request({ url: getNotificationMsg, params, methods: 'post' })
227
230
  .then(res => {
@@ -319,7 +322,7 @@ export default {
319
322
  : this.type == 'twoOfficesDispatch'
320
323
  ? toTwoOfficesDispatch
321
324
  : toTaskUnionExamine,
322
- params: { pendingId: this.pendingId },
325
+ params: { pendingId: this.pendingId,userId: this.userId },
323
326
  headers: { Accept: 'application/json,text/plain' }
324
327
  };
325
328
  this.$toast.loading({
@@ -431,18 +434,17 @@ export default {
431
434
  }
432
435
  if (
433
436
  (type == 'takeAdvice' &&
434
- (nextCurrentOrgObj == '' ||
435
- (nextCurrentOrgObj == null && isHideCurrentOrg == 0))) ||
436
- ((isHideOtherOrg == 0 && nextOtherOrgObj == '') ||
437
- nextOtherOrgObj == null)
437
+ (!nextCurrentOrgObj && isHideCurrentOrg == 0)) &&
438
+ (isHideOtherOrg == 0 && !nextOtherOrgObj)
438
439
  ) {
439
440
  return this.$toast('请选择处理对象!');
440
- } else if (
441
- isHideCurrentOrg == 0 &&
442
- (nextOtherOrgObj == '' || nextOtherOrgObj == null)
443
- ) {
444
- return this.$toast('请选择处理对象!');
445
- }
441
+ }
442
+ // else if (
443
+ // isHideCurrentOrg == 0 &&
444
+ // (nextOtherOrgObj == '' || nextOtherOrgObj == null)
445
+ // ) {
446
+ // return this.$toast('请选择处理对象!');
447
+ // }
446
448
  let info = {
447
449
  opinion,
448
450
  pendingId,
@@ -456,7 +458,8 @@ export default {
456
458
  notificationType: noticeType.join(','),
457
459
  choiceDeptId,
458
460
  isSubFlow,
459
- choiceOrgId
461
+ choiceOrgId,
462
+ userId: this.userId
460
463
  }
461
464
  let formData = new FormData();
462
465
  if (isImageOpinion == 1) {
@@ -0,0 +1,5 @@
1
+ import EmPullRefresh from './src/main';
2
+
3
+ EmPullRefresh.install = Vue => Vue.component(EmPullRefresh.name, EmPullRefresh);
4
+
5
+ export default EmPullRefresh;
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <van-pull-refresh v-model="isLoading" v-bind="$attrs" v-on="$listeners">
3
+ <template v-for="(index, name) in $slots" :slot="name">
4
+ <slot :name="name" />
5
+ </template>
6
+ </van-pull-refresh>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ name: 'EmPullRefresh',
12
+ props: {
13
+ value: {
14
+ type: Boolean,
15
+ default: false
16
+ }
17
+ },
18
+ computed: {
19
+ isLoading: {
20
+ set() {
21
+ return this.value;
22
+ },
23
+ get(val) {
24
+ return val;
25
+ }
26
+ }
27
+ }
28
+ };
29
+ </script>
30
+
31
+ <style></style>
@@ -22,6 +22,7 @@
22
22
  <em-tabs
23
23
  v-show="newTabs.length > 1 && !showTree"
24
24
  @click="handleClick"
25
+ class="em-flow-tabs"
25
26
  type="card"
26
27
  style="margin:10px 0px"
27
28
  >
@@ -679,6 +680,7 @@ export default {
679
680
  this.$emit('update:selectList', this.list);
680
681
  }
681
682
  this.personnel = res.results;
683
+ console.log(this.personnel,'this.personnel')
682
684
  let _this = this;
683
685
  this.list.filter(r => {
684
686
  _this.personnel.find(i => {
@@ -0,0 +1,5 @@
1
+ import EmSwipe from './src/main';
2
+
3
+ EmSwipe.install = Vue => Vue.component(EmSwipe.name, EmSwipe);
4
+
5
+ export default EmSwipe;
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <van-swipe ref="swipe" v-bind="$attrs" v-on="$listeners">
3
+ <van-swipe-item v-for="(item, index) in contents" :key="index">
4
+ <div @click="handleClick(item,index)" v-if="item.render" v-html="item.render(item)"></div>
5
+ <img v-else @click="handleClick(item,index)" :src="item.url" style="width: 100%; height: 100%;" />
6
+ </van-swipe-item>
7
+ <template v-for="(index, name) in $slots" :slot="name">
8
+ <slot :name="name" />
9
+ </template>
10
+ </van-swipe>
11
+ </template>
12
+
13
+ <script>
14
+ export default {
15
+ name: 'EmSwipe',
16
+ props: {
17
+ contents: {
18
+ type: Array,
19
+ default: () => []
20
+ }
21
+ },
22
+ methods:{
23
+ resize() {
24
+ this.$refs.swipe.resize()
25
+ },
26
+ prev() {
27
+ this.$refs.swipe.prev()
28
+ },
29
+ next() {
30
+ this.$refs.swipe.next()
31
+ },
32
+ swipeTo(index,options) {
33
+ this.$refs.swipe.swipeTo(index,options)
34
+ },
35
+ handleClick(info,index){
36
+ this.$emit('click',info,index)
37
+ },
38
+ }
39
+ };
40
+ </script>
41
+
42
+ <style></style>