eoss-ui 0.8.34 → 0.8.36

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.
@@ -40,9 +40,64 @@
40
40
  class="opinions"
41
41
  :opinion="nextNode.newOpinion"
42
42
  :rows="copyHistory || formType == 'readTransfer' ? 2 : 5"
43
+ v-if="showOpinion"
44
+ :required="isOpinionRequired == 1"
43
45
  @change="(val) => (nextNode.newOpinion = val)"
44
46
  />
45
47
  </el-form-item>
48
+ <!-- 阅转办时新增选择流程功能 -->
49
+ <el-form-item
50
+ v-if="isCanReadTransferHandle && readTransferHandleFlowTypeCode"
51
+ prop="nextNode"
52
+ label="选择流程"
53
+ :rules="[
54
+ // { required: true, message: `请选择流程`, trigger: 'blur' }
55
+ ]"
56
+ >
57
+ <el-input
58
+ placeholder="请输入内容"
59
+ class="input-with-select select-process"
60
+ :class="{ 'hide-flow-char': isStartFlowChartView != 'true' }"
61
+ >
62
+ <el-select
63
+ slot="prepend"
64
+ v-model="currentNodeInfo.nextNode"
65
+ style="width: calc(100% + 40px)"
66
+ :placeholder="`请选择流程`"
67
+ :key="optionsKey"
68
+ @change="handleFlowChange"
69
+ >
70
+ <el-option
71
+ v-for="items in currentNodeInfo.option"
72
+ :key="items.id"
73
+ :label="items.name"
74
+ :disabled="items.disabled"
75
+ :value="items.processDefId"
76
+ ></el-option>
77
+ </el-select>
78
+ <div slot="append" v-show="isStartFlowChartView == 'true'">
79
+ <el-button
80
+ icon="es-icon-shu-jituan"
81
+ type="primary"
82
+ @click="
83
+ () => {
84
+ showFlowChart = true;
85
+ }
86
+ "
87
+ ></el-button>
88
+ <el-button
89
+ v-show="activitiDefinitionSort"
90
+ icon="es-icon-paixu"
91
+ type="primary"
92
+ @click="
93
+ () => {
94
+ showSort = true;
95
+ }
96
+ "
97
+ ></el-button>
98
+ </div>
99
+ </el-input>
100
+ </el-form-item>
46
101
  <el-form-item
47
102
  prop="nextOperate"
48
103
  label="下步操作"
@@ -221,6 +276,7 @@
221
276
  :mix="true"
222
277
  :types="types"
223
278
  @change="changeSelectReadUser($event, 'nextReadUserId')"
279
+ :params="fyParams"
224
280
  :tabs="tabs"
225
281
  />
226
282
  </el-form-item>
@@ -238,6 +294,7 @@
238
294
  :showTooltip="showTooltip"
239
295
  :options="presetOptions"
240
296
  title="分阅用户"
297
+ :params="fyParams"
241
298
  :radioList="presetReadUserId"
242
299
  :presetEdit="1"
243
300
  :mix="true"
@@ -429,6 +486,8 @@ import {
429
486
  loginUserInfo,
430
487
  register,
431
488
  freeStartFlow,
489
+ getProcessDefList,
490
+ getNodeInfoForStart,
432
491
  freeStartFlowWithSubmitTask,
433
492
  startReadTransferHandleFlowWithTaskReadEnd
434
493
  } from 'eoss-ui/src/config/api';
@@ -448,6 +507,14 @@ export default {
448
507
  Preset
449
508
  },
