diff --git a/admin/config/config.ts b/admin/config/config.ts index 15c9f95..1295306 100644 --- a/admin/config/config.ts +++ b/admin/config/config.ts @@ -208,6 +208,13 @@ export default defineConfig({ path: '/examination/certificate', component: './examination/certificate', }, + { + name: '制证名单', + icon: 'smile', + hideInMenu: true, + path: '/examination/certificate/person/:id', + component: './examination/certificate/person', + }, ], }, { diff --git a/admin/src/pages/examination/certificate/index.tsx b/admin/src/pages/examination/certificate/index.tsx index 90e9f21..a083766 100644 --- a/admin/src/pages/examination/certificate/index.tsx +++ b/admin/src/pages/examination/certificate/index.tsx @@ -1,5 +1,5 @@ import React, { useState, useRef } from 'react'; -import { useRequest } from 'umi'; +import { useRequest, history } from 'umi'; import { PlusOutlined, TagsOutlined, UploadOutlined } from '@ant-design/icons'; import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Select } from 'antd'; import { PageContainer, FooterToolbar } from '@ant-design/pro-layout'; @@ -184,7 +184,7 @@ const CourseList: React.FC = () => { if (status !== 'open') { return ( // value 和 onchange 会通过 form 自动注入。 - @@ -215,8 +215,8 @@ const CourseList: React.FC = () => { { - handleUpdateModalVisible(true); - setCurrentRow(record); + history.push('/examination/certificate/person/' + record.examination_id) + }} > 查看名单 @@ -256,7 +256,11 @@ const CourseList: React.FC = () => { value.start_time = create_time[0] value.end_time = create_time[1] } - const _data = await queryCertificateList(); + const _data = await queryCertificateList({ + ...value, + page_number: value.current, + page_size: value.pageSize + }); return { current: _data?.pageNumber, diff --git a/admin/src/pages/examination/certificate/index copy.tsx b/admin/src/pages/examination/certificate/person.tsx similarity index 80% rename from admin/src/pages/examination/certificate/index copy.tsx rename to admin/src/pages/examination/certificate/person.tsx index a87a405..e22b3a2 100644 --- a/admin/src/pages/examination/certificate/index copy.tsx +++ b/admin/src/pages/examination/certificate/person.tsx @@ -10,7 +10,7 @@ import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions'; import ProDescriptions from '@ant-design/pro-descriptions'; import type { FormValueType } from './components/UpdateForm'; import UpdateForm from './components/UpdateForm'; -import { saveCertificate, removeCertificate, queryCertificateList } from '../service'; +import { saveCertificate, getExaminationPersonApplyList, getAsyncOrgTree } from '../service'; import type { TableListItem, TableListPagination } from '../data'; import type { DataItem } from '@antv/data-set/lib/transform/tag-cloud'; @@ -106,7 +106,66 @@ const CourseList: React.FC = () => { valueType: 'text', hideInTable: false, hideInForm: false, + hideInSearch: true, + }, + { + title: '市', + dataIndex: 'city_id', + valueType: 'select', + hideInTable: false, + hideInForm: false, hideInSearch: false, + request: async () => { + const data = await getAsyncOrgTree({ + org_id: 100025, + org_type: 1, + get_next: 1 + }).then(); + const option = [] + + data?.map((e, i) => { + console.log(e, i); + + option.push({ label: e.name, value: e.id }) + }) + console.log('city:', data); + + // for (let i = 0; i < Items.length; i++) { + // tags.push({ label: Items[i].tag_name, value: Items[i].tag_id }) + // } + return option; + }, + }, + { + title: '区', + dataIndex: 'district_id', + valueType: 'select', + hideInTable: false, + hideInForm: false, + hideInSearch: false, + dependencies: ['city_id'], + request: async (params) => { + console.log(params, 'params::::'); + + const data = await getAsyncOrgTree({ + org_id: params.city_id, + org_type: 2, + get_next: 1 + }).then(); + const option = [] + + data?.map((e, i) => { + console.log(e, i); + + option.push({ label: e.name, value: e.id }) + }) + console.log('area:', data); + + // for (let i = 0; i < Items.length; i++) { + // tags.push({ label: Items[i].tag_name, value: Items[i].tag_id }) + // } + return option; + }, }, { title: '创建日期', @@ -259,20 +318,24 @@ const CourseList: React.FC = () => { // , // ]} request={async (value) => { - console.log(value, 'form value') - const { create_time } = value; - if (create_time) { - value.start_time = create_time[0] - value.end_time = create_time[1] - } - const _data = await queryCertificateList(); + // console.log(value, 'form value') + // const { create_time } = value; + // if (create_time) { + // value.start_time = create_time[0] + // value.end_time = create_time[1] + // } + // const _data = await getExaminationPersonApplyList({ + // ...value, + // page_number: value.current, + // page_size: value.pageSize + // }); - return { - current: _data?.pageNumber, - data: _data?.table_List, - pageSize: _data?.pageSize, - total: _data?.totalRow || 0, - }; + // return { + // current: _data?.pageNumber, + // data: _data?.table_List, + // pageSize: _data?.pageSize, + // total: _data?.totalRow || 0, + // }; }} // dataSource={list} columns={columns} @@ -350,9 +413,18 @@ const CourseList: React.FC = () => { > layout="horizontal" + // form={schemaForm} layoutType="Form" labelCol={{ span: 8 }} wrapperCol={{ span: 12 }} + // onValuesChange={(values: any) => { + // console.log('values:', values); + // const { city_id } = values + // if (city_id) { + // schemaForm.setFieldsValue({ district_id: "" }) + // } + // }} + onFinish={async (values: any) => { // 表单处理 console.log('columns:', columns); diff --git a/admin/src/pages/examination/service.ts b/admin/src/pages/examination/service.ts index db0f983..8a5f0c3 100644 --- a/admin/src/pages/examination/service.ts +++ b/admin/src/pages/examination/service.ts @@ -168,4 +168,51 @@ export async function queryRulesList( }, ...(options || {}), }); +} + + +/** 获取考试规则列表 GET /dsideal_yy/zygh/training/examination/getExaminationList */ +export async function getExaminationPersonApplyList( + params: { + /** 当前的页码 */ + current?: number; + /** 页面的容量 */ + pageSize?: number; + rules_type?: number, + subject_id?: number, + }, + options?: Record, +) { + return request<{ + data: TableListItem[]; + /** 列表的内容总数 */ + total_row?: number; + /** 页面的容量 */ + page_size?: number; + success?: boolean; + }>('/dsideal_yy/zygh/training/person/getExaminationPersonApplyList', { + method: 'GET', + params: { + ...params, + + }, + ...(options || {}), + }); +} + + + +/** + * 获取省市区 + * http://10.10.14.252:8080/workspace/myWorkspace.do?projectId=382#6426 + * @param params + * @returns + */ +export async function getAsyncOrgTree(params: { + page_size: number; + //count: number; +}): Promise<{ data: { list: CardListItemDataType[] } }> { + return request('dsideal_yy/org/getAsyncOrgTree', { + params, + }); } \ No newline at end of file diff --git a/admin/src/pages/history/analysis/components/IntroduceRow.tsx b/admin/src/pages/history/analysis/components/IntroduceRow.tsx index d7885d8..434504b 100644 --- a/admin/src/pages/history/analysis/components/IntroduceRow.tsx +++ b/admin/src/pages/history/analysis/components/IntroduceRow.tsx @@ -5,7 +5,7 @@ import numeral from 'numeral'; import { ChartCard, Field } from './Charts'; import type { DataItem } from '../data.d'; -import { getAsyncOrgTree } from '../service'; +import { getAsyncOrgTree, getMainBranchSchool } from '../service'; const { Option } = Select; import styles from '../style.less'; @@ -58,6 +58,12 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat } const getSchoolData = async (e) => { + // const areaData = await getAsyncOrgTree({ + // org_id: e, + // org_type: 2, + // get_next: 1 + // }); + console.log(areaData); } diff --git a/admin/src/pages/history/analysis/components/TrainCard.tsx b/admin/src/pages/history/analysis/components/TrainCard.tsx index 082869c..3569e71 100644 --- a/admin/src/pages/history/analysis/components/TrainCard.tsx +++ b/admin/src/pages/history/analysis/components/TrainCard.tsx @@ -13,13 +13,6 @@ export type TimeType = 'today' | 'week' | 'month' | 'year'; const { RangePicker } = DatePicker; const { TabPane } = Tabs; -const rankingListData: { title: string; total: number }[] = []; -for (let i = 0; i < 7; i += 1) { - rankingListData.push({ - title: `工专路 ${i} 号店`, - total: 323234, - }); -} const SalesCard = ({ rangePickerValue, @@ -36,7 +29,7 @@ const SalesCard = ({ handleRangePickerChange: (dates: RangePickerValue, dateStrings: [string, string]) => void; selectDate: (key: TimeType) => void; }) => ( - +
- + - +
diff --git a/admin/src/pages/history/analysis/service.ts b/admin/src/pages/history/analysis/service.ts index a28fbf0..f07cf0f 100644 --- a/admin/src/pages/history/analysis/service.ts +++ b/admin/src/pages/history/analysis/service.ts @@ -36,7 +36,7 @@ export async function fakeChartData(): Promise<{ data: AnalysisData }> { /** - * 获取主题列表 + * 获取省市区 * http://10.10.14.252:8080/workspace/myWorkspace.do?projectId=382#6426 * @param params * @returns @@ -51,6 +51,21 @@ export async function getAsyncOrgTree(params: { } +/** + * 获取学校列表 + * /dsideal_yy/admin/new_base/getMainBranchSchool + * @param params + * @returns + */ +export async function getMainBranchSchool(params: { + page_size: number; + //count: number; +}): Promise<{ data: { list: CardListItemDataType[] } }> { + return request('/dsideal_yy/admin/new_base/getMainBranchSchool', { + params, + }); +} + /* 获取云南省所有市列表: