mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +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 => {
|
||||
// fieldItem.name by default
|
||||
return fieldItem[formatReturn]
|
||||
})
|
||||
}
|
||||
|
@ -842,20 +842,22 @@ export default {
|
||||
}).value
|
||||
}
|
||||
|
||||
if (isReference) {
|
||||
if (!isEmptyValue(parsedWhereClause)) {
|
||||
parsedWhereClause += ` AND ${referenceWhereClause}`
|
||||
} else {
|
||||
parsedWhereClause += referenceWhereClause
|
||||
const addWhereClause = (currentWhereClause, newWhereClause) => {
|
||||
if (isEmptyValue(currentWhereClause)) {
|
||||
return newWhereClause
|
||||
}
|
||||
if (isEmptyValue(newWhereClause)) {
|
||||
return currentWhereClause
|
||||
}
|
||||
return `${currentWhereClause} AND ${newWhereClause}`
|
||||
}
|
||||
|
||||
if (isReference) {
|
||||
parsedWhereClause = addWhereClause(parsedWhereClause, referenceWhereClause)
|
||||
}
|
||||
|
||||
if (!isEmptyValue(criteria)) {
|
||||
if (!isEmptyValue(parsedWhereClause)) {
|
||||
parsedWhereClause += ` AND ${criteria.whereClause}`
|
||||
} else {
|
||||
parsedWhereClause += criteria.whereClause
|
||||
}
|
||||
parsedWhereClause = addWhereClause(parsedWhereClause, criteria.whereClause)
|
||||
}
|
||||
|
||||
const conditionsList = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user