端到端功能入口模块相关代码提交

This commit is contained in:
ouyang 2023-05-11 19:01:49 +08:00
parent 6373d8b703
commit 9154da7197
2 changed files with 90 additions and 8 deletions

View File

@ -69,11 +69,13 @@
</template>
</div>
<!-- 流程库批处理应用安装且当前为流程分类下显示 -->
<div v-if="batchAppVisible && uuid.length < 36" style="float:right;position:relative;right: 10px;display:inline-block;">
<div v-if="uuid.length < 36" style="float:right;position:relative;right: 10px;display:inline-block;">
<!-- 端到端功能入口 -->
<awsui-button v-if="subProcess.appInstall" @click="subProcess.visible = true" class="button-general-color-reverse">生成端到端流程图</awsui-button>
<!-- 小组模式下不能进行批量创建 -->
<awsui-button v-if="$store.getters.getTeamIdFn != null" id="batchCreateButton" visit-type="" style="width: 100px;margin: 0;border-bottom-right-radius: 0px;border-top-right-radius: 0px;" class="button-general-color-reverse" @click="batchCreateFn">批量创建</awsui-button>
<awsui-button v-if="batchAppVisible && $store.getters.getTeamIdFn != null" id="batchCreateButton" visit-type="" style="width: 100px;margin: 0;border-bottom-right-radius: 0px;border-top-right-radius: 0px;" class="button-general-color-reverse" @click="batchCreateFn">批量创建</awsui-button>
<!-- 批量替换 -->
<awsui-button v-if="$store.getters.getTeamIdFn != null" id="batchReplaceButton" style="width: 100px;margin: 0;border-bottom-left-radius: 0px;border-top-left-radius: 0px;" class="button-general-color" type="primary" @click="batchReplaceFn">批量替换</awsui-button>
<awsui-button v-if="batchAppVisible && $store.getters.getTeamIdFn != null" id="batchReplaceButton" style="width: 100px;margin: 0;border-bottom-left-radius: 0px;border-top-left-radius: 0px;" class="button-general-color" type="primary" @click="batchReplaceFn">批量替换</awsui-button>
</div>
</div>
<div>
@ -200,6 +202,9 @@
<el-dropdown-item v-if="modelConvertInstall && scope.row.methodId == 'process.epc'" @click.native="openModelConvertDialog(scope.row.id,scope.row.methodId,'single')">
<div style="height: 100%;width: 100%;font-size: 14px;"><span style="display: inline-block;width: 20px;"></span><span style="font-size: 12px;">模型转换</span></div>
</el-dropdown-item>
<el-dropdown-item v-if="subProcess.appInstall && (scope.row.methodId === 'process.epc' || scope.row.methodId === 'process.flowchart')" class="el-dropdown-row" @click.native="openSubProcessFn(scope.row)">
<div style="height: 100%;width: 100%;font-size: 14px;"><span style="display: inline-block;width: 20px;"></span><span style="font-size: 12px;">生成端到端流程图</span></div>
</el-dropdown-item>
<el-dropdown-item v-if="(isOlderVersion ? havingWritePerm : scope.row.havingWritePerm)" divided style="height: 30px;line-height: 30px;" @click.native="removeFiles(scope.row.id)">
<div class="text-important-color" style="height: 100%;width: 100%;font-size: 14px;"><span style="display: inline-block;width: 20px;"><i class="iconfont icon-lajitong1" style="font-size: 12px;"></i></span><span style="font-size: 12px;">删除模型</span></div>
</el-dropdown-item>
@ -294,6 +299,7 @@
<awsui-button v-if="isOlderVersion ? havingWritePerm : true" style="width: 100px;" class="button-general-color-reverse" plain @click="copyFiles()">创建副本</awsui-button>
<awsui-button v-if="modelConvertInstall && modelConvertDialog.footerBtnVisible" style="width: 100px;" class="button-general-color-reverse" plain @click="openModelConvertDialog('','','batch')">模型转换</awsui-button>
<awsui-button style="width: 100px;" class="button-general-color-reverse" plain @click="exportFiles()">导出</awsui-button>
<awsui-button v-if="subProcess.appInstall && subProcess.footerBtnVisible" class="button-general-color-reverse" plain @click="openSubProcessFn(null)">生成端到端流程图</awsui-button>
<awsui-button v-if="isOlderVersion ? havingRemovePerm : true && category != 'itsystem'" style="width: 100px;" class="button-general-color-reverse2" plain @click="removeFiles()">删除</awsui-button>
<awsui-button style="width: 100px;" class="button-general-color-reverse3" plain @click="closeFooter">取消</awsui-button>
</div>
@ -362,6 +368,13 @@
:visible.sync="batchReplace.visible"
:methodCategory="uuid"
v-on:getResult="closeBatchReplaceFn"></batch-replace>
<!-- 端到端dialog -->
<sub-process
ref="subProcessRef"
:visible.sync="subProcess.visible"
:default-tags="subProcess.tags"
v-on:getResult="closeSubProcessFn">
</sub-process>
<!-- 模型转换的dialog -->
<el-dialog
custom-class="model-convert-dialog"
@ -407,10 +420,13 @@
import BatchCreate from "../batch/create";
import BatchReplace from "../batch/replace";
import bus from '../../eventBus'
import SubProcess from "../subprocess/SubProcess";
export default {
name: "RepositoryList",
components: {RepositoryInfoProperty, PALRepositoryTree, RepositoryInfo, BatchCreate, BatchReplace},
components: {
SubProcess,
RepositoryInfoProperty, PALRepositoryTree, RepositoryInfo, BatchCreate, BatchReplace},
props: {
uuid: {
type: String,
@ -514,6 +530,12 @@
visible: false,
},
subProcess: {
visible: false,
appInstall: false,
tags: [],
footerBtnVisible: false
},
isFileSecurity: false,
isHighSecurity: false,
isOlderVersion: true,
@ -848,6 +870,7 @@
that.havingRemovePerm = ro.data.havingRemovePerm;
that.havingVersionManagePerm = ro.data.havingVersionManagePerm;
that.batchAppVisible = ro.data.batchAppVisible;
that.subProcess.appInstall = ro.data.subProcessAppVisible;
that.batchDlg = ro.data.batchDlg;
that.isHighSecurity = ro.data.isHighSecurity;
that.isFileSecurity = ro.data.isFileSecurity;
@ -1024,8 +1047,10 @@
that.checkedRepositorys = val;
let checkedCount = val.length;
that.modelConvertDialog.repositoryIds = [];
that.subProcess.tags = [];
if (checkedCount > 0) {
let flag = false;
let subProcessFooterFlag = false;
val.forEach(item => {
if (that.modelConvertDialog.repositoryIds.indexOf(item.id) === -1){
that.modelConvertDialog.repositoryIds.push(item.id);
@ -1033,7 +1058,18 @@
if (item.methodId !== 'process.epc'){
flag = true;
}
if (item.methodId === 'process.epc' || item.methodId === 'process.flowchart'){
subProcessFooterFlag = true;
}
let tag = {value: item.id, label: item.name}
that.subProcess.tags.push(tag);
});
if (subProcessFooterFlag) {
that.subProcess.footerBtnVisible = true;
}else {
that.subProcess.footerBtnVisible = false;
that.subProcess.tags = [];
}
if (flag){
that.modelConvertDialog.footerBtnVisible = false;
}else {
@ -1054,6 +1090,7 @@
}
} else {
that.showFooter = false;
that.subProcess.tags = [];
for (let j = 0; j < that.tableData.length; j++) {
const childNodes = that.tbody[0].childNodes;
if (childNodes != undefined) {
@ -1933,6 +1970,16 @@
},
closeBatchReplaceFn() {//
this.batchReplace.visible = false;
},
closeSubProcessFn(){
this.subProcess.visible = false;
},
openSubProcessFn(data) {
this.subProcess.visible = true;
if (data){
let tag = {value: data.versionId, label: data.name};
this.subProcess.tags.push(tag);
}
}
},
computed: {

View File

@ -10,7 +10,7 @@
<el-form-item label="位置" required>
<el-input disabled v-model="subProcessForm.position.label" size="small">
<template slot="append">
<el-popover ref="positionPopover" placement="bottom" trigger="click" width="600" @show="positionPopoverShowEvent">
<el-popover ref="positionPopover" placement="bottom" trigger="click" width="600" @show="positionPopoverShowEvent" @hide="positionPopoverHideEvent">
<div style="height: 200px; overflow: auto;">
<el-tree
v-if="subProcessForm.position.showTree"
@ -35,9 +35,10 @@
</el-input>
</el-form-item>
<el-form-item label="子流程选择" required>
<el-popover ref="subProcessPopover" placement="bottom" trigger="click" width="600">
<el-popover ref="subProcessPopover" placement="bottom" trigger="click" width="600" @show="processPopoverShowEvent" @hide="processPopoverHideEvent">
<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"
@ -45,6 +46,7 @@
show-checkbox
:load="loadModelTreeNode"
@check="modeTreeNodeCheck"
:default-checked-keys="subProcessForm.defaultProcessCheckedKeys"
:props="treeProps">
<span slot-scope="{node, data}">
<i class="awsui-iconfont tree-content-icon tree-content-icon-padding" :style="{'color': node.data.icon.color}" v-html="node.data.icon.icon"></i>
@ -86,6 +88,10 @@
type: Boolean,
default: false
},
defaultTags: {
type: Array,
default: null
},
},
data(){
return {
@ -95,12 +101,15 @@
path: '',
label: '',
showTree: false,
locationId: '',
},
processList: [],
processTags: [],
defaultProcessCheckedKeys: [],
showProcessTree: false,
direction: 'vertically',
directionOpts: [{value: 'vertically', label: '纵向排布'},{value: 'horizontal', label: '横向排布'}],
modelName: '',
processTags: [],
popoverVisible: false
},
treeProps: {
@ -137,7 +146,9 @@
this.$emit('getResult');
this.clearData();
//
this.$refs.subProcessModelTree.setCheckedKeys([]);
if (this.$refs.subProcessModelTree) {
this.$refs.subProcessModelTree.setCheckedKeys([]);
}
},
closeAdapter(done) {
this.close();
@ -151,6 +162,9 @@
this.subProcessForm.popoverVisible = false;
this.subProcessForm.position.label = '';
this.subProcessForm.position.showTree = false;
this.subProcessForm.position.locationId = '';
this.subProcessForm.defaultProcessCheckedKeys = [];
this.subProcessForm.showProcessTree = false;
},
//
generateSubProcessModel(){
@ -214,6 +228,9 @@
if (ro.result === 'ok') {
// console.log('',ro.data);
that.subProcessForm.processTags = ro.data;
that.subProcessForm.processTags.forEach(tag => {
that.subProcessForm.processList.push(tag.value);
});
}
})
.catch(err => {
@ -285,16 +302,34 @@
this.subProcessForm.position.label = pathNames.reverse().join("/");
this.subProcessForm.position.path = pathIds.reverse().join("/");
this.subProcessForm.position.locationId = node.data.id;
this.$refs.positionPopover.doClose();
},
processPopoverShowEvent(){
this.subProcessForm.showProcessTree = true;
},
processPopoverHideEvent(){
this.subProcessForm.showProcessTree = false;
},
positionPopoverShowEvent(){
this.subProcessForm.position.showTree = true;
},
positionPopoverHideEvent(){
this.subProcessForm.position.showTree = false;
}
},
watch: {
visible(val) {
this.dialogVisible = val;
if (val) {
// icon
if (this.defaultTags != null) {
this.subProcessForm.processTags = [...this.defaultTags];
this.defaultTags.forEach(tag => {
this.subProcessForm.defaultProcessCheckedKeys.push(tag.value);
});
}
this.initData();
}
}