fix document condition
This commit is contained in:
@@ -1255,11 +1255,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkFieldConditions (field, cache = {}) {
|
checkFieldConditions (field, cache = {}) {
|
||||||
if (cache[field.uuid] !== undefined) {
|
const cacheKey = field.uuid || field.attachment_uuid
|
||||||
return cache[field.uuid]
|
|
||||||
}
|
|
||||||
|
|
||||||
cache[field.uuid] = true
|
if (cache[cacheKey] !== undefined) {
|
||||||
|
return cache[cacheKey]
|
||||||
|
}
|
||||||
|
|
||||||
if (field.conditions?.length) {
|
if (field.conditions?.length) {
|
||||||
const result = field.conditions.reduce((acc, cond) => {
|
const result = field.conditions.reduce((acc, cond) => {
|
||||||
@@ -1272,10 +1272,12 @@ export default {
|
|||||||
return acc
|
return acc
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
cache[field.uuid] = !result.includes(false)
|
cache[cacheKey] = !result.includes(false)
|
||||||
|
} else {
|
||||||
|
cache[cacheKey] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
return cache[field.uuid]
|
return cache[cacheKey]
|
||||||
},
|
},
|
||||||
checkFieldCondition (condition, cache = {}) {
|
checkFieldCondition (condition, cache = {}) {
|
||||||
const field = this.fieldsUuidIndex[condition.field_uuid]
|
const field = this.fieldsUuidIndex[condition.field_uuid]
|
||||||
|
|||||||
Reference in New Issue
Block a user