ocpview-plus 1.3.3 → 1.3.4

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": "ocpview-plus",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "title": "ocpviewPlus",
5
5
  "description": "A high quality Service UI components Library with Vue.js",
6
6
  "homepage": "",
@@ -109,6 +109,9 @@
109
109
  <span class="status">{{item.act_status_name}}</span>
110
110
  </p>
111
111
  <div>
112
+ <p v-if="index === auditLog.length - 1 && item.candidateUserList && item.candidateUserList.length > 0" class="desc">
113
+ 待审批人:<span>{{ getCandidateUserText(item.candidateUserList) }}</span>
114
+ </p>
112
115
  <span>{{item.act_time_}}</span>
113
116
  <p class="desc">意见:<span v-text="getMessage(item.message)"></span></p>
114
117
  </div>
@@ -354,6 +357,7 @@ export default {
354
357
  if (data.procinfo && data.procinfo.proclist) {
355
358
  let result = data.procinfo.proclist || [];
356
359
  let copylist = [];
360
+ let candidateUserList = [];
357
361
  if (data.procinfo.cc && data.procinfo.cc.length > 0) {
358
362
  data.procinfo.cc.forEach(item => {
359
363
  let tmp = {};
@@ -363,13 +367,26 @@ export default {
363
367
  copylist.push(tmp);
364
368
  });
365
369
  }
366
- result.forEach(item => {
370
+ if (data.procinfo && data.procinfo.flowerProgress) {
371
+ if (data.procinfo.flowerProgress.length > 0) {
372
+ let lastflowerProgress = data.procinfo.flowerProgress[data.procinfo.flowerProgress.length - 1];
373
+ if (lastflowerProgress && lastflowerProgress.candidateUserList) {
374
+ candidateUserList = lastflowerProgress.candidateUserList;
375
+ }
376
+ }
377
+
378
+ }
379
+ result.forEach((item, index) => {
367
380
  item.active = false;
368
381
  item.tasklist.forEach(list => {
369
382
  if (list.usernam) {
370
383
  list.userName = list.username.substr(-2, 2);
371
384
  }
372
385
  });
386
+ // 判断是否是最后一个item,添加candidateUserList
387
+ if (index === result.length - 1) {
388
+ item.candidateUserList = candidateUserList;
389
+ }
373
390
  });
374
391
 
375
392
 
@@ -409,6 +426,13 @@ export default {
409
426
  '.billrepeal',
410
427
  {billno: this.value.billno},
411
428
  (data) => {
429
+ // // 方式1:通过事件 没有生效
430
+ // this.$emit('approvalOk', '');
431
+
432
+ // 方式2:直接调用父组件方法(兜底)
433
+ if (this.$parent && typeof this.$parent.approvalOk === 'function') {
434
+ this.$parent.approvalOk();
435
+ }
412
436
  this.alert(data.msg,null,3);
413
437
  this.showDrawer = false;
414
438
  }
@@ -426,6 +450,13 @@ export default {
426
450
  '.billreject' ,
427
451
  para,
428
452
  (data) => {
453
+ // // 方式1:通过事件 没有生效
454
+ // this.$emit('approvalOk', '');
455
+
456
+ // 方式2:直接调用父组件方法(兜底)
457
+ if (this.$parent && typeof this.$parent.approvalOk === 'function') {
458
+ this.$parent.approvalOk();
459
+ }
429
460
  this.showDrawer = false;
430
461
  this.alert(data.msg,null,3);
431
462
  }
@@ -449,6 +480,13 @@ export default {
449
480
  param.comment = this.idea;
450
481
  }
451
482
  this.doPost('.billsubmit', param, (data) => {
483
+ // // 方式1:通过事件 没有生效
484
+ // this.$emit('approvalOk', '');
485
+
486
+ // 方式2:直接调用父组件方法(兜底)
487
+ if (this.$parent && typeof this.$parent.approvalOk === 'function') {
488
+ this.$parent.approvalOk();
489
+ }
452
490
  this.showDrawer = false;
453
491
  this.$nextTick(() =>{
454
492
  setTimeout(() => {
@@ -462,6 +500,13 @@ export default {
462
500
  '.billapproval',
463
501
  {billno: this.value.billno,comment: this.idea},
464
502
  (data) => {
503
+ // // 方式1:通过事件 没有生效
504
+ // this.$emit('approvalOk', '');
505
+
506
+ // 方式2:直接调用父组件方法(兜底)
507
+ if (this.$parent && typeof this.$parent.approvalOk === 'function') {
508
+ this.$parent.approvalOk();
509
+ }
465
510
  this.showDrawer = false;
466
511
  this.alert(data.msg,null,3);
467
512
  });
@@ -670,6 +715,13 @@ export default {
670
715
  },
671
716
  selectTypeChange() {
672
717
  this.clearUser();
718
+ },
719
+ // 提前所有待审批人姓名
720
+ getCandidateUserText(candidateUserList) {
721
+ if (!candidateUserList || candidateUserList.length === 0) return '';
722
+ // 提取所有待审批人姓名
723
+ let approvers = candidateUserList.map(user => user.userName).join('、');
724
+ return approvers;
673
725
  }
674
726
  },
675
727
  mounted () {
@@ -88,27 +88,33 @@ export default {
88
88
  dictkey: 'CUSTFILETYPE',
89
89
  codeWithName: false,
90
90
  width: 300,
91
+ readOnly: true
91
92
  }, {
92
93
  label: '附件类型',
93
94
  name: 'filemode',
94
95
  type: 'TextBox',
95
96
  width: 300,
96
97
  visible: false,
98
+ readOnly: true
97
99
  }, {
98
100
  label: '文件名称',
99
101
  name: 'filename',
100
- type: 'TextBox'
102
+ type: 'TextBox',
103
+ width: 200,
104
+ readOnly: true
101
105
  }, {
102
106
  label: '文件大小',
103
107
  name: 'filesize',
104
108
  render: this.sizeActionRender,
105
- width: 120
109
+ width: 120,
110
+ readOnly: true
106
111
  }, {
107
112
  label: '上传日期',
108
113
  name: 'ph_timestamp',
109
114
  type: 'DateBox',
110
115
  vtype: 'datetime',
111
- width: 200
116
+ width: 150,
117
+ readOnly: true
112
118
  }, {
113
119
  label: '操作',
114
120
  key: 'action',
@@ -9,7 +9,7 @@
9
9
  </Card>
10
10
  </template>
11
11
  </BillDetailForm>
12
- <ApprovalBox ref="approval" :config="billApprovalConfig"/>
12
+ <ApprovalBox ref="approval" :config="billApprovalConfig" @approvalOk="approvalOk" />
13
13
  <Modal class-name="efuture-billapprovalmainframe" v-model="showApproval" fullscreen title="报批单" footer-hide>
14
14
  <iframe frameborder="0" ref="billapprovalmainframe" style="width:100%;height:100%;" border="0"></iframe>
15
15
  </Modal>