|
|
@@ -12,9 +12,11 @@ import {
|
|
|
MinusOutlined,
|
|
|
} from '@ant-design/icons';
|
|
|
import BaseCrud from '@/components/BaseCrud';
|
|
|
+import { useIntl } from '@@/plugin-locale/localeExports';
|
|
|
|
|
|
export const service = new BaseService<ProtocolItem>('protocol');
|
|
|
const Protocol = () => {
|
|
|
+ const intl = useIntl();
|
|
|
const actionRef = useRef<ActionType>();
|
|
|
|
|
|
const columns: ProColumns<ProtocolItem>[] = [
|
|
|
@@ -25,44 +27,81 @@ const Protocol = () => {
|
|
|
},
|
|
|
{
|
|
|
dataIndex: 'name',
|
|
|
- title: '名称',
|
|
|
+ title: intl.formatMessage({
|
|
|
+ id: 'pages.table.name',
|
|
|
+ defaultMessage: '名称',
|
|
|
+ }),
|
|
|
},
|
|
|
{
|
|
|
dataIndex: 'type',
|
|
|
- title: '通知类型',
|
|
|
+ title: intl.formatMessage({
|
|
|
+ id: 'pages.link.type',
|
|
|
+ defaultMessage: '类型',
|
|
|
+ }),
|
|
|
},
|
|
|
{
|
|
|
dataIndex: 'provider',
|
|
|
- title: '服务商',
|
|
|
+ title: intl.formatMessage({
|
|
|
+ id: 'pages.table.provider',
|
|
|
+ defaultMessage: '服务商',
|
|
|
+ }),
|
|
|
},
|
|
|
{
|
|
|
- title: '操作',
|
|
|
+ title: intl.formatMessage({
|
|
|
+ id: 'pages.data.option',
|
|
|
+ defaultMessage: '操作',
|
|
|
+ }),
|
|
|
valueType: 'option',
|
|
|
align: 'center',
|
|
|
width: 200,
|
|
|
render: (text, record) => [
|
|
|
<a onClick={() => console.log(record)}>
|
|
|
- <Tooltip title="编辑">
|
|
|
+ <Tooltip
|
|
|
+ title={intl.formatMessage({
|
|
|
+ id: 'pages.data.option.edit',
|
|
|
+ defaultMessage: '编辑',
|
|
|
+ })}
|
|
|
+ >
|
|
|
<EditOutlined />
|
|
|
</Tooltip>
|
|
|
</a>,
|
|
|
<a>
|
|
|
- <Tooltip title="删除">
|
|
|
+ <Tooltip
|
|
|
+ title={intl.formatMessage({
|
|
|
+ id: 'pages.data.option.remove',
|
|
|
+ defaultMessage: '删除',
|
|
|
+ })}
|
|
|
+ >
|
|
|
<MinusOutlined />
|
|
|
</Tooltip>
|
|
|
</a>,
|
|
|
<a>
|
|
|
- <Tooltip title="下载配置">
|
|
|
+ <Tooltip
|
|
|
+ title={intl.formatMessage({
|
|
|
+ id: 'pages.data.option.download',
|
|
|
+ defaultMessage: '下载配置',
|
|
|
+ })}
|
|
|
+ >
|
|
|
<ArrowDownOutlined />
|
|
|
</Tooltip>
|
|
|
</a>,
|
|
|
<a>
|
|
|
- <Tooltip title="调试">
|
|
|
+ <Tooltip
|
|
|
+ title={intl.formatMessage({
|
|
|
+ id: 'pages.notice.option.debug',
|
|
|
+ defaultMessage: '调试',
|
|
|
+ })}
|
|
|
+ >
|
|
|
<BugOutlined />
|
|
|
</Tooltip>
|
|
|
</a>,
|
|
|
<a>
|
|
|
- <Tooltip title="通知记录">
|
|
|
+ <Tooltip
|
|
|
+ title={intl.formatMessage({
|
|
|
+ id: 'pages.link.option.record',
|
|
|
+ defaultMessage: '通知记录',
|
|
|
+ })}
|
|
|
+ >
|
|
|
<BarsOutlined />
|
|
|
</Tooltip>
|
|
|
</a>,
|
|
|
@@ -77,7 +116,10 @@ const Protocol = () => {
|
|
|
<BaseCrud
|
|
|
columns={columns}
|
|
|
service={service}
|
|
|
- title="协议管理"
|
|
|
+ title={intl.formatMessage({
|
|
|
+ id: 'pages.link.protocol',
|
|
|
+ defaultMessage: '协议管理',
|
|
|
+ })}
|
|
|
schema={schema}
|
|
|
actionRef={actionRef}
|
|
|
/>
|