eoss-ui 0.7.19 → 0.7.21

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 (58) hide show
  1. package/lib/button-group.js +361 -123
  2. package/lib/button.js +210 -119
  3. package/lib/calogin.js +210 -119
  4. package/lib/checkbox-group.js +210 -119
  5. package/lib/data-table-form.js +210 -119
  6. package/lib/data-table.js +210 -119
  7. package/lib/date-picker.js +210 -119
  8. package/lib/dialog.js +210 -119
  9. package/lib/eoss-ui.common.js +803 -286
  10. package/lib/flow-group.js +210 -119
  11. package/lib/flow-list.js +210 -119
  12. package/lib/flow.js +626 -255
  13. package/lib/form.js +210 -119
  14. package/lib/handle-user.js +210 -119
  15. package/lib/handler.js +212 -122
  16. package/lib/icon.js +210 -119
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +210 -119
  19. package/lib/input.js +210 -119
  20. package/lib/login.js +210 -119
  21. package/lib/main.js +210 -119
  22. package/lib/nav.js +210 -119
  23. package/lib/page.js +210 -119
  24. package/lib/pagination.js +210 -119
  25. package/lib/player.js +210 -119
  26. package/lib/qr-code.js +210 -119
  27. package/lib/radio-group.js +210 -119
  28. package/lib/retrial-auth.js +210 -119
  29. package/lib/select-ganged.js +210 -119
  30. package/lib/select.js +210 -119
  31. package/lib/selector-panel.js +210 -119
  32. package/lib/selector.js +210 -119
  33. package/lib/sizer.js +210 -119
  34. package/lib/steps.js +210 -119
  35. package/lib/switch.js +210 -119
  36. package/lib/table-form.js +210 -119
  37. package/lib/tabs.js +210 -119
  38. package/lib/theme-chalk/flow.css +1 -1
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/tips.js +210 -119
  41. package/lib/tree-group.js +210 -119
  42. package/lib/tree.js +213 -122
  43. package/lib/upload.js +210 -119
  44. package/lib/utils/util.js +210 -119
  45. package/lib/wujie.js +210 -119
  46. package/lib/wxlogin.js +210 -119
  47. package/package.json +2 -2
  48. package/packages/button-group/src/main.vue +49 -1
  49. package/packages/flow/src/component/taskUnionExamine.vue +95 -6
  50. package/packages/flow/src/main.vue +81 -40
  51. package/packages/flow/src/processForm.vue +106 -27
  52. package/packages/handler/src/main.vue +0 -1
  53. package/packages/theme-chalk/lib/flow.css +1 -1
  54. package/packages/theme-chalk/lib/index.css +1 -1
  55. package/packages/theme-chalk/src/flow.scss +4 -1
  56. package/packages/tree/src/main.vue +1 -1
  57. package/src/index.js +1 -1
  58. package/src/utils/util.js +192 -145
@@ -4,6 +4,7 @@
4
4
  ref="infoList"
5
5
  :model="infoList"
6
6
  class="demo-dynamic"
7
+ :rules="rules"
7
8
  label-width="120px"
8
9
  >
9
10
  <el-form-item v-if="isSinglePage" prop="opinion" label="意见">
@@ -67,7 +68,7 @@
67
68
  >
68
69
  <SelectUser
69
70
  :nextUser="infoList.nextOtherOrgObj"
70
- :where="{ filid: 'other',roleid :selectorParams.roleid }"
71
+ :where="{ filid: 'other', roleid: selectorParams.roleid }"
71
72
  :multiple="newMultiple"
72
73
  @change="changeSelectUser($event, 'nextOtherOrgObj')"
73
74
  :mix="otherMix"
@@ -83,6 +84,36 @@
83
84
  :tabs="foreignOrgTabsParam"
84
85
  />
85
86
  </el-form-item>
