fix:更新Bi,bug
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m47s
All checks were successful
Build and Push Docker Image / build (push) Successful in 4m47s
This commit is contained in:
parent
41c9f5909b
commit
ec87966f54
@ -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 {
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
import { MyButtons, MyColumns, MyProTableProps } from '@/common';
|
import {
|
||||||
|
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';
|
||||||
@ -7,76 +12,83 @@ import Update from '../modals/TeamUpdate';
|
|||||||
|
|
||||||
export default function Index({ title = '应急小组' }) {
|
export default function Index({ title = '应急小组' }) {
|
||||||
return (
|
return (
|
||||||
<ProTable
|
<MyPageContainer
|
||||||
{...MyProTableProps.props}
|
title={title}
|
||||||
request={async (params, sort) =>
|
enableTabs={true}
|
||||||
MyProTableProps.request(
|
tabKey="emergency_events_teams"
|
||||||
params,
|
tabLabel={title}
|
||||||
sort,
|
>
|
||||||
Apis.Emergency.EmergencyEventTeams.List,
|
<ProTable
|
||||||
)
|
{...MyProTableProps.props}
|
||||||
}
|
request={async (params, sort) =>
|
||||||
headerTitle="应急小组"
|
MyProTableProps.request(
|
||||||
toolBarRender={(action) => [
|
params,
|
||||||
<Create key="Create" reload={action?.reload} title="应急小组" />,
|
sort,
|
||||||
]}
|
Apis.Emergency.EmergencyEventTeams.List,
|
||||||
columns={[
|
)
|
||||||
MyColumns.ID({
|
}
|
||||||
search: false,
|
headerTitle="应急小组"
|
||||||
}),
|
toolBarRender={(action) => [
|
||||||
{
|
<Create key="Create" reload={action?.reload} title="应急小组" />,
|
||||||
title: '项目',
|
]}
|
||||||
dataIndex: ['asset_project', 'name'],
|
columns={[
|
||||||
search: false,
|
MyColumns.ID({
|
||||||
},
|
search: false,
|
||||||
{
|
}),
|
||||||
title: '名称',
|
{
|
||||||
dataIndex: 'name',
|
title: '项目',
|
||||||
},
|
dataIndex: ['asset_project', 'name'],
|
||||||
{
|
search: false,
|
||||||
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(),
|
title: '名称',
|
||||||
MyColumns.CreatedAt(),
|
dataIndex: 'name',
|
||||||
MyColumns.Option({
|
},
|
||||||
render: (_, item: any, index, action) => (
|
{
|
||||||
<Space key={index}>
|
title: '队长',
|
||||||
<Update item={item} reload={action?.reload} title={title} />
|
dataIndex: ['company_employee', 'name'],
|
||||||
<MyButtons.Delete
|
search: false,
|
||||||
onConfirm={() =>
|
},
|
||||||
Apis.Emergency.EmergencyEventTeams.Delete({
|
MyColumns.Boolean({
|
||||||
id: item.id,
|
title: '是否启用',
|
||||||
}).then(() => action?.reload())
|
dataIndex: 'is_enabled',
|
||||||
}
|
search: false,
|
||||||
/>
|
}),
|
||||||
</Space>
|
{
|
||||||
),
|
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())
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</MyPageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user