Compare commits
No commits in common. "024a45687919b91541cc6799c240e857f1723522" and "ed66ae077cfd6b6b737db88720b5609bd718d50e" have entirely different histories.
024a456879
...
ed66ae077c
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
&:hover &_header img {
|
&:hover &_header img {
|
||||||
transform: scale(1.1) rotate(3deg);
|
transform: scale(1.1) rotate(3deg);
|
||||||
// filter: drop-shadow(0 4px 8px rgba(247, 122, 58, 0.2));
|
filter: drop-shadow(0 4px 8px rgba(247, 122, 58, 0.2));
|
||||||
}
|
}
|
||||||
|
|
||||||
&_label {
|
&_label {
|
||||||
|
|||||||
@ -16,10 +16,7 @@ export default function ApplyClose(
|
|||||||
trigger={
|
trigger={
|
||||||
<MyButtons.Default
|
<MyButtons.Default
|
||||||
title="关闭"
|
title="关闭"
|
||||||
disabled={
|
disabled={props.item.status !== 'InProgress'}
|
||||||
props.item.status !== 'InProgress' &&
|
|
||||||
props.item.status !== 'PendingFollowUp'
|
|
||||||
}
|
|
||||||
type="primary"
|
type="primary"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,4 @@
|
|||||||
import {
|
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
|
||||||
MyButtons,
|
|
||||||
MyColumns,
|
|
||||||
MyPageContainer,
|
|
||||||
MyProTableProps,
|
|
||||||
} from '@/common';
|
|
||||||
import { Apis } from '@/gen/Apis';
|
import { Apis } from '@/gen/Apis';
|
||||||
import { ProTable } from '@ant-design/pro-components';
|
import { ProTable } from '@ant-design/pro-components';
|
||||||
import { Space } from 'antd';
|
import { Space } from 'antd';
|
||||||
@ -12,83 +7,76 @@ import Update from '../modals/TeamUpdate';
|
|||||||
|
|
||||||
export default function Index({ title = '应急小组' }) {
|
export default function Index({ title = '应急小组' }) {
|
||||||
return (
|
return (
|
||||||
<MyPageContainer
|
<ProTable
|
||||||
title={title}
|
{...MyProTableProps.props}
|
||||||
enableTabs={true}
|
request={async (params, sort) =>
|
||||||
tabKey="emergency_events_teams"
|
MyProTableProps.request(
|
||||||
tabLabel={title}
|
params,
|
||||||
>
|
sort,
|
||||||
<ProTable
|
Apis.Emergency.EmergencyEventTeams.List,
|
||||||
{...MyProTableProps.props}
|
)
|
||||||
request={async (params, sort) =>
|
}
|
||||||
MyProTableProps.request(
|
headerTitle="应急小组"
|
||||||
params,
|
toolBarRender={(action) => [
|
||||||
sort,
|
<Create key="Create" reload={action?.reload} title="应急小组" />,
|
||||||
Apis.Emergency.EmergencyEventTeams.List,
|
]}
|
||||||
)
|
columns={[
|
||||||
}
|
MyColumns.ID({
|
||||||
headerTitle="应急小组"
|
search: false,
|
||||||
toolBarRender={(action) => [
|
}),
|
||||||
<Create key="Create" reload={action?.reload} title="应急小组" />,
|
{
|
||||||
]}
|
title: '项目',
|
||||||
columns={[
|
dataIndex: ['asset_project', 'name'],
|
||||||
MyColumns.ID({
|
search: false,
|
||||||
search: false,
|
},
|
||||||
}),
|
{
|
||||||
{
|
title: '名称',
|
||||||
title: '项目',
|
dataIndex: 'name',
|
||||||
dataIndex: ['asset_project', 'name'],
|
},
|
||||||
search: false,
|
{
|
||||||
},
|
title: '队长',
|
||||||
{
|
dataIndex: ['company_employee', 'name'],
|
||||||
title: '名称',
|
search: false,
|
||||||
dataIndex: 'name',
|
},
|
||||||
},
|
MyColumns.Boolean({
|
||||||
{
|
title: '是否启用',
|
||||||
title: '队长',
|
dataIndex: 'is_enabled',
|
||||||
dataIndex: ['company_employee', 'name'],
|
search: false,
|
||||||
search: false,
|
}),
|
||||||
},
|
{
|
||||||
MyColumns.Boolean({
|
title: '成员',
|
||||||
title: '是否启用',
|
search: false,
|
||||||
dataIndex: 'is_enabled',
|
render: (_, item: any) => {
|
||||||
search: false,
|
return (
|
||||||
}),
|
<Space>
|
||||||
{
|
{item?.emergency_team_members?.map(
|
||||||
title: '成员',
|
(res: any, index: number) => {
|
||||||
search: false,
|
return (
|
||||||
render: (_, item: any) => {
|
<div key={`item_${index}`}>{res?.employee_name}</div>
|
||||||
return (
|
);
|
||||||
<Space>
|
},
|
||||||
{item?.emergency_team_members?.map(
|
)}
|
||||||
(res: any, index: number) => {
|
|
||||||
return (
|
|
||||||
<div key={`item_${index}`}>{res?.employee_name}</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
MyColumns.UpdatedAt(),
|
|
||||||
MyColumns.CreatedAt(),
|
|
||||||
MyColumns.Option({
|
|
||||||
render: (_, item: any, index, action) => (
|
|
||||||
<Space key={index}>
|
|
||||||
<Update item={item} reload={action?.reload} title={title} />
|
|
||||||
<MyButtons.Delete
|
|
||||||
onConfirm={() =>
|
|
||||||
Apis.Emergency.EmergencyEventTeams.Delete({
|
|
||||||
id: item.id,
|
|
||||||
}).then(() => action?.reload())
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
);
|
||||||
}),
|
},
|
||||||
]}
|
},
|
||||||
/>
|
MyColumns.UpdatedAt(),
|
||||||
</MyPageContainer>
|
MyColumns.CreatedAt(),
|
||||||
|
MyColumns.Option({
|
||||||
|
render: (_, item: any, index, action) => (
|
||||||
|
<Space key={index}>
|
||||||
|
<Update item={item} reload={action?.reload} title={title} />
|
||||||
|
<MyButtons.Delete
|
||||||
|
onConfirm={() =>
|
||||||
|
Apis.Emergency.EmergencyEventTeams.Delete({
|
||||||
|
id: item.id,
|
||||||
|
}).then(() => action?.reload())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user