| | |
| | | // cl-search |
| | | function hideDateSearch({ exposed }: { exposed: any }) { |
| | | const items = exposed.config?.items as { prop?: string }[] | undefined; |
| | | const index = items?.findIndex(e => e.prop === "date") ?? -1; |
| | | if (index >= 0) items?.splice(index, 1); |
| | | if (!items) return; |
| | | for (let i = items.length - 1; i >= 0; i--) { |
| | | if (items[i].prop === "date" || items[i].prop === "departmentId" || items[i].prop === "keyWord") { |
| | | items.splice(i, 1); |
| | | } |
| | | } |
| | | items.unshift({ |
| | | label: t("按单位筛选"), |
| | | prop: "departmentId", |
| | | component: { |
| | | name: "cl-dept-select", |
| | | props: { |
| | | placeholder: t("请选择单位"), |
| | | checkStrictly: true, |
| | | immediate: true, |
| | | clearable: true, |
| | | }, |
| | | style: { width: "180px" }, |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | const Search = useSearch({ |