Commit 804653ca authored by 卢均锐's avatar 卢均锐

chore: 采购竞价&在线竞价替换状态展示组件

parent e17c41d4
import React, { useContext, useRef } from 'react'; import React, { useContext, useRef } from 'react';
import { Row, Col, Image, Tag, Tooltip, Switch, Typography } from 'antd'; import { Row, Col, Image, Tag, Tooltip, Switch, Typography } from 'antd';
import { StandardTable } from 'god'; import { StandardTable } from 'god';
import { QuestionCircleOutlined } from '@ant-design/icons';
import StatusTag from '@/components/StatusTag';
import Card from '../../../card'; import Card from '../../../card';
import { Context } from '../context'; import { Context } from '../context';
import style from './index.less'; import style from './index.less';
import { QuestionCircleOutlined } from '@ant-design/icons';
const TYPE = { const TYPE = {
1: '发布至平台', 1: '发布至平台',
...@@ -70,7 +72,7 @@ const DemandLayout: React.FC<DemandLayoutIProps> = (props: any) => { ...@@ -70,7 +72,7 @@ const DemandLayout: React.FC<DemandLayoutIProps> = (props: any) => {
title: '是否归属会员', title: '是否归属会员',
key: 'membershipOrNot', key: 'membershipOrNot',
dataIndex: 'membershipOrNot', dataIndex: 'membershipOrNot',
render: (text: any) => (<Tag color={text ? 'success' : 'error'}>{text ? '是' : '否'}</Tag>) render: (text: any) => (<StatusTag type={text ? 'success' : 'danger'} title={text ? '是' : '否'} />)
}, },
{ {
title: ( title: (
......
/** 详情通用 - 流转进度 */ /** 详情通用 - 流转进度 */
import React, { useContext, useState, useMemo } from 'react'; import React, { useContext, useState, useMemo } from 'react';
import { Radio, Table, Typography, Tag } from 'antd'; import { Radio, Table, Typography } from 'antd';
const { Text } = Typography; const { Text } = Typography;
import StatusTag from '@/components/StatusTag';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -44,7 +46,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => { ...@@ -44,7 +46,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => {
title: '状态', title: '状态',
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_text: any, _record: any) => <Tag color={externalColors(_text)}>{_record.stateName}</Tag> render: (_text: any, _record: any) => <StatusTag type={externalColors(_text)} title={_record.stateName} />
}, },
{ {
title: '操作', title: '操作',
...@@ -93,7 +95,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => { ...@@ -93,7 +95,7 @@ const RecordLayout: React.FC<ProgressProps> = (props: any) => {
title: '状态', title: '状态',
key: 'state', key: 'state',
dataIndex: 'state', dataIndex: 'state',
render: (_text: any, _record: any) => <Tag color={internalColors(_text)}>{_record.stateName}</Tag> render: (_text: any, _record: any) => <StatusTag type={internalColors(_text) === 'processing' ? 'primary' : (internalColors(_text) === 'error' ? 'danger' : internalColors(_text))} title={_record.stateName} />
}, },
{ {
title: '操作', title: '操作',
......
...@@ -4,13 +4,13 @@ export const BID_EXTERNALSTATE_COLOR = (text) => { ...@@ -4,13 +4,13 @@ export const BID_EXTERNALSTATE_COLOR = (text) => {
case -1: case -1:
case 7: case 7:
case 8: case 8:
return 'error'; return 'danger';
case 2: case 2:
case 3: case 3:
case 4: case 4:
return 'warning'; return 'warning';
case 6: case 6:
return 'processing'; return 'primary';
case 99: case 99:
return 'success'; return 'success';
default: default:
......
import React, { Fragment, useEffect, useState } from 'react'; import React, { Fragment, useEffect, useState } from 'react';
import { Tag, Badge, Button } from 'antd'; import { Badge, Button } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat'; import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag';
import { Context } from '../../components/detail/components/context'; import { Context } from '../../components/detail/components/context';
import PeripheralLayout from '../../components/detail'; import PeripheralLayout from '../../components/detail';
...@@ -89,7 +90,7 @@ const SearchDetail = () => { ...@@ -89,7 +90,7 @@ const SearchDetail = () => {
col: [ col: [
{ label: '竞价编号', extra: data.biddingNo, type: 'text' }, { label: '竞价编号', extra: data.biddingNo, type: 'text' },
{ label: '竞价摘要', extra: data.details, type: 'text' }, { label: '竞价摘要', extra: data.details, type: 'text' },
{ label: '外部状态', extra: <Tag color={BID_EXTERNALSTATE_COLOR(data.externalState)}>{data.externalStateName}</Tag>, type: 'text' }, { label: '外部状态', extra: <StatusTag type={BID_EXTERNALSTATE_COLOR(data.externalState)} title={data.externalStateName} />, type: 'text' },
{ label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR(data.interiorState)} text={data.interiorStateName} />, type: 'text' }, { label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR(data.interiorState)} text={data.interiorStateName} />, type: 'text' },
] ]
}, },
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Button, Tag, Badge, Typography, Space } from 'antd'; import { Button, Badge, Typography, Space } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons' import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import moment from 'moment';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import Table from '../../components/table' import Table from '../../components/table'
...@@ -69,7 +69,7 @@ const ReadyBid = () => { ...@@ -69,7 +69,7 @@ const ReadyBid = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { Button, Tag, Badge, Typography, Space } from 'antd'; import { Button, Badge, Typography, Space } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons' import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import moment from 'moment';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import Table from '../../components/table' import Table from '../../components/table'
...@@ -68,7 +68,7 @@ const ReadySignUp = () => { ...@@ -68,7 +68,7 @@ const ReadySignUp = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef } from 'react'; import React, { useRef } from 'react';
import { Tag, Badge, Typography, Space } from 'antd'; import { Badge, Typography, Space } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons' import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import Table from '../../components/table' import Table from '../../components/table'
...@@ -63,14 +64,14 @@ const Search = () => { ...@@ -63,14 +64,14 @@ const Search = () => {
key: 'isPrize', key: 'isPrize',
dataIndex: 'isPrize', dataIndex: 'isPrize',
render: (text: any, record: any) => <> render: (text: any, record: any) => <>
{(text !== 1 && text !== 0) ? null : <Tag color={text ? 'success' : 'warning'}>{text ? '是' : '否'}</Tag> } {(text !== 1 && text !== 0) ? null : <StatusTag type={text ? 'success' : 'danger'} title={text ? '是' : '否'} />}
</>, </>,
width: 180 width: 180
}, { }, {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { Fragment, useEffect, useState, useMemo } from 'react'; import React, { Fragment, useEffect, useState, useMemo } from 'react';
import { Tag, Badge, Popconfirm, Button } from 'antd'; import { Badge, Popconfirm, Button } from 'antd';
import { history } from 'umi'; import { history } from 'umi';
import { CheckCircleOutlined } from '@ant-design/icons'; import { CheckCircleOutlined } from '@ant-design/icons';
...@@ -7,6 +7,7 @@ import { PublicApi } from '@/services/api'; ...@@ -7,6 +7,7 @@ import { PublicApi } from '@/services/api';
import { GlobalConfig } from '@/global/config' import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat'; import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag';
import { Context } from '../../components/detail/components/context'; import { Context } from '../../components/detail/components/context';
import PeripheralLayout from '../../components/detail'; import PeripheralLayout from '../../components/detail';
...@@ -119,7 +120,7 @@ const SearchDetail = () => { ...@@ -119,7 +120,7 @@ const SearchDetail = () => {
col: [ col: [
{ label: '竞价编号', extra: data.biddingNo, type: 'text' }, { label: '竞价编号', extra: data.biddingNo, type: 'text' },
{ label: '竞价摘要', extra: data.details, type: 'text' }, { label: '竞价摘要', extra: data.details, type: 'text' },
{ label: '外部状态', extra: <Tag color={BID_EXTERNALSTATE_COLOR(data.externalState)}>{data.externalStateName}</Tag>, type: 'text' }, { label: '外部状态', extra: <StatusTag type={BID_EXTERNALSTATE_COLOR(data.externalState)} title={data.externalStateName} />, type: 'text' },
{ label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR(data.interiorState)} text={data.interiorStateName} />, type: 'text' }, { label: '内部状态', extra: <Badge status={BID_INTERNALSTATE_COLOR(data.interiorState)} text={data.interiorStateName} />, type: 'text' },
] ]
}, },
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Row, Col, Space, Button, Typography, Popconfirm, Badge, Tag, Menu, Dropdown } from 'antd'; import { Row, Col, Space, Button, Typography, Popconfirm, Badge, Menu, Dropdown } from 'antd';
import { PlusOutlined, PlayCircleOutlined, PoweroffOutlined, CaretDownOutlined } from '@ant-design/icons'; import { PlusOutlined, PlayCircleOutlined, PoweroffOutlined, CaretDownOutlined } from '@ant-design/icons';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import Table from '../../components/table' import Table from '../../components/table'
...@@ -51,7 +52,7 @@ const ReadyAdd = () => { ...@@ -51,7 +52,7 @@ const ReadyAdd = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef } from 'react'; import React, { useRef } from 'react';
import { history } from 'umi'; import { history } from 'umi';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Space, Button, Typography, Badge, Tag } from 'antd'; import { Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -55,7 +56,7 @@ const ReadyBid = () => { ...@@ -55,7 +56,7 @@ const ReadyBid = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Space, Button, Typography, Badge, Tag } from 'antd'; import { Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -65,7 +66,7 @@ const ReadyConfirm = () => { ...@@ -65,7 +66,7 @@ const ReadyConfirm = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Row, Col, Space, Button, Typography, Badge, Tag } from 'antd'; import { Row, Col, Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -54,7 +55,7 @@ const ReadyExamineOne = () => { ...@@ -54,7 +55,7 @@ const ReadyExamineOne = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Row, Col, Space, Button, Typography, Badge, Tag } from 'antd'; import { Row, Col, Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -59,7 +60,7 @@ const ReadyExamineResultOne = () => { ...@@ -59,7 +60,7 @@ const ReadyExamineResultOne = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Row, Col, Space, Button, Typography, Badge, Tag } from 'antd'; import { Row, Col, Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -60,7 +61,7 @@ const ReadyExamineResultTwo = () => { ...@@ -60,7 +61,7 @@ const ReadyExamineResultTwo = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Space, Button, Typography, Badge, Tag } from 'antd'; import { Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -67,7 +68,7 @@ const ReadyExamineSignUp = () => { ...@@ -67,7 +68,7 @@ const ReadyExamineSignUp = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Row, Col, Space, Button, Typography, Badge, Tag } from 'antd'; import { Row, Col, Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -53,7 +54,7 @@ const ReadyExamineTwo = () => { ...@@ -53,7 +54,7 @@ const ReadyExamineTwo = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Row, Col, Space, Button, Typography, Badge, Tag } from 'antd'; import { Row, Col, Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -53,7 +54,7 @@ const ReadySubmit = () => { ...@@ -53,7 +54,7 @@ const ReadySubmit = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { Space, Button, Typography, Badge, Tag } from 'antd'; import { Space, Button, Typography, Badge } from 'antd';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'; import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons';
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
...@@ -61,7 +62,7 @@ const ReadySubmitExamineResult = () => { ...@@ -61,7 +62,7 @@ const ReadySubmitExamineResult = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
import React, { useRef, useState } from 'react'; import React, { useRef, useState } from 'react';
import { Button, Tag, Badge, Typography, Space } from 'antd'; import { Button, Badge, Typography, Space } from 'antd';
import { ColumnType } from 'antd/lib/table/interface'; import { ColumnType } from 'antd/lib/table/interface';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons' import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import { formatTimeString } from '@/utils' import { formatTimeString } from '@/utils'
import EyePreview from '@/components/EyePreview'; import EyePreview from '@/components/EyePreview';
import StatusTag from '@/components/StatusTag';
import { PublicApi } from '@/services/api'; import { PublicApi } from '@/services/api';
import Table from '../../components/table' import Table from '../../components/table'
...@@ -57,7 +58,7 @@ const Search = () => { ...@@ -57,7 +58,7 @@ const Search = () => {
title: '外部状态', title: '外部状态',
key: 'externalState', key: 'externalState',
dataIndex: 'externalState', dataIndex: 'externalState',
render: (text: any, record: any) => <Tag color={BID_EXTERNALSTATE_COLOR(text)}>{record.externalStateName}</Tag> render: (text: any, record: any) => <StatusTag type={BID_EXTERNALSTATE_COLOR(text)} title={record.externalStateName} />
}, { }, {
title: '内部状态', title: '内部状态',
key: 'interiorState', key: 'interiorState',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment