Browse Source

下拉筛选项增加大于等于和小于等于

master
zhouhongjun 6 months ago
parent
commit
d6a7385c68
  1. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -791,15 +791,17 @@ export default {
}, },
]; ];
const getOperators = (schema) => { const getOperators = (schema) => {
const values = ["equal", "notEqual"]; const values = ["equal", "notEqual","biggerThanOrEqual","smallThanOrEqual"];
if (schema.type === "string") { if (schema.type === "string") {
values.push("like", "notLike"); values.push("like", "notLike");
if (schema.input && ["year", "month", "date", "datetime"].includes(schema.input)) { if (schema.input && ["year", "month", "date", "datetime"].includes(schema.input)) {
values.push("biggerThan", "smallThan", "biggerThanOrEqual", "smallThanOrEqual"); //values.push("biggerThan", "smallThan", "biggerThanOrEqual", "smallThanOrEqual");
values.push("biggerThan", "smallThan");
} }
} else if (schema.type === "boolean") { } else if (schema.type === "boolean") {
} else { } else {
values.push("biggerThan", "smallThan", "biggerThanOrEqual", "smallThanOrEqual"); //values.push("biggerThan", "smallThan", "biggerThanOrEqual", "smallThanOrEqual");
values.push("biggerThan", "smallThan");
} }
return operators.filter((o) => values.includes(o.value)); return operators.filter((o) => values.includes(o.value));
}; };

Loading…
Cancel
Save