fix(task): table
This commit is contained in:
@@ -20,6 +20,7 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Collapse,
|
Collapse,
|
||||||
Group,
|
Group,
|
||||||
|
MultiSelect,
|
||||||
Select,
|
Select,
|
||||||
SimpleGrid,
|
SimpleGrid,
|
||||||
Stack,
|
Stack,
|
||||||
@@ -63,10 +64,17 @@ const EMPTY_TASK_SIZE: Task.SizeProps = Object.freeze({
|
|||||||
comment_question_size: 0,
|
comment_question_size: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
function createInitialFilters() {
|
interface FilterFormRecord {
|
||||||
|
search_id: string
|
||||||
|
search_status: string
|
||||||
|
current_uid: string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
function createInitialFilters(): FilterFormRecord {
|
||||||
return {
|
return {
|
||||||
search_id: "",
|
search_id: "",
|
||||||
search_status: "0",
|
search_status: "0",
|
||||||
|
current_uid: [],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -342,6 +350,20 @@ export default function OwnTaskTableContainer(props: {
|
|||||||
{searchExpanded ? "收起筛选" : "展开筛选"}
|
{searchExpanded ? "收起筛选" : "展开筛选"}
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
|
<SettingFilterActions>
|
||||||
|
<Button
|
||||||
|
variant="default"
|
||||||
|
leftSection={<IconRefresh size={16} />}
|
||||||
|
onClick={handleReset}>
|
||||||
|
重置
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
leftSection={<IconSearch size={16} />}
|
||||||
|
onClick={handleSearch}
|
||||||
|
loading={loading}>
|
||||||
|
查询
|
||||||
|
</Button>
|
||||||
|
</SettingFilterActions>
|
||||||
</Group>
|
</Group>
|
||||||
<Collapse
|
<Collapse
|
||||||
in={searchExpanded}
|
in={searchExpanded}
|
||||||
@@ -363,7 +385,6 @@ export default function OwnTaskTableContainer(props: {
|
|||||||
search_id: e.target.value,
|
search_id: e.target.value,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
style={{ width: 160 }}
|
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
label="状态"
|
label="状态"
|
||||||
@@ -379,23 +400,20 @@ export default function OwnTaskTableContainer(props: {
|
|||||||
}
|
}
|
||||||
allowDeselect={false}
|
allowDeselect={false}
|
||||||
/>
|
/>
|
||||||
|
<MultiSelect
|
||||||
|
label="当前负责人"
|
||||||
|
data={Array.from(userEnums.allEnum.entries()).map(([x, y]) => ({
|
||||||
|
label: y,
|
||||||
|
value: x.toString(),
|
||||||
|
}))}
|
||||||
|
searchable
|
||||||
|
clearable
|
||||||
|
value={filters.current_uid}
|
||||||
|
onChange={(v) => setFilters((s) => ({ ...s, current_uid: v }))}
|
||||||
|
/>
|
||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
<SettingFilterActions>
|
|
||||||
<Button
|
|
||||||
variant="default"
|
|
||||||
leftSection={<IconRefresh size={16} />}
|
|
||||||
onClick={handleReset}>
|
|
||||||
重置
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
leftSection={<IconSearch size={16} />}
|
|
||||||
onClick={handleSearch}
|
|
||||||
loading={loading}>
|
|
||||||
查询
|
|
||||||
</Button>
|
|
||||||
</SettingFilterActions>
|
|
||||||
</SettingFilterPanel>
|
</SettingFilterPanel>
|
||||||
|
|
||||||
<SettingContentPanel
|
<SettingContentPanel
|
||||||
|
|||||||
@@ -865,6 +865,20 @@ export default function TaskTableContainer(props: {
|
|||||||
{searchExpanded ? "收起筛选" : "展开筛选"}
|
{searchExpanded ? "收起筛选" : "展开筛选"}
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
|
<SettingFilterActions>
|
||||||
|
<Button
|
||||||
|
variant="default"
|
||||||
|
leftSection={<IconRefresh size={16} />}
|
||||||
|
onClick={handleReset}>
|
||||||
|
重置
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
leftSection={<IconSearch size={16} />}
|
||||||
|
onClick={handleSearch}
|
||||||
|
loading={loading}>
|
||||||
|
查询
|
||||||
|
</Button>
|
||||||
|
</SettingFilterActions>
|
||||||
</Group>
|
</Group>
|
||||||
<Collapse
|
<Collapse
|
||||||
in={searchExpanded}
|
in={searchExpanded}
|
||||||
@@ -993,20 +1007,6 @@ export default function TaskTableContainer(props: {
|
|||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
<SettingFilterActions>
|
|
||||||
<Button
|
|
||||||
variant="default"
|
|
||||||
leftSection={<IconRefresh size={16} />}
|
|
||||||
onClick={handleReset}>
|
|
||||||
重置
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
leftSection={<IconSearch size={16} />}
|
|
||||||
onClick={handleSearch}
|
|
||||||
loading={loading}>
|
|
||||||
查询
|
|
||||||
</Button>
|
|
||||||
</SettingFilterActions>
|
|
||||||
</SettingFilterPanel>
|
</SettingFilterPanel>
|
||||||
<SettingContentPanel
|
<SettingContentPanel
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
Reference in New Issue
Block a user