Compare commits

...

2 Commits

Author SHA1 Message Date
zhengpengju 61ca75728b fix
3 years ago
zhengpengju 4096d17e93 fix
3 years ago

@ -40,7 +40,7 @@ export type TableListItem = {
// 资质考试自动组卷
// React.forwardRef 接受渲染函数作为参数。React 将使用 props 和 ref 作为参数来调用此函数。此函数应返回 React 节点。
const AutoSelector = (props: any, ref: any) => {
const { questionType } = props;
const { questionType, ruleData } = props;
// const actionRef = useRef<ActionType>();
const [questionCount, setQuestionCount] = useState([50,50]) // 题库抽取数量
@ -60,7 +60,7 @@ const AutoSelector = (props: any, ref: any) => {
/** 获取常规题库试题数量 */
const { data: normalSum } = useRequest(()=>{
return queryQuestionWithoutList({subject_id: params?.id, page_number: 1, page_size: 1, type: 0})
return queryQuestionWithoutList({rules_id:ruleData?.id, subject_id: ruleData?.subject_id, page_number: 1, page_size: 1, type: 0})
},{
formatResult: (result) => {
return result.totalRow;
@ -69,7 +69,7 @@ const AutoSelector = (props: any, ref: any) => {
/** 获取资质考试题库试题数量 */
const { data: attestationSum } = useRequest(()=>{
return queryQuestionWithoutList({subject_id: params?.id, page_number: 1, page_size: 1, type: 1})
return queryQuestionWithoutList({rules_id:ruleData?.id, subject_id: ruleData?.subject_id, page_number: 1, page_size: 1, type: 1})
},{
formatResult: (result) => {
return result.totalRow;

@ -495,6 +495,7 @@ const QuestionBank = () => {
//dataSource={dataSource}
rowSelection={{
onChange: (_, selectedRows) => {
setSelectedRows(selectedRows);
},
}}

Loading…
Cancel
Save