87
+ <el-form-item
88
+ v-if="enableCustomLimitTimeSetting"
89
+ prop="customLimitTime"
90
+ label="限时办理"
91
+ >
92
+ <el-input
93
+ v-model="infoList.customLimitTime"
94
+ placeholder="请输入限时办理的天数"
95
+ class="input-with-select custom-limit-time"
96
+ >
97
+ <es-select
98
+ v-if="!showCustomLimitTimeText"
99
+ v-model="infoList.customLimitTime"
100
+ placeholder="请选择"
101
+ slot="prepend"
102
+ sysCode="bpm_custom_limit_time"
103
+ ></es-select>
104
+ <es-button
105
+ type="primary"
106
+ slot="append"
107
+ @click="
108
+ () => {
109
+ infoList.customLimitTime = '';
110
+ showCustomLimitTimeText = !showCustomLimitTimeText;
111
+ }
112
+ "
113
+ >切换{{ showCustomLimitTimeText ? '选择框' : '文本框' }}</es-button
114
+ >
115
+ </el-input>
116
+ </el-form-item>
86
117
  <!-- :rules="[
87
118
  { required: false, message: `请选择通知方式`, trigger: 'blur' }
88
119
  ]" -->
@@ -170,7 +201,12 @@ export default {
170
201
  disabled: { type: Boolean, default: false },
171
202
  simpleTips: { type: Boolean, default: true },
172
203
  multiple: { type: Boolean, default: true },
173
- selectorParams: { type: Object, default: () => {return {}} }
204
+ selectorParams: {
205
+ type: Object,
206
+ default: () => {
207
+ return {};
208
+ }
209
+ }
174
210
  },
175
211
  inheritAttrs: false,
