diff --git a/src/pages/account/center/components/Applications/index.tsx b/src/pages/account/center/components/Applications/index.tsx
deleted file mode 100644
index e8c273f5..00000000
--- a/src/pages/account/center/components/Applications/index.tsx
+++ /dev/null
@@ -1,130 +0,0 @@
-import {
- DownloadOutlined,
- EditOutlined,
- EllipsisOutlined,
- ShareAltOutlined,
-} from '@ant-design/icons';
-import { useRequest } from '@umijs/max';
-import { Avatar, Card, Dropdown, List, Tooltip } from 'antd';
-import numeral from 'numeral';
-import React from 'react';
-import type { ListItemDataType } from '../../data.d';
-import { queryFakeList } from '../../service';
-import useStyles from './index.style';
-export function formatWan(val: number) {
- const v = val * 1;
- if (!v || Number.isNaN(v)) return '';
- let result: React.ReactNode = val;
- if (val > 10000) {
- result = (
-
- {Math.floor(val / 10000)}
-
- 万
-
-
- );
- }
- return result;
-}
-const Applications: React.FC = () => {
- const { styles: stylesApplications } = useStyles();
- // 获取tab列表数据
- const { data: listData } = useRequest(() => {
- return queryFakeList({
- count: 30,
- });
- });
-
- const CardInfo: React.FC<{
- activeUser: React.ReactNode;
- newUser: React.ReactNode;
- }> = ({ activeUser, newUser }) => (
-
- );
- return (
-
- rowKey="id"
- className={stylesApplications.filterCardList}
- grid={{
- gutter: 24,
- xxl: 3,
- xl: 2,
- lg: 2,
- md: 2,
- sm: 2,
- xs: 1,
- }}
- dataSource={listData?.list || []}
- renderItem={(item) => (
-
-
-
- ,
-
-
- ,
-
-
- ,
-
-
- ,
- ]}
- >
- }
- title={item.title}
- />
-
-
-
-
-
- )}
- />
- );
-};
-export default Applications;
diff --git a/src/pages/account/center/index.tsx b/src/pages/account/center/index.tsx
deleted file mode 100644
index 88881321..00000000
--- a/src/pages/account/center/index.tsx
+++ /dev/null
@@ -1,278 +0,0 @@
-import {
- ClusterOutlined,
- ContactsOutlined,
- HomeOutlined,
- PlusOutlined,
-} from '@ant-design/icons';
-import { GridContent } from '@ant-design/pro-components';
-import { useRequest } from '@umijs/max';
-import {
- Avatar,
- Card,
- Col,
- Divider,
- Input,
- type InputRef,
- Row,
- Tag,
-} from 'antd';
-import React, { useRef, useState } from 'react';
-import useStyles from './Center.style';
-import Applications from './components/Applications';
-import Articles from './components/Articles';
-import Projects from './components/Projects';
-import type { CurrentUser, TagType, tabKeyType } from './data.d';
-import { queryCurrent } from './service';
-
-const operationTabList = [
- {
- key: 'articles',
- tab: (
-
- 文章{' '}
-
- (8)
-
-
- ),
- },
- {
- key: 'applications',
- tab: (
-
- 应用{' '}
-
- (8)
-
-
- ),
- },
- {
- key: 'projects',
- tab: (
-
- 项目{' '}
-
- (8)
-
-
- ),
- },
-];
-const TagList: React.FC<{
- tags: CurrentUser['tags'];
-}> = ({ tags }) => {
- const { styles } = useStyles();
- const ref = useRef(null);
- const [newTags, setNewTags] = useState([]);
- const [inputVisible, setInputVisible] = useState(false);
- const [inputValue, setInputValue] = useState('');
- const showInput = () => {
- setInputVisible(true);
- if (ref.current) {
- // eslint-disable-next-line no-unused-expressions
- ref.current?.focus();
- }
- };
- const handleInputChange = (e: React.ChangeEvent) => {
- setInputValue(e.target.value);
- };
- const handleInputConfirm = () => {
- let tempsTags = [...newTags];
- if (
- inputValue &&
- tempsTags.filter((tag) => tag.label === inputValue).length === 0
- ) {
- tempsTags = [
- ...tempsTags,
- {
- key: `new-${tempsTags.length}`,
- label: inputValue,
- },
- ];
- }
- setNewTags(tempsTags);
- setInputVisible(false);
- setInputValue('');
- };
- return (
-
-
标签
- {(tags || []).concat(newTags).map((item) => (
-
{item.label}
- ))}
- {inputVisible && (
-
- )}
- {!inputVisible && (
-
-
-
- )}
-
- );
-};
-const Center: React.FC = () => {
- const { styles } = useStyles();
- const [tabKey, setTabKey] = useState('articles');
-
- // 获取用户信息
- const { data: currentUser, loading } = useRequest(() => {
- return queryCurrent();
- });
-
- // 渲染用户信息
- const renderUserInfo = ({
- title,
- group,
- geographic,
- }: Partial) => {
- return (
-
-
-
- {title}
-
-
-
- {group}
-
-
-
- {
- (
- geographic || {
- province: {
- label: '',
- },
- }
- ).province.label
- }
- {
- (
- geographic || {
- city: {
- label: '',
- },
- }
- ).city.label
- }
-
-
- );
- };
-
- // 渲染tab切换
- const renderChildrenByTabKey = (tabValue: tabKeyType) => {
- if (tabValue === 'projects') {
- return ;
- }
- if (tabValue === 'applications') {
- return ;
- }
- if (tabValue === 'articles') {
- return ;
- }
- return null;
- };
- return (
-
-
-
-
- {!loading && currentUser && (
- <>
-
-

-
{currentUser.name}
-
{currentUser?.signature}
-
- {renderUserInfo(currentUser)}
-
-
-
-
- >
- )}
-
-
-
- {
- setTabKey(_tabKey as tabKeyType);
- }}
- >
- {renderChildrenByTabKey(tabKey)}
-
-
-
-
- );
-};
-export default Center;
diff --git a/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx b/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx
deleted file mode 100644
index fe4194d5..00000000
--- a/src/pages/dashboard/analysis/components/Charts/ChartCard/index.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import { Card } from 'antd';
-import type { CardProps } from 'antd/es/card';
-import classNames from 'classnames';
-import omit from 'rc-util/lib/omit';
-import React from 'react';
-import useStyles from './index.style';
-
-type totalType = () => React.ReactNode;
-
-export type ChartCardProps = {
- title: React.ReactNode;
- action?: React.ReactNode;
- total?: React.ReactNode | number | (() => React.ReactNode | number);
- footer?: React.ReactNode;
- contentHeight?: number;
- avatar?: React.ReactNode;
- style?: React.CSSProperties;
-} & CardProps;
-
-const ChartCard: React.FC = (props) => {
- const { styles } = useStyles();
- const renderTotal = (total?: number | totalType | React.ReactNode) => {
- if (!total && total !== 0) {
- return null;
- }
- let totalDom: React.ReactNode | null = null;
- switch (typeof total) {
- case 'undefined':
- totalDom = null;
- break;
- case 'function':
- totalDom = {total()}
;
- break;
- default:
- totalDom = {total}
;
- }
- return totalDom;
- };
- const renderContent = () => {
- const {
- contentHeight,
- title,
- avatar,
- action,
- total,
- footer,
- children,
- loading,
- } = props;
- if (loading) {
- return false;
- }
- return (
-
-
-
{avatar}
-
-
- {title}
- {action}
-
- {renderTotal(total)}
-
-
- {children && (
-
- )}
- {footer && (
-
- {footer}
-
- )}
-
- );
- };
-
- const { loading = false, ...rest } = props;
- const cardProps = omit(rest, ['total', 'contentHeight', 'action']);
- return (
-
- {renderContent()}
-
- );
-};
-export default ChartCard;
diff --git a/src/pages/dashboard/analysis/components/Charts/MiniProgress/index.tsx b/src/pages/dashboard/analysis/components/Charts/MiniProgress/index.tsx
deleted file mode 100644
index 5376e01c..00000000
--- a/src/pages/dashboard/analysis/components/Charts/MiniProgress/index.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Tooltip } from 'antd';
-import React from 'react';
-export type MiniProgressProps = {
- target: number;
- targetLabel?: string;
- color?: string;
- size?: number;
- percent?: number;
- style?: React.CSSProperties;
-};
-const MiniProgress: React.FC = ({
- targetLabel,
- target,
- color = 'rgb(19, 194, 194)',
- size,
- percent,
-}) => {
- return (
-
- );
-};
-export default MiniProgress;
diff --git a/src/pages/dashboard/analysis/components/IntroduceRow.tsx b/src/pages/dashboard/analysis/components/IntroduceRow.tsx
deleted file mode 100644
index 6e21f1f3..00000000
--- a/src/pages/dashboard/analysis/components/IntroduceRow.tsx
+++ /dev/null
@@ -1,168 +0,0 @@
-import { InfoCircleOutlined } from '@ant-design/icons';
-import { Area, Column } from '@ant-design/plots';
-import { Col, Progress, Row, Tooltip } from 'antd';
-import numeral from 'numeral';
-import type { DataItem } from '../data.d';
-import useStyles from '../style.style';
-import Yuan from '../utils/Yuan';
-import { ChartCard, Field } from './Charts';
-import Trend from './Trend';
-
-const topColResponsiveProps = {
- xs: 24,
- sm: 12,
- md: 12,
- lg: 12,
- xl: 6,
- style: {
- marginBottom: 24,
- },
-};
-const IntroduceRow = ({
- loading,
- visitData,
-}: {
- loading: boolean;
- visitData: DataItem[];
-}) => {
- const { styles } = useStyles();
- return (
-
-
-
-
-
- }
- loading={loading}
- total={() => 126560}
- footer={
-
- }
- contentHeight={46}
- >
-
- 周同比
- 12%
-
-
- 日同比
- 11%
-
-
-
-
-
-
-
-
- }
- total={numeral(8846).format('0,0')}
- footer={
-
- }
- contentHeight={46}
- >
-
-
-
-
-
-
-
- }
- total={numeral(6560).format('0,0')}
- footer={}
- contentHeight={46}
- >
-
-
-
-
-
-
-
- }
- total="78%"
- footer={
-
-
- 周同比
- 12%
-
-
- 日同比
- 11%
-
-
- }
- contentHeight={46}
- >
-
-
-
-
- );
-};
-export default IntroduceRow;
diff --git a/src/pages/dashboard/analysis/components/OfflineData.tsx b/src/pages/dashboard/analysis/components/OfflineData.tsx
deleted file mode 100644
index f271c9af..00000000
--- a/src/pages/dashboard/analysis/components/OfflineData.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import { Line, Tiny } from '@ant-design/plots';
-import { Card, Col, Row, Tabs } from 'antd';
-import type { DataItem, OfflineDataType } from '../data.d';
-import useStyles from '../style.style';
-import NumberInfo from './NumberInfo';
-
-const CustomTab = ({
- data,
- currentTabKey: currentKey,
-}: {
- data: OfflineDataType;
- currentTabKey: string;
-}) => (
-
-
-
-
-
-
-
-
-);
-
-const OfflineData = ({
- activeKey,
- loading,
- offlineData,
- offlineChartData,
- handleTabChange,
-}: {
- activeKey: string;
- loading: boolean;
- offlineData: OfflineDataType[];
- offlineChartData: DataItem[];
- handleTabChange: (activeKey: string) => void;
-}) => {
- const { styles } = useStyles();
- return (
-
- ({
- key: shop.name,
- label: ,
- children: (
-
-
-
- ),
- }))}
- />
-
- );
-};
-export default OfflineData;
diff --git a/src/pages/dashboard/analysis/components/TopSearch.tsx b/src/pages/dashboard/analysis/components/TopSearch.tsx
deleted file mode 100644
index 2833b0a4..00000000
--- a/src/pages/dashboard/analysis/components/TopSearch.tsx
+++ /dev/null
@@ -1,181 +0,0 @@
-import { InfoCircleOutlined } from '@ant-design/icons';
-import { Area } from '@ant-design/plots';
-import { Card, Col, Row, Table, Tooltip } from 'antd';
-import numeral from 'numeral';
-import React from 'react';
-import type { DataItem } from '../data.d';
-import NumberInfo from './NumberInfo';
-import Trend from './Trend';
-
-const TopSearch = ({
- loading,
- visitData2,
- searchData,
- dropdownGroup,
-}: {
- loading: boolean;
- visitData2: DataItem[];
- dropdownGroup: React.ReactNode;
- searchData: DataItem[];
-}) => {
- const columns = [
- {
- title: '排名',
- dataIndex: 'index',
- key: 'index',
- },
- {
- title: '搜索关键词',
- dataIndex: 'keyword',
- key: 'keyword',
- render: (text: React.ReactNode) => {text},
- },
- {
- title: '用户数',
- dataIndex: 'count',
- key: 'count',
- sorter: (
- a: {
- count: number;
- },
- b: {
- count: number;
- },
- ) => a.count - b.count,
- },
- {
- title: '周涨幅',
- dataIndex: 'range',
- key: 'range',
- sorter: (
- a: {
- range: number;
- },
- b: {
- range: number;
- },
- ) => a.range - b.range,
- render: (
- text: React.ReactNode,
- record: {
- status: number;
- },
- ) => (
-
-
- {text}%
-
-
- ),
- },
- ];
- return (
-
-
-
-
- 搜索用户数
-
-
-
-
- }
- gap={8}
- total={numeral(12321).format('0,0')}
- status="up"
- subTotal={17.1}
- />
-
-
-
-
- 人均搜索次数
-
-
-
-
- }
- total={2.7}
- status="down"
- subTotal={26.2}
- gap={8}
- />
-
-
-
-
- rowKey={(record) => record.index}
- size="small"
- columns={columns}
- dataSource={searchData}
- pagination={{
- style: {
- marginBottom: 0,
- },
- pageSize: 5,
- }}
- />
-
- );
-};
-export default TopSearch;
diff --git a/src/pages/dashboard/monitor/index.tsx b/src/pages/dashboard/monitor/index.tsx
deleted file mode 100644
index a17fb72d..00000000
--- a/src/pages/dashboard/monitor/index.tsx
+++ /dev/null
@@ -1,203 +0,0 @@
-import { Gauge, Liquid, WordCloud } from '@ant-design/plots';
-import { GridContent } from '@ant-design/pro-components';
-import { useRequest } from '@umijs/max';
-import { Card, Col, Progress, Row, Statistic } from 'antd';
-import numeral from 'numeral';
-import type { FC } from 'react';
-import ActiveChart from './components/ActiveChart';
-import MonitorMap from './components/Map';
-import { queryTags } from './service';
-import useStyles from './style.style';
-
-const deadline = Date.now() + 1000 * 60 * 60 * 24 * 2 + 1000 * 30; // Moment is also OK
-
-const Monitor: FC = () => {
- const { styles } = useStyles();
- const { loading, data } = useRequest(queryTags);
- const wordCloudData = (data?.list || []).map((item) => {
- return {
- id: +Date.now(),
- word: item.name,
- weight: item.value,
- };
- });
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '优',
- }}
- meta={{
- color: {
- range: [
- '#6395FA',
- '#62DAAB',
- '#657798',
- '#F7C128',
- '#1F8718',
- ],
- },
- }}
- />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-export default Monitor;
diff --git a/src/pages/form/advanced-form/index.tsx b/src/pages/form/advanced-form/index.tsx
deleted file mode 100644
index 83a262ed..00000000
--- a/src/pages/form/advanced-form/index.tsx
+++ /dev/null
@@ -1,549 +0,0 @@
-import { CloseCircleOutlined } from '@ant-design/icons';
-import type { ProColumnType } from '@ant-design/pro-components';
-import {
- EditableProTable,
- FooterToolbar,
- PageContainer,
- ProForm,
- ProFormDateRangePicker,
- ProFormSelect,
- ProFormText,
- ProFormTimePicker,
-} from '@ant-design/pro-components';
-import { Card, Col, message, Popover, Row } from 'antd';
-import type { FC } from 'react';
-import { useState } from 'react';
-import { fakeSubmitForm } from './service';
-import useStyles from './style.style';
-
-interface TableFormDateType {
- key: string;
- workId?: string;
- name?: string;
- department?: string;
- isNew?: boolean;
- editable?: boolean;
-}
-type InternalNamePath = (string | number)[];
-const fieldLabels = {
- name: '仓库名',
- url: '仓库域名',
- owner: '仓库管理员',
- approver: '审批人',
- dateRange: '生效日期',
- type: '仓库类型',
- name2: '任务名',
- url2: '任务描述',
- owner2: '执行人',
- approver2: '责任人',
- dateRange2: '生效日期',
- type2: '任务类型',
-};
-const tableData = [
- {
- key: '1',
- workId: '00001',
- name: 'John Brown',
- department: 'New York No. 1 Lake Park',
- },
- {
- key: '2',
- workId: '00002',
- name: 'Jim Green',
- department: 'London No. 1 Lake Park',
- },
- {
- key: '3',
- workId: '00003',
- name: 'Joe Black',
- department: 'Sidney No. 1 Lake Park',
- },
-];
-interface ErrorField {
- name: InternalNamePath;
- errors: string[];
-}
-const AdvancedForm: FC> = () => {
- const { styles } = useStyles();
- const [error, setError] = useState([]);
- const getErrorInfo = (errors: ErrorField[]) => {
- const errorCount = errors.filter((item) => item.errors.length > 0).length;
- if (!errors || errorCount === 0) {
- return null;
- }
- const scrollToField = (fieldKey: string) => {
- const labelNode = document.querySelector(`label[for="${fieldKey}"]`);
- if (labelNode) {
- labelNode.scrollIntoView(true);
- }
- };
- const errorList = errors.map((err) => {
- if (!err || err.errors.length === 0) {
- return null;
- }
- const key = err.name[0] as
- | 'name'
- | 'url'
- | 'owner'
- | 'approver'
- | 'dateRange'
- | 'type';
- return (
- scrollToField(key)}
- >
-
- {err.errors[0]}
- {fieldLabels[key]}
-
- );
- });
- return (
-
- {
- if (trigger?.parentNode) {
- return trigger.parentNode as HTMLElement;
- }
- return trigger;
- }}
- >
-
-
- {errorCount}
-
- );
- };
- const onFinish = async (values: Record) => {
- setError([]);
- try {
- await fakeSubmitForm(values);
- message.success('提交成功');
- } catch {
- // console.log
- }
- };
- const onFinishFailed = (errorInfo: any) => {
- setError(errorInfo.errorFields);
- };
- const columns: ProColumnType[] = [
- {
- title: '成员姓名',
- dataIndex: 'name',
- key: 'name',
- width: '20%',
- },
- {
- title: '工号',
- dataIndex: 'workId',
- key: 'workId',
- width: '20%',
- },
- {
- title: '所属部门',
- dataIndex: 'department',
- key: 'department',
- width: '40%',
- },
- {
- title: '操作',
- key: 'action',
- valueType: 'option',
- render: (_, record: TableFormDateType, _index, action) => {
- return [
- {
- action?.startEditable(record.key);
- }}
- >
- 编辑
- ,
- ];
- },
- },
- ];
- return (
- {
- return (
-
- {getErrorInfo(error)}
- {dom}
-
- );
- },
- }}
- initialValues={{
- members: tableData,
- }}
- onFinish={onFinish}
- onFinishFailed={onFinishFailed}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- recordCreatorProps={{
- record: () => {
- return {
- key: `0${Date.now()}`,
- };
- },
- }}
- columns={columns}
- rowKey="key"
- />
-
-
-
-
- );
-};
-export default AdvancedForm;
diff --git a/src/pages/form/basic-form/index.tsx b/src/pages/form/basic-form/index.tsx
deleted file mode 100644
index 7d053f99..00000000
--- a/src/pages/form/basic-form/index.tsx
+++ /dev/null
@@ -1,194 +0,0 @@
-import {
- PageContainer,
- ProForm,
- ProFormDateRangePicker,
- ProFormDependency,
- ProFormDigit,
- ProFormRadio,
- ProFormSelect,
- ProFormText,
- ProFormTextArea,
-} from '@ant-design/pro-components';
-import { useRequest } from '@umijs/max';
-import { Card, message } from 'antd';
-import type { FC } from 'react';
-import { fakeSubmitForm } from './service';
-import useStyles from './style.style';
-
-const BasicForm: FC> = () => {
- const { styles } = useStyles();
- const { run } = useRequest(fakeSubmitForm, {
- manual: true,
- onSuccess: () => {
- message.success('提交成功');
- },
- });
- const onFinish = async (values: Record) => {
- run(values);
- };
- return (
-
-
-
-
-
-
-
-
-
-
- 客户
- (选填)
-
- }
- tooltip="目标的服务对象"
- name="client"
- placeholder="请描述你服务的客户,内部客户直接 @姓名/工号"
- />
-
-
- 邀评人
- (选填)
-
- }
- name="invites"
- placeholder="请直接 @姓名/工号,最多可邀请 5 人"
- />
-
-
- 权重
- (选填)
-
- }
- name="weight"
- placeholder="请输入"
- min={0}
- max={100}
- width="xs"
- fieldProps={{
- formatter: (value) => `${value || 0}%`,
- parser: (value) => Number(value ? value.replace('%', '') : '0'),
- }}
- />
-
-
-
- {({ publicType }) => {
- return (
-
- );
- }}
-
-
-
-
- );
-};
-export default BasicForm;
diff --git a/src/pages/form/step-form/index.tsx b/src/pages/form/step-form/index.tsx
deleted file mode 100644
index d70b31aa..00000000
--- a/src/pages/form/step-form/index.tsx
+++ /dev/null
@@ -1,248 +0,0 @@
-import {
- PageContainer,
- ProForm,
- ProFormDigit,
- ProFormSelect,
- ProFormText,
- StepsForm,
-} from '@ant-design/pro-components';
-import type { FormInstance } from 'antd';
-import {
- Alert,
- Button,
- Card,
- Descriptions,
- Divider,
- Result,
- Statistic,
-} from 'antd';
-import React, { useRef, useState } from 'react';
-import type { StepDataType } from './data.d';
-import useStyles from './style.style';
-
-const StepDescriptions: React.FC<{
- stepData: StepDataType;
- bordered?: boolean;
-}> = ({ stepData, bordered }) => {
- const { payAccount, receiverAccount, receiverName, amount } = stepData;
- return (
-
- {payAccount}
- {receiverAccount}
- {receiverName}
-
-
- 元
-
- }
- precision={2}
- />
-
-
- );
-};
-const StepResult: React.FC<{
- onFinish: () => Promise;
- children?: React.ReactNode;
-}> = (props) => {
- const { styles } = useStyles();
- return (
-
-
-
- >
- }
- className={styles.result}
- >
- {props.children}
-
- );
-};
-const StepForm: React.FC> = () => {
- const { styles } = useStyles();
- const [stepData, setStepData] = useState({
- payAccount: 'ant-design@alipay.com',
- receiverAccount: 'test@example.com',
- receiverName: 'Alex',
- amount: '500',
- receiverMode: 'alipay',
- });
- const [current, setCurrent] = useState(0);
- const formRef = useRef(null);
- return (
-
-
- {
- if (props.step === 2) {
- return null;
- }
- return dom;
- },
- }}
- >
-
- formRef={formRef}
- title="填写转账信息"
- initialValues={stepData}
- onFinish={async (values) => {
- setStepData(values);
- return true;
- }}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- setCurrent(0);
- formRef.current?.resetFields();
- }}
- >
-
-
-
-
-
-
-
说明
-
转账到支付宝账户
-
- 如果需要,这里可以放一些关于产品的常见问题说明。如果需要,这里可以放一些关于产品的常见问题说明。如果需要,这里可以放一些关于产品的常见问题说明。
-
-
转账到银行卡
-
- 如果需要,这里可以放一些关于产品的常见问题说明。如果需要,这里可以放一些关于产品的常见问题说明。如果需要,这里可以放一些关于产品的常见问题说明。
-
-
-
-
- );
-};
-export default StepForm;
diff --git a/src/pages/list/basic-list/components/OperationModal.tsx b/src/pages/list/basic-list/components/OperationModal.tsx
deleted file mode 100644
index ebb2e082..00000000
--- a/src/pages/list/basic-list/components/OperationModal.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import {
- ModalForm,
- ProFormDateTimePicker,
- ProFormSelect,
- ProFormText,
- ProFormTextArea,
-} from '@ant-design/pro-components';
-import { Button, Result } from 'antd';
-import type { FC } from 'react';
-import type { BasicListItemDataType } from '../data.d';
-import useStyles from '../style.style';
-
-type OperationModalProps = {
- done: boolean;
- open: boolean;
- current: Partial | undefined;
- onDone: () => void;
- onSubmit: (values: BasicListItemDataType) => void;
- children?: React.ReactNode;
-};
-const OperationModal: FC = (props) => {
- const { styles } = useStyles();
- const { done, open, current, onDone, onSubmit, children } = props;
- if (!open) {
- return null;
- }
- return (
-
- open={open}
- title={done ? null : `任务${current ? '编辑' : '添加'}`}
- className={styles.standardListForm}
- width={640}
- onFinish={async (values) => {
- onSubmit(values);
- }}
- initialValues={current}
- submitter={{
- render: (_, dom) => (done ? null : dom),
- }}
- trigger={children}
- modalProps={{
- onCancel: () => onDone(),
- destroyOnHidden: true,
- bodyStyle: done
- ? {
- padding: '72px 0',
- }
- : {},
- }}
- >
- {!done ? (
- <>
-
-
-
-
- >
- ) : (
-
- 知道了
-
- }
- className={styles.formResult}
- />
- )}
-
- );
-};
-export default OperationModal;
diff --git a/src/pages/list/basic-list/index.tsx b/src/pages/list/basic-list/index.tsx
deleted file mode 100644
index 3ac9e29a..00000000
--- a/src/pages/list/basic-list/index.tsx
+++ /dev/null
@@ -1,280 +0,0 @@
-import { DownOutlined, PlusOutlined } from '@ant-design/icons';
-import { PageContainer } from '@ant-design/pro-components';
-import { useRequest } from '@umijs/max';
-import {
- Avatar,
- Button,
- Card,
- Col,
- Dropdown,
- Input,
- List,
- Modal,
- Progress,
- Row,
- Segmented,
-} from 'antd';
-import dayjs from 'dayjs';
-import type { FC } from 'react';
-import React, { useState } from 'react';
-import OperationModal from './components/OperationModal';
-import type { BasicListItemDataType } from './data.d';
-import {
- addFakeList,
- queryFakeList,
- removeFakeList,
- updateFakeList,
-} from './service';
-import useStyles from './style.style';
-
-const { Search } = Input;
-const Info: FC<{
- title: React.ReactNode;
- value: React.ReactNode;
- bordered?: boolean;
-}> = ({ title, value, bordered }) => {
- const { styles } = useStyles();
- return (
-
-
{title}
-
{value}
- {bordered &&
}
-
- );
-};
-const ListContent = ({
- data: { owner, createdAt, percent, status },
-}: {
- data: BasicListItemDataType;
-}) => {
- const { styles } = useStyles();
- return (
-
-
-
-
开始时间
-
{dayjs(createdAt).format('YYYY-MM-DD HH:mm')}
-
-
-
- );
-};
-export const BasicList: FC = () => {
- const { styles } = useStyles();
- const [done, setDone] = useState(false);
- const [open, setVisible] = useState(false);
- const [current, setCurrent] = useState<
- Partial | undefined
- >(undefined);
- const {
- data: listData,
- loading,
- mutate,
- } = useRequest(() => {
- return queryFakeList({
- count: 50,
- });
- });
- const { run: postRun } = useRequest(
- (method, params) => {
- if (method === 'remove') {
- return removeFakeList(params);
- }
- if (method === 'update') {
- return updateFakeList(params);
- }
- return addFakeList(params);
- },
- {
- manual: true,
- onSuccess: (result) => {
- mutate(result);
- },
- },
- );
- const list = listData?.list || [];
- const paginationProps = {
- showSizeChanger: true,
- showQuickJumper: true,
- pageSize: 5,
- total: list.length,
- };
- const showEditModal = (item: BasicListItemDataType) => {
- setVisible(true);
- setCurrent(item);
- };
- const deleteItem = (id: string) => {
- postRun('remove', {
- id,
- });
- };
- const editAndDelete = (
- key: string | number,
- currentItem: BasicListItemDataType,
- ) => {
- if (key === 'edit') showEditModal(currentItem);
- else if (key === 'delete') {
- Modal.confirm({
- title: '删除任务',
- content: '确定删除该任务吗?',
- okText: '确认',
- cancelText: '取消',
- onOk: () => deleteItem(currentItem.id),
- });
- }
- };
- const extraContent = (
-
-
- ({})}
- variant="filled"
- />
-
- );
- const MoreBtn: React.FC<{
- item: BasicListItemDataType;
- }> = ({ item }) => (
- editAndDelete(key, item),
- items: [
- {
- key: 'edit',
- label: '编辑',
- },
- {
- key: 'delete',
- label: '删除',
- },
- ],
- }}
- >
-
- 更多
-
-
- );
- const handleDone = () => {
- setDone(false);
- setVisible(false);
- setCurrent({});
- };
- const handleSubmit = (values: BasicListItemDataType) => {
- setDone(true);
- const method = values?.id ? 'update' : 'add';
- postRun(method, values);
- };
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (
- {
- e.preventDefault();
- showEditModal(item);
- }}
- >
- 编辑
- ,
- ,
- ]}
- >
-
- }
- title={{item.title}}
- description={item.subDescription}
- />
-
-
- )}
- />
-
-
-
-
-
-
- );
-};
-export default BasicList;
diff --git a/src/pages/list/search/applications/index.tsx b/src/pages/list/search/applications/index.tsx
deleted file mode 100644
index 4b69ccad..00000000
--- a/src/pages/list/search/applications/index.tsx
+++ /dev/null
@@ -1,239 +0,0 @@
-import {
- DownloadOutlined,
- EditOutlined,
- EllipsisOutlined,
- ShareAltOutlined,
-} from '@ant-design/icons';
-import { useRequest } from '@umijs/max';
-import {
- Avatar,
- Card,
- Col,
- Dropdown,
- Form,
- List,
- Row,
- Select,
- Tooltip,
-} from 'antd';
-import numeral from 'numeral';
-import type { FC } from 'react';
-import React from 'react';
-import { categoryOptions } from '../../mock';
-import StandardFormRow from './components/StandardFormRow';
-import TagSelect from './components/TagSelect';
-import type { ListItemDataType } from './data.d';
-import { queryFakeList } from './service';
-import useStyles from './style.style';
-export function formatWan(val: number) {
- const v = val * 1;
- if (!v || Number.isNaN(v)) return '';
- let result: React.ReactNode = val;
- if (val > 10000) {
- result = (
-
- {Math.floor(val / 10000)}
-
- 万
-
-
- );
- }
- return result;
-}
-const formItemLayout = {
- wrapperCol: {
- xs: {
- span: 24,
- },
- sm: {
- span: 16,
- },
- },
-};
-const CardInfo: React.FC<{
- activeUser: React.ReactNode;
- newUser: React.ReactNode;
-}> = ({ activeUser, newUser }) => {
- const { styles } = useStyles();
- return (
-
- );
-};
-export const Applications: FC> = () => {
- const { styles } = useStyles();
- const { data, loading, run } = useRequest((values: any) => {
- console.log('form data', values);
- return queryFakeList({
- count: 8,
- });
- });
-
- const list = data?.list || [];
-
- return (
-
-
-
-
-
-
- rowKey="id"
- grid={{
- gutter: 16,
- xs: 1,
- sm: 2,
- md: 3,
- lg: 3,
- xl: 4,
- xxl: 4,
- }}
- loading={loading}
- dataSource={list}
- renderItem={(item) => (
-
-
-
- ,
-
-
- ,
-
-
- ,
-
-
- ,
- ]}
- >
- }
- title={item.title}
- />
-
-
-
-
-
- )}
- />
-
- );
-};
-export default Applications;
diff --git a/src/pages/list/search/articles/index.tsx b/src/pages/list/search/articles/index.tsx
deleted file mode 100644
index 868a11cf..00000000
--- a/src/pages/list/search/articles/index.tsx
+++ /dev/null
@@ -1,261 +0,0 @@
-import {
- LikeOutlined,
- LoadingOutlined,
- MessageOutlined,
- StarOutlined,
-} from '@ant-design/icons';
-import { useRequest } from '@umijs/max';
-import { Button, Card, Col, Form, List, Row, Select, Tag } from 'antd';
-import type { DefaultOptionType } from 'antd/es/select';
-import type { FC } from 'react';
-import React, { useMemo } from 'react';
-import { categoryOptions } from '../../mock';
-import ArticleListContent from './components/ArticleListContent';
-import StandardFormRow from './components/StandardFormRow';
-import TagSelect from './components/TagSelect';
-import type { ListItemDataType } from './data.d';
-import { queryFakeList } from './service';
-import useStyles from './style.style';
-
-const FormItem = Form.Item;
-
-const pageSize = 5;
-
-const Articles: FC = () => {
- const [form] = Form.useForm();
-
- const { styles } = useStyles();
-
- const { data, reload, loading, loadMore, loadingMore } = useRequest(
- () => {
- return queryFakeList({
- count: pageSize,
- });
- },
- {
- loadMore: true,
- },
- );
-
- const list = data?.list || [];
-
- const setOwner = () => {
- form.setFieldsValue({
- owner: ['wzj'],
- });
- };
-
- const owners = [
- {
- id: 'wzj',
- name: '我自己',
- },
- {
- id: 'wjh',
- name: '吴家豪',
- },
- {
- id: 'zxx',
- name: '周星星',
- },
- {
- id: 'zly',
- name: '赵丽颖',
- },
- {
- id: 'ym',
- name: '姚明',
- },
- ];
-
- const IconText: React.FC<{
- type: string;
- text: React.ReactNode;
- }> = ({ type, text }) => {
- switch (type) {
- case 'star-o':
- return (
-
-
- {text}
-
- );
- case 'like-o':
- return (
-
-
- {text}
-
- );
- case 'message':
- return (
-
-
- {text}
-
- );
- default:
- return null;
- }
- };
-
- const formItemLayout = {
- wrapperCol: {
- xs: { span: 24 },
- sm: { span: 24 },
- md: { span: 12 },
- },
- };
-
- const loadMoreDom = list.length > 0 && (
-
-
-
- );
-
- const ownerOptions = useMemo(
- () =>
- owners.map((item) => ({
- label: item.name,
- value: item.id,
- })),
- [],
- );
-
- return (
- <>
-
-
-
-
-
- size="large"
- loading={loading}
- rowKey="id"
- itemLayout="vertical"
- loadMore={loadMoreDom}
- dataSource={list}
- renderItem={(item) => (
- ,
- ,
- ,
- ]}
- extra={}
- >
-
- {item.title}
-
- }
- description={
-
- Ant Design
- 设计语言
- 蚂蚁金服
-
- }
- />
-
-
- )}
- />
-
- >
- );
-};
-
-export default Articles;
diff --git a/src/pages/list/search/projects/index.tsx b/src/pages/list/search/projects/index.tsx
deleted file mode 100644
index fa0401e7..00000000
--- a/src/pages/list/search/projects/index.tsx
+++ /dev/null
@@ -1,176 +0,0 @@
-import { useRequest } from '@umijs/max';
-import { Card, Col, Form, List, Row, Select, Typography } from 'antd';
-import dayjs from 'dayjs';
-import relativeTime from 'dayjs/plugin/relativeTime';
-import type { FC } from 'react';
-import { categoryOptions } from '../../mock';
-import AvatarList from './components/AvatarList';
-import StandardFormRow from './components/StandardFormRow';
-import TagSelect from './components/TagSelect';
-import type { ListItemDataType } from './data.d';
-import { queryFakeList } from './service';
-import useStyles from './style.style';
-
-dayjs.extend(relativeTime);
-
-const FormItem = Form.Item;
-const { Paragraph } = Typography;
-const getKey = (id: string, index: number) => `${id}-${index}`;
-const Projects: FC = () => {
- const { styles } = useStyles();
- const { data, loading, run } = useRequest((values: any) => {
- console.log('form data', values);
- return queryFakeList({
- count: 8,
- });
- });
- const list = data?.list || [];
- const cardList = list && (
-
- rowKey="id"
- loading={loading}
- grid={{
- gutter: 16,
- xs: 1,
- sm: 2,
- md: 3,
- lg: 3,
- xl: 4,
- xxl: 4,
- }}
- dataSource={list}
- renderItem={(item) => (
-
- }
- >
- {item.title}}
- description={
-
- {item.subDescription}
-
- }
- />
-
-
{dayjs(item.updatedAt).fromNow()}
-
-
- {item.members.map((member, i) => (
-
- ))}
-
-
-
-
-
- )}
- />
- );
- const formItemLayout = {
- wrapperCol: {
- xs: {
- span: 24,
- },
- sm: {
- span: 16,
- },
- },
- };
- return (
-
- );
-};
-export default Projects;
diff --git a/src/pages/list/table-list/components/CreateForm.tsx b/src/pages/list/table-list/components/CreateForm.tsx
deleted file mode 100644
index a02ef58a..00000000
--- a/src/pages/list/table-list/components/CreateForm.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Modal } from 'antd';
-import React from 'react';
-
-type CreateFormProps = {
- modalVisible: boolean;
- children?: React.ReactNode;
- onCancel: () => void;
-};
-
-const CreateForm: React.FC = (props) => {
- const { modalVisible, onCancel } = props;
-
- return (
- onCancel()}
- footer={null}
- >
- {props.children}
-
- );
-};
-
-export default CreateForm;
diff --git a/src/pages/list/table-list/components/UpdateForm.tsx b/src/pages/list/table-list/components/UpdateForm.tsx
deleted file mode 100644
index c785b1dc..00000000
--- a/src/pages/list/table-list/components/UpdateForm.tsx
+++ /dev/null
@@ -1,161 +0,0 @@
-import {
- ProFormDateTimePicker,
- ProFormRadio,
- ProFormSelect,
- ProFormText,
- ProFormTextArea,
- StepsForm,
-} from '@ant-design/pro-components';
-import { Modal } from 'antd';
-import React from 'react';
-import type { TableListItem } from '../data';
-
-export type FormValueType = {
- target?: string;
- template?: string;
- type?: string;
- time?: string;
- frequency?: string;
-} & Partial;
-
-export type UpdateFormProps = {
- onCancel: (flag?: boolean, formVals?: FormValueType) => void;
- onSubmit: (values: FormValueType) => Promise;
- updateModalVisible: boolean;
- values: Partial;
-};
-
-const UpdateForm: React.FC = (props) => {
- return (
- {
- return (
- {
- props.onCancel();
- }}
- >
- {dom}
-
- );
- }}
- onFinish={props.onSubmit}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-export default UpdateForm;
diff --git a/src/pages/profile/advanced/index.tsx b/src/pages/profile/advanced/index.tsx
deleted file mode 100644
index f0d00c1c..00000000
--- a/src/pages/profile/advanced/index.tsx
+++ /dev/null
@@ -1,493 +0,0 @@
-import {
- DingdingOutlined,
- DownOutlined,
- EllipsisOutlined,
- InfoCircleOutlined,
-} from '@ant-design/icons';
-import {
- GridContent,
- PageContainer,
- RouteContext,
-} from '@ant-design/pro-components';
-import { useRequest } from '@umijs/max';
-import {
- Badge,
- Button,
- Card,
- Descriptions,
- Divider,
- Dropdown,
- Empty,
- Popover,
- Space,
- Statistic,
- Steps,
- Table,
- Tooltip,
-} from 'antd';
-import classNames from 'classnames';
-import type { FC } from 'react';
-import React, { useState } from 'react';
-import type { AdvancedProfileData } from './data.d';
-import { queryAdvancedProfile } from './service';
-import useStyles from './style.style';
-
-const { Step } = Steps;
-
-const action = (
-
- {({ isMobile }) => {
- if (isMobile) {
- return (
- }
- menu={{
- items: [
- {
- key: '1',
- label: '操作一',
- },
- {
- key: '2',
- label: '操作二',
- },
- {
- key: '3',
- label: '操作三',
- },
- ],
- }}
- placement="bottomRight"
- >
- 主操作
-
- );
- }
- return (
-
-
-
-
-
-
-
-
-
-
- );
- }}
-
-);
-
-const operationTabList = [
- {
- key: 'tab1',
- tab: '操作日志一',
- },
- {
- key: 'tab2',
- tab: '操作日志二',
- },
- {
- key: 'tab3',
- tab: '操作日志三',
- },
-];
-const columns = [
- {
- title: '操作类型',
- dataIndex: 'type',
- key: 'type',
- },
- {
- title: '操作人',
- dataIndex: 'name',
- key: 'name',
- },
- {
- title: '执行结果',
- dataIndex: 'status',
- key: 'status',
- render: (text: string) => {
- if (text === 'agree') {
- return ;
- }
- return ;
- },
- },
- {
- title: '操作时间',
- dataIndex: 'updatedAt',
- key: 'updatedAt',
- },
- {
- title: '备注',
- dataIndex: 'memo',
- key: 'memo',
- },
-];
-type AdvancedState = {
- operationKey: 'tab1' | 'tab2' | 'tab3';
- tabActiveKey: string;
-};
-const Advanced: FC = () => {
- const { styles } = useStyles();
-
- const extra = (
-
-
-
-
- );
- const description = (
-
- {({ isMobile }) => (
-
- 曲丽丽
- XX 服务
- 2017-07-07
-
- 12421
-
-
- 2017-07-07 ~ 2017-08-08
-
-
- 请于两个工作日内确认
-
-
- )}
-
- );
- const desc1 = (
-
- 曲丽丽
-
-
2016-12-12 12:32
-
- );
- const desc2 = (
-
- );
-
- const [tabStatus, seTabStatus] = useState({
- operationKey: 'tab1',
- tabActiveKey: 'detail',
- });
-
- const customDot = (
- dot: React.ReactNode,
- {
- status,
- }: {
- status: string;
- },
- ) => {
- const popoverContent = (
-
- 吴加号
-
-
- 未响应
-
- }
- />
-
-
- 耗时:2小时25分钟
-
-
- );
- if (status === 'process') {
- return (
-
- {dot}
-
- );
- }
- return dot;
- };
-
- const { data = {}, loading } = useRequest<{
- data: AdvancedProfileData;
- }>(queryAdvancedProfile);
- const { advancedOperation1, advancedOperation2, advancedOperation3 } = data;
- const contentList = {
- tab1: (
-
- ),
- tab2: (
-
- ),
- tab3: (
-
- ),
- };
- const onTabChange = (tabActiveKey: string) => {
- seTabStatus({
- ...tabStatus,
- tabActiveKey,
- });
- };
- const onOperationTabChange = (key: string) => {
- seTabStatus({
- ...tabStatus,
- operationKey: key as 'tab1',
- });
- };
- return (
-
-
-
-
-
- {({ isMobile }) => (
-
-
-
-
-
-
- )}
-
-
-
-
- 付小小
-
- 32943898021309809423
-
-
- 3321944288191034921
-
-
- 18112345678
-
-
- 曲丽丽 18100000000 浙江省杭州市西湖区黄姑山路工专路交叉路口
-
-
-
- 725
-
- 2017-08-08
-
-
- 某某数据
-
-
-
-
- }
- >
- 725
-
-
- 2017-08-08
-
-
-
- 信息组
-
-
-
- 林东东
- 1234567
-
- XX公司 - YY部
-
-
- 2017-08-08
-
-
- 这段描述很长很长很长很长很长很长很长很长很长很长很长很长很长很长...
-
-
-
-
-
- Citrullus lanatus (Thunb.) Matsum. et
- Nakai一年生蔓生藤本;茎、枝粗壮,具明显的棱。卷须较粗..
-
-
-
-
- 付小小
- 1234568
-
-
-
-
-
-
-
- {contentList[tabStatus.operationKey] as React.ReactNode}
-
-
-
-
- );
-};
-export default Advanced;
diff --git a/src/pages/profile/basic/index.tsx b/src/pages/profile/basic/index.tsx
deleted file mode 100644
index 08e6fdbc..00000000
--- a/src/pages/profile/basic/index.tsx
+++ /dev/null
@@ -1,236 +0,0 @@
-import type { ProColumns } from '@ant-design/pro-components';
-import { PageContainer, ProTable } from '@ant-design/pro-components';
-import { useRequest } from '@umijs/max';
-import { Badge, Card, Descriptions, Divider } from 'antd';
-import type { FC } from 'react';
-import React from 'react';
-import type { BasicGood, BasicProgress } from './data.d';
-import { queryBasicProfile } from './service';
-import useStyles from './style.style';
-
-const progressColumns: ProColumns[] = [
- {
- title: '时间',
- dataIndex: 'time',
- key: 'time',
- },
- {
- title: '当前进度',
- dataIndex: 'rate',
- key: 'rate',
- },
- {
- title: '状态',
- dataIndex: 'status',
- key: 'status',
- render: (text: React.ReactNode) => {
- if (text === 'success') {
- return ;
- }
- return ;
- },
- },
- {
- title: '操作员ID',
- dataIndex: 'operator',
- key: 'operator',
- },
- {
- title: '耗时',
- dataIndex: 'cost',
- key: 'cost',
- },
-];
-const Basic: FC = () => {
- const { styles } = useStyles();
- const { data, loading } = useRequest(() => {
- return queryBasicProfile();
- });
- const { basicGoods, basicProgress } = data || {
- basicGoods: [],
- basicProgress: [],
- };
- let goodsData: typeof basicGoods = [];
- if (basicGoods.length) {
- let num = 0;
- let amount = 0;
- basicGoods.forEach((item) => {
- num += Number(item.num);
- amount += Number(item.amount);
- });
- goodsData = basicGoods.concat({
- id: '总计',
- num,
- amount,
- });
- }
- const renderContent = (value: any, _: any, index: any) => {
- const obj: {
- children: any;
- props: {
- colSpan?: number;
- };
- } = {
- children: value,
- props: {},
- };
- if (index === basicGoods.length) {
- obj.props.colSpan = 0;
- }
- return obj;
- };
- const goodsColumns: ProColumns[] = [
- {
- title: '商品编号',
- dataIndex: 'id',
- key: 'id',
- render: (text: React.ReactNode, _: any, index: number) => {
- if (index < basicGoods.length) {
- return {text};
- }
- return {
- children: (
-
- 总计
-
- ),
- props: {
- colSpan: 4,
- },
- };
- },
- },
- {
- title: '商品名称',
- dataIndex: 'name',
- key: 'name',
- render: renderContent,
- },
- {
- title: '商品条码',
- dataIndex: 'barcode',
- key: 'barcode',
- render: renderContent,
- },
- {
- title: '单价',
- dataIndex: 'price',
- key: 'price',
- align: 'right' as 'left' | 'right' | 'center',
- render: renderContent,
- },
- {
- title: '数量(件)',
- dataIndex: 'num',
- key: 'num',
- align: 'right' as 'left' | 'right' | 'center',
- render: (text: React.ReactNode, _: any, index: number) => {
- if (index < basicGoods.length) {
- return text;
- }
- return (
-
- {text}
-
- );
- },
- },
- {
- title: '金额',
- dataIndex: 'amount',
- key: 'amount',
- align: 'right' as 'left' | 'right' | 'center',
- render: (text: React.ReactNode, _: any, index: number) => {
- if (index < basicGoods.length) {
- return text;
- }
- return (
-
- {text}
-
- );
- },
- },
- ];
- return (
-
-
-
- 1000000000
- 已取货
- 1234123421
- 3214321432
-
-
-
- 付小小
- 18100000000
- 菜鸟仓储
-
- 浙江省杭州市西湖区万塘路18号
-
- 无
-
-
- 退货商品
-
- 退货进度
-
-
-
- );
-};
-export default Basic;
diff --git a/src/pages/result/fail/index.tsx b/src/pages/result/fail/index.tsx
deleted file mode 100644
index fed1ec75..00000000
--- a/src/pages/result/fail/index.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import { CloseCircleOutlined, RightOutlined } from '@ant-design/icons';
-import { GridContent } from '@ant-design/pro-components';
-import { Button, Card, Result } from 'antd';
-import useStyles from './index.style';
-
-export default () => {
- const { styles } = useStyles();
- const Content = (
- <>
-
- 您提交的内容有如下错误:
-
-
-
- >
- );
- return (
-
-
-
- 返回修改
-
- }
- style={{
- marginTop: 48,
- marginBottom: 16,
- }}
- >
- {Content}
-
-
-
- );
-};
diff --git a/src/pages/result/success/index.tsx b/src/pages/result/success/index.tsx
deleted file mode 100644
index bf45bd09..00000000
--- a/src/pages/result/success/index.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-import { DingdingOutlined } from '@ant-design/icons';
-import { GridContent } from '@ant-design/pro-components';
-import { Button, Card, Descriptions, Result, Steps } from 'antd';
-import useStyles from './index.style';
-
-const { Step } = Steps;
-
-export default () => {
- const { styles } = useStyles();
- const desc1 = (
-
-
- 曲丽丽
-
-
-
2016-12-12 12:32
-
- );
- const desc2 = (
-
- );
- const content = (
- <>
-
- 23421
- 曲丽丽
-
- 2016-12-12 ~ 2017-12-12
-
-
-
-
-
- 创建项目
-
- }
- description={desc1}
- />
-
- 部门初审
-
- }
- description={desc2}
- />
-
- 财务复核
-
- }
- />
-
- 完成
-
- }
- />
-
- >
- );
- const extra = (
- <>
-
-
-
- >
- );
- return (
-
-
-
- {content}
-
-
-
- );
-};
diff --git a/src/pages/user/register/index.tsx b/src/pages/user/register/index.tsx
deleted file mode 100644
index 72f909d1..00000000
--- a/src/pages/user/register/index.tsx
+++ /dev/null
@@ -1,309 +0,0 @@
-import { history, Link, useRequest } from '@umijs/max';
-import {
- Button,
- Col,
- Form,
- Input,
- message,
- Popover,
- Progress,
- Row,
- Select,
- Space,
-} from 'antd';
-import type { Store } from 'antd/es/form/interface';
-import type { FC } from 'react';
-import { useEffect, useState } from 'react';
-import type { StateType } from './service';
-import { fakeRegister } from './service';
-import useStyles from './styles';
-
-const FormItem = Form.Item;
-const { Option } = Select;
-
-const passwordProgressMap: {
- ok: 'success';
- pass: 'normal';
- poor: 'exception';
-} = {
- ok: 'success',
- pass: 'normal',
- poor: 'exception',
-};
-const Register: FC = () => {
- const { styles } = useStyles();
- const [count, setCount]: [number, any] = useState(0);
- const [open, setVisible]: [boolean, any] = useState(false);
- const [prefix, setPrefix]: [string, any] = useState('86');
- const [popover, setPopover]: [boolean, any] = useState(false);
- const confirmDirty = false;
- let interval: number | undefined;
-
- const passwordStatusMap = {
- ok: (
-
- 强度:强
-
- ),
- pass: (
-
- 强度:中
-
- ),
- poor: (
-
- 强度:太短
-
- ),
- };
-
- const [form] = Form.useForm();
- useEffect(
- () => () => {
- clearInterval(interval);
- },
- [interval],
- );
- const onGetCaptcha = () => {
- let counts = 59;
- setCount(counts);
- interval = window.setInterval(() => {
- counts -= 1;
- setCount(counts);
- if (counts === 0) {
- clearInterval(interval);
- }
- }, 1000);
- };
- const getPasswordStatus = () => {
- const value = form.getFieldValue('password');
- if (value && value.length > 9) {
- return 'ok';
- }
- if (value && value.length > 5) {
- return 'pass';
- }
- return 'poor';
- };
- const { loading: submitting, run: register } = useRequest<{
- data: StateType;
- }>(fakeRegister, {
- manual: true,
- onSuccess: (data, params) => {
- if (data.status === 'ok') {
- message.success('注册成功!');
- history.push({
- pathname: `/user/register-result?account=${params[0].email}`,
- });
- }
- },
- });
- const onFinish = (values: Store) => {
- register(values);
- };
- const checkConfirm = (_: any, value: string) => {
- const promise = Promise;
- if (value && value !== form.getFieldValue('password')) {
- return promise.reject('两次输入的密码不匹配!');
- }
- return promise.resolve();
- };
- const checkPassword = (_: any, value: string) => {
- const promise = Promise;
- // 没有值的情况
- if (!value) {
- setVisible(!!value);
- return promise.reject('请输入密码!');
- }
- // 有值的情况
- if (!open) {
- setVisible(!!value);
- }
- setPopover(!popover);
- if (value.length < 6) {
- return promise.reject('');
- }
- if (value && confirmDirty) {
- form.validateFields(['confirm']);
- }
- return promise.resolve();
- };
- const changePrefix = (value: string) => {
- setPrefix(value);
- };
- const renderPasswordProgress = () => {
- const value = form.getFieldValue('password');
- const passwordStatus = getPasswordStatus();
- return value?.length ? (
-
-
- ) : null;
- };
- return (
-
- );
-};
-export default Register;