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