450
509
  props: {
510
+ isCanReadTransferHandle: {
511
+ type: Boolean,
512
+ default: false
513
+ },
514
+ readTransferHandleFlowTypeCode: {
515
+ type: String,
516
+ default: ''
517
+ },
451
518
  processDefinitionId: {
452
519
  type: String,
453
520
  default: ''
@@ -527,11 +594,15 @@ export default {
527
594
  return {
528
595
  loading: false,
529
596
  isCustomUser: 0,
597
+ currentNodeInfo: { nextNode: '', nextUser: '', option: [] },
598
+ isStartFlowChartView: false,
530
599
  isCurrentNodeForbiddenChangeCandidate: 0,
531
600
  allLoading: null,
532
601
  selectUser: false,
533
602
  multiple: false,
534
603
  readMultiple: true,
604
+ showOpinion: true,
605
+ isOpinionRequired: 0,
535
606
  currentOrgSelectorTabs: ['employee', 'persongroup'],
536
607
  customPresetHintMessage: '', //流程预设标题
537
608
  nextNodeCheckType: 'select',
@@ -550,6 +621,7 @@ export default {
550
621
  defaultNextNode: '',
551
622
  presetUserJson: [],
552
623
  businessId: '',
624
+ optionsKey: 0,
553
625
  isTaskread: 0, //是否显示分阅用户
554
626
  isHandleExplain: 0, //是否展示办理说明
555
627
  options: [],
@@ -587,6 +659,7 @@ export default {
587
659
  }
588
660
  }
589
661
  },
662
+ activitiDefinitionSort: false,
590
663
  userModel: {},
591
664
  nextUserTabs: {},
592
665
  selectPresetUserList: [],
@@ -651,7 +724,9 @@ export default {
651
724
  }
652
725
  },
653
726
  processDefinitionId(val) {
727
+ const savedNodeInfo = { ...this.currentNodeInfo };
654
728
  Object.assign(this.$data, this.$options.data());
729
+ this.currentNodeInfo = savedNodeInfo;
655
730
  this.getUserInfo();
656
731
  this.getNodeType();
657
732
  this.getStartFlow(val);
@@ -700,6 +775,28 @@ export default {
700
775
  } else {
701
776
  return ['employee', 'enterprise', 'department', 'persongroup'];
702
777
  }
778
+ },
779
+ fyParams() {
780
+ let orgId = JSON.parse(util.getStorage('mainConfig')).userModel.orgId;
781
+ let params = {};
782
+ if (this.configInfo.selectPersonValue == 1) {
783
+ params.filid = orgId;
784
+ } else if (this.configInfo.selectPersonValue == 2) {
785
+ params.filid = orgId;
786
+ } else if (this.configInfo.selectPersonValue == 3) {
787
+ params.filid = 'all';
788
+ } else if (this.configInfo.selectPersonValue == 4) {
789
+ params.filid = 'all';
790
+ } else if (this.configInfo.selectPersonValue == 5) {
791
+ params.filid = '';
792
+ } else if (this.configInfo.selectPersonValue == 6) {
793
+ params.filid = '';
794
+ } else if (this.configInfo.selectPersonValue == 7) {
795
+ params.filid = orgId;
796
+ } else if (this.configInfo.selectPersonValue == 8) {
797
+ params.filid = orgId;
798
+ }
799
+ return params;
703
800
  }
704
801
  },
705
802
  created() {
@@ -715,8 +812,70 @@ export default {
715
812
  } else if (this.formType != 'readTransfer') {
716
813
  this.newOpinion = this.opinion;
717
814
  }
815
+ if (this.isCanReadTransferHandle && this.readTransferHandleFlowTypeCode) {
816
+ this.getProcess(this.readTransferHandleFlowTypeCode);
817
+ }
718
818
  },
719
819
  methods: {
820
+ /**
821
+ * getProcess
822
+ * @desc:获取选择流程
823
+ * @author liufan
824
+ * @date 2022年5月25日
825
+ **/
826
+ getProcess(val) {
827
+ let params = {
828
+ businessId: this.businessId,
829
+ flowTypeCode: val || this.flowTypeCode,
830
+ // defaultProcessKey: this.defaultProcessKey,
831
+ isOnly: true,
832
+ hideTempSave: true
833
+ };
834
+ const loading = util.loading(this.$loading, '加载中...');
835
+ util
836
+ .ajax({ url: getProcessDefList, params })
837
+ .then((res) => {
838
+ const { status, message, data } = res;
839
+ loading.close();
840
+ if (status === 'success') {
841
+ this.isStartFlowChartView = data.isStartFlowChartView;
842
+ if (
843
+ !Object.keys(data).length ||
844
+ (data.definitionList && !data.definitionList.length)
845
+ ) {
846
+ this.$message.error('流程不存在或未关联对应流程!');
847
+ } else {
848
+ this.activitiDefinitionSort = data.activitiDefinitionSort;
849
+ this.currentNodeInfo.option = data.definitionList;
850
+ this.currentNodeInfo.nextNode = data.definitionList.filter(
851
+ (item) => item.processDefKey == this.defaultProcessKey
852
+ );
853
+ if (this.currentNodeInfo.nextNode.length) {
854
+ this.currentNodeInfo.nextNode =
855
+ this.currentNodeInfo.nextNode[0].processDefId;
856
+ } else {
857
+ if (data.definitionList.length != 0) {
858
+ this.currentNodeInfo.nextNode =
859
+ data.definitionList[0].processDefId;
860
+ } else {
861
+ this.currentNodeInfo.nextNode = '';
862
+ }
863
+ }
864
+ if (this.currentNodeInfo.nextNode) {
865
+ this.handleFlowChange(this.currentNodeInfo.nextNode, true);
866
+ }
867
+ }
868
+ } else {
869
+ this.$message.error(message || '系统错误,请联系管理员!');
870
+ }
871
+ })
872
+ .catch((err) => {
873
+ loading.close();
874
+ if (err.message && err.message !== 'canceled') {
875
+ this.$message.error(err.message);
876
+ }
877
+ });
878
+ },
720
879
  handleChangeTime(val) {
721
880
  this.nextNode.customLimitTime = val;
722
881
  },
@@ -739,6 +898,28 @@ export default {
739
898
  callback();
740
899
  }
741
900
  },
901
+ handleFlowChange(val) {
902
+ this.getNodeInfoForStartFlow(val);
903
+ this.$parent.$emit('flowChange', val);
904
+ },
905
+ getNodeInfoForStartFlow(processDefinitionId) {
906
+ let params = {
907
+ url: getNodeInfoForStart,
908
+ params: { processDefinitionId }
909
+ };
910
+ util.ajax(params).then((res) => {
911
+ if (res.status == 'success') {
912
+ this.isOpinionRequired = res.data.nodeExtAttr.isOpinionRequired;
913
+ this.showOpinion = false;
914
+ setTimeout(() => {
915
+ this.showOpinion = true;
916
+ }, 0);
917
+ this.processDefinitionId = processDefinitionId;
918
+ // this.getStartFlow(processDefinitionId);
919
+ // this.getNodeInfos(undefined, undefined, processDefinitionId);
920
+ }
921
+ });
922
+ },
742
923
  handleChange() {
743
924
  this.isChangeMessage = true;
744
925
  },
@@ -1137,7 +1318,8 @@ export default {
1137
1318
  if (this.isHideOtherOrg) {
1138
1319
  params.nextOtherOrgObj = nextOtherOrgObj;
1139
1320
  }
1140
- if (this.activeNames != '1' || !this.isCustomPreset) delete params.customPresetUserJson;
1321
+ if (this.activeNames != '1' || !this.isCustomPreset)
1322
+ delete params.customPresetUserJson;
1141
1323
  if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1142
1324
  let newParm = {};
1143
1325
  newParm.copyHistory =
@@ -1275,7 +1457,8 @@ export default {
1275
1457
  if (this.isHideOtherOrg) {
1276
1458
  params.nextOtherOrgObj = nextOtherOrgObj;
1277
1459
  }
1278
- if (this.activeNames != '1' || !this.isCustomPreset) delete params.customPresetUserJson;
1460
+ if (this.activeNames != '1' || !this.isCustomPreset)
1461
+ delete params.customPresetUserJson;
1279
1462
  if (this.isFreeStartFlow || this.formType === 'readTransfer') {
1280
1463
  let newParm = {};
1281
1464
  newParm.copyHistory = this.copyHistory === 'needCopyPendedHistory';
@@ -1352,9 +1535,9 @@ export default {
1352
1535
  }
1353
1536
  });
1354
1537
  },
1355
- getNodeInfos(nodeId, index) {
1538
+ getNodeInfos(nodeId, index, processDefinitionId) {
1356
1539
  let params = {
1357
- processDefinitionId: this.processDefinitionId,
1540
+ processDefinitionId: processDefinitionId || this.processDefinitionId,
1358
1541
  nextNodeId: nodeId ? nodeId : this.nextNode.nextNode,
1359
1542
  businessId: this.id,
1360
1543
  userId: util.getStorage('userId')
@@ -1379,8 +1562,14 @@ export default {
1379
1562
  this.allLoading.close();
1380
1563
  }
1381
1564
  if (status === 'success') {
1382
- if( this.currentOrgSelectorParams.department && !this.currentOrgSelectorParams.department.roleid && this.selectorParams.roleid && nodeExtAttr.deptRoleCode){
1383
- this.currentOrgSelectorParams.department.roleid = nodeExtAttr.deptRoleCode;
1565
+ if (
1566
+ this.currentOrgSelectorParams.department &&
1567
+ !this.currentOrgSelectorParams.department.roleid &&
1568
+ this.selectorParams.roleid &&
1569
+ nodeExtAttr.deptRoleCode
1570
+ ) {
1571
+ this.currentOrgSelectorParams.department.roleid =
1572
+ nodeExtAttr.deptRoleCode;
1384
1573
  }
1385
1574
  this.isCurrentNodeForbiddenChangeCandidate =
1386
1575
  nodeExtAttr.isCurrentNodeForbiddenChangeCandidate;
@@ -1390,7 +1579,7 @@ export default {
1390
1579
  this.enableCustomLimitTimeSetting =
1391
1580
  nodeExtAttr.enableCustomLimitTimeSetting == 1;
1392
1581
  if (nodeMoreInfo.currentOrgDefaultSelectObjectItems) {
1393
- this.nextCurrentOrgselectUserList = []
1582
+ this.nextCurrentOrgselectUserList = [];
1394
1583
  if (
1395
1584
  nodeMoreInfo.currentOrgDefaultSelectObjectItems.deptIds.length >
1396
1585
  0
@@ -1439,7 +1628,8 @@ export default {
1439
1628
  }
1440
1629
  );
1441
1630
  }
1442
- this.nextNode.nextCurrentOrgObj = nodeMoreInfo.currentOrgDefaultSelectObjects
1631
+ this.nextNode.nextCurrentOrgObj =
1632
+ nodeMoreInfo.currentOrgDefaultSelectObjects;
1443
1633
  }
1444
1634
  if (
1445
1635
  this.enableCustomLimitTimeSetting &&
@@ -1684,6 +1874,7 @@ export default {
1684
1874
  });
1685
1875
  }
1686
1876
  }
1877
+ this.configInfo = res.data;
1687
1878
  this.customPresetHintMessage = data.customPresetHintMessage;
1688
1879
  this.readOnlyNotificationType = data.readOnlyNotificationType;
1689
1880
  this.notificationMessageReadOnly =
@@ -1780,10 +1971,14 @@ export default {
1780
1971
  this.nextNode.presetReadUserId.push(item);
1781
1972
  });
1782
1973
  }
1783
- this.getNodeInfos();
1974
+ this.getNodeInfos(undefined, undefined, processId);
1784
1975
  // this.getPresetFlowInfo();
1785
1976
  this.isCustomPreset &&
1786
- this.$refs.customPreset.getPresetFlowInfo(this.nextNode.nextNode);
1977
+ this.$refs.customPreset.getPresetFlowInfo(
1978
+ this.nextNode.nextNode,
1979
+ undefined,
1980
+ true
1981
+ );
1787
1982
  this.getFind();
1788
1983
  this.getMessage();
1789
1984
  } else {
@@ -13,8 +13,8 @@
13
13
  label-width="100px"
14
14
  label-align="left"
15
15
  >
16
- <div style="max-height: 290px; overflow-y: auto; margin-bottom: 10px">
17
- <el-form-item prop="nodeName" label="当前节点">
16
+ <div :style="`max-height: 290px; overflow-y: ${hideBtn?'unset' : 'auto'}; margin-bottom: 10px`">
17
+ <el-form-item prop="nodeName" label="当前节点`">
18
18
  <el-input v-model="nodeName" disabled />
19
19
  </el-form-item>
20
20
  <el-form-item
@@ -5,7 +5,7 @@
5
5
  element-loading-text="加载中..."
6
6
  element-loading-spinner="el-icon-loading"
7
7
  element-loading-background="rgba(255, 255,255, 0.8)"
8
- :style="`height: ${typeCode == 'read'? '100%' : 'unset'};`"
8
+ :style="`height: ${typeCode == 'read' || hideBtn ? '100%' : 'unset'};`"
9
9
  >
10
10
  <el-form
11
11
  ref="nextNode"
@@ -15,8 +15,8 @@
15
15
  >
16
16
  <div
17
17
  :style="`max-height: ${
18
- typeCode ? 'unset' : '290px'
19
- }; overflow-y: auto; margin-bottom: 10px`"
18
+ typeCode || hideBtn ? '100%' : '290px'
19
+ }; overflow-y:${hideBtn?'unset' : 'auto'}; margin-bottom: 10px`"
20
20
  >
21
21
  <el-form-item
22
22
  prop="handleExplain"
@@ -248,14 +248,14 @@ export default {
248
248
  let tab = {};
249
249
  if (this.type != 'transfer') {
250
250
  tab = {
251
- employee: {
252
- param: {
253
- filid: this.orgId,
254
- name: '本单位用户'
255
- }
256
- },
257
- department: { param: { filid: this.orgId } },
258
- enterprise: {}
251
+ // employee: {
252
+ // param: {
253
+ // filid: '',//this.orgId
254
+ // name: '本单位用户'
255
+ // }
256
+ // },
257
+ department: { param: { filid: this.orgId } },//this.orgId
258
+ // enterprise: {}
259
259
  };
260
260
  } else {
261
261
  tab = {
@@ -283,6 +283,11 @@ export default {
283
283
  }
284
284
  },
285
285
  methods: {
286
+ // getSelectType(info){
287
+ // if(info.selectPersonValue == 4){
288
+ // this.selectorParams.filid = 'all'
289
+ // }
290
+ // },
286
291
  getSelectorConfig() {
287
292
  this.selectorTabs = this.selectorConfig.type.split(',');
288
293
  this.selectorParams = this.selectorConfig.params;
@@ -403,7 +408,14 @@ export default {
403
408
  } else if (this.configInfo.selectPersonValue == 6) {
404
409
  this.multiple = true;
405
410
  this.params.filid = '';
411
+ }else if (this.configInfo.selectPersonValue == 7) {
412
+ this.multiple = false;
413
+ this.params.filid = orgId;
414
+ }else if (this.configInfo.selectPersonValue == 8) {
415
+ this.multiple = true;
416
+ this.params.filid = orgId;
406
417
  }
418
+ console.log(this.params,'params')
407
419
  },
408
420
  handleSelectCheck(val, data) {
409
421
  let { userIds, userNames } = data;
@@ -446,6 +458,7 @@ export default {
446
458
  url: toStartTaskRead,
447
459
  params: {
448
460
  pendingId: this.pendingId,
461
+ appId: this.resetAppId,
449
462
  taskAction: this.type,
450
463
  ...this.param
451
464
  }