操作栏增加判断条件

This commit is contained in:
unknown 2023-02-06 10:29:05 +08:00
parent a6060b5a3b
commit 3a98b7ceea

View File

@ -95,6 +95,13 @@ export default {
let showStatus = true let showStatus = true
const showStatusArr = showParam.data.map((item) => { const showStatusArr = showParam.data.map((item) => {
let showStatusItem = true let showStatusItem = true
if (item.type === 'have') {
if (row[item.name] !== item.value) {
showStatusItem = true
} else {
showStatusItem = false
}
}
if (item.type === 'unequal') { if (item.type === 'unequal') {
if (row[item.name] !== item.value) { if (row[item.name] !== item.value) {
showStatusItem = true showStatusItem = true
@ -123,6 +130,13 @@ export default {
showStatusItem = false showStatusItem = false
} }
} }
if (item.type === 'have') {
if (row[item.name] !== item.value) {
showStatusItem = true
} else {
showStatusItem = false
}
}
if (item.type === 'indexof') { if (item.type === 'indexof') {
if (item.value.indexOf(row[item.name]) >= 0) { if (item.value.indexOf(row[item.name]) >= 0) {
showStatusItem = true showStatusItem = true