端到端功能入口模块相关代码提交
This commit is contained in:
parent
6373d8b703
commit
9154da7197
@ -69,11 +69,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</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>
|
</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')">
|
<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>
|
<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>
|
||||||
|
<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)">
|
<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>
|
<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>
|
</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="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 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 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 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>
|
<awsui-button style="width: 100px;" class="button-general-color-reverse3" plain @click="closeFooter">取消</awsui-button>
|
||||||
</div>
|
</div>
|
||||||
@ -362,6 +368,13 @@
|
|||||||
:visible.sync="batchReplace.visible"
|
:visible.sync="batchReplace.visible"
|
||||||
:methodCategory="uuid"
|
:methodCategory="uuid"
|
||||||
v-on:getResult="closeBatchReplaceFn"></batch-replace>
|
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 -->
|
<!-- 模型转换的dialog -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
custom-class="model-convert-dialog"
|
custom-class="model-convert-dialog"
|
||||||
@ -407,10 +420,13 @@
|
|||||||
import BatchCreate from "../batch/create";
|
import BatchCreate from "../batch/create";
|
||||||
import BatchReplace from "../batch/replace";
|
import BatchReplace from "../batch/replace";
|
||||||
import bus from '../../eventBus'
|
import bus from '../../eventBus'
|
||||||
|
import SubProcess from "../subprocess/SubProcess";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RepositoryList",
|
name: "RepositoryList",
|
||||||
components: {RepositoryInfoProperty, PALRepositoryTree, RepositoryInfo, BatchCreate, BatchReplace},
|
components: {
|
||||||
|
SubProcess,
|
||||||
|
RepositoryInfoProperty, PALRepositoryTree, RepositoryInfo, BatchCreate, BatchReplace},
|
||||||
props: {
|
props: {
|
||||||
uuid: {
|
uuid: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -514,6 +530,12 @@
|
|||||||
visible: false,
|
visible: false,
|
||||||
|
|
||||||
},
|
},
|
||||||
|
subProcess: {
|
||||||
|
visible: false,
|
||||||
|
appInstall: false,
|
||||||
|
tags: [],
|
||||||
|
footerBtnVisible: false
|
||||||
|
},
|
||||||
isFileSecurity: false,
|
isFileSecurity: false,
|
||||||
isHighSecurity: false,
|
isHighSecurity: false,
|
||||||
isOlderVersion: true,
|
isOlderVersion: true,
|
||||||
@ -848,6 +870,7 @@
|
|||||||
that.havingRemovePerm = ro.data.havingRemovePerm;
|
that.havingRemovePerm = ro.data.havingRemovePerm;
|
||||||
that.havingVersionManagePerm = ro.data.havingVersionManagePerm;
|
that.havingVersionManagePerm = ro.data.havingVersionManagePerm;
|
||||||
that.batchAppVisible = ro.data.batchAppVisible;
|
that.batchAppVisible = ro.data.batchAppVisible;
|
||||||
|
that.subProcess.appInstall = ro.data.subProcessAppVisible;
|
||||||
that.batchDlg = ro.data.batchDlg;
|
that.batchDlg = ro.data.batchDlg;
|
||||||
that.isHighSecurity = ro.data.isHighSecurity;
|
that.isHighSecurity = ro.data.isHighSecurity;
|
||||||
that.isFileSecurity = ro.data.isFileSecurity;
|
that.isFileSecurity = ro.data.isFileSecurity;
|
||||||
@ -1024,8 +1047,10 @@
|
|||||||
that.checkedRepositorys = val;
|
that.checkedRepositorys = val;
|
||||||
let checkedCount = val.length;
|
let checkedCount = val.length;
|
||||||
that.modelConvertDialog.repositoryIds = [];
|
that.modelConvertDialog.repositoryIds = [];
|
||||||
|
that.subProcess.tags = [];
|
||||||
if (checkedCount > 0) {
|
if (checkedCount > 0) {
|
||||||
let flag = false;
|
let flag = false;
|
||||||
|
let subProcessFooterFlag = false;
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
if (that.modelConvertDialog.repositoryIds.indexOf(item.id) === -1){
|
if (that.modelConvertDialog.repositoryIds.indexOf(item.id) === -1){
|
||||||
that.modelConvertDialog.repositoryIds.push(item.id);
|
that.modelConvertDialog.repositoryIds.push(item.id);
|
||||||
@ -1033,7 +1058,18 @@
|
|||||||
if (item.methodId !== 'process.epc'){
|
if (item.methodId !== 'process.epc'){
|
||||||
flag = true;
|
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){
|
if (flag){
|
||||||
that.modelConvertDialog.footerBtnVisible = false;
|
that.modelConvertDialog.footerBtnVisible = false;
|
||||||
}else {
|
}else {
|
||||||
@ -1054,6 +1090,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
that.showFooter = false;
|
that.showFooter = false;
|
||||||
|
that.subProcess.tags = [];
|
||||||
for (let j = 0; j < that.tableData.length; j++) {
|
for (let j = 0; j < that.tableData.length; j++) {
|
||||||
const childNodes = that.tbody[0].childNodes;
|
const childNodes = that.tbody[0].childNodes;
|
||||||
if (childNodes != undefined) {
|
if (childNodes != undefined) {
|
||||||
@ -1933,6 +1970,16 @@
|
|||||||
},
|
},
|
||||||
closeBatchReplaceFn() {// 关闭批量替换
|
closeBatchReplaceFn() {// 关闭批量替换
|
||||||
this.batchReplace.visible = false;
|
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: {
|
computed: {
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
<el-form-item label="位置" required>
|
<el-form-item label="位置" required>
|
||||||
<el-input disabled v-model="subProcessForm.position.label" size="small">
|
<el-input disabled v-model="subProcessForm.position.label" size="small">
|
||||||
<template slot="append">
|
<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;">
|
<div style="height: 200px; overflow: auto;">
|
||||||
<el-tree
|
<el-tree
|
||||||
v-if="subProcessForm.position.showTree"
|
v-if="subProcessForm.position.showTree"
|
||||||
@ -35,9 +35,10 @@
|
|||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="子流程选择" required>
|
<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;">
|
<div class="sub-process-tree-box" style="height: 300px; overflow: auto;">
|
||||||
<el-tree
|
<el-tree
|
||||||
|
v-if="subProcessForm.showProcessTree"
|
||||||
ref="subProcessModelTree"
|
ref="subProcessModelTree"
|
||||||
@node-collapse="closeSubProcessNode"
|
@node-collapse="closeSubProcessNode"
|
||||||
node-key="id"
|
node-key="id"
|
||||||
@ -45,6 +46,7 @@
|
|||||||
show-checkbox
|
show-checkbox
|
||||||
:load="loadModelTreeNode"
|
:load="loadModelTreeNode"
|
||||||
@check="modeTreeNodeCheck"
|
@check="modeTreeNodeCheck"
|
||||||
|
:default-checked-keys="subProcessForm.defaultProcessCheckedKeys"
|
||||||
:props="treeProps">
|
:props="treeProps">
|
||||||
<span slot-scope="{node, data}">
|
<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>
|
<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,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
defaultTags: {
|
||||||
|
type: Array,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
@ -95,12 +101,15 @@
|
|||||||
path: '',
|
path: '',
|
||||||
label: '',
|
label: '',
|
||||||
showTree: false,
|
showTree: false,
|
||||||
|
locationId: '',
|
||||||
},
|
},
|
||||||
processList: [],
|
processList: [],
|
||||||
|
processTags: [],
|
||||||
|
defaultProcessCheckedKeys: [],
|
||||||
|
showProcessTree: false,
|
||||||
direction: 'vertically',
|
direction: 'vertically',
|
||||||
directionOpts: [{value: 'vertically', label: '纵向排布'},{value: 'horizontal', label: '横向排布'}],
|
directionOpts: [{value: 'vertically', label: '纵向排布'},{value: 'horizontal', label: '横向排布'}],
|
||||||
modelName: '',
|
modelName: '',
|
||||||
processTags: [],
|
|
||||||
popoverVisible: false
|
popoverVisible: false
|
||||||
},
|
},
|
||||||
treeProps: {
|
treeProps: {
|
||||||
@ -137,7 +146,9 @@
|
|||||||
this.$emit('getResult');
|
this.$emit('getResult');
|
||||||
this.clearData();
|
this.clearData();
|
||||||
// 子流程树节点所选清空
|
// 子流程树节点所选清空
|
||||||
|
if (this.$refs.subProcessModelTree) {
|
||||||
this.$refs.subProcessModelTree.setCheckedKeys([]);
|
this.$refs.subProcessModelTree.setCheckedKeys([]);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
closeAdapter(done) {
|
closeAdapter(done) {
|
||||||
this.close();
|
this.close();
|
||||||
@ -151,6 +162,9 @@
|
|||||||
this.subProcessForm.popoverVisible = false;
|
this.subProcessForm.popoverVisible = false;
|
||||||
this.subProcessForm.position.label = '';
|
this.subProcessForm.position.label = '';
|
||||||
this.subProcessForm.position.showTree = false;
|
this.subProcessForm.position.showTree = false;
|
||||||
|
this.subProcessForm.position.locationId = '';
|
||||||
|
this.subProcessForm.defaultProcessCheckedKeys = [];
|
||||||
|
this.subProcessForm.showProcessTree = false;
|
||||||
},
|
},
|
||||||
// 生成端到端总图
|
// 生成端到端总图
|
||||||
generateSubProcessModel(){
|
generateSubProcessModel(){
|
||||||
@ -214,6 +228,9 @@
|
|||||||
if (ro.result === 'ok') {
|
if (ro.result === 'ok') {
|
||||||
// console.log('节点选中接口',ro.data);
|
// console.log('节点选中接口',ro.data);
|
||||||
that.subProcessForm.processTags = ro.data;
|
that.subProcessForm.processTags = ro.data;
|
||||||
|
that.subProcessForm.processTags.forEach(tag => {
|
||||||
|
that.subProcessForm.processList.push(tag.value);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
@ -285,16 +302,34 @@
|
|||||||
this.subProcessForm.position.label = pathNames.reverse().join("/");
|
this.subProcessForm.position.label = pathNames.reverse().join("/");
|
||||||
this.subProcessForm.position.path = pathIds.reverse().join("/");
|
this.subProcessForm.position.path = pathIds.reverse().join("/");
|
||||||
|
|
||||||
|
this.subProcessForm.position.locationId = node.data.id;
|
||||||
|
|
||||||
this.$refs.positionPopover.doClose();
|
this.$refs.positionPopover.doClose();
|
||||||
},
|
},
|
||||||
|
processPopoverShowEvent(){
|
||||||
|
this.subProcessForm.showProcessTree = true;
|
||||||
|
},
|
||||||
|
processPopoverHideEvent(){
|
||||||
|
this.subProcessForm.showProcessTree = false;
|
||||||
|
},
|
||||||
positionPopoverShowEvent(){
|
positionPopoverShowEvent(){
|
||||||
this.subProcessForm.position.showTree = true;
|
this.subProcessForm.position.showTree = true;
|
||||||
|
},
|
||||||
|
positionPopoverHideEvent(){
|
||||||
|
this.subProcessForm.position.showTree = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
visible(val) {
|
visible(val) {
|
||||||
this.dialogVisible = val;
|
this.dialogVisible = val;
|
||||||
if (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();
|
this.initData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user