Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

video_transcode
caicai8 5 years ago
commit 8eb6535427

@ -1,7 +1,7 @@
/*
* @Description: 添加测试用例
* @Author: tangjiang
* @Github:
* @Github:
* @Date: 2019-11-21 09:19:38
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-27 10:37:41
@ -19,14 +19,14 @@ const AddTestDemo = (props) => {
const {
// key,
// onSubmitTest,
onDeleteTest,
onDeleteTest,
testCase,
testCaseValidate,
isOpen
} = props;
// const [isEditor, setIsEditor] = useState(false); // 是否是编辑
// 删除操作
const handleDeletePanel = (e) => {
// console.log('点击的删除按钮')
@ -63,7 +63,7 @@ const AddTestDemo = (props) => {
const value = e.target.value;
testCaseOutputChange(value, index);
}
// 右侧删除图标
const genExtra = () => (
<Icon
@ -127,7 +127,7 @@ const AddTestDemo = (props) => {
* 文本输入框可编辑的情况
* 1. 新增时
* 2. isAdd false isEditor 为true
* @param {*} testCase
* @param {*} testCase
*/
// const isDisabled = (testCase) => {
// return !testCase.isAdd && !isEditor;
@ -138,21 +138,19 @@ const AddTestDemo = (props) => {
// defaultActiveKey: [isOpen ? '1' : '']
// };
// console.log(activePane);
// 切换手风琴
const handleChangeCollapse = () => {
const {index, updateOpenTestCaseIndex} = props;
updateOpenTestCaseIndex(index);
}
return (
<Collapse className={'collapse_area'} activeKey={isOpen?'1':''} onChange={() => handleChangeCollapse()}>
<Panel header={`测试用例${props.index + 1}`} extra={genExtra()} key="1">
<Form>
<FormItem
label={<span className={'label_text'}>输入</span>}
validateStatus={testCaseValidate.input.validateStatus}
help={testCaseValidate.input.errMsg}
colon={ false }
>
<TextArea
@ -164,8 +162,6 @@ const AddTestDemo = (props) => {
</FormItem>
<FormItem
label={<span className={'label_text'}>输出</span>}
validateStatus={testCaseValidate.output.validateStatus}
help={testCaseValidate.output.errMsg}
colon={ false }
>
<TextArea

@ -1268,7 +1268,8 @@ submittojoinclass=(value)=>{
{shixuntype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训项目</Link></li>}
{pathstype===true?"":<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>{this.props.user&&this.props.user.main_site===false?"我的课程":"我的实践课程"}</Link></li>}
{this.props.user&&this.props.user.main_site===true?<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的开发项目</Link></li>:""}
{ Periofters === true &&<li><Link to ={`/problemset`}>我的题库</Link></li> }
{ Periofters === true &&<li><Link to ={`/problemset`}>我的试题库</Link></li> }
{ Periofters === true &&<li><Link to ={`/paperlibrary`}>我的试卷库</Link></li> }
{/*<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/package`}>我的众包</Link></li>*/}
<li style={{display: this.props.Headertop === undefined ? 'none' : this.props.Headertop.customer_management_url===null || this.props.Headertop.customer_management_url===""? 'none' : 'block'}}>
<a href={this.props.Headertop === undefined ? '' : this.props.Headertop.customer_management_url}>客户管理</a>

@ -26,7 +26,6 @@ import { notification } from "antd";
export const startProgramQuestion = (id, props) => {
return (dispatch, getState) => {
const {searchParams} = getState().ojFormReducer;
console.log(searchParams);
fetchStartProgram(id).then(res => {
const { status, data } = res;
if (status === 200) {
@ -50,7 +49,7 @@ export const startProgramQuestion = (id, props) => {
// console.log(path);
// props.history.push(`/myproblems/${identifier}`);
props.history.push({
pathname: `/myproblems/${identifier}.json?${searchParams}`,
pathname: `/myproblems/${identifier}`,
});
}
}

@ -1,14 +1,14 @@
/*
* @Description: 开发者社区编辑模块
* @Author: tangjiang
* @Github:
* @Github:
* @Date: 2019-11-20 16:35:46
* @LastEditors : tangjiang
* @LastEditTime : 2020-02-11 16:29:32
*/
import types from './actionTypes';
import CONST from '../../constants';
import {
import {
fetchPostOjForm,
fetchGetOjById,
publishTask,
@ -18,7 +18,7 @@ import {
} from '../../services/ojService';
import { Base64 } from 'js-base64';
import { notification } from 'antd';
import { toStore } from 'educoder';
import { toStore } from 'educoder';
// import { startProgramQuestion } from ''
const { jcLabel } = CONST;
// 表单字段映射
@ -124,7 +124,7 @@ export const validateOjForm = (props, type, cb) => {
hasSuccess = false;
dispatch(
{
type: maps[key].type,
type: maps[key].type,
payload: payloadInfo(key, value, errMsg, validateResult[key])
}
)
@ -168,14 +168,14 @@ export const validateOjForm = (props, type, cb) => {
tcValidResult.push(tempObj);
});
if (testCases.length === 0) {
hasSuccess = false;
notification['error']({
message: '提示',
description: '测试用例必须输入!'
});
}
// if (testCases.length === 0) {
// hasSuccess = false;
// notification['error']({
// message: '提示',
// description: '测试用例必须输入!'
// });
// }
// if (!code) {
// hasSuccess = false;
// notification['error']({
@ -300,7 +300,7 @@ export const validateOjForm = (props, type, cb) => {
cb && cb();
} else {
const {identifier} = res.data;
// message.success(paramsObj['submitType'] === 'update' ? '更新成功' : '保存成功');
notification.success({
message: '提示',
@ -311,7 +311,7 @@ export const validateOjForm = (props, type, cb) => {
type: types.SAVE_OJ_FORM_ID,
payload: identifier
});
// console.log(identifier , props.identifier);
if (identifier || props.identifier) {
dispatch(getOJFormById(identifier || props.identifier));
@ -443,7 +443,7 @@ export const saveOjFormCode = (value) => {
payload: value
};
}
// 验证任务名称
// 验证任务名称
export const validateOJName = (value) => {
const validate = emptyValidate('name', value)['name'];
const errMsg = validate.errMsg;
@ -735,9 +735,9 @@ export const saveKnowledge = (values) => {
}
/**
* 新增时跳转到OJ时带的默认参数:
* @param {}} params
* {
* 新增时跳转到OJ时带的默认参数:
* @param {}} params
* {
* difficult: '', // 难易度
* sub_discipline_id: '' // 课程方向
* tag_discipline_id [] 知识点
@ -767,7 +767,7 @@ export const tagDisciplines = (params) => {
}
});
}
}
}
// 保存地址栏参数
export const saveSearchParams = (params) => {

@ -1,7 +1,7 @@
/*
* @Description: 开发者社区接口
* @Author: tangjiang
* @Github:
* @Github:
* @Date: 2019-11-20 10:55:38
* @LastEditors : tangjiang
* @LastEditTime : 2020-01-07 15:23:19
@ -34,7 +34,7 @@ export async function fetchPostOjForm (paramsObj) {
// if (identifier) {
// return axios.post(url, params);
// } else {
// return
// return
// }
return identifier ? axios.put(url, params) : axios.post(url, params);
}
@ -136,7 +136,7 @@ export async function fetchUploadImage (file) {
export async function fetchUploadImageUrl (id) {
const url = `/attachments/${id}`;
return axios.get(url);
}
}
// 添加笔记
export async function fetchAddNotes (identifier, params) {

Loading…
Cancel
Save