wangxi 3 years ago
commit 789423f8ab

@ -266,7 +266,7 @@ const CourseList: React.FC = () => {
<Upload
accept='.mp4'
action='/dsideal_yy/res/plupload/'
defaultFileList={item.initialValue ? [item.initialValue] : []}
defaultFileList={item.initialValue && console.log('item.initialValue',item.initialValue) ? [item.initialValue] : []}
beforeUpload={async (file) => {
/** 获取视频文件信息 */
const {media: {track:[General, Video, Audio]}} = await getInfo(file)

@ -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;

@ -342,7 +342,7 @@ export default () => {
// value="锦书"
// disabled
/>
{/*主题一旦选择并提交将不支持修改 */}
<ProFormSelect
width="lg"
initialValue={ruleData.subject_id}
@ -360,7 +360,11 @@ export default () => {
rules={[{ required: true, message: '请选择主题' }]}
name="subject_id"
label="关联主题"
disabled={params?.id}
/>
<Row style={{marginBottom:24,marginTop:-7}}>
<Col offset={8} style={{color:'#bfbfbf'}}></Col>
</Row>
<ProFormText addonAfter={`分钟`} name="examination_time" label="考试时间"
initialValue={ruleData.examination_time}
rules={[{ required: true, message: '请输入考试时间' }]}

Loading…
Cancel
Save