mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-12 22:29:59 +08:00
fix: Empty mandatory fields. (#699)
Co-authored-by: EdwinBetanc0urt <EdwinBetanco0urt@outlook.com>
This commit is contained in:
parent
0d30213637
commit
2e39e18c8a
@ -102,8 +102,9 @@ const getters = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if (!isEmptyValue(formatReturn)) {
|
if (formatReturn) {
|
||||||
return fieldsNameEmpty.map(fieldItem => {
|
return fieldsNameEmpty.map(fieldItem => {
|
||||||
|
// fieldItem.name by default
|
||||||
return fieldItem[formatReturn]
|
return fieldItem[formatReturn]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -842,20 +842,22 @@ export default {
|
|||||||
}).value
|
}).value
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isReference) {
|
const addWhereClause = (currentWhereClause, newWhereClause) => {
|
||||||
if (!isEmptyValue(parsedWhereClause)) {
|
if (isEmptyValue(currentWhereClause)) {
|
||||||
parsedWhereClause += ` AND ${referenceWhereClause}`
|
return newWhereClause
|
||||||
} else {
|
|
||||||
parsedWhereClause += referenceWhereClause
|
|
||||||
}
|
}
|
||||||
|
if (isEmptyValue(newWhereClause)) {
|
||||||
|
return currentWhereClause
|
||||||
|
}
|
||||||
|
return `${currentWhereClause} AND ${newWhereClause}`
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isReference) {
|
||||||
|
parsedWhereClause = addWhereClause(parsedWhereClause, referenceWhereClause)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEmptyValue(criteria)) {
|
if (!isEmptyValue(criteria)) {
|
||||||
if (!isEmptyValue(parsedWhereClause)) {
|
parsedWhereClause = addWhereClause(parsedWhereClause, criteria.whereClause)
|
||||||
parsedWhereClause += ` AND ${criteria.whereClause}`
|
|
||||||
} else {
|
|
||||||
parsedWhereClause += criteria.whereClause
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const conditionsList = []
|
const conditionsList = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user