|
|
|
@ -49,7 +49,8 @@ const AutoSelector = (props: any, ref: any) => {
|
|
|
|
|
|
|
|
|
|
const match = useRouteMatch();
|
|
|
|
|
console.log('match', match);
|
|
|
|
|
|
|
|
|
|
const params = useParams();
|
|
|
|
|
console.log('params::',params)
|
|
|
|
|
//const type = history.location.pathname === '/questionbank/attestation' ? 1 : 0 ; // 题库类型
|
|
|
|
|
//const [questionType, setQuestionType] = useState([]);
|
|
|
|
|
//const [selectedRowsState, setSelectedRows] = useState<API.RuleListItem[]>([]);
|
|
|
|
@ -57,7 +58,7 @@ const AutoSelector = (props: any, ref: any) => {
|
|
|
|
|
|
|
|
|
|
/** 获取常规题库试题数量 */
|
|
|
|
|
const { data: normalSum } = useRequest(()=>{
|
|
|
|
|
return queryQuestionList({page_number: 1, page_size: 1, type: 0})
|
|
|
|
|
return queryQuestionList({subject_id: params?.id, page_number: 1, page_size: 1, type: 0})
|
|
|
|
|
},{
|
|
|
|
|
formatResult: (result) => {
|
|
|
|
|
return result.totalRow;
|
|
|
|
@ -66,7 +67,7 @@ const AutoSelector = (props: any, ref: any) => {
|
|
|
|
|
|
|
|
|
|
/** 获取资质考试题库试题数量 */
|
|
|
|
|
const { data: attestationSum } = useRequest(()=>{
|
|
|
|
|
return queryQuestionList({page_number: 1, page_size: 1, type: 1})
|
|
|
|
|
return queryQuestionList({subject_id: params?.id, page_number: 1, page_size: 1, type: 1})
|
|
|
|
|
},{
|
|
|
|
|
formatResult: (result) => {
|
|
|
|
|
return result.totalRow;
|
|
|
|
|