master
xialiang 3 years ago
parent b9e71699b8
commit aebec36f1c

@ -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',
},
],
},
{

@ -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 自动注入。
<Select defaultValue="0" >
<Select defaultValue="" allowClear={true} >
<Option value="0"></Option>
<Option value="1"></Option>
<Option value="2"></Option>
@ -215,8 +215,8 @@ const CourseList: React.FC = () => {
<a
key="detail"
onClick={() => {
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,

@ -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 = () => {
// </Button>,
// ]}
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 = () => {
>
<BetaSchemaForm<DataItem>
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);

@ -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<string, any>,
) {
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,
});
}

@ -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);
}

@ -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;
}) => (
<Card loading={loading} bordered={false} bodyStyle={{ padding: 0, marginBottom:'24px' }}>
<Card loading={loading} bordered={false} bodyStyle={{ padding: 0, marginBottom: '24px' }}>
<div className={styles.salesCard}>
<Tabs
tabBarExtraContent={
@ -101,10 +94,10 @@ const SalesCard = ({
}}
/>
</div>
</Col>
</Col>
</Row>
</TabPane>
</Tabs>
</div>
</Card>

@ -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,
});
}
/*

Loading…
Cancel
Save