Merge branches 'dev_new_shixunsrepository' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_new_shixunsrepository

dev_new_shixunsrepository
杨树明 5 years ago
commit 04ddbef336

@ -42,14 +42,14 @@ if (isDev) {
// 老师 // 老师
//debugType="teacher"; //debugType="teacher";
// 学生 // 学生
debugType="student"; //debugType="student";
function railsgettimes(proxy) { function railsgettimes(proxy) {
if(timestamp&&checkSubmitFlg===false){ if(timestamp&&checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){ $.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){ if(data.status===0){
timestamp=data.data.t; timestamp=data.message;
} }
}}) }})
checkSubmitFlg=true checkSubmitFlg=true
@ -59,7 +59,7 @@ debugType="student";
}else if(checkSubmitFlg===false){ }else if(checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){ $.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){ if(data.status===0){
timestamp=data.data.t; timestamp=data.message;
} }
}}) }})
checkSubmitFlg=true checkSubmitFlg=true
@ -127,7 +127,8 @@ export function initAxiosInterceptors(props) {
if (window.location.port === "3007") { if (window.location.port === "3007") {
// let timestamp=railsgettimes(proxy); // let timestamp=railsgettimes(proxy);
// console.log(timestamp) // console.log(timestamp)
railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`); // `https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`
railsgettimes( `${proxy}/api/main/first_stamp.json`);
let newopens=md5(opens+timestamp) let newopens=md5(opens+timestamp)
config.url = `${proxy}${url}`; config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {
@ -137,7 +138,9 @@ export function initAxiosInterceptors(props) {
} }
} else { } else {
// 加api前缀 // 加api前缀
railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`); // railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
railsgettimes( `/api/main/first_stamp.json`);
let newopens=md5(opens+timestamp) let newopens=md5(opens+timestamp)
config.url = url; config.url = url;
if (config.url.indexOf('?') == -1) { if (config.url.indexOf('?') == -1) {

@ -79,20 +79,26 @@ let newtimestamp;
let checkSubmitFlgs = false; let checkSubmitFlgs = false;
function railsgettimess(proxy) { function railsgettimess(proxy) {
if(checkSubmitFlgs===false){ if(checkSubmitFlgs===false){
$.ajax({url:proxy,async:false,success:function(data){ $.ajax({url:proxy,
async:false,success:function(data){
if(data.status===0){ if(data.status===0){
newtimestamp=data.data.t; newtimestamp=data.message;
checkSubmitFlgs = true;
} }
}}) }})
checkSubmitFlgs=true
window.setTimeout(function () { window.setTimeout(function () {
checkSubmitFlgs=false; checkSubmitFlgs=false;
}, 2500); }, 2500);
} }
} }
export function Railsgettimes() { export function Railsgettimes() {
railsgettimess(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`); railsgettimess(`${getUrl()}/api/main/first_stamp.json`);
// railsgettimess(`https://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
} }
export function getUploadActionUrl(path, goTest) { export function getUploadActionUrl(path, goTest) {
@ -127,7 +133,7 @@ export function getUploadActionUrlOfAuth(id) {
} }
export function getRandomNumber(type) { export function getRandomNumber(type) {
Railsgettimes() Railsgettimes()
let anewopens=md5(newopens+newtimestamp); let anewopens=md5(newopens+newtimestamp);
return type===true?`randomcode=${newtimestamp}&client_key=${anewopens}`:`?randomcode=${newtimestamp}&client_key=${anewopens}` return type===true?`randomcode=${newtimestamp}&client_key=${anewopens}`:`?randomcode=${newtimestamp}&client_key=${anewopens}`
} }

@ -1,5 +1,5 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import { ConditionToolTip } from 'educoder' import { ConditionToolTip,getRandomNumber } from 'educoder'
class AttachmentsList extends Component{ class AttachmentsList extends Component{
constructor(props){ constructor(props){
@ -15,9 +15,9 @@ class AttachmentsList extends Component{
<p key={key} className="clearfix mb3"> <p key={key} className="clearfix mb3">
<a className="color-grey fl"> <a className="color-grey fl">
<i className="font-14 color-green iconfont icon-fujian mr8"></i> <i className="font-14 color-green iconfont icon-fujian mr8"></i>
</a> </a>
<ConditionToolTip title={item.title} condition={item.title && item.title.length > 30 }> <ConditionToolTip title={item.title} condition={item.title && item.title.length > 30 }>
<a href={item.url} className="mr12 fl task-hide" length="58" target={ item.is_pdf && item.is_pdf == true ? "_blank" : "_self" } style={{"maxWidth":"432px"}}>{item.title}</a> <a href={item.url+getRandomNumber()} className="mr12 fl task-hide" length="58" target={ item.is_pdf && item.is_pdf == true ? "_blank" : "_self" } style={{"maxWidth":"432px"}}>{item.title}</a>
</ConditionToolTip> </ConditionToolTip>
<span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span> <span className="color-grey mt2 color-grey-6 font-12">{item.filesize}</span>
</p> </p>

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd'; import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd';
import {markdownToHTML,getImageUrl} from 'educoder'; import {markdownToHTML,getImageUrl,getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
const { Content } = Layout; const { Content } = Layout;
@ -69,7 +69,7 @@ class CompetitionContents extends Component{
const operations = <div> const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button> <Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<Button className={"fr mr20"} type="primary" ghost> <Button className={"fr mr20"} type="primary" ghost>
<a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a> <a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx?${getRandomNumber(true)}`)}>导出</a>
</Button> </Button>
</div> </div>
const columns = [ const columns = [

@ -1,10 +1,10 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { SnackbarHOC } from 'educoder'; import { getRandomNumber } from 'educoder';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
import Loading from '../../../Loading'; import Loading from '../../../Loading';
import { WordsBtn, MarkdownToHtml, trigger, queryString, downloadFile } from 'educoder'; import { WordsBtn, MarkdownToHtml, trigger, queryString, getRandomcode } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import AccessoryModal from "../coursesPublic/AccessoryModal"; import AccessoryModal from "../coursesPublic/AccessoryModal";
@ -125,7 +125,7 @@ class CommonWorkDetailIndex extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// this.setState({ donwloading: true }) // this.setState({ donwloading: true })
@ -206,7 +206,7 @@ class CommonWorkDetailIndex extends Component{
} }
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
let exportParams = {} let exportParams = {}
const isListModule = childModuleName == '作品列表'; const isListModule = childModuleName == '作品列表';
// 是列表页 // 是列表页
@ -221,10 +221,10 @@ class CommonWorkDetailIndex extends Component{
// console.log(params); // console.log(params);
let exportUrl = `/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}` let exportUrl = `/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`
let exportResultUrl = `/homework_commons/${workId}/works_list.xlsx?${queryString.stringify(params)}` let exportResultUrl = `/homework_commons/${workId}/works_list.xlsx?${queryString.stringify(params)}`
document.title=course_name === undefined ? "" : course_name; document.title=course_name === undefined ? "" : course_name;
return ( return (
<div> <div>
<PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]} <PublishRightnow ref={this.publishModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={true} doWhenSuccess={this.doWhenSuccess} checkBeforePost={this.saveWorkSetting} isPublish={true} doWhenSuccess={this.doWhenSuccess} checkBeforePost={this.saveWorkSetting}
onToPublishClick={this.onToPublishClick} onToPublishClick={this.onToPublishClick}
></PublishRightnow> ></PublishRightnow>
@ -234,8 +234,8 @@ class CommonWorkDetailIndex extends Component{
modalCancel={this.Downloadcal} modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType} modalsType={this.state.DownloadType}
/> />
<PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]} <PublishRightnow ref={this.endModal} showActionButton={false} {...this.props} checkBoxValues={[workId]}
isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow> isPublish={false} doWhenSuccess={this.doWhenSuccess}></PublishRightnow>
<div className="newMain clearfix worklist1"> <div className="newMain clearfix worklist1">
@ -266,7 +266,7 @@ class CommonWorkDetailIndex extends Component{
typelist={homework_status} typelist={homework_status}
typesylename={"mt12"} typesylename={"mt12"}
/> />
{category && <a className="color-grey-6 fr font-16 ml30 mt5 mr20" onClick={this.goback} style={{ marginRight: '26px'}}>返回</a>} {category && <a className="color-grey-6 fr font-16 ml30 mt5 mr20" onClick={this.goback} style={{ marginRight: '26px'}}>返回</a>}
@ -293,24 +293,24 @@ class CommonWorkDetailIndex extends Component{
{ noTab !== true && <div className="stud-class-set bor-bottom-greyE floatSpinParent"> { noTab !== true && <div className="stud-class-set bor-bottom-greyE floatSpinParent">
<div className="mt10 clearfix edu-back-white poll_list pl5"> <div className="mt10 clearfix edu-back-white poll_list pl5">
<Link <Link
onClick={() => this.setState({moduleName: '作品列表'})} onClick={() => this.setState({moduleName: '作品列表'})}
className={`${isListModule ? 'active' : '' } `} className={`${isListModule ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link> to={`/courses/${courseId}/${moduleEngName}/${workId}/list`}>作品列表</Link>
<Link <Link
onClick={() => this.setState({moduleName: '作业描述'})} onClick={() => this.setState({moduleName: '作业描述'})}
className={`${childModuleName == '作业描述' ? 'active' : '' } `} className={`${childModuleName == '作业描述' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link> to={`/courses/${courseId}/${moduleEngName}/${workId}/question`}>作业描述</Link>
{view_answer == true && <Link {view_answer == true && <Link
onClick={() => this.setState({moduleName: '参考答案'})} onClick={() => this.setState({moduleName: '参考答案'})}
className={`${childModuleName == '参考答案' ? 'active' : '' } `} className={`${childModuleName == '参考答案' ? 'active' : '' } `}
to={`/courses/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>} to={`/courses/${courseId}/${moduleEngName}/${workId}/answer`}>参考答案</Link>}
<Link <Link
onClick={() => this.setState({moduleName: '设置'})} onClick={() => this.setState({moduleName: '设置'})}
className={`${childModuleName == '设置' ? 'active' : '' } `} className={`${childModuleName == '设置' ? 'active' : '' } `}
style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}} style={{paddingLeft:this.props.isAdmin()?'38px':'20px'}}
to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"}</Link> to={`/courses/${courseId}/${moduleEngName}/${workId}/setting`}>{this.props.isAdmin()?"设置":"得分规则"}</Link>
{/* { this.props.tabRightComponents } */} {/* { this.props.tabRightComponents } */}
<React.Fragment> <React.Fragment>
@ -365,16 +365,16 @@ class CommonWorkDetailIndex extends Component{
{isAdmin && <a className={"fr color-blue font-16"} onClick={() => this.props.toEditPage(this.props.match.params, workId)}>编辑作业</a>} {isAdmin && <a className={"fr color-blue font-16"} onClick={() => this.props.toEditPage(this.props.match.params, workId)}>编辑作业</a>}
{ // { //
work_statuses && work_statuses.indexOf('关联项目') != -1 && work_statuses && work_statuses.indexOf('关联项目') != -1 &&
<React.Fragment> <React.Fragment>
<ConnectProject ref="connectProject" {...this.props} connectSuccess={this.connectSuccess}></ConnectProject> <ConnectProject ref="connectProject" {...this.props} connectSuccess={this.connectSuccess}></ConnectProject>
<WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.openConnectionProject({ homework_id: workId })}>关联项目</WordsBtn> <WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.openConnectionProject({ homework_id: workId })}>关联项目</WordsBtn>
<WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.props.toCreateProject()}>创建项目</WordsBtn> <WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.props.toCreateProject()}>创建项目</WordsBtn>
</React.Fragment> </React.Fragment>
} }
{ // { //
work_statuses && work_statuses.indexOf('取消关联') != -1 && work_statuses && work_statuses.indexOf('取消关联') != -1 &&
<WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.cancelConnectionProject( {homework_id: workId} )}>取消关联</WordsBtn> <WordsBtn style="blue" className={` font-16 fr`} onClick={() => this.cancelConnectionProject( {homework_id: workId} )}>取消关联</WordsBtn>
} }
@ -390,7 +390,7 @@ class CommonWorkDetailIndex extends Component{
{work_statuses && work_statuses.indexOf('修改作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"} {work_statuses && work_statuses.indexOf('修改作品') != -1 && <a className={"fr color-blue font-16"} href={"javascript:void(0)"}
onClick={() => { this.props.toWorkPostPage(this.props.match.params, null, true, work_id)}} onClick={() => { this.props.toWorkPostPage(this.props.match.params, null, true, work_id)}}
>修改作品</a>} >修改作品</a>}
{work_statuses && work_statuses.indexOf('补交附件') != -1 && {work_statuses && work_statuses.indexOf('补交附件') != -1 &&
<React.Fragment> <React.Fragment>
<AccessoryModal <AccessoryModal
{...this.props} {...this.props}
@ -406,7 +406,7 @@ class CommonWorkDetailIndex extends Component{
onClick={this.addAccessory} onClick={this.addAccessory}
>补交附件</a> >补交附件</a>
</React.Fragment> </React.Fragment>
} }
</React.Fragment> </React.Fragment>
@ -415,7 +415,7 @@ class CommonWorkDetailIndex extends Component{
{/* 内容区 */} {/* 内容区 */}
<Switch {...this.props}> <Switch {...this.props}>
{/* --------------------------------------------------------------------- */} {/* --------------------------------------------------------------------- */}
{/* 作业设置 */} {/* 作业设置 */}
@ -474,7 +474,7 @@ class CommonWorkDetailIndex extends Component{
</div> </div>
</div> </div>
</div> </div>
) )
} }
} }

@ -978,10 +978,8 @@ class CommonWorkSetting extends Component{
let exportUrl = `/api/homework_commons/${workId}/works_list.zip` let exportUrl = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx` const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx`
const noAuth = !isAdmin || !startEditFlag; const noAuth = !isAdmin || !startEditFlag;
return(
return(
<React.Fragment> <React.Fragment>
<Modals <Modals
modalsType={Modalstype} modalsType={Modalstype}
@ -1222,7 +1220,7 @@ class CommonWorkSetting extends Component{
<Checkbox className="ml30" checked={anonymous_comment} onChange={this.anonymous_comment_change} <Checkbox className="ml30" checked={anonymous_comment} onChange={this.anonymous_comment_change}
disabled={noAuth || moment(init_evaluation_start) < moment()} disabled={noAuth || moment(init_evaluation_start) < moment()}
>启用匿评</Checkbox> >启用匿评</Checkbox>
<span className={"font-14 color-grey-9"}>作品数量2可以开启匿评</span> <span className={"font-14 color-grey-9"}>{this.state.category&&this.state.category.category_name==="普通作业"?"作品数量≥2个可以开启匿评":"提交作品的分组数量≥2个可以开启匿评"}</span>
</div> </div>
{/* 开启时间 */} {/* 开启时间 */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>

@ -1,7 +1,7 @@
import React,{Component} from "react"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn, MarkdownToHtml } from 'educoder'; import { WordsBtn, getRandomcode } from 'educoder';
import axios from 'axios'; import axios from 'axios';
import PublishRightnow from '../PublishRightnow' import PublishRightnow from '../PublishRightnow'
import AccessoryModal from "../../coursesPublic/AccessoryModal"; import AccessoryModal from "../../coursesPublic/AccessoryModal";
@ -44,7 +44,7 @@ class TabRightComponents extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true' ).then((response) => { axios.get(url + '&export=true' ).then((response) => {
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -63,7 +63,7 @@ class TabRightComponents extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url); this.props.slowDownload(getRandomcode(url));
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
} }
@ -108,9 +108,8 @@ class TabRightComponents extends Component{
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const isSuperAdmin = this.props.isSuperAdmin() const isSuperAdmin = this.props.isSuperAdmin()
let exportUrl = `/api/homework_commons/${workId}/works_list.zip` let exportUrls = `/api/homework_commons/${workId}/works_list.zip`
const exportResultUrl = `/api/homework_commons/${workId}/works_list.xlsx` const exportResultUrls = `/api/homework_commons/${workId}/works_list.xlsx`
return( return(
<React.Fragment> <React.Fragment>
{isAdmin ? {isAdmin ?
@ -150,8 +149,8 @@ class TabRightComponents extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"padding":"0 20px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"padding":"0 20px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={(url)=>this.confirmysl(exportResultUrl)} className="color-dark">导出成绩</a></li> <li><a onClick={(url)=>this.confirmysl(exportResultUrls)} className="color-dark">导出成绩</a></li>
<li><a onClick={(url)=>this.confirmysl(exportUrl)} className="color-dark">导出作品附件</a></li> <li><a onClick={(url)=>this.confirmysl(exportUrls)} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}

@ -1,6 +1,6 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd'; import {Button,Layout,Tabs,Icon, Card, Avatar, Row, Col ,Table,Badge} from 'antd';
import {markdownToHTML,getImageUrl} from 'educoder'; import {markdownToHTML,getImageUrl,getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
const { Content } = Layout; const { Content } = Layout;
@ -69,7 +69,7 @@ class CompetitionContents extends Component{
const operations = <div> const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button> <Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<Button className={"fr mr20"} type="primary" ghost> <Button className={"fr mr20"} type="primary" ghost>
<a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a> <a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx?${getRandomNumber(true)}`)}>导出</a>
</Button> </Button>
</div> </div>
const columns = [ const columns = [

@ -1,7 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Checkbox,Input,Table, Pagination,Menu,Spin} from "antd"; import {Checkbox,Input,Table, Pagination,Menu,Spin} from "antd";
import {Link,NavLink} from 'react-router-dom'; import {Link,NavLink} from 'react-router-dom';
import { WordsBtn ,ActionBtn,queryString,getRandomcode} from 'educoder'; import { WordsBtn ,getRandomNumber,queryString,getRandomcode} from 'educoder';
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import '../css/members.css'; import '../css/members.css';
import '../css/busyWork.css'; import '../css/busyWork.css';
@ -175,9 +175,9 @@ class Testpapersettinghomepage extends Component{
if(child!=undefined){ if(child!=undefined){
params =child._getRequestParams()!==undefined?child._getRequestParams():{}; params =child._getRequestParams()!==undefined?child._getRequestParams():{};
} }
console.log("170");
console.log(params); const urll=url+`?${queryString.stringify(params)}`;
const urll=url+`?${queryString.stringify(params)}`;
axios.get(urll+ '&export=true').then((response) => { axios.get(urll+ '&export=true').then((response) => {
if(response===undefined){ if(response===undefined){
return return
@ -200,7 +200,7 @@ class Testpapersettinghomepage extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(urll) this.props.slowDownload(getRandomcode(urll))
// this.setState({ donwloading: true }) // this.setState({ donwloading: true })
// downloadFile({ // downloadFile({
// url: urll, // url: urll,

@ -32,8 +32,8 @@ class Bullsubdirectory extends Component{
} }
componentDidMount() { componentDidMount() {
console.log("获取到数据"); // console.log("获取到数据");
console.log(this.props); // console.log(this.props);
let{id,myname,mydescription,index,item} =this.props let{id,myname,mydescription,index,item} =this.props
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
id:id, id:id,

@ -30,8 +30,8 @@ class Eduinforms extends Component{
} }
componentDidMount() { componentDidMount() {
console.log("Eduinformss"); // console.log("Eduinformss");
console.log("获取到数据"); // console.log("获取到数据");
// console.log(this.props); // console.log(this.props);
const query = this.props.location.search; const query = this.props.location.search;
// const type = query.split('?chinaoocTimestamp='); // const type = query.split('?chinaoocTimestamp=');

@ -1,5 +1,5 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import {getRandomNumber,queryString} from 'educoder'; import {getRandomNumber} from 'educoder';
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {Tooltip,Menu} from 'antd'; import {Tooltip,Menu} from 'antd';
import Loadable from 'react-loadable'; import Loadable from 'react-loadable';
@ -313,15 +313,18 @@ class GraduationTaskDetail extends Component{
} }
CodeReview=()=>{ CodeReview=()=>{
let newgetRandomNumber=getRandomNumber(true);
console.log(newgetRandomNumber)
this.props.showNotification("正在导出中..."); this.props.showNotification("正在导出中...");
if(newgetRandomNumber){
const task_Id = this.props.match.params.task_Id; const task_Id = this.props.match.params.task_Id;
window.open(`/api/graduation_tasks/${task_Id}/sonar? window.open(`/api/graduation_tasks/${task_Id}/sonar?
${this.state.taskdatas.teacher_comment===undefined||this.state.taskdatas.teacher_comment===null?"":"teacher_comment="+this.state.taskdatas.teacher_comment} ${this.state.taskdatas.teacher_comment===undefined||this.state.taskdatas.teacher_comment===null?"":"teacher_comment="+this.state.taskdatas.teacher_comment+"&"}
${this.state.taskdatas.task_status===undefined||this.state.taskdatas.task_status===null?"":"&task_status="+this.state.taskdatas.task_status} ${this.state.taskdatas.task_status===undefined||this.state.taskdatas.task_status===null?"":"task_status="+this.state.taskdatas.task_status+"&"}
${this.state.taskdatas.course_group===undefined||this.state.taskdatas.course_group===null?"":"&course_group="+this.state.taskdatas.course_group} ${this.state.taskdatas.course_group===undefined||this.state.taskdatas.course_group===null?"":"course_group="+this.state.taskdatas.course_group+"&"}
${this.state.taskdatas.cross_comment===undefined||this.state.taskdatas.cross_comment===null?"":"&cross_comment="+this.state.taskdatas.cross_comment} ${this.state.taskdatas.cross_comment===undefined||this.state.taskdatas.cross_comment===null?"":"cross_comment="+this.state.taskdatas.cross_comment+"&"}
${this.state.taskdatas.search===undefined||this.state.taskdatas.search===null?"":"&search="+this.state.taskdatas.search+"&"}${getRandomNumber(true)}`) ${this.state.taskdatas.search===undefined||this.state.taskdatas.search===null?"":"search="+this.state.taskdatas.search+"&"}${newgetRandomNumber}`)
}
} }
getsonars=(teacher_comment,task_status,course_group,cross_comment,search)=>{ getsonars=(teacher_comment,task_status,course_group,cross_comment,search)=>{
@ -519,8 +522,8 @@ class GraduationTaskDetail extends Component{
{this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}> {this.props.isAdmin()? <li className="li_line drop_down fr color-blue font-16 mt20" style={{"paddingLeft":"0px"}}>
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}> <ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.xlsx")} className="color-dark">导出成绩</a></li> <li><a onClick={()=>this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.xlsx`)} className="color-dark">导出成绩</a></li>
<li><a onClick={()=>this.child.confirmysl("/graduation_tasks/"+task_Id+"/tasks_list.zip")} className="color-dark">导出作品附件</a></li> <li><a onClick={()=>this.child.confirmysl(`/graduation_tasks/${task_Id}/tasks_list.xlsx`)} className="color-dark">导出作品附件</a></li>
</ul> </ul>
</li>:""} </li>:""}
{questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{ {questionslist.work_status===undefined||questionslist.work_status===null||questionslist.work_status.length===0?"":questionslist.work_status.map((item,key)=>{

@ -7,7 +7,7 @@ import TPMMDEditor from '../../../tpm/challengesnew/TPMMDEditor';
import { getUrl, getUploadActionUrl } from 'educoder' import { getUrl, getUploadActionUrl } from 'educoder'
const $ = window.$; const $ = window.$;
/* /*
*/ */
class GraduationTasksappraiseMainEditor extends Component{ class GraduationTasksappraiseMainEditor extends Component{
@ -25,17 +25,23 @@ class GraduationTasksappraiseMainEditor extends Component{
} }
onSubmit = () => { onSubmit = () => {
const { score, same_score } = this.state const { score, same_score } = this.state
let category_id= this.props.match.params.category_id; let category_id= this.props.match.params.category_id;
const url = `/graduation_works/${category_id}/add_score.json` const url = `/graduation_works/${category_id}/add_score.json`
const attachment_ids = this.state.fileList.map(item => { const attachment_ids = this.state.fileList.map(item => {
return item.response ? item.response.id : item.id return item.response ? item.response.id : item.id
}) })
const comment = this.mdRef.current.getValue() const comment = this.mdRef.current.getValue()
if ((!comment || comment.trim() == "") && !score) { if ((!comment || comment.trim() == "") && !score &&this.props.isAdmin()===true) {
this.setState( {errorMessage : '分数和评语不能同时为空' }) this.setState( {errorMessage : '分数和评语不能同时为空' })
// this.props.showNotification('请先输入评阅说明') // this.props.showNotification('请先输入评阅说明')
return; return;
} }
if (!score && this.props.isAdmin()===false) {
this.setState( {errorMessage : '分数不能同时为空' })
// this.props.showNotification('请先输入评阅说明')
return;
}
if (comment.length > 2000) { if (comment.length > 2000) {
this.setState( {errorMessage : '不能超过2000个字符' }) this.setState( {errorMessage : '不能超过2000个字符' })
// this.props.showNotification('评阅说明文本长度不能超过2000') // this.props.showNotification('评阅说明文本长度不能超过2000')
@ -63,12 +69,12 @@ class GraduationTasksappraiseMainEditor extends Component{
this.clearInputs() this.clearInputs()
this.props.addSuccess(); this.props.addSuccess();
} }
}).catch((error)=>{ }).catch((error)=>{
console.log(error) console.log(error)
}) })
} }
} }
clearInputs = () => { clearInputs = () => {
this.setState({ this.setState({
@ -79,7 +85,7 @@ class GraduationTasksappraiseMainEditor extends Component{
this.mdRef.current.setValue('') this.mdRef.current.setValue('')
} }
onCancel = () => { onCancel = () => {
this.clearInputs() this.clearInputs()
} }
componentDidMount(){ componentDidMount(){
} }
@ -119,7 +125,7 @@ class GraduationTasksappraiseMainEditor extends Component{
const { status } = response.data; const { status } = response.data;
if (status == 0) { if (status == 0) {
console.log('--- success') console.log('--- success')
this.setState((state) => { this.setState((state) => {
const index = state[stateName].indexOf(file); const index = state[stateName].indexOf(file);
const newFileList = state[stateName].slice(); const newFileList = state[stateName].slice();
@ -235,7 +241,7 @@ class GraduationTasksappraiseMainEditor extends Component{
<a className="task-btn task-btn-orange fr mt4" style={{height: '30px', width: '100px'}} <a className="task-btn task-btn-orange fr mt4" style={{height: '30px', width: '100px'}}
onClick={this.onSubmit} onClick={this.onSubmit}
>提交</a> >提交</a>
<a onClick={this.onCancel} className="defalutCancelbtn fr mt4" <a onClick={this.onCancel} className="defalutCancelbtn fr mt4"
style={{height: '30px', width: '100px', fontSize: '14px', lineHeight: '30px', marginRight: '20px'}}>清空</a> style={{height: '30px', width: '100px', fontSize: '14px', lineHeight: '30px', marginRight: '20px'}}>清空</a>
</div> </div>

@ -2,7 +2,7 @@ import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import locale from 'antd/lib/date-picker/locale/zh_CN'; import locale from 'antd/lib/date-picker/locale/zh_CN';
import { WordsBtn,getUrl ,handleDateString} from 'educoder'; import { WordsBtn,getRandomcode ,handleDateString} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../../modals/DownloadMessageysl";
@ -870,9 +870,8 @@ class GraduationTaskssettingapp extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url,urls){
debugger;
console.log(3);
axios.get(url + '?export=true' ).then((response) => { axios.get(url + '?export=true' ).then((response) => {
if(response === undefined){ if(response === undefined){
return return
@ -895,8 +894,10 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url)
// this.props.showNotification(`正在下载中`);
this.props.slowDownload(getRandomcode(url))
// window.open(getRandomcode("/api" + url), '_blank');
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
} }

@ -1,7 +1,7 @@
import React,{Component} from "react"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal,Pagination, Table, Divider, Tag,Tooltip} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import {getImageUrl, NoneData, sortDirections} from 'educoder'; import {getImageUrl, NoneData, sortDirections,getRandomcode} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
import HomeworkModal from "../../coursesPublic/HomeworkModal"; import HomeworkModal from "../../coursesPublic/HomeworkModal";
@ -759,7 +759,7 @@ class GraduationTaskssettinglist extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');

@ -1,7 +1,7 @@
import React,{Component} from "react"; import React,{Component} from "react";
import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag} from "antd";
import {Link} from 'react-router-dom'; import {Link} from 'react-router-dom';
import { WordsBtn,markdownToHTML,AttachmentList} from 'educoder'; import { getRandomcode,markdownToHTML,AttachmentList} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import Modals from '../../../modals/Modals'; import Modals from '../../../modals/Modals';
import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../../modals/DownloadMessageysl";
@ -214,9 +214,8 @@ class GraduationTasksquestions extends Component{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url,urls){
debugger;
console.log(2);
axios.get(url + '?export=true').then((response) => { axios.get(url + '?export=true').then((response) => {
if(response === undefined){ if(response === undefined){
return return
@ -239,8 +238,10 @@ class GraduationTasksquestions extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) // this.props.slowDownload(urls)
//this.props.showNotification(`正在下载中`);
this.props.slowDownload(getRandomcode(url))
// window.open(getRandomcode("/api" + url), '_blank');
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
} }

@ -4,7 +4,7 @@ import {Checkbox, Menu, Pagination,Spin} from "antd";
import Titlesearchsection from '../../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../../common/titleSearch/TitleSearchSection'
import DownloadMessageysl from "../../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../../modals/DownloadMessageysl";
import { WordsBtn ,getRandomcode} from 'educoder' import { WordsBtn ,getRandomcode,getRandomNumber} from 'educoder'
import NoneData from '../../coursesPublic/NoneData' import NoneData from '../../coursesPublic/NoneData'
import Modals from "../../../modals/Modals" import Modals from "../../../modals/Modals"
import axios from 'axios' import axios from 'axios'
@ -55,7 +55,7 @@ class Boards extends Component{
let {pageSize}=this.state; let {pageSize}=this.state;
const cid = this.props.match.params.coursesId const cid = this.props.match.params.coursesId
let url = `/courses/${cid}/graduation_topics.json?limit=${pageSize}` let url = `/courses/${cid}/graduation_topics.json?limit=${pageSize}`
if(searchValue!=""){ if(searchValue!=""){
url+="&search="+searchValue url+="&search="+searchValue
@ -142,8 +142,8 @@ class Boards extends Component{
checkBoxValues: _.difference(this.state.checkBoxValues, values) checkBoxValues: _.difference(this.state.checkBoxValues, values)
}) })
} }
} }
onItemClick = (item) => { onItemClick = (item) => {
const checkBoxValues = this.state.checkBoxValues.slice(0); const checkBoxValues = this.state.checkBoxValues.slice(0);
const index = checkBoxValues.indexOf(item.id); const index = checkBoxValues.indexOf(item.id);
@ -198,7 +198,7 @@ class Boards extends Component{
}) })
} }
cancelOperateTopic=()=>{ cancelOperateTopic=()=>{
this.setState({ this.setState({
modalsType:false, modalsType:false,
modalsTopval:"", modalsTopval:"",
modalsBottomval:"", modalsBottomval:"",
@ -257,7 +257,7 @@ onDelete=(index)=>{
console.log(error) console.log(error)
}) })
} }
}else{ }else{
this.setState({ this.setState({
// delType:true, // delType:true,
@ -319,7 +319,7 @@ sureDelTopic=()=>{
}).catch((error)=>{ }).catch((error)=>{
console.log(error); console.log(error);
}) })
} }
}else{ }else{
this.setState({ this.setState({
delType:false, delType:false,
@ -335,7 +335,7 @@ onBoardsNew=()=>{
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true').then((response) => { axios.get(url + '&export=true').then((response) => {
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -376,12 +376,12 @@ onBoardsNew=()=>{
this.fetchAll(searchValue,page,status); this.fetchAll(searchValue,page,status);
} }
render(){ render(){
let { let {
searchValue, searchValue,
topicList, topicList,
data, data,
course_public, course_public,
checkBoxValues, checkBoxValues,
checkAllValue, checkAllValue,
page, page,
totalCount, totalCount,
@ -507,9 +507,9 @@ onBoardsNew=()=>{
: :
<div></div> <div></div>
} }
<div> <div>
</div> </div>
</React.Fragment> </React.Fragment>
) )
} }

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; import { WordsBtn,on, off, trigger,markdownToHTML,getRandomNumber} from 'educoder';
import { import {
Button, Button,
Checkbox, Checkbox,
@ -23,7 +23,8 @@ class GroupPackage extends Component {
} }
} }
DownloadOpenPdf=(type,url)=>{ DownloadOpenPdf=(type,url)=>{
type===true?window.open(url):window.location.href=url; let newurl=url+getRandomNumber();
type===true?window.open(newurl):window.location.href=newurl;
} }
componentDidMount() { componentDidMount() {
console.log("Groupjobquesanswer"); console.log("Groupjobquesanswer");

@ -14,7 +14,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText' import ColorCountText from '../common/titleSearch/ColorCountText'
import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections, NoneData } from 'educoder' import { WordsBtn, trigger, on, off, getUrl, downloadFile , getRandomcode, NoneData } from 'educoder'
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
import DownloadMessageysl from "../../modals/DownloadMessageysl"; import DownloadMessageysl from "../../modals/DownloadMessageysl";
@ -23,7 +23,7 @@ import ChangeRolePop from './ChangeRolePop'
import CourseGroupListTable from './CourseGroupListTable' import CourseGroupListTable from './CourseGroupListTable'
import './studentsList.css' import './studentsList.css'
/** /**
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生 角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
*/ */
function CourseGroupList(props) { function CourseGroupList(props) {
@ -36,7 +36,7 @@ function CourseGroupList(props) {
const [listRes, setListRes] = useState({}) const [listRes, setListRes] = useState({})
const createGroupModalEl = useRef(null); const createGroupModalEl = useRef(null);
const courseId = props.match.params.coursesId const courseId = props.match.params.coursesId
useEffect(() => { useEffect(() => {
fetchAll() fetchAll()
@ -63,7 +63,7 @@ function CourseGroupList(props) {
} }
const onConfirm = async () => { const onConfirm = async () => {
} }
function createGroupImportSuccess() { function createGroupImportSuccess() {
} }
@ -83,7 +83,7 @@ function CourseGroupList(props) {
} }
const confirmysl = (url) => { const confirmysl = (url) => {
axios.get(url + 'export=true').then((response) => { axios.get(url + '&export=true').then((response) => {
if(response === undefined){ if(response === undefined){
return return
} }
@ -100,13 +100,13 @@ function CourseGroupList(props) {
setDownloadMessageval(500) setDownloadMessageval(500)
} }
}else { }else {
props.slowDownload(url) props.slowDownload(getRandomcode(url))
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}); });
} }
const isAdmin = props.isAdmin(); const isAdmin = props.isAdmin();
const isSuperAdmin = props.isSuperAdmin(); const isSuperAdmin = props.isSuperAdmin();
const isParent = true; const isParent = true;
@ -121,9 +121,9 @@ function CourseGroupList(props) {
const course_groups = listRes.course_groups const course_groups = listRes.course_groups
const current_group_id = listRes.current_group_id const current_group_id = listRes.current_group_id
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩 let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息 let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx`; //课堂信息
let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度 let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx`; //活跃度
return ( return (
<React.Fragment> <React.Fragment>
<DownloadMessageysl <DownloadMessageysl
@ -140,8 +140,8 @@ function CourseGroupList(props) {
showSearchInput={total_count >= 10} showSearchInput={total_count >= 10}
searchPlaceholder={ '请输入分班名称进行搜索' } searchPlaceholder={ '请输入分班名称进行搜索' }
firstRowRight={ firstRowRight={
<React.Fragment> <React.Fragment>
{ // pageType !== TYPE_STUDENTS && { // pageType !== TYPE_STUDENTS &&
isSuperAdmin && <React.Fragment> isSuperAdmin && <React.Fragment>
{/* ref="createGroupByImportModal" */} {/* ref="createGroupByImportModal" */}
<CreateGroupByImportModal {...props} <CreateGroupByImportModal {...props}
@ -151,12 +151,12 @@ function CourseGroupList(props) {
{/* this.refs['createGroupByImportModal'].setVisible(true) */} {/* this.refs['createGroupByImportModal'].setVisible(true) */}
<WordsBtn style="blue" className="mr30" onClick={()=> {createGroupModalEl.current.setVisible(true)}}>导入创建分班</WordsBtn> <WordsBtn style="blue" className="mr30" onClick={()=> {createGroupModalEl.current.setVisible(true)}}>导入创建分班</WordsBtn>
</React.Fragment> } </React.Fragment> }
{ {
// pageType !== TYPE_STUDENTS && // pageType !== TYPE_STUDENTS &&
!isCourseEnd && isAdmin && <WordsBtn style="blue" className="mr30" onClick={()=>addDir()}>新建分班</WordsBtn> } !isCourseEnd && isAdmin && <WordsBtn style="blue" className="mr30" onClick={()=>addDir()}>新建分班</WordsBtn> }
{/* { {/* {
isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>deleteDir()}>删除分班</WordsBtn> } */} isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>deleteDir()}>删除分班</WordsBtn> } */}
{/* { {/* {
isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> } */} isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> } */}
<style>{` <style>{`
.drop_down_menu li a { .drop_down_menu li a {
@ -210,7 +210,7 @@ function CourseGroupList(props) {
} }
onPressEnter={onPressEnter} onPressEnter={onPressEnter}
></Titlesearchsection> ></Titlesearchsection>
{!!none_group_member_count && <div className="mt20 E9F8FF padding20-30 pointer" onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}> {!!none_group_member_count && <div className="mt20 E9F8FF padding20-30 pointer" onClick={() => {props.history.push(`/courses/${courseId}/course_groups/0`)}}>
<span>未分班</span> <span>未分班</span>
<span style={{color: '#999999'}}>{none_group_member_count}个学生</span> <span style={{color: '#999999'}}>{none_group_member_count}个学生</span>
@ -219,17 +219,17 @@ function CourseGroupList(props) {
</div>} </div>}
<Spin size="large" spinning={isSpin}> <Spin size="large" spinning={isSpin}>
{course_groups && !!course_groups.length ? {course_groups && !!course_groups.length ?
<div className="mt20 edu-back-white padding20 courseGroupList"> <div className="mt20 edu-back-white padding20 courseGroupList">
<CourseGroupListTable <CourseGroupListTable
course_groups={course_groups} course_groups={course_groups}
onOperationSuccess={onOperationSuccess} onOperationSuccess={onOperationSuccess}
current_group_id={current_group_id} current_group_id={current_group_id}
{...props} {...props}
></CourseGroupListTable> ></CourseGroupListTable>
</div>: </div>:
<NoneData></NoneData>} <NoneData></NoneData>}
</Spin> </Spin>
</React.Fragment> </React.Fragment>

@ -7,7 +7,7 @@ import CourseLayoutcomponent from '../common/CourseLayoutComponent'
import Titlesearchsection from '../common/titleSearch/TitleSearchSection' import Titlesearchsection from '../common/titleSearch/TitleSearchSection'
import ColorCountText from '../common/titleSearch/ColorCountText' import ColorCountText from '../common/titleSearch/ColorCountText'
import { WordsBtn, trigger, on, off, getUrl, downloadFile , sortDirections } from 'educoder' import { WordsBtn, trigger, on, off, getRandomcode, getRandomNumber , sortDirections } from 'educoder'
import Modals from "../../modals/Modals"; import Modals from "../../modals/Modals";
import axios from 'axios' import axios from 'axios'
import _ from 'lodash' import _ from 'lodash'
@ -24,7 +24,7 @@ const TYPE_COURSE_GOURP_CHILD = 3
const buildColumns = (that,isParent) => { const buildColumns = (that,isParent) => {
const { course_groups , sortedInfo } = that.state const { course_groups , sortedInfo } = that.state
let showSorter = isParent==true let showSorter = isParent==true
const courseId = that.props.match.params.coursesId const courseId = that.props.match.params.coursesId
const columns=[{ const columns=[{
title: '序号', title: '序号',
dataIndex: 'id', dataIndex: 'id',
@ -35,7 +35,7 @@ const buildColumns = (that,isParent) => {
render: (id, student, index) => { render: (id, student, index) => {
return (that.state.page - 1) * 20 + index + 1 return (that.state.page - 1) * 20 + index + 1
} }
}, },
// { // {
// title: '用户id', // title: '用户id',
// dataIndex: 'login', // dataIndex: 'login',
@ -48,7 +48,7 @@ const buildColumns = (that,isParent) => {
// title={login && login.length > 10 ? login : ''} // title={login && login.length > 10 ? login : ''}
// >{login}</span> // >{login}</span>
// } // }
// }, // },
{ {
title: '姓名', title: '姓名',
dataIndex: 'name', dataIndex: 'name',
@ -57,7 +57,7 @@ const buildColumns = (that,isParent) => {
width:"10%", width:"10%",
className:"color-grey-6", className:"color-grey-6",
render: (name, record) => { render: (name, record) => {
return <a className="color-dark overflowHidden1" target="_blank" return <a className="color-dark overflowHidden1" target="_blank"
style={{maxWidth: '120px'}} href={`/users/${record.login}`}>{name}</a> style={{maxWidth: '120px'}} href={`/users/${record.login}`}>{name}</a>
} }
}, { }, {
@ -106,7 +106,7 @@ const buildColumns = (that,isParent) => {
} }
} }
]; ];
if (that.hasGroupModule()) { if (that.hasGroupModule()) {
that.isStudentPage && columns.push({ that.isStudentPage && columns.push({
title: '分班', title: '分班',
@ -126,7 +126,7 @@ const buildColumns = (that,isParent) => {
if (item.title === "学号") { if (item.title === "学号") {
columns.splice(key, 1) columns.splice(key, 1)
return true return true
} }
}) })
} }
const isAdmin = that.props.isAdmin() const isAdmin = that.props.isAdmin()
@ -149,7 +149,7 @@ const buildColumns = (that,isParent) => {
render: (text, record) => { render: (text, record) => {
return ( return (
<React.Fragment> <React.Fragment>
<WordsBtn onClick={() => that.onDelete(record)} style={'grey'}>删除学生</WordsBtn> <WordsBtn onClick={() => that.onDelete(record)} style={'grey'}>删除学生</WordsBtn>
{record.member_roles && record.member_roles.length && <ChangeRolePop {record.member_roles && record.member_roles.length && <ChangeRolePop
style={{ marginLeft: '12px' }} style={{ marginLeft: '12px' }}
courseId={courseId} courseId={courseId}
@ -164,7 +164,7 @@ const buildColumns = (that,isParent) => {
) )
}, },
}) })
} }
return columns; return columns;
@ -199,7 +199,7 @@ class studentsList extends Component{
} }
} }
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url,urls){
// this.props.showGlobalLoading('正在生成文件,请稍后...') // this.props.showGlobalLoading('正在生成文件,请稍后...')
axios.get(url + 'export=true').then((response) => { axios.get(url + 'export=true').then((response) => {
if(response === undefined){ if(response === undefined){
@ -223,11 +223,11 @@ class studentsList extends Component{
}) })
} }
}else { }else {
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// getUrl() + "/api"+ // getUrl() + "/api"+
// const fileUrl = url; // const fileUrl = url;
@ -263,7 +263,7 @@ class studentsList extends Component{
DownloadMessageval:undefined DownloadMessageval:undefined
}) })
} }
inputStudent=(e)=>{ inputStudent=(e)=>{
this.setState({ this.setState({
StudentList_value:e.target.value StudentList_value:e.target.value
@ -307,7 +307,7 @@ class studentsList extends Component{
modalCancel:false modalCancel:false
}) })
} }
onChange=()=>{ onChange=()=>{
} }
@ -344,7 +344,7 @@ class studentsList extends Component{
this.fetchCourseGroups() this.fetchCourseGroups()
this.fetchAll() this.fetchAll()
} }
addStudentSuccessListener=(e, data)=>{ addStudentSuccessListener=(e, data)=>{
const params = JSON.parse(data) const params = JSON.parse(data)
this.props.updataleftNavfun() this.props.updataleftNavfun()
@ -358,10 +358,10 @@ class studentsList extends Component{
// console.log('addStudentSuccessListener', data) // console.log('addStudentSuccessListener', data)
} }
fetchCourseGroups = () => { fetchCourseGroups = () => {
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
let url = `/courses/${courseId}/all_course_groups.json` let url = `/courses/${courseId}/all_course_groups.json`
axios.get(url, { axios.get(url, {
}) })
.then((response) => { .then((response) => {
@ -382,7 +382,7 @@ class studentsList extends Component{
this.setState({checkBoxValues: [], checkAllValue: false }) this.setState({checkBoxValues: [], checkAllValue: false })
this.fetchAll(1) this.fetchAll(1)
} }
// 加载了2次 // 加载了2次
// else if (prevProps.coursesids != this.props.coursesids) { // else if (prevProps.coursesids != this.props.coursesids) {
// this.fetchAll(1) // this.fetchAll(1)
@ -392,7 +392,7 @@ class studentsList extends Component{
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
let id = this.props.match.params.coursesId let id = this.props.match.params.coursesId
let course_group_id = this.props.match.params.course_group_id let course_group_id = this.props.match.params.course_group_id
const { coursesids } = this.props const { coursesids } = this.props
@ -424,7 +424,7 @@ class studentsList extends Component{
} }
axios.get(encodeURI(url)).then((result)=>{ axios.get(encodeURI(url)).then((result)=>{
if (result.data.students) { if (result.data.students) {
this.setState({ this.setState({
students: result.data.students, students: result.data.students,
total_count: result.data.students_count, total_count: result.data.students_count,
course_group_name: result.data.course_group_name, course_group_name: result.data.course_group_name,
@ -468,7 +468,7 @@ class studentsList extends Component{
}) })
} }
onPageChange = (page) => { onPageChange = (page) => {
this.fetchAll(page) this.fetchAll(page)
this.setState({ checkAllValue: false }) this.setState({ checkAllValue: false })
} }
@ -490,7 +490,7 @@ class studentsList extends Component{
return; return;
} }
let id = this.props.match.params.coursesId let id = this.props.match.params.coursesId
let { order, searchValue }=this.state let { order, searchValue }=this.state
let url=`/courses/${id}/transfer_to_course_group.json`; let url=`/courses/${id}/transfer_to_course_group.json`;
axios.post((url), { axios.post((url), {
@ -541,7 +541,7 @@ class studentsList extends Component{
// content: `确认要删除所选的${len}个学生吗?`, // content: `确认要删除所选的${len}个学生吗?`,
content: `是否确认删除?`, content: `是否确认删除?`,
onOk: () => { onOk: () => {
let id = this.props.match.params.coursesId let id = this.props.match.params.coursesId
let url=`/courses/${id}/delete_from_course.json`; let url=`/courses/${id}/delete_from_course.json`;
axios.post((url), { axios.post((url), {
students: [{course_member_id: record.course_member_id}] // this.state.checkBoxValues.map(item => {return {course_member_id: item} }), students: [{course_member_id: record.course_member_id}] // this.state.checkBoxValues.map(item => {return {course_member_id: item} }),
@ -563,7 +563,7 @@ class studentsList extends Component{
trigger('groupAdd', this.props.coursesids) trigger('groupAdd', this.props.coursesids)
} }
doAddToDir = async () => { doAddToDir = async () => {
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
const url = `/courses/${courseId}/join_course_group.json` const url = `/courses/${courseId}/join_course_group.json`
const course_group_id = this.props.match.params.course_group_id const course_group_id = this.props.match.params.course_group_id
@ -578,12 +578,12 @@ class studentsList extends Component{
} }
addToDir = (record) => { addToDir = (record) => {
this.props.confirm({ this.props.confirm({
content: `是否确认加入分班: ${this.state.course_group_name}?`, content: `是否确认加入分班: ${this.state.course_group_name}?`,
okText: '确认', okText: '确认',
cancelText: '取消', cancelText: '取消',
onOk: () => { onOk: () => {
this.doAddToDir() this.doAddToDir()
}, },
@ -604,7 +604,7 @@ class studentsList extends Component{
</div>, </div>,
onOk: () => { onOk: () => {
const course_group_id = this.props.match.params.course_group_id const course_group_id = this.props.match.params.course_group_id
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
const url = `/course_groups/${course_group_id}.json` const url = `/course_groups/${course_group_id}.json`
axios.delete(url) axios.delete(url)
@ -616,7 +616,7 @@ class studentsList extends Component{
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
} }
}) })
} }
@ -643,7 +643,7 @@ class studentsList extends Component{
const isCourseEnd = this.props.isCourseEnd() const isCourseEnd = this.props.isCourseEnd()
let { let {
page, page,
order, order,
StudentList_value, StudentList_value,
stu_new_flag, stu_new_flag,
@ -662,17 +662,19 @@ class studentsList extends Component{
let currentOrderName = '学生学号排序' let currentOrderName = '学生学号排序'
if (order == ORDER_BY_GROUP) { if (order == ORDER_BY_GROUP) {
currentOrderName = '分班名称排序' currentOrderName = '分班名称排序'
} }
const { coursesids } = this.props const { coursesids } = this.props
const course_group_id = this.props.match.params.course_group_id const course_group_id = this.props.match.params.course_group_id
const isParent = !course_group_id || course_group_id == coursesids const isParent = !course_group_id || course_group_id == coursesids
const { course_group_name, invite_code } = this.state; const { course_group_name, invite_code } = this.state;
const courseId = this.props.match.params.coursesId const courseId = this.props.match.params.coursesId
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩 let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`; //总成绩
let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息 let exportUrltwo = `/courses/${courseId}/export_couser_info.xlsx?`; //课堂信息
let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度 let exportUrlthree = `/courses/${courseId}/export_member_act_score.xlsx?`; //活跃度
const params = {} const params = {}
if (course_group_id) { if (course_group_id) {
params.group_id = course_group_id params.group_id = course_group_id
@ -685,11 +687,13 @@ class studentsList extends Component{
} }
let paramsString = '' let paramsString = ''
for (let key in params) { for (let key in params) {
paramsString += `${key}=${params[key]}&` paramsString += `&${key}=${params[key]}&`
} }
exportUrl += paramsString; exportUrl += paramsString;
exportUrltwo+=paramsString; exportUrltwo+=paramsString;
exportUrlthree+=paramsString; exportUrlthree += paramsString;
// console.log(paramsString); // console.log(paramsString);
// console.log(checkBoxValues); // console.log(checkBoxValues);
// console.log(searchValue); // console.log(searchValue);
@ -725,7 +729,7 @@ class studentsList extends Component{
} }
) )
} }
return( return(
<React.Fragment > <React.Fragment >
<DownloadMessageysl <DownloadMessageysl
@ -735,7 +739,7 @@ class studentsList extends Component{
modalsType={this.state.DownloadType} modalsType={this.state.DownloadType}
/> />
<Titlesearchsection <Titlesearchsection
title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"): title={isParent ? (pageType == TYPE_STUDENTS ? "全部学生" : "学生列表"):
<React.Fragment> <React.Fragment>
<span> <span>
<Tooltip title="返回至分班列表"> <Tooltip title="返回至分班列表">
@ -756,9 +760,9 @@ class studentsList extends Component{
<i class="iconfont icon-fuzhi font-14 ml10 copybtn" style={{color: '#FF6800', cursor: 'pointer', verticalAlign: 'baseline'}} data-clipboard-text={invite_code} ></i> <i class="iconfont icon-fuzhi font-14 ml10 copybtn" style={{color: '#FF6800', cursor: 'pointer', verticalAlign: 'baseline'}} data-clipboard-text={invite_code} ></i>
</span> </span>
</Tooltip> </Tooltip>
</React.Fragment> </React.Fragment>
} }
</React.Fragment> </React.Fragment>
} }
searchValue={ searchValue } searchValue={ searchValue }
@ -766,24 +770,24 @@ class studentsList extends Component{
showSearchInput={total_count >= 10} showSearchInput={total_count >= 10}
searchPlaceholder={ '请输入姓名、学号进行搜索' } searchPlaceholder={ '请输入姓名、学号进行搜索' }
firstRowRight={ firstRowRight={
<React.Fragment> <React.Fragment>
{/* { {/* {
// pageType !== TYPE_STUDENTS && // pageType !== TYPE_STUDENTS &&
!isStudentPage && isSuperAdmin && <React.Fragment> !isStudentPage && isSuperAdmin && <React.Fragment>
<CreateGroupByImportModal ref="createGroupByImportModal" {...this.props} <CreateGroupByImportModal ref="createGroupByImportModal" {...this.props}
createGroupImportSuccess={this.createGroupImportSuccess} createGroupImportSuccess={this.createGroupImportSuccess}
></CreateGroupByImportModal> ></CreateGroupByImportModal>
<WordsBtn style="blue" className="mr30" onClick={()=> this.refs['createGroupByImportModal'].setVisible(true)}>导入创建分班</WordsBtn> <WordsBtn style="blue" className="mr30" onClick={()=> this.refs['createGroupByImportModal'].setVisible(true)}>导入创建分班</WordsBtn>
</React.Fragment> } */} </React.Fragment> } */}
{ {
!isStudentPage && isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> } !isStudentPage && isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> }
{ {
!isStudentPage && isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> } !isStudentPage && isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> }
{ {
!isStudentPage && !isCourseEnd && isAdmin && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>新建分班</WordsBtn> } !isStudentPage && !isCourseEnd && isAdmin && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>新建分班</WordsBtn> }
{ {
!isStudentPage && isStudent && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="" onClick={()=>this.addToDir()}>加入分班</WordsBtn> } !isStudentPage && isStudent && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="" onClick={()=>this.addToDir()}>加入分班</WordsBtn> }
<style>{` <style>{`
.drop_down_menu li a { .drop_down_menu li a {
@ -815,6 +819,7 @@ class studentsList extends Component{
<li className="li_line drop_down fr color-blue font-16"> <li className="li_line drop_down fr color-blue font-16">
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i> 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-20px", "left": "unset", "height": "auto"}}> <ul className="drop_down_menu" style={{"right": "-20px", "left": "unset", "height": "auto"}}>
<li><a <li><a
onClick={(i) => this.confirmysl(exportUrltwo)}>课堂信息</a> onClick={(i) => this.confirmysl(exportUrltwo)}>课堂信息</a>
</li> </li>
@ -824,6 +829,7 @@ class studentsList extends Component{
<li><a <li><a
onClick={(i) => this.confirmysl(exportUrl)}>总成绩</a> onClick={(i) => this.confirmysl(exportUrl)}>总成绩</a>
</li> </li>
</ul> </ul>
</li> </li>
} }
@ -854,7 +860,7 @@ class studentsList extends Component{
'' ''
} }
{ {
course_group_id != 0 && course_groups && course_groups.length > 0 && course_group_id != 0 && course_groups && course_groups.length > 0 &&
<li key={0} onClick={() => this.moveToGroup({id: 0})}>未分班</li> <li key={0} onClick={() => this.moveToGroup({id: 0})}>未分班</li>
} }
{ course_groups.filter((item)=> { { course_groups.filter((item)=> {
@ -865,8 +871,8 @@ class studentsList extends Component{
) )
}) } }) }
{ course_groups && course_groups.length > 0 && <Divider className="dividerStyle"></Divider> } { course_groups && course_groups.length > 0 && <Divider className="dividerStyle"></Divider> }
{ isAdmin && !isCourseEnd && { isAdmin && !isCourseEnd &&
<p className="drop_down_btn"> <p className="drop_down_btn">
<a href="javascript:void(0)" className="color-grey-6" <a href="javascript:void(0)" className="color-grey-6"
onClick={()=>this.addDir()} onClick={()=>this.addDir()}
@ -876,10 +882,10 @@ class studentsList extends Component{
} }
</ul> </ul>
</li>} </li>}
{/* <li className="drop_down"> {/* <li className="drop_down">
{currentOrderName} {currentOrderName}
{ course_groups && !!course_groups.length && { course_groups && !!course_groups.length &&
<React.Fragment> <React.Fragment>
<i className="iconfont icon-xiajiantou font-12 ml2"></i> <i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_normal" style={{width: '124px'}}> <ul className="drop_down_normal" style={{width: '124px'}}>
@ -893,7 +899,7 @@ class studentsList extends Component{
</div> </div>
<Spin size="large" spinning={this.state.isSpin}> <Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table"> <div className="clearfix stu_table">
{students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}> {students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
<Table columns={studentlist} dataSource={students} onChange={this.onTableChange} pagination={false}></Table> <Table columns={studentlist} dataSource={students} onChange={this.onTableChange} pagination={false}></Table>
</Checkbox.Group> } </Checkbox.Group> }
</div> </div>

@ -3,7 +3,7 @@ import {Menu} from "antd";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import { WordsBtn } from 'educoder' import { WordsBtn,getRandomcode } from 'educoder'
import PollTabFirst from './PollDetailTabFirst' import PollTabFirst from './PollDetailTabFirst'
import PollTabSecond from './PollDetailTabSecond' import PollTabSecond from './PollDetailTabSecond'
import PollTabThird from './PollDetailTabThird' import PollTabThird from './PollDetailTabThird'
@ -112,7 +112,7 @@ class PollDetailIndex extends Component{
/// 确认是否下载 /// 确认是否下载
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true' ).then((response) => { axios.get(url + '&export=true' ).then((response) => {
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -131,7 +131,7 @@ class PollDetailIndex extends Component{
}) })
} }
}else { }else {
this.props.slowDownload(url) this.props.slowDownload(getRandomcode(url))
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
@ -239,7 +239,7 @@ class PollDetailIndex extends Component{
</li> </li>
:"" :""
} */} } */}
<a className="fl color-blue font-16" onClick={(url)=>this.confirmysl("/polls/"+this.props.match.params.pollId+"/commit_result.xlsx")} href="javascript:void(0);">导出统计</a> <a className="fl color-blue font-16" onClick={(url)=>this.confirmysl(`/polls/${this.props.match.params.pollId}/commit_result.xlsx`)} href="javascript:void(0);">导出统计</a>
</span> </span>
} }
{ {

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, publicSearchs, sortDirections} from 'educoder'; import {getRandomcode, publicSearchs, sortDirections} from 'educoder';
import { import {
Form, Form,
Select, Select,
@ -3389,7 +3389,7 @@ class Listofworksstudentone extends Component {
daochuzuoye = () => { daochuzuoye = () => {
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?course_group=${this.state.checkedValuesineinfo === undefined || this.state.checkedValuesineinfo === null ? "" : this.state.checkedValuesineinfo}&work_status=${this.state.course_groupyslstwo === undefined || this.state.course_groupyslstwo === null ? "" : this.state.course_groupyslstwo}&search=${this.state.searchtext === undefined || this.state.searchtext === null ? "" : this.state.searchtext}` let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?course_group=${this.state.checkedValuesineinfo === undefined || this.state.checkedValuesineinfo === null ? "" : this.state.checkedValuesineinfo}&work_status=${this.state.course_groupyslstwo === undefined || this.state.course_groupyslstwo === null ? "" : this.state.course_groupyslstwo}&search=${this.state.searchtext === undefined || this.state.searchtext === null ? "" : this.state.searchtext}`
this.confirmysl(url); this.confirmysl(url);
} }
@ -3418,7 +3418,7 @@ class Listofworksstudentone extends Component {
} else { } else {
// this.props.showNotification(`正在下载中`); // this.props.showNotification(`正在下载中`);
// window.open("/api"+url, '_blank'); // window.open("/api"+url, '_blank');
this.props.slowDownload(url); this.props.slowDownload(getRandomcode(url));
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, getRandomcode, sortDirections} from 'educoder'; import {getRandomNumber, getRandomcode, sortDirections} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal"; import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal";
@ -599,7 +599,7 @@ class ShixunStudentWork extends Component {
} }
confirmysl(url){ confirmysl(url){
axios.get(url + '?export=true').then((response) => { axios.get(url + '&export=true').then((response) => {
if(response === undefined){ if(response === undefined){
return return
} }

@ -1,7 +1,7 @@
import React, {Component} from "react"; import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
import {WordsBtn, getRandomcode, handleDateString, getImageUrl} from 'educoder'; import {getRandomNumber, getRandomcode, handleDateString, getImageUrl} from 'educoder';
import PollDetailTabForthRules from '../poll/PollDetailTabForthRules'; import PollDetailTabForthRules from '../poll/PollDetailTabForthRules';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal'; import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import { import {
@ -2252,16 +2252,16 @@ class Trainingjobsetting extends Component {
daochushixunbaogao = () => { daochushixunbaogao = () => {
let url = `/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`; let url = `/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url, url + '&export=true'); this.confirmysl(url,true) ;
} }
daochuzuoye = () => { daochuzuoye = () => {
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`; let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url, url + '?export=true'); this.confirmysl(url,true);
} }
confirmysl(url, urlWithExport) { confirmysl(url, urlWithExport) {
axios.get(urlWithExport).then((response) => { axios.get(url+`?export=true`).then((response) => {
if (response === undefined) { if (response === undefined) {
return return
} }
@ -2285,6 +2285,7 @@ class Trainingjobsetting extends Component {
} else { } else {
this.props.showNotification(`正在下载中`); this.props.showNotification(`正在下载中`);
window.open(getRandomcode("/api" + url), '_blank'); window.open(getRandomcode("/api" + url), '_blank');
} }
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)

@ -1,6 +1,6 @@
import React, {Component} from "react"; import React, {Component} from "react";
import CoursesListType from '../coursesPublic/CoursesListType'; import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn, getRandomcode, markdownToHTML} from 'educoder'; import {getRandomNumber, getRandomcode, markdownToHTML} from 'educoder';
import { import {
Form, Form,
Select, Select,
@ -381,12 +381,12 @@ class Workquestionandanswer extends Component {
daochushixunbaogao=()=>{ daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`; let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url, url + '&export=true'); this.confirmysl(url, url + `&export=true`);
} }
daochuzuoye =() =>{ daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`; let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url, url + '?export=true'); this.confirmysl(url, url + `?export=true`);
} }
confirmysl(url, urlWithExport){ confirmysl(url, urlWithExport){

@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import {getRandomNumber} from 'educoder';
import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message, Modal } from 'antd'; import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message, Modal } from 'antd';
import axios from 'axios'; import axios from 'axios';
import _ from 'lodash' import _ from 'lodash'
@ -233,7 +234,7 @@ class GraduationRequirement extends React.Component {
<Link to="/forums/3530" target="_blank" className="link ml10">查看详情</Link> <Link to="/forums/3530" target="_blank" className="link ml10">查看详情</Link>
</div> </div>
</div> </div>
<a href={`/api/ec_years/${this.props.yearId}/ec_graduation_requirements.xlsx`} target="_blank" className="ant-btn ant-btn-primary color-white">导出毕业要求</a> <a href={`/api/ec_years/${this.props.yearId}/ec_graduation_requirements.xlsx${getRandomNumber()}`} target="_blank" className="ant-btn ant-btn-primary color-white">导出毕业要求</a>
</div> </div>
<Divider/> <Divider/>

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames' import classNames from 'classnames'
import {getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd'; import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd';
@ -48,7 +48,7 @@ class RequirementVsObjective extends Component {
// ...testState // ...testState
} }
} }
componentDidMount(){ componentDidMount(){
// this.init() // this.init()
// return; // return;
@ -58,7 +58,7 @@ class RequirementVsObjective extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response.data.graduation_requirements) { if (response.data.graduation_requirements) {
this.setState( {...response.data} , () => { this.setState( {...response.data} , () => {
this.init() this.init()
}) })
} }
}).catch((e) => { }).catch((e) => {
@ -92,7 +92,7 @@ class RequirementVsObjective extends Component {
const yearId = this.props.match.params.yearId const yearId = this.props.match.params.yearId
const url = `/ec_years/${yearId}/requirement_support_objectives.json` const url = `/ec_years/${yearId}/requirement_support_objectives.json`
const method = select ? axios.delete : axios.post const method = select ? axios.delete : axios.post
method(url, method(url,
select ? { select ? {
params: { params: {
ec_graduation_requirement_id, ec_graduation_requirement_id,
@ -105,7 +105,7 @@ class RequirementVsObjective extends Component {
).then((response) => { ).then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.setState( this.setState(
(prevState) => ({ (prevState) => ({
tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}}) tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}})
}) })
) )
@ -128,7 +128,7 @@ class RequirementVsObjective extends Component {
const columnIdIndexMap = {} const columnIdIndexMap = {}
console.log(columns, tableData) console.log(columns, tableData)
return ( return (
<div className="educontent requirementVsObjective" style={{ background: '#fff' }}> <div className="educontent requirementVsObjective" style={{ background: '#fff' }}>
<ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF" <ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
style={{ 'marginBottom': '0px' }} > style={{ 'marginBottom': '0px' }} >
@ -140,7 +140,7 @@ class RequirementVsObjective extends Component {
</p> </p>
</li> </li>
<a href={`/api/ec_years/${this.props.yearId}/requirement_support_objectives.xlsx`} target="_blank" <a href={`/api/ec_years/${this.props.yearId}/requirement_support_objectives.xlsx${getRandomNumber()}`} target="_blank"
className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a> className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a>
</ul> </ul>
<div className="padding20-30" style={{ background: '#fff' }}> <div className="padding20-30" style={{ background: '#fff' }}>
@ -155,7 +155,7 @@ class RequirementVsObjective extends Component {
></SelectTable> ></SelectTable>
</div> </div>
</div> </div>
); );
} }
} }

@ -1,7 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames' import classNames from 'classnames'
import {getRandomNumber} from 'educoder'
import axios from 'axios'; import axios from 'axios';
import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd'; import { Table, Divider, Tag, Checkbox, InputNumber, Spin, Icon } from 'antd';
@ -12,10 +12,10 @@ class RequirementVsObjective extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state={ this.state={
} }
} }
componentDidMount(){ componentDidMount(){
// this.init() // this.init()
// return; // return;
@ -25,7 +25,7 @@ class RequirementVsObjective extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response.data.graduation_subitems) { if (response.data.graduation_subitems) {
this.setState( {...response.data} , () => { this.setState( {...response.data} , () => {
this.init() this.init()
}) })
} }
}).catch((e) => { }).catch((e) => {
@ -61,7 +61,7 @@ class RequirementVsObjective extends Component {
const yearId = this.props.match.params.yearId const yearId = this.props.match.params.yearId
const url = `/ec_years/${yearId}/subitem_support_standards.json` const url = `/ec_years/${yearId}/subitem_support_standards.json`
const method = select ? axios.delete : axios.post const method = select ? axios.delete : axios.post
method(url, method(url,
select ? { select ? {
params: { params: {
ec_graduation_subitem_id, ec_graduation_subitem_id,
@ -74,7 +74,7 @@ class RequirementVsObjective extends Component {
).then((response) => { ).then((response) => {
if (response.data.status == 0) { if (response.data.status == 0) {
this.setState( this.setState(
(prevState) => ({ (prevState) => ({
tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}}) tableData : update(prevState.tableData, {[rowIndex]: {[colIndex]: {$set: select ? false : true}}})
}) })
) )
@ -97,7 +97,7 @@ class RequirementVsObjective extends Component {
const columnIdIndexMap = {} const columnIdIndexMap = {}
console.log(columns, tableData) console.log(columns, tableData)
return ( return (
<div className="educontent requirementVsObjective" style={{ background: '#fff' }}> <div className="educontent requirementVsObjective" style={{ background: '#fff' }}>
<ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF" <ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
style={{ 'marginBottom': '0px' }} > style={{ 'marginBottom': '0px' }} >
@ -109,7 +109,7 @@ class RequirementVsObjective extends Component {
</p> </p>
</li> </li>
<a href={`/api/ec_years/${this.props.yearId}/subitem_support_standards.xlsx`} target="_blank" <a href={`/api/ec_years/${this.props.yearId}/subitem_support_standards.xlsx${getRandomNumber()}`} target="_blank"
className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a> className="ant-btn ant-btn-primary color-white fr mt20">导出矩阵</a>
</ul> </ul>
<div className="padding20-30" style={{ background: '#fff' }}> <div className="padding20-30" style={{ background: '#fff' }}>
@ -126,7 +126,7 @@ class RequirementVsObjective extends Component {
></SelectTable> ></SelectTable>
</div> </div>
</div> </div>
); );
} }
} }

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message } from 'antd'; import { Spin, Button, Input, Divider, Icon, Tooltip, Form, message } from 'antd';
import {getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
import './index.scss'; import './index.scss';
@ -157,7 +158,7 @@ class TrainingObjective extends React.Component {
<Link to="/forums/3529" target="_blank" className="link ml10">查看详情</Link> <Link to="/forums/3529" target="_blank" className="link ml10">查看详情</Link>
</div> </div>
</div> </div>
<a href={`/api/ec_years/${this.props.yearId}/ec_training_objectives.xlsx`} target="_blank" className="ant-btn ant-btn-primary color-white">导出培养目标</a> <a href={`/api/ec_years/${this.props.yearId}/ec_training_objectives.xlsx${getRandomNumber()}`} target="_blank" className="ant-btn ant-btn-primary color-white">导出培养目标</a>
</div> </div>
<Divider/> <Divider/>
@ -191,7 +192,7 @@ class TrainingObjective extends React.Component {
</div> </div>
) )
} }
<div className="training-objective-items"> <div className="training-objective-items">
<div className="training-objective-items-head"> <div className="training-objective-items-head">
<div className="no-column">分项</div> <div className="no-column">分项</div>

@ -1,6 +1,8 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames' import classNames from 'classnames';
import {getRandomNumber} from 'educoder';
import axios from 'axios'; import axios from 'axios';
@ -166,7 +168,7 @@ const buildColumns = (that) => {
const _i_remain = index % 3; const _i_remain = index % 3;
// 未达成 // 未达成
const obj = { const obj = {
children: row.status ? <span style={{color: '#29BD88'}}>达成</span> children: row.status ? <span style={{color: '#29BD88'}}>达成</span>
: <span style={{color: '#FF6800'}}>未达成</span>, : <span style={{color: '#FF6800'}}>未达成</span>,
props: {}, props: {},
}; };
@ -233,14 +235,14 @@ function getTableData(data_args) {
// 一个course数组的数据组合成三行table数据 // 一个course数组的数据组合成三行table数据
innerItem.course_data.forEach((course, courseIndex) => { innerItem.course_data.forEach((course, courseIndex) => {
nameRowData[`c${courseIndex + 1}`] = course.course_name; nameRowData[`c${courseIndex + 1}`] = course.course_name;
targetValueRowData[`c${courseIndex + 1}`] = course.target_value && course.target_value.toFixed targetValueRowData[`c${courseIndex + 1}`] = course.target_value && course.target_value.toFixed
? course.target_value.toFixed(3) : course.target_value ; ? course.target_value.toFixed(3) : course.target_value ;
if (course.target_value) { if (course.target_value) {
target_value_total = target_value_total + course.target_value target_value_total = target_value_total + course.target_value
} }
realValueRowData[`c${courseIndex + 1}`] = course.real_value && course.real_value.toFixed realValueRowData[`c${courseIndex + 1}`] = course.real_value && course.real_value.toFixed
? course.real_value.toFixed(3) : course.real_value ; ? course.real_value.toFixed(3) : course.real_value ;
if (course.real_value) { if (course.real_value) {
real_value_total = real_value_total + course.real_value real_value_total = real_value_total + course.real_value
@ -259,7 +261,7 @@ function getTableData(data_args) {
return tableData; return tableData;
} }
// new // new
function getTableData(data_args) { function getTableData(data_args) {
let tableData = [] let tableData = []
// 最大课程数量,根据这个值动态渲染课程列数 // 最大课程数量,根据这个值动态渲染课程列数
maxCouseCount = 0; maxCouseCount = 0;
@ -274,16 +276,16 @@ let tableData = []
// 一个course数组的数据组合成三行table数据 // 一个course数组的数据组合成三行table数据
innerItem.course_supports.forEach((course, courseIndex) => { innerItem.course_supports.forEach((course, courseIndex) => {
nameRowData[`c${courseIndex + 1}`] = course.course_name; nameRowData[`c${courseIndex + 1}`] = course.course_name;
targetValueRowData[`c${courseIndex + 1}`] = course.reach_criteria targetValueRowData[`c${courseIndex + 1}`] = course.reach_criteria
// course.target_value && course.target_value.toFixed // course.target_value && course.target_value.toFixed
// ? course.target_value.toFixed(3) : course.target_value ; // ? course.target_value.toFixed(3) : course.target_value ;
// if (course.target_value) { // if (course.target_value) {
// target_value_total = target_value_total + course.target_value // target_value_total = target_value_total + course.target_value
// } // }
realValueRowData[`c${courseIndex + 1}`] = course.actually_reach realValueRowData[`c${courseIndex + 1}`] = course.actually_reach
// course.real_value && course.real_value.toFixed // course.real_value && course.real_value.toFixed
// ? course.real_value.toFixed(3) : course.real_value ; // ? course.real_value.toFixed(3) : course.real_value ;
// if (course.real_value) { // if (course.real_value) {
// real_value_total = real_value_total + course.real_value // real_value_total = real_value_total + course.real_value
@ -496,7 +498,7 @@ class GraduatesRequirement extends Component {
} }
} }
onDaChengYuZhiChange = (value) => { onDaChengYuZhiChange = (value) => {
if ( (!window.event || window.event.type == 'blur') if ( (!window.event || window.event.type == 'blur')
&& this.state.daChengYuZhi > 1 && value == 1) { && this.state.daChengYuZhi > 1 && value == 1) {
this.props.showSingleButtonModal('提示', '达成阈值必须小于等于1') this.props.showSingleButtonModal('提示', '达成阈值必须小于等于1')
} }
@ -526,7 +528,7 @@ class GraduatesRequirement extends Component {
axios.post(url, { axios.post(url, {
reach_criteria : this.state.daChengYuZhi reach_criteria : this.state.daChengYuZhi
}).then((response) => { }).then((response) => {
if( response.data.status === 0 ) { if( response.data.status === 0 ) {
this.setState({ daChengYuZhiSaved: this.state.daChengYuZhi }) this.setState({ daChengYuZhiSaved: this.state.daChengYuZhi })
this.setDaChengYuZhiEditableMode(false) this.setDaChengYuZhiEditableMode(false)
@ -537,7 +539,7 @@ class GraduatesRequirement extends Component {
console.log(error) console.log(error)
}) })
} }
componentDidMount(){ componentDidMount(){
window.document.title = '达成度评价结果'; window.document.title = '达成度评价结果';
@ -569,7 +571,7 @@ class GraduatesRequirement extends Component {
// const url = `ec_courses/7/get_calculation_data` // const url = `ec_courses/7/get_calculation_data`
// const url = `/ec_courses/get_calculation_data?ec_year_id=${ec_year_id}` // const url = `/ec_courses/get_calculation_data?ec_year_id=${ec_year_id}`
const url = `/ec_years/${ec_year_id}/reach_evaluation.json` const url = `/ec_years/${ec_year_id}/reach_evaluation.json`
// num_array = getNumArray(testData.calculation_data); // num_array = getNumArray(testData.calculation_data);
// tableData = getTableData(testData.calculation_data) // tableData = getTableData(testData.calculation_data)
// return // return
@ -578,8 +580,8 @@ class GraduatesRequirement extends Component {
}) })
.then((response) => { .then((response) => {
if (response.data.graduation_requirements) { if (response.data.graduation_requirements) {
num_array = getNumArray(response.data.graduation_requirements); num_array = getNumArray(response.data.graduation_requirements);
tableData = getTableData(response.data.graduation_requirements) tableData = getTableData(response.data.graduation_requirements)
// 先计算再触发render // 先计算再触发render
this.setState({ this.setState({
calculationData: response.data.calculation_data, calculationData: response.data.calculation_data,
@ -590,7 +592,7 @@ class GraduatesRequirement extends Component {
calculating: false, calculating: false,
}) })
} }
}) })
.catch(function (error) { .catch(function (error) {
@ -604,7 +606,7 @@ class GraduatesRequirement extends Component {
return; return;
} }
this.setState({ calculating: true }) this.setState({ calculating: true })
var Url = '/ec_courses/sync_all_course_data'; var Url = '/ec_courses/sync_all_course_data';
/** /**
@ -615,14 +617,14 @@ class GraduatesRequirement extends Component {
axios.post(Url, { axios.post(Url, {
course_ids: this.state.course_ids course_ids: this.state.course_ids
}).then((response) => { }).then((response) => {
// 计算需要一定的时间,让按钮转动 // 计算需要一定的时间,让按钮转动
if( response.data.status === 1 ) { if( response.data.status === 1 ) {
let ec_year_id = this.props.match.params.ec_year_id; let ec_year_id = this.props.match.params.ec_year_id;
this.fetchData(ec_year_id); this.fetchData(ec_year_id);
this.props.showSingleButtonModal('提示', '计算完毕') this.props.showSingleButtonModal('提示', '计算完毕')
} else { } else {
} }
}).catch((error) => { }).catch((error) => {
this.setState({ calculating: false }) this.setState({ calculating: false })
@ -641,7 +643,7 @@ class GraduatesRequirement extends Component {
// showCalculateButton = true; // showCalculateButton = true;
// } // }
return ( return (
<div className="educontent graduatesRequirement"> <div className="educontent graduatesRequirement">
<ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF" <ul className="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
@ -659,62 +661,62 @@ class GraduatesRequirement extends Component {
<p class="clearfix padding20-30 bor-bottom-greyE backgroundFFF" <p class="clearfix padding20-30 bor-bottom-greyE backgroundFFF"
style={{ 'paddingBottom': '12px' }}> style={{ 'paddingBottom': '12px' }}>
<span class="fl font-14">达成阈值</span> <span class="fl font-14">达成阈值</span>
{ daChengYuZhiEditableMode ? { daChengYuZhiEditableMode ?
<React.Fragment> <React.Fragment>
<InputNumber value={daChengYuZhi} onChange={this.onDaChengYuZhiChange} <InputNumber value={daChengYuZhi} onChange={this.onDaChengYuZhiChange}
size="small" min={0} max={1} step={0.01} ></InputNumber> size="small" min={0} max={1} step={0.01} ></InputNumber>
<span onClick={this.saveDaChengYuZhi} <span onClick={this.saveDaChengYuZhi}
style={{color: '#4CACFF', marginLeft: '4px', cursor: 'pointer', fontSize: '13px'}}>确定 style={{color: '#4CACFF', marginLeft: '4px', cursor: 'pointer', fontSize: '13px'}}>确定
</span> </span>
<span onClick={ this.onDaChengYuZhiCancel } <span onClick={ this.onDaChengYuZhiCancel }
style={{color: '#d1d1d1', marginLeft: '4px', cursor: 'pointer', fontSize: '13px'}} >取消 style={{color: '#d1d1d1', marginLeft: '4px', cursor: 'pointer', fontSize: '13px'}} >取消
</span> </span>
</React.Fragment> </React.Fragment>
: :
<React.Fragment> <React.Fragment>
<span class="color-orange fl" id="ReachStandardNum">{daChengYuZhiSaved}</span> <span class="color-orange fl" id="ReachStandardNum">{daChengYuZhiSaved}</span>
{/* data-tip-down="编辑" */} {/* data-tip-down="编辑" */}
<i <i
onClick={() => { this.setDaChengYuZhiEditableMode(true) }} onClick={() => { this.setDaChengYuZhiEditableMode(true) }}
class="iconfont icon-bianjidaibeijing color-green" idkey="0" class="iconfont icon-bianjidaibeijing color-green" idkey="0"
style={{ float: 'left', marginTop: '-3px', marginLeft: '3px', cursor: 'pointer' }}></i> style={{ float: 'left', marginTop: '-3px', marginLeft: '3px', cursor: 'pointer' }}></i>
</React.Fragment> </React.Fragment>
} }
{/* <a class="mr20 editSubentry" style={{display: 'block'}}> {/* <a class="mr20 editSubentry" style={{display: 'block'}}>
</a> */} </a> */}
<a href="javascript:void(0)" <a href="javascript:void(0)"
class="white-btn edu-orangeback-btn fr mr10" class="white-btn edu-orangeback-btn fr mr10"
href={`/api/ec_years/${this.state.ec_year_id}/reach_evaluation.xlsx`} href={`/api/ec_years/${this.state.ec_year_id}/reach_evaluation.xlsx${getRandomNumber()}`}
>导出</a> >导出</a>
{/* /ec_major_schools/3/academic_years/5/export_reach_requirements_data.xls {/* /ec_major_schools/3/academic_years/5/export_reach_requirements_data.xls
let major_school_id =this.props.match.params.major_school_id; let major_school_id =this.props.match.params.major_school_id;
let ec_year_id =this.props.match.params.ec_year_id; let ec_year_id =this.props.match.params.ec_year_id;
*/} */}
{ showCalculateButton && ( this.state.calculating === true ? { showCalculateButton && ( this.state.calculating === true ?
<a href="javascript:void(0)" class="white-btn edu-grayback-btn mr20 fr"> <a href="javascript:void(0)" class="white-btn edu-grayback-btn mr20 fr">
计算中... 计算中...
</a> : </a> :
<a href="javascript:void(0)" class="white-btn edu-orangeline-btn mr20 fr" onClick={this.onCalculate}> <a href="javascript:void(0)" class="white-btn edu-orangeline-btn mr20 fr" onClick={this.onCalculate}>
计算 计算
</a> ) </a> )
} }
</p> </p>
{/* { this.state.calculating == true ? {/* { this.state.calculating == true ?
<Spin delay={500} className="Spinlarge" indicator={<Icon type="loading" style={{ fontSize: 30 }} spin />}></Spin> <Spin delay={500} className="Spinlarge" indicator={<Icon type="loading" style={{ fontSize: 30 }} spin />}></Spin>
: }   */} : }   */}
<Table bordered loading={ this.state.calculating } <Table bordered loading={ this.state.calculating }
columns={buildColumns(this)} dataSource={tableData} pagination={false} columns={buildColumns(this)} dataSource={tableData} pagination={false}
scroll={{ y: 530 }} scroll={{ y: 530 }}
></Table> ></Table>
</div> </div>
); );
} }
} }

@ -1,23 +1,13 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import classNames from 'classnames'
import axios from 'axios'; import {getRandomNumber} from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
import { SnackbarHOC } from 'educoder'
import { message,Modal,Spin,Icon} from 'antd';
import 'antd/dist/antd.css'; import 'antd/dist/antd.css';
import EcTitleCourseEvaluations from '../ecTitle/ecTitle'
import '../css/ecCourseSupports.css'; import '../css/ecCourseSupports.css';
import '../css/ecCourseEvaluations.css'; import '../css/ecCourseEvaluations.css';
import { import {
BrowserRouter as Router,
Route, Route,
Switch Switch
} from 'react-router-dom'; } from 'react-router-dom';
@ -223,7 +213,7 @@ class Curriculum extends Component {
titine===5? titine===5?
<span> <span>
<span className={ismanager===false?"none":""} style={{top: "26px"}}> <span className={ismanager===false?"none":""} style={{top: "26px"}}>
<a className="white-btn edu-blueback-btn fr mb10 mr10 mt9" target="_blank" href={`/ec_courses/${ec_course_id}/course_targets.xlsx`}>导出评价详情</a> <a className="white-btn edu-blueback-btn fr mb10 mr10 mt9" target="_blank" href={`/ec_courses/${ec_course_id}/course_targets.xlsx${getRandomNumber()}`}>导出评价详情</a>
</span> </span>
<span className={ismanager===false?"none":"right newrightcalculatebuttons fr mb10 mr20 "} <span className={ismanager===false?"none":"right newrightcalculatebuttons fr mb10 mr20 "}
onClick={()=>this.newrightcalculatebuttonysl(this.child)}>计算</span> onClick={()=>this.newrightcalculatebuttonysl(this.child)}>计算</span>

@ -115,7 +115,7 @@ class TPMRightSection extends Component {
<div className="font-16 mb5"> <div className="font-16 mb5">
<span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span> <span><i className={"iconfont icon-jilu1 audit_situationactive font-14"}></i> </span>
<span className={"sortinxdirection space-between fr"}> <span className={"sortinxdirection space-between fr"}>
<span className="color888hezuo font-14">已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} / {TPMRightSectionData&&TPMRightSectionData.challenge_count} </span> <span className="color888hezuo font-14">已完成 {TPMRightSectionData&&TPMRightSectionData.complete_count===null?0:TPMRightSectionData&&TPMRightSectionData.complete_count} / {TPMRightSectionData&&TPMRightSectionData.challenge_count} </span>
</span> </span>
</div> </div>

@ -608,7 +608,7 @@ class LoginRegisterComponent extends Component {
}; };
//短信验证 //短信验证
SMSverification = () => { SMSverification = () => {
let logins=this.state.login; let logins=this.state.logins;
var url = `/accounts/get_verification_code.json`; var url = `/accounts/get_verification_code.json`;
axios.get((url), { axios.get((url), {
params: { params: {

Loading…
Cancel
Save