sasp-flow-render 1.1.11 → 1.1.13

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": "sasp-flow-render",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
4
4
  "description": "业务应用支撑平台-智慧流程渲染组件",
5
5
  "scripts": {
6
6
  "build": "vue-cli-service build"
@@ -79,10 +79,10 @@
79
79
  </el-button>
80
80
  </div>
81
81
  </div>
82
- <el-button type="primary" icon="el-icon-document-copy" size="small" round v-if="isShow('pending')"
82
+ <el-button type="primary" icon="el-icon-document-copy" size="small" round v-if="isShow('pending') && !flowIds.includes(',') && flowDefine.openBatch === '1'"
83
83
  @click="openFlowBatchPendingDialog">批量处理
84
84
  </el-button>
85
- <el-button type="warning" icon="el-icon-document-copy" size="small" round v-if="isShow('pending') && getFormDataByDataIds && flowDefine.openBatch === '1'"
85
+ <el-button type="warning" icon="el-icon-document-copy" size="small" round v-if="isShow('pending') && getFormDataByDataIds && flowDefine.openBatch === '1' && !flowIds.includes(',')"
86
86
  @click="openFlowBatchPendingDialogNew">快捷处理
87
87
  </el-button>
88
88
  </el-header>
@@ -302,6 +302,7 @@
302
302
  :key="btn.btnType"
303
303
  :type="btn.type"
304
304
  :icon="btn.icon"
305
+ :disabled="btn.disabled"
305
306
  size="small">
306
307
  {{btn.text}}
307
308
  </el-button>
@@ -594,6 +595,7 @@
594
595
  text: "存草稿",
595
596
  type: "success",
596
597
  icon: "el-icon-check",
598
+ disabled: false,
597
599
  show: true,
598
600
  method: () => {
599
601
  this.saveDraft();
@@ -604,6 +606,7 @@
604
606
  text: "下一步",
605
607
  type: "primary",
606
608
  icon: "el-icon-d-arrow-right",
609
+ disabled: false,
607
610
  show: true,
608
611
  method: () => {
609
612
  this.nextStep();
@@ -615,6 +618,7 @@
615
618
  text: "加签",
616
619
  type: "primary",
617
620
  icon: "saspiconfont pl-icon-jiaqian",
621
+ disabled: false,
618
622
  show: false,
619
623
  method: () => {
620
624
  this.completeSignDialog = true;
@@ -625,6 +629,7 @@
625
629
  text: "转签",
626
630
  type: "primary",
627
631
  icon: "saspiconfont pl-icon-zhuanqian-icon",
632
+ disabled: false,
628
633
  show: false,
629
634
  method: () => {
630
635
  this.turnSignDialog = true;
@@ -635,6 +640,7 @@
635
640
  text: "退回",
636
641
  type: "danger",
637
642
  icon: "el-icon-d-arrow-left",
643
+ disabled: false,
638
644
  show: false,
639
645
  method: () => {
640
646
  this.backToPrevious(this.currentInst);
@@ -645,6 +651,7 @@
645
651
  text: "退回指定节点",
646
652
  type: "danger",
647
653
  icon: "el-icon-refresh-left",
654
+ disabled: false,
648
655
  show: false,
649
656
  method: () => {
650
657
  this.retSpecified(this.currentInst); //退回指定节点
@@ -655,6 +662,7 @@
655
662
  text: "中止",
656
663
  type: "danger",
657
664
  icon: "saspiconfont pl-icon-yizhongzhi",
665
+ disabled: false,
658
666
  show: false,
659
667
  method: () => {
660
668
  this.saspFlowAxios.post(this.api.plFlowInst.stopFlow, {
@@ -701,6 +709,7 @@
701
709
  text: "撤销",
702
710
  type: "danger",
703
711
  icon: "saspiconfont pl-icon-chexiao",
712
+ disabled: false,
704
713
  show: false,
705
714
  isView: true,
706
715
  method: () => {
@@ -739,6 +748,7 @@
739
748
  text: "取回",
740
749
  type: "danger",
741
750
  icon: "el-icon-refresh-left",
751
+ disabled: false,
742
752
  show: false,
743
753
  isView: true,
744
754
  method: () => {
@@ -750,6 +760,7 @@
750
760
  text: "恢复",
751
761
  type: "success",
752
762
  icon: "saspiconfont pl-icon-chexiao",
763
+ disabled: false,
753
764
  show: false,
754
765
  isView: true,
755
766
  method: () => {
@@ -760,6 +771,7 @@
760
771
  text: "流转记录",
761
772
  type: "warning",
762
773
  icon: "saspiconfont pl-icon-liuchengtu",
774
+ disabled: false,
763
775
  show: true,
764
776
  isView: true,
765
777
  method: () => {
@@ -770,6 +782,7 @@
770
782
  text: "关闭",
771
783
  type: "",
772
784
  icon: "el-icon-close",
785
+ disabled: false,
773
786
  show: true,
774
787
  isView: true,
775
788
  method: () => {
@@ -1122,7 +1135,7 @@
1122
1135
  /**
1123
1136
  * 打开[修改和处理]窗口
1124
1137
  */
1125
- initUpdateFlowForm(row) {
1138
+ initUpdateFlowForm(row, type) {
1126
1139
  this.currentRowData = row;
1127
1140
  this.currNodeName = 'noEnd';
1128
1141
  if (this.flowId.includes(',')) {
@@ -1138,7 +1151,7 @@
1138
1151
  return new Promise(resolve => {
1139
1152
  let startNodeKey = this.startNodeKeyObj[row.version];
1140
1153
  this.initFieldStatus(row.nodeKey || startNodeKey,row.version).then(()=>{
1141
- this.initFormInfoFunc('update',row).then(() => {
1154
+ this.initFormInfoFunc(type,row).then(() => {
1142
1155
  this.currentStartUser = this.userMap[row.startUserId] || "";
1143
1156
  this.currentStartTime = row.startTime;
1144
1157
  this.currentInst = row;
@@ -1169,7 +1182,7 @@
1169
1182
  return;
1170
1183
  }
1171
1184
  this.flowInstDataDialog = true;
1172
- this.initUpdateFlowForm(row).then(() =>{
1185
+ this.initUpdateFlowForm(row, 'update').then(() =>{
1173
1186
  this.$nextTick(() => {
1174
1187
  this.exeFlowEvent(executePosition,"afterClick",row.currentNode);
1175
1188
  let currentNodeObj = this.flowNodeIdToInfo[row.currentNode] ||{};
@@ -1221,15 +1234,33 @@
1221
1234
  activeName: arrRows[0].dataId,
1222
1235
  batchDataId: arrRows[0].dataId
1223
1236
  });
1224
-
1237
+ let currentNodeObj = this.flowNodeIdToInfo[arrRows[0].currentNode] ||{};
1238
+ let result = null;
1239
+ let type = "update";
1240
+ if (currentNodeObj.openEvent === '1') {
1241
+ result = this.exeNewFlowEvent("editBefore",currentNodeObj.nodeLinkId ||'');//新事件规则
1242
+ if (result === false && typeof result == "boolean") {
1243
+ type = "view";
1244
+ }
1245
+ }
1225
1246
  this.flowBatchPendingDialog = true;
1226
- this.initUpdateFlowForm(arrRows[0]).then(()=>{
1247
+ this.initUpdateFlowForm(arrRows[0],type).then(()=>{
1227
1248
  // this.batchUpdateFormInfo.formShow = true;
1228
1249
  let ref='batchTableForm'+arrRows[0].dataId+'Ref'
1229
1250
 
1230
1251
  this.$nextTick(()=>{
1231
1252
  // this.$refs[ref][0].loadData().then(() => {
1253
+ if(result === false && typeof result == "boolean"){
1254
+ this.formBtnArr.forEach(item => {
1255
+ if (item.btnType !== "close" && item.btnType !== "record") {
1256
+ item.disabled = true;
1257
+ }
1258
+ });
1259
+ }
1232
1260
  this.exeFlowEvent("handle","afterClick",arrRows[0].currentNode,ref);
1261
+ if(currentNodeObj.openEvent === '1'){ //开启事件
1262
+ this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
1263
+ }
1233
1264
  // })
1234
1265
  })
1235
1266
  });
@@ -2070,17 +2101,36 @@
2070
2101
  */
2071
2102
  batchTabClick(val) {
2072
2103
  this.batchUpdateFormInfo.batchDataId = val.name;
2073
- this.initUpdateFlowForm(this.batchUpdateFormInfo.dataRows[val.index]);
2074
2104
  let dataId=this.batchUpdateFormInfo.dataRows[val.index].dataId;
2075
2105
  let currentNode=this.batchUpdateFormInfo.dataRows[val.index].currentNode;
2076
- let ref='batchTableForm'+dataId+'Ref';
2077
2106
 
2078
- this.$nextTick(()=>{
2107
+ let currentNodeObj = this.flowNodeIdToInfo[currentNode] ||{};
2108
+ let result = null;
2109
+ let type = "update";
2110
+ if (currentNodeObj.openEvent === '1') {
2111
+ result = this.exeNewFlowEvent("editBefore",currentNodeObj.nodeLinkId ||'');//新事件规则
2112
+ if (result === false && typeof result == "boolean") {
2113
+ type = "view";
2114
+ }
2115
+ }
2116
+ this.initUpdateFlowForm(this.batchUpdateFormInfo.dataRows[val.index], type).then(() => {
2117
+ let ref='batchTableForm'+dataId+'Ref';
2118
+ this.$nextTick(()=>{
2119
+ if(result === false && typeof result == "boolean"){
2120
+ this.formBtnArr.forEach(item => {
2121
+ if (item.btnType !== "close" && item.btnType !== "record") {
2122
+ this.$set(item, 'disabled', true);
2123
+ }
2124
+ });
2125
+ }
2079
2126
  // this.$refs[ref][0].loadData().then(() => {
2080
2127
  this.exeFlowEvent("handle","afterClick",currentNode,ref);
2128
+ if(currentNodeObj.openEvent === '1'){ //开启事件
2129
+ this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
2130
+ }
2081
2131
  // })
2132
+ })
2082
2133
  })
2083
-
2084
2134
  },
2085
2135
 
2086
2136
  /**
@@ -2104,13 +2154,33 @@
2104
2154
  this.batchUpdateFormInfo.activeName = nextTab.dataId;
2105
2155
  this.batchUpdateFormInfo.batchDataId =nextTab.dataId;
2106
2156
  this.batchUpdateFormInfo.formShow = false;
2157
+
2158
+ let currentNodeObj = this.flowNodeIdToInfo[nextTab.currentNode] ||{};
2159
+ let result = null;
2160
+ let type = "update";
2161
+ if (currentNodeObj.openEvent === '1') {
2162
+ result = this.exeNewFlowEvent("editBefore",currentNodeObj.nodeLinkId ||'');//新事件规则
2163
+ if (result === false && typeof result == "boolean") {
2164
+ type = "view";
2165
+ }
2166
+ }
2107
2167
  this.$nextTick(() => {
2108
2168
  this.batchUpdateFormInfo.formShow = true;
2109
- this.initUpdateFlowForm(nextTab).then(()=>{
2169
+ this.initUpdateFlowForm(nextTab, type).then(()=>{
2110
2170
  this.$nextTick(()=>{
2111
2171
  let ref='batchTableForm'+nextTab.dataId+'Ref';
2172
+ if(result === false && typeof result == "boolean"){
2173
+ this.formBtnArr.forEach(item => {
2174
+ if (item.btnType !== "close" && item.btnType !== "record") {
2175
+ item.disabled = true;
2176
+ }
2177
+ });
2178
+ }
2112
2179
  // this.$refs[ref][0].loadData().then(() => {
2113
2180
  this.exeFlowEvent("handle","afterClick",nextTab.currentNode,ref);
2181
+ if(currentNodeObj.openEvent === '1'){ //开启事件
2182
+ this.exeNewFlowEvent("editAfter",currentNodeObj.nodeLinkId ||'');//新事件规则
2183
+ }
2114
2184
  // })
2115
2185
  })
2116
2186
  });
@@ -3407,6 +3477,14 @@
3407
3477
  if (obj.dealerType === "variable" && obj.variable) {
3408
3478
  this.isRefreshGetNextUsers.push(obj.variable);
3409
3479
  }
3480
+ if (obj.dealerType === "interface" && obj.dealerUrlParam) {
3481
+ let dealerUrlParam = JSON.parse(obj.dealerUrlParam || "[]");
3482
+ dealerUrlParam.forEach(param => {
3483
+ if (param.paramType === "variable") {
3484
+ this.isRefreshGetNextUsers.push(param.paramVal);
3485
+ }
3486
+ })
3487
+ }
3410
3488
  }
3411
3489
  });
3412
3490
  if (!this.flowId.includes(",")) {