zhengpengju 3 years ago
commit a9568b1950

@ -176,7 +176,12 @@ const CourseList: React.FC = () => {
hideInTable: true,
hideInForm: false,
hideInSearch: true,
renderText: (val: string) => `${val} 分钟`,
render: (text: React.ReactNode, _: any, index: number) => {
return(
<div>{text}</div>
)
},
// renderText: (val: string) => `${val} 分钟`,
formItemProps: {
// 参照 https://ant.design/components/form-cn/#Rule
rules: [
@ -277,7 +282,7 @@ const CourseList: React.FC = () => {
maxCount={1}
multiple={false}
file={()=>{
// location.pathname
// location.pathname
}}
>
<Button icon={<UploadOutlined />}></Button>
@ -626,13 +631,14 @@ const CourseList: React.FC = () => {
//const url = values?.upload[0]?.url?.replace('/dsideal_yy/html/','') || values?.upload[0]?.response?.url;
//console.log('url', url)
console.log('values编辑',values)
await handleUpdate({
...values,
attachment_filesize: attachment_json?.size || 0, // Bit 字节
course_id: currentRow?.course_id,
attachment_json: `{"img":"", "name":"${values.attachment_json.file.name}", "url": "${values.attachment_json?.url}", "size": "${values.attachment_json?.size}"}`
});
await handleUpdate({
...values,
attachment_json: `{"img":"", "name": "${values.attachment_json.file.name}", "url": "down/Syzx/${uuid?.substr(0, 2)}/${uuid}.mp4"}`,
attachment_filesize: values.attachment_json?.size || 0, // Bit 字节
course_id: currentRow?.course_id,
// attachment_json:JSON.stringify(values.attachment_json)
// attachment_json: `{"img":"", "name":"${values.attachment_json.file.name}", "url": "${values.attachment_json?.url}", "size": "${values.attachment_json?.size}"}`
});
handleUpdateModalVisible(false); // 隐藏编辑窗口
actionRef.current?.reloadAndRest?.();
console.log(values);

@ -72,9 +72,9 @@ const TableList: React.FC = () => {
</Button>,
]}
request={async (value) => {
console.log(value, "value11")
const _data = await getExaminationPersonStatistics({ ...value, current: value.page_number, sort_type: 2, sort_colum: 1 });
request={async (params) => {
const _data = await getExaminationPersonStatistics({ page_number:params.current, page_size:20,sort_type: 2, sort_colum: 1 });
return {
data: _data?.table_List,
};

@ -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*100} width={80} strokeWidth={10} style={{ position: 'relative', margin: '15px auto 0 auto' }} />
<Progress type="circle" percent={examinationData?parseInt(examinationData.num*100):0} width={80} strokeWidth={10} style={{ position: 'relative', margin: '15px auto 0 auto' }} />
</ChartCard>
</Col>
</Row>

@ -32,7 +32,7 @@ const SalesCard = () => {
data.push({
city: e.city_name,
count: e.count,
credential_rate: e.credential_rate
credential_rate: e.credential_rate?e.credential_rate:0
})
})
@ -48,7 +48,40 @@ const SalesCard = () => {
title: {
text: '证书比例',
},
label: {
formatter: (val) => `${val}%`,
},
}],
tooltip: {
customContent: (title, items) => {
return (
<>
<h5 style={{ marginTop: 16 }}>{title}</h5>
<ul style={{ paddingLeft: 0 }}>
{items?.map((item, index) => {
const { name, value, color } = item;
return (
<li
key={item.year}
className="g2-tooltip-list-item"
data-index={index}
style={{ marginBottom: 4, display: 'flex', alignItems: 'center' }}
>
<span className="g2-tooltip-marker" style={{ backgroundColor: color }}></span>
<span
style={{ display: 'inline-flex', flex: 1, justifyContent: 'space-between' }}
>
<span style={{ margiRight: 16 }}>{name}:&nbsp;&nbsp;&nbsp;</span>
<span className="g2-tooltip-list-item-value">{value}{index===0?'':'%'}</span>
</span>
</li>
);
})}
</ul>
</>
);
},
},
geometryOptions: [
{
geometry: 'column',
@ -81,7 +114,7 @@ const SalesCard = () => {
<TabPane tab="各市州资质证书情况" key="train">
<Row>
<Col xl={24} lg={24} md={24} sm={24} xs={24}>
<div className={styles.salesBar}>
<div className={styles.salesBar} style={{marginRight:'2rem'}}>
<DualAxes {...config} />
</div>

Loading…
Cancel
Save