未验证 提交 69a153c5 编写于 作者: W Wangyizhi1 提交者: GitHub

[Fix-6139][UI] Fix missing relationship issue (#6258)

* the relationship is missing in kinship

* Fix missing environmentCode parameter issue when modifying the process
上级 fab4eae9
......@@ -49,6 +49,9 @@
},
workerGroup: {
type: String
},
isNewCreate: {
type: Boolean
}
},
model: {
......@@ -70,6 +73,7 @@
},
_initEnvironmentOptions (workerGroup) {
this.environmentOptions = []
this.selectedValue = ''
if (this.environmentList && workerGroup) {
this.environmentList.forEach(item => {
if (item.workerGroups && item.workerGroups.length > 0) {
......@@ -85,10 +89,11 @@
if (this.environmentOptions.length > 0) {
/// default to select this environment when only have one environment
if (this.environmentOptions.length === 1 && this.selectedValue === '') {
/// automatically select only when creating a new task
if (this.isNewCreate && this.environmentOptions.length === 1 && this.selectedValue === '') {
this.selectedValue = this.environmentOptions[0].code
this.$emit('environmentCodeEvent', this.selectedValue)
}
this.$emit('environmentCodeEvent', this.selectedValue)
} else {
this.selectedValue = ''
this.$emit('environmentCodeEvent', this.selectedValue)
......
......@@ -118,6 +118,7 @@
<m-related-environment
v-model="environmentCode"
:workerGroup="workerGroup"
:isNewCreate="isNewCreate"
v-on:environmentCodeEvent="_onUpdateEnvironmentCode"
></m-related-environment>
</div>
......@@ -512,7 +513,9 @@
postTasks: [],
prevTasks: [],
// refresh part of the formModel, after set backfillItem outside
backfillRefresh: true
backfillRefresh: true,
// whether this is a new Task
isNewCreate: true
}
},
provide () {
......@@ -560,7 +563,8 @@
},
type: task.taskType,
waitStartTimeout: task.taskParams.waitStartTimeout,
workerGroup: task.workerGroup
workerGroup: task.workerGroup,
environmentCode: task.environmentCode
}
},
/**
......@@ -902,6 +906,7 @@
const backfillItem = this.taskToBackfillItem(task)
o = backfillItem
this.backfillItem = backfillItem
this.isNewCreate = false
}
})
}
......
......@@ -41,6 +41,7 @@ export default function (locations, links, sourceWorkFlowCode, isShowLabel) {
const { color, category } = getCategory(categoryDic, item, sourceWorkFlowCode)
return {
...item,
id: item.code,
emphasis: {
itemStyle: {
color
......
......@@ -143,7 +143,7 @@ export default {
state.globalParams = res.data.processDefinition.globalParamList
// timeout
state.timeout = res.data.processDefinition.timeout
// tenantId
// tenantCode
state.tenantCode = res.data.processDefinition.tenantCode || 'default'
// tasks info
state.tasks = res.data.taskDefinitionList.map(task => _.pick(task, [
......@@ -161,7 +161,8 @@ export default {
'failRetryInterval',
'timeoutFlag',
'timeoutNotifyStrategy',
'timeout'
'timeout',
'environmentCode'
]))
resolve(res.data)
}).catch(res => {
......@@ -257,7 +258,8 @@ export default {
'failRetryInterval',
'timeoutFlag',
'timeoutNotifyStrategy',
'timeout'
'timeout',
'environmentCode'
]))
// startup parameters
state.startup = _.assign(state.startup, _.pick(res.data, ['commandType', 'failureStrategy', 'processInstancePriority', 'workerGroup', 'warningType', 'warningGroupId', 'receivers', 'receiversCc']))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册