-
{e.flowName}
+
+
{e.flowName}
{(e?.partNumbers || []).map((item: any, index: number) => {
return (
@@ -70,13 +71,11 @@ const ViewBomInfoModal: FC
= ({ onClose, ...props }) => {
key={`value_${index}`}
className="flex max-w-lg items-center bg-[#F1F1F1] h-6 mb-[10px] rounded ml-5"
>
-
- PN : {shortStr(item, 8, 8)}
-
+
+
+ PN : {shortStr(item, 8, 8)}
+
+
);
})}
diff --git a/src/components/routes/carbon/tags.tsx b/src/components/routes/carbon/tags.tsx
index c818ffb..ca3c7e8 100644
--- a/src/components/routes/carbon/tags.tsx
+++ b/src/components/routes/carbon/tags.tsx
@@ -3,7 +3,7 @@ import WrapPageContainer from '@/components/ant/WrapPageContainer';
import { ProductQrcode } from '@/components/common/productQrcode';
import { Teacher as SvgTeacher } from '@/components/svgr';
import { useTags } from '@/lib/hooks/useDatas';
-import { getCurrentDate } from '@/lib/utils';
+import { getCurrentDate, wrapPath } from '@/lib/utils';
import _ from 'lodash';
import { useMemo } from 'react';
@@ -81,23 +81,24 @@ export function Tag() {
},
];
return records.map(({ loadName, proofTime, tokenId, tokenUrl, uuid, verifyUserName, orgName, orgType }) => {
+ const name = orgType !== 'aicp' ? 'Certified' : 'Verified';
return {
title: loadName,
icon:
,
by: `${getCurrentDate(proofTime, 'YYYY年MM月DD日')}签发 by ${orgName}`,
id: uuid,
qrcodeDisable: false,
+ name,
link: [
{ text: '标签信息', href: `/label?vin=${uuid}` },
{
text: '在区块链浏览器查看',
- href: `/chain?tokenId=${tokenId}`,
+ href: `/chain?tokenId=${tokenId}&name=${name}`,
},
],
tokenId,
- name: orgType !== 'aicp' ? 'Certified' : 'Verified',
orgName,
- qrCode: `${window.origin}/label?vin=${uuid}`,
+ qrCode: `${window.origin}${wrapPath('/label')}?vin=${uuid}`,
};
});
}, [data]);
diff --git a/src/components/routes/chain.tsx b/src/components/routes/chain.tsx
index 8784772..409eb27 100644
--- a/src/components/routes/chain.tsx
+++ b/src/components/routes/chain.tsx
@@ -4,7 +4,7 @@ import { Table } from '@/components/common/table';
import { Aicp as SVGAICP, GGX as SvgGgx } from '@/components/svgr';
import { useSBT } from '@/lib/hooks/useDatas';
import { useT } from '@/lib/hooks/useT';
-import { autoFormaterRealTime, genScanUrl, shortStr } from '@/lib/utils';
+import { autoFormaterRealTime, genScanUrl, shortStr, wrapPath } from '@/lib/utils';
import { useSearchParams } from '@umijs/max';
import classNames from 'classnames';
import { now } from 'lodash';
@@ -13,6 +13,7 @@ import { VscQuestion, VscVerified } from 'react-icons/vsc';
import { WrapLink } from '../ant/Link';
import WrapPageContainer from '../ant/WrapPageContainer';
import { HeaderLayout } from '../common/headerLayout';
+import { Tooltip } from 'antd';
function ItemInfo(p: { label: string; text: string; link?: string; tip?: any; className?: string }) {
return (
@@ -27,11 +28,9 @@ function ItemInfo(p: { label: string; text: string; link?: string; tip?: any; cl
)}
>
{!!p.tip && (
-
+
+
+
)}
{p.label}:{' '}
{p.link ? (
@@ -106,6 +105,7 @@ function CardInfo(p: any) {
export function Blockchain() {
const [sq] = useSearchParams();
const tokenId = sq.get('tokenId');
+ const name = sq.get('name');
const { t, formatRelativeTime } = useT();
const isMobile = useIsMobile();
const [current, setCurrent] = useState('');
@@ -128,7 +128,7 @@ export function Blockchain() {
),
render: (text: string) => {
return (
-
+
{shortStr(text)}
);
@@ -164,7 +164,7 @@ export function Blockchain() {
dataIndex: 'fromAddress',
render: (text: string) => {
return (
-
+
{shortStr(text)}
);
@@ -175,7 +175,7 @@ export function Blockchain() {
dataIndex: 'toAddress',
render: (text: string) => {
return (
-
+
{shortStr(text)}
);
@@ -186,8 +186,6 @@ export function Blockchain() {
'GGX (GTech Green Chain) is a shared digital space for the automotive industry. GGX offers 3T (Transparency, Traceability, Trust) featured data as a solid foundation for cross-boundary collaboration between automotive value chain players.',
);
- console.log('sbtTagList', sbtTagList);
-
return (
@@ -196,7 +194,8 @@ export function Blockchain() {
@@ -214,14 +213,14 @@ export function Blockchain() {
-
{t('Label Details')}
+ {t('Label Details')}
-
{t('Item Activity on Blockchain')}
+
{t('Item Activity on Blockchain')}
@@ -230,7 +229,7 @@ export function Blockchain() {
{t('Platform powered by:')}
-
+
{t('Automotive Industry Carbon Platform')}
@@ -244,7 +243,7 @@ export function Blockchain() {
{t('Blockchain powered by:')}
-
+
{t('GGX Blockchain')}
diff --git a/src/components/routes/label.tsx b/src/components/routes/label.tsx
index 755d836..6248ded 100644
--- a/src/components/routes/label.tsx
+++ b/src/components/routes/label.tsx
@@ -2,7 +2,7 @@ import { Carbon3 as SVGCarbon3 } from '@/components/svgr';
import { useTagInfo } from '@/lib/hooks/useDatas';
import { useT } from '@/lib/hooks/useT';
-import { genScanUrl, handleCarbonStr } from '@/lib/utils';
+import { genScanUrl, handleCarbonStr, wrapPath } from '@/lib/utils';
import { useSearchParams } from '@umijs/max';
import { Fragment } from 'react';
import WrapPageContainer from '../ant/WrapPageContainer';
@@ -118,9 +118,9 @@ export function Label() {
'A Soul-bounded Token (a special type of NFT that is not allowed to transfer after created) has been generated on blockchain to make sure the information in this label is immutable and will be maintain for traceability forever. Check {{value}} to verify the SBT on blockchain explorer.',
).replace(
'{{value}}',
- `
${t(
- 'here',
- )}`,
+ `
${t('here')}`,
),
}}
/>
diff --git a/src/components/routes/tools/verificationManagement/index.tsx b/src/components/routes/tools/verificationManagement/index.tsx
index 957cb50..c4c2b6c 100644
--- a/src/components/routes/tools/verificationManagement/index.tsx
+++ b/src/components/routes/tools/verificationManagement/index.tsx
@@ -123,6 +123,7 @@ export function VerificationManagementList() {
title: '验证时间',
dataIndex: 'proofTime',
valueType: 'dateTime',
+
width: 170,
},
{
diff --git a/src/layout/_app.tsx b/src/layout/_app.tsx
index ec617b1..4c82585 100644
--- a/src/layout/_app.tsx
+++ b/src/layout/_app.tsx
@@ -5,14 +5,10 @@ import classNames from 'classnames';
import { authGetResData } from '@/lib/http';
import React, { FC, ReactNode } from 'react';
import 'react-tippy/dist/tippy.css';
-import { Tooltip } from 'react-tooltip';
import 'react-tooltip/dist/react-tooltip.css';
import { SWRConfig } from 'swr/_internal';
function InitProvider(p: { children: React.ReactNode }) {
- // useEffect(() => {
- // modalRootRef.current = document.body as any;
- // }, []);
return (
- );
-}
-
function App(p: { children?: ReactNode }) {
return (
@@ -47,7 +29,6 @@ function App(p: { children?: ReactNode }) {
{p.children}
-
);
}
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index 8d53f07..9788937 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -1,10 +1,10 @@
import { useIntl } from '@umijs/max';
import { AxiosError } from 'axios';
+import dayjs from 'dayjs';
import _, { toInteger } from 'lodash';
import moment from 'moment';
+import { historyType } from '../../config/defaultSettings';
import { LABEL_CONTRACT, SCAN_BASE } from './env';
-import dayjs from 'dayjs';
-
export const DATE_FTM = {
long: 'YYYY-MM-DD HH:mm:ss',
short: 'YYYY-MM-DD',
@@ -234,3 +234,10 @@ export const convertArr = (label: string | number, value: string | number, arr?:
return { label: item[label], value: item[value] };
});
};
+
+export function wrapPath(path: `/${string}`) {
+ if (historyType === 'hash') {
+ return '/#' + path;
+ }
+ return path;
+}