|
|
|
@ -12,7 +12,7 @@ import { Button, message } from 'antd';
|
|
|
|
|
import { forwardRef, ReactText, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
|
|
|
|
//import { PlusOutlined, DeleteOutlined, DownloadOutlined, UploadOutlined, EditOutlined, EyeOutlined, EyeInvisibleOutlined, DownOutlined } from '@ant-design/icons';
|
|
|
|
|
import { useParams, useRequest, history, useRouteMatch } from 'umi';
|
|
|
|
|
import { queryCourseView, queryTagList } from '@/pages/course/option/service';
|
|
|
|
|
import { queryCourseListByTag, queryCourseView, queryTagList } from '@/pages/course/option/service';
|
|
|
|
|
import { queryQuestionList, queryQuestionType } from '@/pages/questionbank/service';
|
|
|
|
|
//import ProForm, { ProFormSelect } from '@ant-design/pro-form';
|
|
|
|
|
import type { ActionType, ProColumns } from '@ant-design/pro-table';
|
|
|
|
@ -73,7 +73,7 @@ const QuestionSelector = (props: any, ref: any) => {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '标签',
|
|
|
|
|
dataIndex: 'tag',
|
|
|
|
|
dataIndex: 'tag_ids',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
hideInTable: true,
|
|
|
|
|
hideInForm: true,
|
|
|
|
@ -91,6 +91,17 @@ const QuestionSelector = (props: any, ref: any) => {
|
|
|
|
|
title: '课程',
|
|
|
|
|
dataIndex: 'course',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
dependencies: ['tag_ids'],
|
|
|
|
|
request: async (arr) => {
|
|
|
|
|
// console.log('arr',arr)
|
|
|
|
|
// const {tags} = arr;
|
|
|
|
|
const { data: Items } = await queryCourseListByTag({ tag_ids: arr?.tag_ids?.toString() });
|
|
|
|
|
const courses = []
|
|
|
|
|
for (let i = 0; i < Items?.length; i++) {
|
|
|
|
|
courses.push({ label: Items[i]?.course_name, value: Items[i]?.course_id })
|
|
|
|
|
}
|
|
|
|
|
return courses;
|
|
|
|
|
},
|
|
|
|
|
hideInTable: true,
|
|
|
|
|
hideInForm: true,
|
|
|
|
|
hideInSearch: false,
|
|
|
|
|