caishi 5 years ago
commit c9d462a18f

@ -16,6 +16,7 @@ import '@icedesign/base/index.scss';
import LoginDialog from './modules/login/LoginDialog'
import Notcompletedysl from './modules/user/Notcompletedysl'
import Trialapplicationysl from './modules/login/Trialapplicationysl'
import Trialapplicationreview from './modules/user/Trialapplicationreview'
import Trialapplication from './modules/login/Trialapplication'
import NotFoundPage from './NotFoundPage'
@ -268,6 +269,7 @@ class App extends Component {
<LoginDialog {...this.props} {...this.state}></LoginDialog>
<Notcompletedysl {...this.props} {...this.state}></Notcompletedysl>
<Trialapplicationysl {...this.props} {...this.state}></Trialapplicationysl>
<Trialapplicationreview {...this.props} {...this.state}></Trialapplicationreview>
{/*{*/}
{/* isRender === true?*/}
{/* <LoginDialog></LoginDialog> : ""*/}

@ -46,6 +46,9 @@ export function getUrl2(path, goTest) {
export function getUploadActionUrl(path, goTest) {
return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}`
}
export function getUploadActionUrlOfAuth(id) {
return `${getUrl()}/api/users/accounts/${id}/auth_attachments.json${isDev ? `?debug=${window._debugType || 'admin'}` : ''}`
}
export function test(path) {
return `${path}`;

@ -648,7 +648,9 @@ class TopicDetail extends Component {
<div className="padding30 memoContent new_li" style={{ paddingBottom: '10px'}}>
<MarkdownToHtml content={memo.content}></MarkdownToHtml>
{memo.is_md == true ? <MarkdownToHtml content={memo.content}></MarkdownToHtml> :
<div dangerouslySetInnerHTML={{ __html: memo.content }}></div>
}
</div>
<div className="padding30 bor-bottom-greyE" style={{paddingTop: '2px'}}>
<div className="mt10 mb20">

@ -900,9 +900,9 @@ class Listofworksstudentone extends Component {
},
],
}
console.log("902");
console.log("902");
console.log(this.props);
// console.log("902");
// console.log("902");
// console.log(this.props);
}
componentDidCatch(error, info){
@ -916,15 +916,17 @@ class Listofworksstudentone extends Component {
console.log("+++++++++915");
console.log("+++++++++916");
console.log(nextProps);
console.log(this.props)
}
componentDidMount() {
console.log("componentDidMount");
if(this.props.isAdmin() === true){
this.tearchar();
console.log("909");
// console.log("909");
}else{
this.student();
console.log("911");
// console.log("911");
}
}
@ -1165,8 +1167,8 @@ class Listofworksstudentone extends Component {
}
}
console.log("554");
console.log(columns2);
// console.log("554");
// console.log(columns2);
this.setState({
@ -1621,8 +1623,8 @@ class Listofworksstudentone extends Component {
user_name: student_works[i].user_name,
user_login: student_works[i].user_login,
})
console.log(datalist);
console.log("1612");
// console.log(datalist);
// console.log("1612");
}
@ -1719,9 +1721,9 @@ class Listofworksstudentone extends Component {
} else {
}
console.log(datalist);
console.log("1712");
//
// console.log(datalist);
// console.log("1712");
this.setState({
data: datalist,
columns: columns2,
@ -2004,7 +2006,7 @@ class Listofworksstudentone extends Component {
}
//立即截止
homeworkends = () => {
console.log("1160");
// console.log("1160");
let homeworkid = this.props.match.params.homeworkid;
let url = "/homework_commons/" + homeworkid + "/end_groups.json";
@ -2201,18 +2203,63 @@ class Listofworksstudentone extends Component {
//
// }
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo===undefined ||this.state.course_groupyslstwo===null? "": this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null? "":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext===null?"":this.state.searchtext}`
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null?"":this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext=== null?"":this.state.searchtext}`
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
let {columns,course_groupysls,isAdmin, course_groupyslstwo, unlimited, unlimitedtwo, course_group_info, orders, task_status, checkedValuesine, searchtext, teacherlist, visible,visibles, game_list,columnsstu, limit,experience, boolgalist,viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate,computeTimetype} = this.state;
// console.log(this.state.data);
// console.log("841");
console.log(this.state.columns);
console.log(data);
console.log("2202");
console.log(this.props.isAdmin());
// console.log(this.state.columns);
// console.log(data);
// console.log("2202");
// console.log(this.props.isAdmin());
return (
this.props.isAdmin() === true ?
@ -2232,7 +2279,13 @@ class Listofworksstudentone extends Component {
updatas={() => this.isupdatas()}
/> : ""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{visibles === true ?
<div>
<style>

@ -32,8 +32,6 @@ class ShixunHomeworkPage extends Component {
visible: false,
showmodel:false,
child:undefined,
DownloadType:false,
DownloadMessageval:undefined,
}
}
@ -86,9 +84,14 @@ class ShixunHomeworkPage extends Component {
}
// confirmysl(child,url) {
// confirmysl(url);
// }
confirmysl(child,i) {
if(i===1){
child.daochushixunbaogao();
}
if(i===2){
child.daochuzuoye();
}
}
homeworkendss(child){
child.homeworkends();
@ -102,40 +105,8 @@ class ShixunHomeworkPage extends Component {
child.workshowmodel();
}
/// 确认是否下载
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
bindRef = ref => { this.child = ref }
///////////////教师截止
@ -231,10 +202,10 @@ class ShixunHomeworkPage extends Component {
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
<ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
<li><a
onClick={(url) => this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}&work_status=${this.state.course_groupyslstwo===undefined ||this.state.course_groupyslstwo===null? null: this.state.course_groupyslstwo}&course_group=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null? null:this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext===null?null:this.state.searchtext}`)}>实训报告</a>
onClick={(child,i) => this.confirmysl(this.child,1)}>实训报告</a>
</li>
<li><a
onClick={(url) => this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx?group_id=${this.state.checkedValuesineinfo===undefined||this.state.checkedValuesineinfo===null?null:this.state.checkedValuesineinfo}&search=${this.state.searchtext===undefined||this.state.searchtext=== null?null:this.state.searchtext}`)}>学生成绩</a>
onClick={(child,i) => this.confirmysl(this.child,2)}>学生成绩</a>
</li>
</ul>
@ -271,18 +242,18 @@ class ShixunHomeworkPage extends Component {
</div>
</div>
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
{/*<DownloadMessageysl*/}
{/*{...this.props}*/}
{/*value={this.state.DownloadMessageval}*/}
{/*modalCancel={this.Downloadcal}*/}
{/*modalsType={this.state.DownloadType}*/}
/>
{/*/>*/}
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>
:parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>
:parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>
:parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
{parseInt(tab) === 0 ?<Listofworksstudentone triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Listofworksstudentone>:""}
{parseInt(tab) === 1 ?<Workquestionandanswer triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Workquestionandanswer>:""}
{parseInt(tab) === 2 ?<ShixunStudentWork triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></ShixunStudentWork>:""}
{parseInt(tab) === 3 ?<Trainingjobsetting triggerRef={this.bindRef} {...this.props} {...this.state} Getdataback={(jobsettingsdata, teacherdata) => this.Getdataback(jobsettingsdata, teacherdata)}></Trainingjobsetting>:""}
</div>
</div>

@ -3,6 +3,7 @@ import CoursesListType from '../coursesPublic/CoursesListType';
import {WordsBtn,ActionBtn} from 'educoder';
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import DownloadMessageysl from '../../modals/DownloadMessageysl';
import NoneData from '../coursesPublic/NoneData';
import {
Form,
@ -69,6 +70,8 @@ class ShixunStudentWork extends Component {
datalist:undefined,
showmodel:false,
jobsettingsdata:undefined,
DownloadType:false,
DownloadMessageval:undefined
}
}
@ -507,6 +510,52 @@ class ShixunStudentWork extends Component {
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
let {
data,
@ -596,6 +645,13 @@ class ShixunStudentWork extends Component {
issCancel={()=>this.hideshowmodel()}
updatas={()=>this.getupdata()}
/>:""}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*<DownloadMessage*/}
{/* {...this.props}*/}

@ -27,6 +27,7 @@ import moment from 'moment';
import 'moment/locale/zh-cn';
import Modals from "../../modals/Modals";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const RadioGroup = Radio.Group;
//GraduationTaskssetting.js
@ -1730,6 +1731,52 @@ class Trainingjobsetting extends Component {
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
@ -1776,7 +1823,13 @@ class Trainingjobsetting extends Component {
{/* {...this.props}*/}
{/* ref="DownloadMessage"*/}
{/*/>*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
{/*立即发布*/}
<HomeworkModal
modaltype={this.state.modaltype}

@ -35,6 +35,7 @@ import Homeworddescription from "../shixunHomework/Homeworddescription";
import ShixunWorkModal from './Shixunworkdetails/ShixunWorkModal';
import HomeworkModal from "../coursesPublic/HomeworkModal";
import Startshixuntask from "../coursesPublic/Startshixuntask";
import DownloadMessageysl from "../../modals/DownloadMessageysl";
const TextArea = Input.TextArea
//作业问答页面
@ -319,6 +320,52 @@ class Workquestionandanswer extends Component {
ChangeTab=(e)=>{
this.props.ChangeTab(e);
}
daochushixunbaogao=()=>{
let url =`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`;
this.confirmysl(url);
}
daochuzuoye =() =>{
let url = `/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`;
this.confirmysl(url);
}
confirmysl(url){
axios.get(url).then((response) => {
if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){
if(response.data.messages === "100"){
// 已超出文件导出的上限数量100 ),建议:
this.setState({
DownloadType:true,
DownloadMessageval:100
})
}else {
//因附件资料超过500M
this.setState({
DownloadType:true,
DownloadMessageval:500
})
}
}else {
this.props.showNotification(`正在下载中`);
window.open("/api"+url, '_blank');
}
}).catch((error) => {
console.log(error)
});
}
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() {
const dateFormat = 'YYYY-MM-DD HH:mm:ss';
let {
@ -352,6 +399,13 @@ class Workquestionandanswer extends Component {
{/* ref="DownloadMessage"*/}
{/*/>*/}
{/*立即发布*/}
<DownloadMessageysl
{...this.props}
value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType}
/>
<HomeworkModal
modaltype={this.state.modaltype}
modalname={this.state.modalname}

@ -86,7 +86,7 @@ class Trialapplicationysl extends Component {
// console.log("53");
//
// console.log(this.props.isRenders);
this.getipthon();
// this.getipthon();
if (this.props.isRenders != undefined) {
this.setState({
isRenders: this.props.isRenders

@ -0,0 +1,65 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Modal} from 'antd';
import axios from 'axios';
import './common.css'
//您的试用申请正在审核中,请耐心等待
class Trialapplicationreview extends Component {
constructor(props) {
super(props);
this.state={
modalsType:false,
}
}
componentDidMount() {
axios.interceptors.response.use((response) => {
if (response != undefined)
if (response && response.data.status === 408) {
this.setState({
modalsType: true
})
}
return response;
}, (error) => {
//TODO 这里如果样式变了会出现css不加载的情况
});
}
setDownload=()=>{
//立即联系
this.setState({
modalsType:false
})
}
render() {
return(
<Modal
keyboard={false}
closable={false}
footer={null}
destroyOnClose={true}
title="提示"
centered={true}
visible={this.state.modalsType===undefined?false:this.state.modalsType}
width="530px"
>
<div className="educouddiv tabeltext-alignleft">
<div className={"tabeltext-alignleft mb20"}><p>您的试用申请正在审核中请耐心等待</p></div>
<a className="task-btn task-btn-orange bth100" onClick={()=>this.setDownload()}>知道啦</a>
</div>
</Modal>
)
}
}
export default Trialapplicationreview;
Loading…
Cancel
Save