Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.31线上测试问题修复 #7184

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/desktop/src/pages/commonManage/CommonTplList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
:type="exportType">
</ExportTemplateDialog>
<SelectProjectModal
:title="$t('创建任务')"
:title="$t('新建任务')"
:show="isSelectProjectShow"
:confirm-loading="permissionLoading"
:confirm-cursor="!hasCreateTaskPerm"
Expand Down
2 changes: 1 addition & 1 deletion frontend/desktop/src/pages/home/SelectCreateTaskDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
width="600"
:render-directive="'if'"
:ext-cls="'common-dialog'"
:title="$t('创建任务')"
:title="$t('新建任务')"
:mask-close="false"
:value="isCreateTaskDialogShow"
:header-position="'left'"
Expand Down
10 changes: 9 additions & 1 deletion frontend/desktop/src/pages/task/TaskExecute/ExecuteInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
:show-tool="false"
:editable="false"
:canvas-data="canvasData"
@onConditionClick="onOpenConditionEdit"
@onNodeClick="onNodeClick">
</TemplateCanvas>
<div class="flow-option">
Expand Down Expand Up @@ -986,9 +987,16 @@
if (nodeInfo) {
nodeInfo && this.onSelectNode(nodeInfo)
const parentInstance = this.$parent.$parent
parentInstance.defaultActiveId = node + '-' + nodeInfo.parentId
if (nodeInfo.conditionType) {
parentInstance.defaultActiveId = node + '-' + nodeInfo.parentId + '-condition'
} else {
parentInstance.defaultActiveId = node + '-' + nodeInfo.parentId
}
}
},
onOpenConditionEdit (data) {
this.onNodeClick(`${data.nodeId}-${data.id}`)
},
onZoomOut () {
const jsFlowInstance = this.$refs.subProcessCanvas
jsFlowInstance.onZoomOut()
Expand Down
17 changes: 12 additions & 5 deletions frontend/desktop/src/pages/task/TaskExecute/NodeTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,18 @@
handler (val) {
this.activeId = val
let nodeId = val.split('-')[0]
let parentId = []
// 分支条件默认选中特殊处理
if (val.split('-').pop() === 'condition') {
nodeId = val.split('-').slice(0, -1).join('-')
this.activeId = nodeId
if (val.match('condition')) {
// 小画布默认id会携带parentId
const nodes = val.split('-').slice(0, -1)
nodeId = nodes.slice(0, 2).join('-')
this.activeId = nodes.join('-')
parentId = nodes.slice(2)
}
// 根据父节点过滤节点树
let nodes = this.treeData
const parentId = val.split('-').slice(1)
parentId = parentId.length ? parentId : val.split('-').slice(1)
if (parentId.length) {
parentId.forEach(id => {
nodes.some(item => {
Expand All @@ -82,9 +86,12 @@
setDefaultActiveId (treeData = [], id) {
return treeData.some(item => {
if (item.id === id) {
item.expanded = !!item.isSubProcess
item.expanded = !!item.isSubProcess || !!item.conditionType
return true
} else if (item.children?.length) {
if (item.expanded) {
return this.setDefaultActiveId(item.children, id)
}
item.expanded = this.setDefaultActiveId(item.children, id)
return item.expanded
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,8 @@
parentId,
independentId,
gatewayId: id,
lastId: item.id
lastId: item.id,
taskId
},
ordered,
item.children
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</div>
</div>
<SelectProjectModal
:title="$t('创建任务')"
:title="$t('新建任务')"
:show="isSelectProjectShow"
:confirm-loading="commonTplCreateTaskPermLoading || templateSaving"
:confirm-cursor="['new', 'clone'].includes(type) ? false : !hasCommonTplCreateTaskPerm"
Expand Down Expand Up @@ -255,6 +255,13 @@

if (saveAndCreate) {
if (this.createTaskBtnActive) {
// 通过项目下公共流程创建任务时,不需要弹出选择项目弹框
const { project_id } = this.$route.params
if (project_id) {
this.selectedProject = {
id: project_id
}
}
// 普通任务直接走模板校验、保存逻辑,公共流程先走模板校验、保存逻辑,然后显示项目选择弹窗
this.saveTemplate(saveAndCreate)
} else {
Expand Down
Loading