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

fix: meta变量复用不去更新变量配置和值 #7335

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@
type: 'add',
id: this.nodeId,
key: variableKey,
tagCode: this.hookingVarForm
tagCode: this.hookingVarForm,
reuse: true
}
this.formData[this.hookingVarForm] = variableKey
this.$emit('hookChange', 'reuse', config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,9 @@
if (!constant) return
const sourceInfo = constant.source_info
if (type === 'add') {
if (data.reuse) { // 是否为复用变量
constant.reuse = true
}
if (sourceInfo[id]) {
sourceInfo[id].push(tagCode)
} else {
Expand Down Expand Up @@ -1616,6 +1619,11 @@
// 更新子流程已勾选的变量值
Object.keys(this.localConstants).forEach(key => {
const constantValue = this.localConstants[key]
// 复用变量不去更新变量配置和值
if (constantValue.reuse) {
delete constantValue.reuse
return
}
// 根据source_info中获取勾选的表单项code
const [formCode] = constantValue.source_info[this.nodeId] || []
if (!formCode) return
Expand Down
Loading