diff --git a/admin/src/pages/history/analysis/components/IntroduceRow.tsx b/admin/src/pages/history/analysis/components/IntroduceRow.tsx index 9d36b27..d7885d8 100644 --- a/admin/src/pages/history/analysis/components/IntroduceRow.tsx +++ b/admin/src/pages/history/analysis/components/IntroduceRow.tsx @@ -1,94 +1,157 @@ -import { InfoCircleOutlined } from '@ant-design/icons'; +import { useEffect, useRef, useState } from 'react'; import { TinyArea, TinyColumn } from '@ant-design/charts'; -import { Card, Col, Progress, Row, Tabs, DatePicker } from 'antd'; - +import { Card, Col, Progress, Row, Tabs, DatePicker, Select, Form, Statistic } from 'antd'; import numeral from 'numeral'; import { ChartCard, Field } from './Charts'; import type { DataItem } from '../data.d'; -import Trend from './Trend'; -import Yuan from '../utils/Yuan'; + +import { getAsyncOrgTree } from '../service'; +const { Option } = Select; + import styles from '../style.less'; +import ProForm, { ProFormSelect } from '@ant-design/pro-form'; const { RangePicker } = DatePicker; const topColResponsiveProps = { xs: 24, - sm: 12, - md: 12, - lg: 12, - xl: 12, + sm: 4, + md: 4, + lg: 4, + xl: 4, + offset: 1, style: { marginBottom: 24 }, }; +const cityData = await getAsyncOrgTree({ + org_id: 100025, + org_type: 1, + get_next: 1 +}); +const layout = { + labelCol: { span: 8 }, + wrapperCol: { span: 16 }, +}; + + + + +const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: DataItem[] }) => { + const [cityList, setCityList] = useState([]); + const [areaList, setAreaList] = useState([]); + const [form] = Form.useForm(); + // eslint-disable-next-line react-hooks/exhaustive-deps + useEffect(() => { + setCityList(cityData || []); + }, []); + + + const getAreaData = async (e) => { + // console.log(e, 'eeeeeeeeeeeee2ee'); + const areaData = await getAsyncOrgTree({ + org_id: e, + org_type: 2, + get_next: 1 + }); + form.setFieldsValue({ area: "" }) + // console.log(form.setFieldsValue({ area: "" }), 'form'); + + setAreaList(areaData || []); + + } + + const getSchoolData = async (e) => { + + } + -const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: DataItem[] }) => ( + const onFinish = (values: any) => { + console.log(values); + }; + const onGenderChange = (value: string) => { + // const options = this.state.data.map(d => ); - -
- + + }; + return ( + +
+
- {/* selectDate('today')}> - 今日 - - selectDate('week')}> - 本周 - - selectDate('month')}> - 本月 - - selectDate('year')}> - 本年 - */} + + +
+ + + + + + + + + + + + + + + + + + + + + +
- +
- } - size="large" - tabBarStyle={{ marginBottom: 24 }} - > - - - - + + } + size="large" + tabBarStyle={{ marginBottom: 24 }} + /> +
+ + + + - - - - + + - - - - + + - - - -
+ + ) -); +}; export default IntroduceRow; diff --git a/admin/src/pages/history/analysis/index.tsx b/admin/src/pages/history/analysis/index.tsx index 37a3eb5..22f9b26 100644 --- a/admin/src/pages/history/analysis/index.tsx +++ b/admin/src/pages/history/analysis/index.tsx @@ -129,7 +129,7 @@ const Analysis: FC = () => { - + );