@ -7,11 +7,12 @@ import type { DataItem } from '../data.d';
import { getAsyncOrgTree , getEduUnitList , getExaminationStatistics } from '../service' ;
const { Option } = Select ;
import cookie from 'react-cookies' ;
import styles from '../style.less' ;
import ProForm , { ProFormSelect } from '@ant-design/pro-form' ;
import { useRequest } from 'umi' ;
import { listMyLearningChapterCourse } from "../../../../../../web/src/pages/course/list/service" ;
import { number } from "prop-types" ;
const { RangePicker } = DatePicker ;
const topColResponsiveProps = {
@ -33,7 +34,7 @@ let city_id=0;
let area_id = 0 ;
let school = 0 ;
const IntroduceRow = ( { loading , visitData } : { loading : boolean ; visitData : DataItem [ ] } ) = > {
const [ provinceId , setProvinceId ] = useState ( "100007" )
const [ provinceId , setProvinceId ] = useState ( cookie . load ( 'background_province_id' ) )
const [ cityList , setCityList ] = useState ( [ ] ) ;
const [ areaList , setAreaList ] = useState ( [ ] ) ;
@ -63,7 +64,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat
const { data : examinationData , run } = useRequest ( ( ) = > {
return getExaminationStatistics ( {
bureau_id : school,
bureau_id :typeof ( school) === number ? school :0 ,
city_id :city_id ,
district_id : area_id ,
province_id : provinceId
@ -75,7 +76,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat
result . num = num ;
} else {
const percent = result . credential_person_count / result . apply_person_count ;
const num = percent . toFixed ( 4 ) ;
const num = percent . toFixed ( 2 ) ;
result . num = num ;
}
@ -154,13 +155,22 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat
if ( value >= 'a' && value <= 'z' ) {
return false ;
}
if ( value ) {
if ( value ) {
school = value ;
// console.log('value::', value)
// setOptions([{ORG_NAME:"aaa", ORG_ID:"111"},{ORG_NAME:"aab", ORG_ID:"112"}])
let id = provinceId ;
if ( city_id !== 0 ) {
if ( area_id !== 0 ) {
id = area_id ;
} else {
id = city_id ;
}
}
console . log ( 'iddidididididididi' , id )
const { table_List } = await getEduUnitList ( {
random_num : 277470 ,
area_id : provinceId ,
area_id : id,
edu_type : - 1 ,
// main_school_id: 200125116,
org_name : value ,
@ -291,7 +301,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat
style = { { textAlign : 'center' , marginBottom : 0 , padding :12 , border : 'solid 1px #f0f0f0' } }
bodyStyle = { { padding :0 } }
>
< Progress type = "circle" percent = { examinationData ? . num * 10 0} width = { 80 } strokeWidth = { 10 } style = { { position : 'relative' , margin : '15px auto 0 auto' } } / >
< Progress type = "circle" percent = { examinationData ? parseInt ( examinationData . num * 10 0) : 0} width = { 80 } strokeWidth = { 10 } style = { { position : 'relative' , margin : '15px auto 0 auto' } } / >
< / ChartCard >
< / Col >
< / Row >