From 880e1f4e9802162e0bd5cc1a17ac7217d6f4e5db Mon Sep 17 00:00:00 2001 From: dengbf Date: Tue, 2 Jan 2024 11:50:08 +0800 Subject: [PATCH] =?UTF-8?q?-=20[=E4=BF=AE=E5=A4=8D]=20=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=8C=85=E5=90=AB=E8=A7=84=E5=88=99?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88=20=20=20=20-=20[=E5=85=B3=E8=81=94]?= =?UTF-8?q?=20#[1059936853786624]=E8=A1=A8=E5=8D=95=E7=BC=96=E8=BE=91-?= =?UTF-8?q?=E5=AD=90=E8=A1=A8=E5=8D=95=E7=9A=84=E8=A7=84=E5=88=99=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E2=80=9D=E5=8C=85=E5=90=AB=E2=80=9C=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E4=B8=8D=E7=94=9F=E6=95=88=20http://192.168.0.96:8090?= =?UTF-8?q?/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1059?= =?UTF-8?q?936853786624?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugins/TsSheet/form/conditionexpression/exclude.js | 2 +- .../plugins/TsSheet/form/conditionexpression/include.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/resources/plugins/TsSheet/form/conditionexpression/exclude.js b/src/resources/plugins/TsSheet/form/conditionexpression/exclude.js index 4054cd55..3dd441b9 100644 --- a/src/resources/plugins/TsSheet/form/conditionexpression/exclude.js +++ b/src/resources/plugins/TsSheet/form/conditionexpression/exclude.js @@ -15,7 +15,7 @@ export default (currentValue, oldValue, conditionValue) => { if (conditionValue.filter(item => valueList.some(c => c === item)).length == 0) { isExclude = true; } - } else if (typeof currentValue == 'string' && conditionValue.indexOf(currentValue) == -1) { + } else if ((typeof currentValue == 'string' || typeof currentValue == 'number') && conditionValue.indexOf(currentValue) == -1) { isExclude = true; } else if (typeof currentValue === 'object' && conditionValue.indexOf(currentValue.value) == -1) { isExclude = true; diff --git a/src/resources/plugins/TsSheet/form/conditionexpression/include.js b/src/resources/plugins/TsSheet/form/conditionexpression/include.js index 2f8559fd..338cd29b 100644 --- a/src/resources/plugins/TsSheet/form/conditionexpression/include.js +++ b/src/resources/plugins/TsSheet/form/conditionexpression/include.js @@ -13,11 +13,11 @@ export default (currentValue, oldValue, conditionValue) => { if (conditionValue.filter(item => valueList.some(c => c === item)).length > 0) { isInclude = true; } - } else if (typeof currentValue == 'string' && conditionValue.indexOf(currentValue) > -1) { + } else if ((typeof currentValue == 'string' || typeof currentValue == 'number') && conditionValue.indexOf(currentValue) > -1) { isInclude = true; - } else if (typeof item === 'object' && conditionValue.indexOf(currentValue.value) > -1) { + } else if (typeof currentValue === 'object' && conditionValue.indexOf(currentValue.value) > -1) { isInclude = true; - } + } } return isInclude; }; -- Gitee