diff --git a/admin/src/pages/examinationrules/components/QuestionSelector.tsx b/admin/src/pages/examinationrules/components/QuestionSelector.tsx index 1f5c651..dfa97ad 100644 --- a/admin/src/pages/examinationrules/components/QuestionSelector.tsx +++ b/admin/src/pages/examinationrules/components/QuestionSelector.tsx @@ -12,7 +12,7 @@ import styles from '../style.less'; 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 } from '@/pages/course/option/service'; +import { 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'; @@ -78,6 +78,14 @@ const QuestionSelector = (props: any, ref: any) => { hideInTable: true, hideInForm: true, hideInSearch: false, + request: async () => { + const { data: Items } = await queryTagList({}); + const tags = [] + for (let i = 0; i < Items.length; i++) { + tags.push({ label: Items[i].tag_name, value: Items[i].tag_id }) + } + return tags; + }, }, { title: '课程', diff --git a/admin/src/pages/examinationrules/normal/step/index.tsx b/admin/src/pages/examinationrules/normal/step/index.tsx index 4bb6c38..6a75724 100644 --- a/admin/src/pages/examinationrules/normal/step/index.tsx +++ b/admin/src/pages/examinationrules/normal/step/index.tsx @@ -5,7 +5,7 @@ import { ModalForm } from '@ant-design/pro-form'; import { ProFormRadio } from '@ant-design/pro-form'; import ProForm, {StepsForm, ProFormText, ProFormDatePicker, ProFormSelect, ProFormTextArea, ProFormCheckbox, ProFormDateRangePicker,} from '@ant-design/pro-form'; import ProCard from '@ant-design/pro-card'; -import { Button, Checkbox, Col, Divider, Dropdown, Form, Input, List, Menu, message, Modal, Radio, Row, Space, Table, Typography, Upload, Empty } from 'antd'; +import { Button, Checkbox, Col, Divider, Dropdown, Form, Input, List, Menu, message, Modal, Radio, Row, Space, Table, Typography, Upload, Empty, Tooltip } from 'antd'; import { PageContainer } from '@ant-design/pro-layout'; import ProDescriptions from '@ant-design/pro-descriptions'; import styles from './index.less' @@ -470,12 +470,14 @@ export default () => { console.log('typeQuestionCount', typeQuestionCount); handleScoreModalVisible(true) }}>批量设置分值 - + 请选择试题组卷并设置分值后保存} placement="bottom" visible={questions ? false : true} color='#108ee9'> + + diff --git a/admin/src/pages/questionbank/index.tsx b/admin/src/pages/questionbank/index.tsx index f2949bb..c0b4d38 100644 --- a/admin/src/pages/questionbank/index.tsx +++ b/admin/src/pages/questionbank/index.tsx @@ -169,7 +169,7 @@ const QuestionBank = () => { rules: [ { required: true, - message: '请填选择课程', + message: '请选择课程', }, ] }, @@ -199,7 +199,7 @@ const QuestionBank = () => { rules: [ { required: true, - message: '请填题干内容', + message: '请填写题干内容', }, ] }, @@ -337,6 +337,7 @@ const QuestionBank = () => { return ( + style={{minWidth:1180}} rowKey='id' itemLayout="vertical" actionRef={actionRef} @@ -385,7 +386,8 @@ const QuestionBank = () => { // handleModalVisible(false); if (actionRef.current) { setSelectedRows([]); - actionRef.current?.reload(); + actionRef.current?.reloadAndRest(); + } } }else{ @@ -611,7 +613,7 @@ const QuestionBank = () => { // handleModalVisible(false); if (actionRef.current) { setSelectedRows([]); - actionRef.current?.reload(); + actionRef.current?.reloadAndRest(); } } }} @@ -710,12 +712,18 @@ const QuestionBank = () => { search: true, dataIndex: 'question_stem', valueType: 'text', + fieldProps: { + placeholder:'请输入关键字' + }, }, create_time: { title: '创建时间', search: true, dataIndex: 'create_time', valueType: 'dateRange', + fieldProps: { + placeholder:['开始时间','结束时间'] + }, }, }} /> @@ -764,9 +772,7 @@ const QuestionBank = () => { // 表单处理 console.log('columns:', columns); - console.log('values:', values); - - return false + console.log('values:', values); const opts = []; values?.answers?.forEach((item, key)=>{ //