diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 8c4cdd15..71cb0b50 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -2,12 +2,13 @@ import React, { Component } from 'react'; import AccountProfile from "../../modules/user/AccountProfile"; import { getImageUrl } from 'educoder' import axios from 'axios'; -import { Input , notification , Dropdown , Menu } from 'antd'; +import { Modal, Input, message, notification , Dropdown , Menu } from 'antd'; import LoginDialog from '../../modules/login/LoginDialog'; import GotoQQgroup from '../../modal/GotoQQgroup' import '../../modules/tpm/TPMIndex.css'; +import logo from '../../modules/tpm/images/logo.png'; import './header.scss'; const $ = window.$ @@ -32,9 +33,11 @@ class NewHeader extends Component { Checkboxteachertype: false, Checkboxteachingtype: false, code_notice: false, + checked_notice: false, RadioGroupvalue: undefined, submitapplications: false, isRender: false, + showSearchOpentype: false, showTrial: false, setevaluatinghides: false, occupation: 0, @@ -42,6 +45,7 @@ class NewHeader extends Component { headtypesonClickbool: false, headtypess: "/", settings: null, + goshowqqgtounp: false, visiblemyss: false, openSearch:false, } @@ -126,7 +130,43 @@ class NewHeader extends Component { } } + submitsubmitapplications = () => { + let { + submitapplicationssum, + submitapplicationsvaluedata + } = this.state; + this.setState({ + submitapplications: false, + RadioGroupvalue: undefined + }) + if (submitapplicationssum === 0) { + if (submitapplicationsvaluedata !== undefined) { + window.location.href = "/courses/" + submitapplicationsvaluedata; + } + } else if (submitapplicationssum === 1) { + if (submitapplicationsvaluedata !== undefined) { + window.location.href = "/projects/" + submitapplicationsvaluedata; + } + } + } + hidesubmitapplications = () => { + this.setState({ + Addcoursestypes: false, + tojoinitemtype: false, + tojoinclasstitle: undefined, + rolearr: ["", ""], + Checkboxteacherchecked: false, + Checkboxstudentchecked: false, + Checkboxteachingchecked: false, + Checkboxteachertype: false, + Checkboxteachingtype: false, + code_notice: false, + checked_notice: false, + submitapplications: false, + RadioGroupvalue: undefined + }) + } educoderlogin = () => { //登录账号 this.setState({ @@ -165,6 +205,23 @@ class NewHeader extends Component { }; + hidetojoinclass = () => { + this.setState({ + tojoinclasstype: false, + tojoinitemtype: false, + tojoinclasstitle: undefined, + rolearr: ["", ""], + Checkboxteacherchecked: false, + Checkboxstudentchecked: false, + Checkboxteachingchecked: false, + Checkboxteachertype: false, + Checkboxteachingtype: false, + code_notice: false, + checked_notice: false, + RadioGroupvalue: undefined + }) + } + // 关闭 cancelModulationModels = () => { this.setState({ isRenders: false }) @@ -256,6 +313,14 @@ class NewHeader extends Component { } } + + // 处理弹框 + setgoshowqqgtounp = (bool) => { + this.setState({ + goshowqqgtounp: bool + }) + } + addMenu=(list)=>{ return( list && list.length >0 && @@ -273,25 +338,6 @@ class NewHeader extends Component { ) } - renderMenu=(personal)=>{ - const { current_user } = this.props; - return( - - - {current_user && current_user.username} - - { - personal && personal.length > 0 && personal.map((item,key)=>{ - return( -
  • {item.name}
  • - ) - }) - } - this.educoderloginysl()}>退出 -
    - ) - } - render() { const { match} = this.props; let current_user = this.props.user; @@ -299,12 +345,17 @@ class NewHeader extends Component { tojoinitemtype, tojoinclasstitle, code_notice, + checked_notice, AccountProfiletype, + submitapplications, + submitapplicationsvalue, user, isRender, + showSearchOpentype, headtypesonClickbool, headtypess, settings, + goshowqqgtounp, openSearch, } = this.state; /*用户名称 用户头像url*/ @@ -401,6 +452,11 @@ class NewHeader extends Component { {...this.props} {...this.state} /> : ""} + { + goshowqqgtounp === true ? + this.setgoshowqqgtounp(bool)}> + :"" + } { settings && settings.nav_logo_url ? @@ -466,6 +522,32 @@ class NewHeader extends Component { } :"" } + +
    +
    + +
    +
    + {!user || (user && !user.login) ? @@ -476,11 +558,25 @@ class NewHeader extends Component { } : - - - 头像 +
    + + + - + +
    } diff --git a/src/forge/Main/CoderRootBranch.js b/src/forge/Main/CoderRootBranch.js index 94411def..5e9a84ca 100644 --- a/src/forge/Main/CoderRootBranch.js +++ b/src/forge/Main/CoderRootBranch.js @@ -40,7 +40,7 @@ export default ((props)=>{

    - 创建合并请求 + 创建合并请求 diff --git a/src/forge/users/Echart/Calendar.jsx b/src/forge/users/Echart/Calendar.jsx index d0816ccc..743a0a55 100644 --- a/src/forge/users/Echart/Calendar.jsx +++ b/src/forge/users/Echart/Calendar.jsx @@ -74,7 +74,7 @@ function Calendar({ userLogin , time , chooseTime }) { var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); return Y+M+D; - } + } function Init(data,max) { var huan_val = document.getElementById("Calendar"); @@ -137,6 +137,7 @@ function Calendar({ userLogin , time , chooseTime }) { }); } + return(
    ) diff --git a/src/forge/users/GeneralView/ConcentrateBox.jsx b/src/forge/users/GeneralView/ConcentrateBox.jsx index bd0b04db..0ec8d9c6 100644 --- a/src/forge/users/GeneralView/ConcentrateBox.jsx +++ b/src/forge/users/GeneralView/ConcentrateBox.jsx @@ -15,14 +15,13 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) { const [ value , setValue ]= useState([]); const [ isSpin , setIsSpin ]= useState(true); const [ disable , setDisable ] = useState(false); - const [ loadCount , setLoadCount ]= useState(0); useEffect(()=>{ - if(visible && loadCount === 0){ - setLoadCount(loadCount+1); + if(visible){ setIsSpin(true); getProjectList(); } + setSearch(undefined); },[visible]) useEffect(()=>{ @@ -57,15 +56,16 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) { const url = `/users/${username}/projects.json`; Axios.get(url,{ params:{ - page:p,limit,is_public: "public",search:s + page:p,limit,is_public: "public",search:s,choosed } }).then(result=>{ if(result && result.data){ - let e = mergeArrayMerge(list,result.data.projects); + let e = page > 1 ? mergeArrayMerge(list,result.data.projects) : result.data.projects; setTotal(result.data.count); - setList(page > 1 ? e : result.data.projects); + setList(e); setIsSpin(false); + // 查看更多需要页数 let s = parseInt(result.data.count/limit,0); let y = result.data.count%limit; setPageSize(y>0?s+1:s); @@ -91,13 +91,21 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) { setValue([]); } - function chooseProject(e) { + function chooseProject(e,p) { setValue(e); } // 搜索 function onSearch(params) { + setPage(1); + setList([]); setSearch(params); + // if(params){ + // setValueCopy(value); + // }else{ + // setValue(valueCopy); + // setValueCopy([]); + // } } return( @@ -120,6 +128,8 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed }) { onSearch={onSearch} enterButton="搜索" allowClear + value={search} + onChange={(e)=>setSearch(e.target.value)} />
    diff --git a/src/forge/users/GeneralView/Index.scss b/src/forge/users/GeneralView/Index.scss index 30152fdc..e79f6858 100644 --- a/src/forge/users/GeneralView/Index.scss +++ b/src/forge/users/GeneralView/Index.scss @@ -45,7 +45,7 @@ } } .ConcentrateTip{ - margin:0px 30px; + margin:20px 20px 0px; padding:5px 20px; border:1px solid rgb(248, 56, 56); border-radius: 4px; diff --git a/src/forge/users/Material/Base.jsx b/src/forge/users/Material/Base.jsx index 89338046..05a9cab1 100644 --- a/src/forge/users/Material/Base.jsx +++ b/src/forge/users/Material/Base.jsx @@ -56,7 +56,7 @@ export default Form.create()( {getFieldDecorator("email",{ rules:[{required:true,message:"请输入邮箱账号"}] })( - + )} diff --git a/src/forge/users/Material/Index.jsx b/src/forge/users/Material/Index.jsx index 3e24b0b9..ee0f4eec 100644 --- a/src/forge/users/Material/Index.jsx +++ b/src/forge/users/Material/Index.jsx @@ -33,7 +33,7 @@ function Index(props){
    基本资料 - 密码管理 + {/* 密码管理 */}
    {