176
212
  data() {
@@ -179,13 +215,17 @@ export default {
179
215
  readOnlyNotificationType: '',
180
216
  notificationMessageReadOnly: false,
181
217
  otherMix: false,
218
+ enableCustomLimitTimeSetting: false,
219
+ showCustomLimitTimeText: false,
182
220
  currentMix: false,
183
221
  infoList: {
184
222
  nextOtherOrgObj: [],
185
223
  nextCurrentOrgObj: [],
186
224
  noticeType: [],
225
+ noticeList: [],
187
226
  noticeInfo: '',
188
- opinion: ''
227
+ opinion: '',
228
+ customLimitTime: ''
189
229
  },
190
230
  onlyName: '',
191
231
  unionSealData: [],
@@ -211,6 +251,20 @@ export default {
211
251
  loading: false
212
252
  };
213
253
  },
254
+ computed: {
255
+ rules() {
256
+ return {
257
+ customLimitTime: [
258
+ {
259
+ required:this.enableCustomLimitTimeSetting,
260
+ message: this.showCustomLimitTimeText?'请输入限时办理天数' : '请选择限时办理天数',
261
+ trigger: 'blur'
262
+ },
263
+ {required:this.enableCustomLimitTimeSetting, validator: this.checkCustomLimitTime, trigger: 'change' }
264
+ ]
265
+ };
266
+ }
267
+ },
214
268
  mounted() {
215
269
  this.loading = true;
216
270
  this.newMultiple = this.multiple;
@@ -221,6 +275,25 @@ export default {
221
275
  this.getInfo();
222
276
  },
223
277
  methods: {
278
+ validate() {
279
+ let validSate = true;
280
+ this.$refs.infoList.validate((valid) => {
281
+ if (valid) {
282
+ validSate = true;
283
+ } else {
284
+ validSate = false;
285
+ }
286
+ });
287
+ return validSate;
288
+ },
289
+ checkCustomLimitTime(rule, value, callback){
290
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
291
+ callback(new Error('请输入正确的天数'))
292
+ this.infoList.customLimitTime = '';
293
+ }else{
294
+ callback()
295
+ }
296
+ },
224
297
  isMultiple(val) {
225
298
  if (val == 7 || val == 9 || val == 11) {
226
299
  this.newMultiple = false;
@@ -335,6 +408,8 @@ export default {
335
408
  unionDispatchOrgId,
336
409
  otherOrgDisabledObjId,
337
410
  orgNames,
411
+ enableCustomLimitTimeSetting,
412
+ defaultCustomLimitDays,
338
413
  nodeInfoMap: {
339
414
  nodeExtAttr: {
340
415
  userSelectionType,
@@ -348,6 +423,10 @@ export default {
348
423
  if (otherOrgDisabledObjId) {
349
424
  this.otherOrgDisabledObjId = otherOrgDisabledObjId.split(',');
350
425
  }
426
+ this.enableCustomLimitTimeSetting = enableCustomLimitTimeSetting;
427
+ if(this.enableCustomLimitTimeSetting && defaultCustomLimitDays){
428
+ this.infoList.customLimitTime = defaultCustomLimitDays + ''
429
+ }
351
430
  if (res.data.customizedConfig) {
352
431
  if (res.data.customizedConfig.currentOrgSelectorCustomized) {
353
432
  this.currentMix =
@@ -458,6 +537,7 @@ export default {
458
537
  nextCurrentOrgObj,
459
538
  nextOtherOrgObj,
460
539
  noticeType,
540
+ customLimitTime,
461
541
  noticeInfo
462
542
  },
463
543
  isOpinionRequired,
@@ -470,18 +550,21 @@ export default {
470
550
  isSubFlow,
471
551
  pendingId
472
552
  } = this;
553
+ console.log(nextCurrentOrgObj);
554
+ console.log(nextOtherOrgObj);
473
555
  if (
474
556
  type == 'takeAdvice' &&
475
557
  !nextCurrentOrgObj &&
476
558
  isHideCurrentOrg == 0 &&
559
+ nextCurrentOrgObj.length == 0 &&
477
560
  isHideOtherOrg == 0 &&
478
- !nextOtherOrgObj
561
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0)
479
562
  ) {
480
563
  return this.$message.warning('请选择处理对象!');
481
564
  } else if (
482
565
  isHideCurrentOrg == 0 &&
483
- !nextOtherOrgObj &&
484
- !nextCurrentOrgObj
566
+ (!nextOtherOrgObj || nextOtherOrgObj.length == 0) &&
567
+ (!nextCurrentOrgObj || nextCurrentOrgObj.length == 0)
485
568
  ) {
486
569
  return this.$message.warning('请选择处理对象!');
487
570
  }
@@ -505,6 +588,7 @@ export default {
505
588
  data: {
506
589
  opinion,
507
590
  pendingId,
591
+
508
592
  nextOtherOrgObj:
509
593
  this.type == 'unionSeal'
510
594
  ? this.unionSealData.map((x) => x.showid).join(',')
@@ -523,6 +607,11 @@ export default {
523
607
  headers: { Accept: 'application/json,text/plain' },
524
608
  method: 'POST'
525
609
  };
610
+ if (this.enableCustomLimitTimeSetting) {
611
+ param.data.customLimitTime = customLimitTime;
612
+ console.log(this.validate(),'this.validate()')
613
+ if (!this.validate()) return;
614
+ }
526
615
  this.loading = true;
527
616
  util
528
617
  .ajax(param)
@@ -129,7 +129,7 @@
129
129
  :appId="resetAppId"
130
130
  :params="param"
131
131
  :showOther="showOther"
132
- :selectorParams="selectorParams"
132
+ :selectorParams="selectorParams"
133
133
  :formLabelPosition="formLabelPosition"
134
134
  :simpleTips="simpleTips"
135
135
  />
@@ -245,6 +245,7 @@
245
245
  ref="nextNode"
246
246
  :model="isFlow ? nodeInfo : nextNode"
247
247
  class="demo-dynamic"
248
+ :rules="rules"
248
249
  :label-width="
249
250
  startFlowPageEmbeddedIntoStartFlowIndex ? '100px' : '120px'
250
251
  "
@@ -483,40 +484,7 @@
483
484
  :tabs="nextUserTabs"
484
485
  />
485
486
  </el-form-item>
486
- <el-form-item
487
- v-if="enableCustomLimitTimeSetting"
488
- prop="customLimitTime"
489
- label="限时办理"
490
- >
491
- <el-input
492
- v-model="nextNode.customLimitTime"
493
- placeholder="请输入限时办理的天数"
494
- @change="changeCustomLimitTime"
495
- class="input-with-select custom-limit-time"
496
- >
497
- <es-select
498
- v-if="!showCustomLimitTimeText"
499
- v-model="nextNode.customLimitTime"
500
- placeholder="请选择"
501
- slot="prepend"
502
- sysCode="bpm_custom_limit_time"
503
- ></es-select>
504
- <es-button
505
- type="primary"
506
- slot="append"
507
- @click="
508
- () => {
509
- nextNode.customLimitTime = '';
510
- showCustomLimitTimeText = !showCustomLimitTimeText;
511
- }
512
- "
513
- >切换{{
514
- showCustomLimitTimeText ? '选择框' : '文本框'
515
- }}</es-button
516
- >
517
- </el-input>
518
- </el-form-item>
519
-
487
+
520
488
  <el-form-item
521
489
  v-if="isHideCurrentOrg && nextNode.isReturnSubmitter != 1"
522
490
  prop="nextCurrentOrgObj"
@@ -610,6 +578,41 @@
610
578
  :tabs="tabs"
611
579
  />
612
580
  </el-form-item>
581
+ <el-form-item
582
+ v-if="enableCustomLimitTimeSetting"
583
+ prop="customLimitTime"
584
+ label="限时办理"
585
+ style="margin-bottom: 10px"
586
+ >
587
+ <el-input
588
+ v-model="nextNode.customLimitTime"
589
+ placeholder="请输入限时办理的天数"
590
+ @change="changeCustomLimitTime"
591
+ class="input-with-select custom-limit-time"
592
+ >
593
+ <es-select
594
+ v-if="!showCustomLimitTimeText"
595
+ v-model="nextNode.customLimitTime"
596
+ placeholder="请选择"
597
+ slot="prepend"
598
+ sysCode="bpm_custom_limit_time"
599
+ ></es-select>
600
+ <es-button
601
+ type="primary"
602
+ slot="append"
603
+ @click="
604
+ () => {
605
+ nextNode.customLimitTime = '';
606
+ showCustomLimitTimeText = !showCustomLimitTimeText;
607
+ }
608
+ "
609
+ >切换{{
610
+ showCustomLimitTimeText ? '选择框' : '文本框'
611
+ }}</es-button
612
+ >
613
+ </el-input>
614
+ </el-form-item>
615
+
613
616
  <el-form-item
614
617
  v-if="isHandleExplain == 1"
615
618
  prop="handleExplain"
@@ -1239,7 +1242,12 @@ export default {
1239
1242
  type: Object,
1240
1243
  default: () => {}
1241
1244
  },
1242
- selectorParams: { type: Object, default: () => {return {}} },
1245
+ selectorParams: {
1246
+ type: Object,
1247
+ default: () => {
1248
+ return {};
1249
+ }
1250
+ },
1243
1251
  width: {
1244
1252
  type: String
1245
1253
  },
@@ -1467,8 +1475,8 @@ export default {
1467
1475
  this.currentOrgSelectorParams.filid = JSON.parse(
1468
1476
  util.getStorage('mainConfig')
1469
1477
  ).userModel.orgId;
1470
- this.foreignOrgSelectorParams.roleid = this.currentOrgSelectorParams.roleid =
1471
- this.selectorParams.roleid;
1478
+ this.foreignOrgSelectorParams.roleid =
1479
+ this.currentOrgSelectorParams.roleid = this.selectorParams.roleid;
1472
1480
  this.nextNode.nextNodeId = this.nextNodeId;
1473
1481
  if (!this.isFlow) {
1474
1482
  this.getInfo();
@@ -1545,6 +1553,18 @@ export default {
1545
1553
  }
1546
1554
  },
1547
1555
  computed: {
1556
+ rules() {
1557
+ return {
1558
+ customLimitTime: [
1559
+ {
1560
+ required:this.enableCustomLimitTimeSetting,
1561
+ message: this.showCustomLimitTimeText?'请输入限时办理天数' : '请选择限时办理天数',
1562
+ trigger: 'blur'
1563
+ },
1564
+ {required:this.enableCustomLimitTimeSetting, validator: this.checkCustomLimitTime, trigger: 'change' }
1565
+ ]
1566
+ };
1567
+ },
1548
1568
  tabs() {
1549
1569
  return {
1550
1570
  employee: {
@@ -1586,6 +1606,25 @@ export default {
1586
1606
  }
1587
1607
  },
1588
1608
  methods: {
1609
+ limitTimevalidate() {
1610
+ let validSate = true;
1611
+ this.$refs.nextNode.validate((valid) => {
1612
+ if (valid) {
1613
+ validSate = true;
1614
+ } else {
1615
+ validSate = false;
1616
+ }
1617
+ });
1618
+ return validSate;
1619
+ },
1620
+ checkCustomLimitTime(rule, value, callback){
1621
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
1622
+ callback(new Error('请输入正确的天数'))
1623
+ this.nextNode.customLimitTime = '';
1624
+ }else{
1625
+ callback()
1626
+ }
1627
+ },
1589
1628
  getAdminMsgType() {
1590
1629
  let params = {
1591
1630
  url: getUrgencyLevelChangedNotificationType,
@@ -1675,7 +1714,7 @@ export default {
1675
1714
  // });
1676
1715
  // }
1677
1716
  this.optionsKey++;
1678
- this.isOpinionRequired = res.data.nodeExtAttr.isOpinionRequired == 1;
1717
+ this.isOpinionRequired = res.data.nodeExtAttr.isOpinionRequired;
1679
1718
  this.showOpinion = false;
1680
1719
  setTimeout(() => {
1681
1720
  this.showOpinion = true;
@@ -2590,6 +2629,9 @@ export default {
2590
2629
  data.nodeExtAttr.currentNodeEnableItemHandleDescription == 1;
2591
2630
  this.enableCustomLimitTimeSetting =
2592
2631
  data.nodeExtAttr.enableCustomLimitTimeSetting == 1;
2632
+ if(this.enableCustomLimitTimeSetting && data.nodeMoreInfo.defaultCustomLimitDays){
2633
+ this.nextNode.customLimitTime = data.nodeMoreInfo.defaultCustomLimitDays + ''
2634
+ }
2593
2635
  data.otherOrgDisabledObjId &&
2594
2636
  (this.otherOrgDisabledObjId =
2595
2637
  data.otherOrgDisabledObjId.split(','));
@@ -3082,7 +3124,6 @@ export default {
3082
3124
  }
3083
3125
  this.isCurrentNodeForbiddenChangeCandidate =
3084
3126
  nodeInfoMap.nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
3085
- console.log(opinion,'opinionopinionopinion')
3086
3127
  this.value = opinion || '';
3087
3128
  this.nodeDefaultSubmitOpinion =
3088
3129
  nodeInfoMap.nodeExtAttr.nodeDefaultSubmitOpinion;
@@ -11,6 +11,7 @@
11
11
  :model="nextNode"
12
12
  class="demo-dynamic"
13
13
  label-width="100px"
14
+ :rules="rules"
14
15
  :label-position="labelPosition"
15
16
  >
16
17
  <div
@@ -76,7 +77,7 @@
76
77
  prop="nextNode"
77
78
  label="下步节点"
78
79
  :rules="[
79
- { required: true, message: `请选择下步节点`, trigger: 'blur' }
80
+ { required: false, message: `请选择下步节点`, trigger: 'blur' }
80
81
  ]"
81
82
  >
82
83
  <el-select
@@ -209,12 +210,26 @@
209
210
  v-if="enableCustomLimitTimeSetting"
210
211
  prop="customLimitTime"
211
212
  label="限时办理"
213
+ :rules="[
214
+ {
215
+ required: enableCustomLimitTimeSetting,
216
+ message: showCustomLimitTimeText
217
+ ? '请输入限时办理天数'
218
+ : '请选择限时办理天数',
219
+ trigger: 'blur'
220
+ },
221
+ {
222
+ required: enableCustomLimitTimeSetting,
223
+ validator: checkCustomLimitTime,
224
+ trigger: 'blur'
225
+ }
226
+ ]"
212
227
  >
213
228
  <el-input
214
229
  v-model="nextNode.customLimitTime"
215
230
  placeholder="请输入限时办理的天数"
216
- @change="changeCustomLimitTime"
217
231
  class="input-with-select custom-limit-time"
232
+ @change="changeCustomLimitTime"
218
233
  >
219
234
  <es-select
220
235
  v-if="!showCustomLimitTimeText"
@@ -248,7 +263,11 @@
248
263
  v-model="nextNode.handleExplain"
249
264
  />
250
265
  </el-form-item>
251
- <el-form-item prop="noticeType" label="通知方式" v-show="showBtn && nextNode.noticeList.length>0">
266
+ <el-form-item
267
+ prop="noticeType"
268
+ label="通知方式"
269
+ v-show="showBtn && nextNode.noticeList.length > 0"
270
+ >
252
271
  <el-checkbox-group v-model="nextNode.noticeType">
253
272
  <el-checkbox
254
273
  v-for="item of nextNode.noticeList"
@@ -327,7 +346,10 @@
327
346
  </div>
328
347
  </el-form-item>
329
348
  </el-form>
330
- <div v-if="!showBtn && nextNode.noticeList.length>0" style="padding: 5px; background: #fff">
349
+ <div
350
+ v-if="!showBtn && nextNode.noticeList.length > 0"
351
+ style="padding: 5px; background: #fff"
352
+ >
331
353
  <div class="news" @click="showNews = !showNews">
332
354
  <span class="news-item">消息通知</span>
333
355
  <span :class="showNews ? 'show' : 'sj'"></span>
@@ -444,18 +466,18 @@ export default {
444
466
  default: ''
445
467
  },
446
468
  showBtn: { type: Boolean, default: true },
447
- messageType:{
448
- type:Array,
469
+ messageType: {
470
+ type: Array,
449
471
  default: () => []
450
472
  },
451
- urgencyLevel:{
452
- type:[Number,String],
453
- default:''
454
- },
455
- keyCount:{
456
- type:[Number,String],
457
- default:0
473
+ urgencyLevel: {
474
+ type: [Number, String],
475
+ default: ''
458
476
  },
477
+ keyCount: {
478
+ type: [Number, String],
479
+ default: 0
480
+ }
459
481
  },
460
482
  data() {
461
483
  return {
@@ -547,12 +569,12 @@ export default {
547
569
  userInfo: [],
548
570
  handleExplain: '',
549
571
  noticeList: [],
550
- msgTypeCount:0
572
+ msgTypeCount: 0
551
573
  }
552
574
  };
553
575
  },
554
576
  watch: {
555
- messageType:{
577
+ messageType: {
556
578
  handler(val) {
557
579
  if (this.urgencyLevel) {
558
580
  this.nextNode.noticeList = val;
@@ -565,8 +587,8 @@ export default {
565
587
  });
566
588
  });
567
589
  this.nextNode.noticeType = arr;
568
- }else{
569
- this.msgTypeCount++
590
+ } else {
591
+ this.msgTypeCount++;
570
592
  }
571
593
  }
572
594
  },
@@ -596,6 +618,24 @@ export default {
596
618
  }
597
619
  },
598
620
  computed: {
621
+ rules() {
622
+ return {
623
+ customLimitTime: [
624
+ {
625
+ required: this.enableCustomLimitTimeSetting,
626
+ message: this.showCustomLimitTimeText
627
+ ? '请输入限时办理天数'
628
+ : '请选择限时办理天数',
629
+ trigger: 'blur'
630
+ },
631
+ {
632
+ required: this.enableCustomLimitTimeSetting,
633
+ validator: this.checkCustomLimitTime,
634
+ trigger: 'blur'
635
+ }
636
+ ]
637
+ };
638
+ },
599
639
  types() {
600
640
  if (this.isCdjxjTaskHandle == 'true') {
601
641
  return ['employee', 'enterprise', 'department'];
@@ -608,7 +648,7 @@ export default {
608
648
  this.getUserInfo();
609
649
  },
610
650
  mounted() {
611
- if(!this.urgencyLevel){
651
+ if (!this.urgencyLevel) {
612
652
  this.getNodeType();
613
653
  }
614
654
  this.getStartFlow(this.processDefinitionId);
@@ -619,8 +659,27 @@ export default {
619
659
  }
620
660
  },
621
661
  methods: {
662
+ limitTimevalidate() {
663
+ let validSate = true;
664
+ this.$refs.nextNode.validate((valid) => {
665
+ if (valid) {
666
+ validSate = true;
667
+ } else {
668
+ validSate = false;
669
+ }
670
+ });
671
+ return validSate;
672
+ },
673
+ checkCustomLimitTime(rule, value, callback) {
674
+ if (!Number(value) || value.indexOf('.') != -1 || Number(value) < 0) {
675
+ callback(new Error('请输入正确的天数'));
676
+ this.nextNode.customLimitTime = '';
677
+ } else {
678
+ callback();
679
+ }
680
+ },
622
681
  handleChange() {
623
- this.isChangeMessage = true
682
+ this.isChangeMessage = true;
624
683
  },
625
684
  changeCustomLimitTime(val) {
626
685
  if (!Number(val) || val.indexOf('.') != -1 || Number(val) < 0) {
@@ -783,7 +842,10 @@ export default {
783
842
  if (res.status === 'success') {
784
843
  if (!this.showBtn) {
785
844
  this.oldMessage = res.message;
786
- this.nextNode.noticeInfo = res.message.replace('{title}', this.formTitle);
845
+ this.nextNode.noticeInfo = res.message.replace(
846
+ '{title}',
847
+ this.formTitle
848
+ );
787
849
  } else {
788
850
  this.nextNode.noticeInfo = res.message;
789
851
  }
@@ -847,7 +909,6 @@ export default {
847
909
  let params = {
848
910
  processDefinitionId: this.processDefinitionId,
849
911
  nextUserId: this.multiple ? newNextUser.join(',') : nextUser,
850
- customLimitTime,
851
912
  nextNodeId: nextNode,
852
913
  businessId: this.businessId,
853
914
  notificationType: newNoticeType,
@@ -870,6 +931,22 @@ export default {
870
931
  : presetReadUserId.join(','),
871
932
  opinion: this.newOpinion || newOpinion
872
933
  };
934
+ if (this.enableCustomLimitTimeSetting) {
935
+ params.customLimitTime = customLimitTime;
936
+ if (!customLimitTime) {
937
+ this.$message.warning('请选择或输入限时办理的天数');
938
+ this.nextNode.customLimitTime = '';
939
+ return;
940
+ } else if (
941
+ !Number(customLimitTime) ||
942
+ val.indexOf('.') != -1 ||
943
+ Number(customLimitTime) < 0
944
+ ) {
945
+ this.$message.warning('请输入正确的天数');
946
+ this.nextNode.customLimitTime = '';
947
+ return;
948
+ }
949
+ }
873
950
  if (this.activeNames != '1') delete params.customPresetUserJson;
874
951
  if (this.isFreeStartFlow || this.formType === 'readTransfer') {
875
952
  let newParm = {};
@@ -890,7 +967,7 @@ export default {
890
967
  : '';
891
968
  }
892
969
  }
893
-
970
+
894
971
  newParm.submitTaskParamJson = JSON.stringify(this.taskParams);
895
972
  if (this.formType == 'readTransfer') {
896
973
  newParm.readTransferHandleStartFlowParamJson =
@@ -902,17 +979,19 @@ export default {
902
979
  }
903
980
  params = newParm;
904
981
  }
905
- if(this.copyHistory && !this.isFreeStartFlow){
906
- params.pendingId = this.pendingId
907
- delete params.businessId;
908
- }
982
+ if (this.copyHistory && !this.isFreeStartFlow) {
983
+ params.pendingId = this.pendingId;
984
+ delete params.businessId;
985
+ }
909
986
  util
910
987
  .ajax({
911
988
  url: this.isFreeStartFlow
912
989
  ? freeStartFlowWithSubmitTask
913
990
  : this.formType == 'readTransfer'
914
991
  ? startReadTransferHandleFlowWithTaskReadEnd
915
- : this.copyHistory? freeStartFlow : register,
992
+ : this.copyHistory
993
+ ? freeStartFlow
994
+ : register,
916
995
  method: 'post',
917
996
  data: params
918
997
  })
@@ -365,7 +365,6 @@ export default {
365
365
  return len;
366
366
  },
367
367
  handleClick(res) {
368
- console.log(res);
369
368
  const { type, event } = res;
370
369
  if (event) {
371
370
  event();