端到端功能部分代码提交
This commit is contained in:
		
							parent
							
								
									6ce36cdbbd
								
							
						
					
					
						commit
						c50fc90f1d
					
				| @ -35,10 +35,9 @@ | ||||
|                     </el-input> | ||||
|                 </el-form-item> | ||||
|                 <el-form-item label="子流程选择" required> | ||||
|                     <el-popover ref="subProcessPopover" placement="bottom" trigger="click" width="600" @show="processPopoverShowEvent" @hide="processPopoverHideEvent"> | ||||
|                     <el-popover ref="subProcessPopover" placement="bottom" trigger="click" width="600"> | ||||
|                         <div class="sub-process-tree-box" style="height: 300px; overflow: auto;"> | ||||
|                             <el-tree | ||||
|                                     v-if="subProcessForm.showProcessTree" | ||||
|                                     ref="subProcessModelTree" | ||||
|                                     @node-collapse="closeSubProcessNode" | ||||
|                                     node-key="id" | ||||
| @ -83,17 +82,30 @@ | ||||
|                 :close-on-press-escape="false" | ||||
|                 append-to-body> | ||||
|             <div> | ||||
|                 <div style="display: inline-flex;align-items: center;flex-wrap: wrap;overflow: auto; border: 1px solid #efefef;"> | ||||
|                     <el-tag style="margin: 5px;" v-for="tag in generatePreHandleData.independentNodeVos" :key="tag.id">{{ tag.name }}</el-tag> | ||||
|                 <div v-if="generatePreHandleData.independentNodeVos.length"> | ||||
|                     <div style="width: 100%;height: 125px;display: inline-flex;flex-wrap: wrap;overflow: auto; border: 1px solid #efefef;"> | ||||
|                         <el-tag style="margin: 5px;" v-for="tag in generatePreHandleData.independentNodeVos" :key="tag.id">{{ tag.name }}</el-tag> | ||||
|                     </div> | ||||
|                     <p style="margin: 10px 0;text-indent: 2em;"> | ||||
|                         <span style="color: red;">*</span> | ||||
|                         以上的子流程,既不存在前置流程也不存在后置流程,同时也不是其它流程的前置流程或后置流程。 | ||||
|                         因此,如果想继续生成总图并同时保留以上子流程的话,请取消本次操作,并为以上子流程补充前置流程或后置流程。 如果想继续生成总图且不想保留以上子流程的话,请选择跳过。 | ||||
|                     </p> | ||||
|                 </div> | ||||
|                 <div v-if="generatePreHandleData.leadAndRearNotInRange.length"> | ||||
|                     <div style="width: 100%;height: 125px;display: inline-flex;flex-wrap: wrap;overflow: auto; border: 1px solid #efefef;"> | ||||
|                         <el-tag style="margin: 5px;" v-for="tag in generatePreHandleData.leadAndRearNotInRange" :key="tag.id">{{ tag.name }}</el-tag> | ||||
|                     </div> | ||||
|                     <p style="margin: 10px 0;text-indent: 2em;"> | ||||
|                         <span style="color: red;">*</span> | ||||
|                         以上的子流程,存在前置流程或者后置流程,但是其前置流程或者后置流程不在勾选的子流程范围之内。 | ||||
|                         因此,如果想继续生成总图并想在生成的总图中体现出前置流程或后置流程的话,请取消本次操作,并勾选以上子流程的前置流程或后置流程。 | ||||
|                         如果想继续生成总图的话,请选择跳过,但是在生成的总图中并不会体现出其前置流程或者后置流程。 | ||||
|                     </p> | ||||
|                 </div> | ||||
|                 <p style="margin: 10px 0;text-indent: 2em;"> | ||||
|                     <span style="color: red;">*</span> | ||||
|                     以上的子流程,既不存在前置流程也不存在后置流程,同时也不是其它流程的前置流程或后置流程。<br/> | ||||
|                     因此,如果想继续生成总图并同时保留以上子流程的话,请取消本次操作,并为以上子流程补充前置流程或后置流程。 如果想继续生成总图且不想保留以上子流程的话,请选择跳过。 | ||||
|                 </p> | ||||
|             </div> | ||||
|             <div slot="footer" class="dialog-footer"> | ||||
|                 <awsui-button type="primary" >跳过</awsui-button> | ||||
|                 <awsui-button type="primary" @click="jumpOverIndependent">跳过</awsui-button> | ||||
|                 <awsui-button @click="closeGeneratePreDlg">取 消</awsui-button> | ||||
|             </div> | ||||
|         </el-dialog> | ||||
| @ -140,7 +152,8 @@ | ||||
|                 }, | ||||
|                 generatePreHandleData: { | ||||
|                     independentDlgVisible: false, | ||||
|                     independentNodeVos: [] | ||||
|                     independentNodeVos: [], | ||||
|                     leadAndRearNotInRange: [] | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
| @ -180,6 +193,7 @@ | ||||
|             closeGeneratePreDlg(){ | ||||
|                 this.generatePreHandleData.independentDlgVisible = false; | ||||
|                 this.generatePreHandleData.independentNodeVos = []; | ||||
|                 this.generatePreHandleData.leadAndRearNotInRange = []; | ||||
|             }, | ||||
|             closeAdapter(done) { | ||||
|                 this.close(); | ||||
| @ -200,29 +214,13 @@ | ||||
|             submit(){ | ||||
|                 this.generatePreHandle(); | ||||
|             }, | ||||
|             // 预处理2 查看所选的子流程中部分子流程的前置或后置是否在所选的范围内 | ||||
|             generatePreHandle2(excludeProcessIdArr){ | ||||
|                 const param = { | ||||
|                     url: 'jd', | ||||
|                     data: { | ||||
|                         cmd: '', | ||||
|                         processIdJsonArr: JSON.stringify(this.subProcessForm.processList), | ||||
|                         excludeProcessIdJsonArr: JSON.stringify(excludeProcessIdArr) | ||||
|                     } | ||||
|                 } | ||||
|                 awsuiAxios.post(param) | ||||
|                     .then(ro => { | ||||
| 
 | ||||
|                     }) | ||||
|                     .catch(err => { | ||||
|                         console.log(err); | ||||
|                     }); | ||||
|             }, | ||||
|             // 跳过独立的子流程 | ||||
|             // 跳过 | ||||
|             jumpOverIndependent(){ | ||||
|                 let excludeProcessIdArr = []; | ||||
|                 this.generatePreHandleData.independentNodeVos.forEach(vo => excludeProcessIdArr.push(vo.id)); | ||||
|                 this.generatePreHandle2(excludeProcessIdArr); | ||||
|                 let independentNodeArr = []; | ||||
|                 this.generatePreHandleData.independentNodeVos.forEach(node => { | ||||
|                   independentNodeArr.push(node.id); | ||||
|                 }); | ||||
|                 this.generateSubProcessModel(independentNodeArr); | ||||
|             }, | ||||
|             // 预处理 检验是否有独立的子流程 | ||||
|             generatePreHandle(){ | ||||
| @ -236,11 +234,12 @@ | ||||
|                 awsuiAxios.post(param) | ||||
|                     .then(ro => { | ||||
|                         if (ro.result == 'ok'){ | ||||
|                             if (ro.data.independentNodeVos.length){ | ||||
|                             if (ro.data.independentNodeVos.length || ro.data.leadAndRearNotInRange.length){ | ||||
|                                 this.generatePreHandleData.independentDlgVisible = true; | ||||
|                                 this.generatePreHandleData.independentNodeVos = ro.data.independentNodeVos; | ||||
|                                 this.generatePreHandleData.leadAndRearNotInRange = ro.data.leadAndRearNotInRange; | ||||
|                             }else { | ||||
|                                 this.generatePreHandle2([]); | ||||
|                                 this.generateSubProcessModel([]); | ||||
|                             } | ||||
|                         }else if (ro.result == 'error'){ | ||||
|                             this.$message({type: 'error', message: ro.msg}); | ||||
| @ -251,7 +250,7 @@ | ||||
|                     }); | ||||
|             }, | ||||
|             // 生成端到端总图 | ||||
|             generateSubProcessModel(){ | ||||
|             generateSubProcessModel(independentNodeArr){ | ||||
|                 console.log('执行参数',this.subProcessForm); | ||||
|                 if (!this.subProcessForm.processList.length){ | ||||
|                     this.$message({type: 'warning', message: '请选择子流程'}); | ||||
| @ -268,7 +267,8 @@ | ||||
|                       processIdJsonArr: JSON.stringify(this.subProcessForm.processList), | ||||
|                       locationId: this.subProcessForm.position.locationId, | ||||
|                       direction: this.subProcessForm.direction, | ||||
|                       modelName: this.subProcessForm.modelName | ||||
|                       modelName: this.subProcessForm.modelName, | ||||
|                       excludeProcessIdArr: JSON.stringify(independentNodeArr) | ||||
|                     } | ||||
|                 } | ||||
|                 awsuiAxios.post(param) | ||||
| @ -276,6 +276,7 @@ | ||||
|                     console.log(ro); | ||||
|                     if (ro.result == 'ok'){ | ||||
|                       this.close(); | ||||
|                       this.closeGeneratePreDlg(); | ||||
|                       this.$message({type: 'success', message: '第一个阶段图形节点分布测试成功'}); | ||||
|                     }else if (ro.result === 'error'){ | ||||
|                       this.$message({type: 'error', message: '发生了什么'}); | ||||
| @ -328,6 +329,8 @@ | ||||
|                 if (!obj.checkedKeys.length) { | ||||
|                     // 当前树没有选中的节点 对应的tag数组清空 | ||||
|                     that.subProcessForm.processTags = []; | ||||
|                     that.subProcessForm.defaultProcessCheckedKeys = []; | ||||
|                     that.subProcessForm.processList = []; | ||||
|                     return; | ||||
|                 } | ||||
|                 // 调接口查询当前选中节点的所有子节点 | ||||
| @ -341,11 +344,15 @@ | ||||
|                 awsuiAxios.post(param) | ||||
|                     .then(ro => { | ||||
|                         if (ro.result === 'ok') { | ||||
|                             // console.log('节点选中接口',ro.data); | ||||
|                             that.subProcessForm.processTags = ro.data; | ||||
|                             that.subProcessForm.processTags.forEach(tag => { | ||||
|                                 that.subProcessForm.processList.push(tag.value); | ||||
|                             }); | ||||
|                           // console.log('节点选中接口',ro.data); | ||||
|                           that.subProcessForm.processTags = []; | ||||
|                           that.subProcessForm.defaultProcessCheckedKeys = []; | ||||
|                           that.subProcessForm.processList = []; | ||||
|                           that.subProcessForm.processTags = ro.data; | ||||
|                           that.subProcessForm.processTags.forEach(tag => { | ||||
|                               that.subProcessForm.processList.push(tag.value); | ||||
|                               that.subProcessForm.defaultProcessCheckedKeys.push(tag.value); | ||||
|                           }); | ||||
|                         } | ||||
|                     }) | ||||
|                     .catch(err => { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 qinoy
						qinoy