From 5e12bc722553f362897be5da5d78d91be30918bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 30 Dec 2019 16:26:51 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/shixunHomework/shixunHomework.js | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 4705e7a8f..36d5129f5 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1,12 +1,10 @@ import React,{ Component } from "react"; -import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin } from "antd"; -import { WordsBtn,on, off, trigger } from 'educoder'; -import {BrowserRouter as Router,Route,Switch,Link} from 'react-router-dom'; +import { Input,Checkbox, Pagination,Menu, AutoComplete,Spin } from "antd"; +import { WordsBtn,on, trigger } from 'educoder'; +import {Link} from 'react-router-dom'; import axios from'axios'; import HomeworkModal from "../coursesPublic/HomeworkModal"; -import OneSelfOrderModal from "../coursesPublic/OneSelfOrderModal"; -import ShixunModal from "../coursesPublic/ShixunModal"; -import PathModal from "../coursesPublic/PathModal"; + import NewShixunModel from '../coursesPublic/NewShixunModel'; import AddcoursesNav from "../coursesPublic/AddcoursesNav"; import Modals from '../../modals/Modals'; @@ -16,7 +14,7 @@ import '../css/busyWork.css' import ShixunhomeWorkItem from "./ShixunhomeWorkItem"; import NoneData from "../coursesPublic/NoneData"; -const Search = Input.Search; + class ShixunHomework extends Component{ constructor(props){ @@ -1212,12 +1210,27 @@ class ShixunHomework extends Component{
- this.SearchCoursename(value)} - > + {/* this.SearchCoursename(value)}*/} + {/* allowClear*/} + {/*>*/} + + } /> +
From 0a1d2b0626e22973d2688104bbccb2f2010f10d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 30 Dec 2019 16:58:32 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/shixunHomework/shixunHomework.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 36d5129f5..c3eb8095a 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { Input,Checkbox, Pagination,Menu, AutoComplete,Spin } from "antd"; +import { Input,Checkbox, Pagination,Menu, AutoComplete,Spin,Icon } from "antd"; import { WordsBtn,on, trigger } from 'educoder'; import {Link} from 'react-router-dom'; import axios from'axios'; @@ -1029,7 +1029,7 @@ class ShixunHomework extends Component{ let main_id=this.props.match.params.main_id; let category_id=this.props.match.params.category_id; - + const dataSource = ['12345', '23456', '34567']; return(
@@ -1225,7 +1225,7 @@ class ShixunHomework extends Component{ dropdownStyle={{ width: 300 }} size="large" style={{ width: '100%' }} - dataSource={options} + dataSource={dataSource} placeholder="input here" optionLabelProp="value" > From bd6bf4512992f366e144af1f747718c5223c191f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 31 Dec 2019 11:03:15 +0800 Subject: [PATCH 03/13] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/common/UrlTool.js | 16 +++++ public/react/src/common/educoder.js | 2 +- .../modules/courses/busyWork/commonWork.js | 24 ++++---- .../common/titleSearch/TitleSearchSection.js | 22 +++---- .../src/modules/courses/exercise/Exercise.js | 29 ++++----- .../modules/courses/graduation/tasks/index.js | 14 +++-- .../courses/graduation/topics/index.js | 13 ++-- public/react/src/modules/courses/poll/Poll.js | 24 ++++---- .../courses/shixunHomework/shixunHomework.js | 60 +++++++------------ 9 files changed, 101 insertions(+), 103 deletions(-) diff --git a/public/react/src/common/UrlTool.js b/public/react/src/common/UrlTool.js index 33a84dc55..07c492081 100644 --- a/public/react/src/common/UrlTool.js +++ b/public/react/src/common/UrlTool.js @@ -1,4 +1,8 @@ +import React from "react"; import md5 from 'md5'; +import {Input} from "antd"; +const { Search } = Input; + const $ = window.$; const isDev = window.location.port == 3007; export const TEST_HOST = "https://test-newweb.educoder.net" @@ -144,3 +148,15 @@ export function htmlEncode(str) { s = s.replace(/\"/g, """); return s; } + +export function publicSearchs(Placeholder,onSearch,onInputs,onChanges,loadings) { + return() +} \ No newline at end of file diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 126a42e87..35abfc7fe 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -2,7 +2,7 @@ // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; -export { getImageUrl as getImageUrl, getUrl as getUrl, getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl +export { getImageUrl as getImageUrl, getUrl as getUrl, publicSearchs as publicSearchs,getRandomcode as getRandomcode,getUrlmys as getUrlmys, getUrl2 as getUrl2, setImagesUrl as setImagesUrl , getUploadActionUrl as getUploadActionUrl,getUploadActionUrltwo as getUploadActionUrltwo ,getUploadActionUrlthree as getUploadActionUrlthree, getUploadActionUrlOfAuth as getUploadActionUrlOfAuth , getTaskUrlById as getTaskUrlById, TEST_HOST ,htmlEncode as htmlEncode } from './UrlTool'; export { default as queryString } from './UrlTool2'; diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index d114b6777..ffc2e0c34 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -1,28 +1,22 @@ import React,{ Component } from "react"; import { Input,Checkbox,Menu,Pagination,Spin} from "antd"; -import CourseLayoutcomponent from '../common/CourseLayoutComponent'; import UseBank from './UseBank' - import '../css/members.css' import '../css/busyWork.css' - -import CoursesListType from '../coursesPublic/CoursesListType' import CommonWorkItem from './CommonWorkItem' import PublishRightnow from './PublishRightnow' import ConnectProject from './ConnectProject' - import { WordsBtn, on, off } from 'educoder' import Modals from '../../modals/Modals' import NoneData from "../coursesPublic/NoneData" import Titlesearchsection from '../common/titleSearch/TitleSearchSection'; import { RouteHOC } from './common' - import axios from 'axios'; import _ from 'lodash' -const Search = Input.Search; -const map={1:"普通作业",2:"",3:"分组作业"} -const COMMON_WORK = 1 +// const Search = Input.Search; +// const map={1:"普通作业",2:"",3:"分组作业"} +// const COMMON_WORK = 1 // const COMMON_WORK = 2 class commonWork extends Component{ constructor(props){ @@ -47,13 +41,12 @@ class commonWork extends Component{ inputStudent=(e)=>{ this.setState({ search:e.target.value, - page:1 }) } //搜索查询 searchStudent=()=>{ let {page,search,order}=this.state; - this.getList(page,search,order); + this.getList(1,search,order); } openConnectionProject = (work) => { this.refs['connectProject'].openConnectionProject(work) @@ -134,11 +127,14 @@ class commonWork extends Component{ mainList:result.data, totalCount:result.data.task_count, isSpin:false, + page:page, ...result.data }) } }).catch((error)=>{ - console.log(error); + this.setState({ + isSpin:false + }) }) } //筛选条件 @@ -325,7 +321,7 @@ class commonWork extends Component{ console.log(error) }) } - + render(){ let { @@ -396,7 +392,7 @@ class commonWork extends Component{ // searchtype={this.props.isAdmin||this.props.isStudent ?true:false} onInputSearchChange={this.inputStudent} onPressEnter={this.searchStudent} - + allowClearonChange={this.inputStudent} firstRowRight={ { isAdmin && this.createCommonWork(1)}>新建} diff --git a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js index c71ef38ea..479c8595b 100644 --- a/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js +++ b/public/react/src/modules/courses/common/titleSearch/TitleSearchSection.js @@ -1,8 +1,5 @@ import React,{ Component } from "react"; -import { Input } from "antd"; - -const Search = Input.Search; - +import {publicSearchs} from 'educoder'; class Titlesearchsection extends Component{ constructor(props){ super(props); @@ -14,7 +11,7 @@ class Titlesearchsection extends Component{ render(){ let { addGroup } = this.state; const { firstRowRight, secondRowLeft,firstRowMid, secondRowBotton,thirdRow, title, onInputSearchChange - , searchValue, onPressEnter, searchPlaceholder, showSearchInput } = this.props; + , searchValue, onPressEnter, searchPlaceholder, allowClearonChange } = this.props; return( -
- { - defaultActiveKey===0||defaultActiveKey==="0"? - -
-

新增

-
-
- :"" - } - trigger.parentNode} placement="bottom" trigger="hover" content={contents} > +
+ this.props.setdatafunsval(e)} + onSearch={ (value)=>this.props.setdatafuns(value)} /> + +
@@ -122,19 +127,76 @@ class Contentpart extends Component {
- this.props.setdatafunsval(e)} - onSearch={ (value)=>this.props.setdatafuns(value)} /> + + + + + + +
+ {/*内容*/} + { + this.props.Contentdata.items === undefined ||this.props.Contentdata.items === null||this.props.Contentdata.items.length===0 ? +
+ : +
+ { + defaultActiveKey===1||defaultActiveKey==="1"? + this.props.selectallquestionsonthispage()} > + :"" + } + { + defaultActiveKey===0||defaultActiveKey==="0"? + this.props.selectallquestionsonthispage()}> + :"" + } +
+ } + + +
+ {/*列表集合*/} +
+ { + this.props.booljupyterurls===true? + + : + this.props.Contentdata.exams === undefined ||this.props.Contentdata.exams === null||this.props.Contentdata.exams.length===0? + + + : this.props.Contentdata.exams.map((object, index) => { + return ( + + + ) + })} + + + +
+ +
diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js new file mode 100644 index 000000000..cd541f429 --- /dev/null +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -0,0 +1,130 @@ +import React, {Component} from "react"; +import {Link, NavLink} from 'react-router-dom'; +import {WordsBtn, ActionBtn,SnackbarHOC,getImageUrl,markdownToHTML} from 'educoder'; +import axios from 'axios'; +import { + notification, + Spin, + Table, + Pagination, + Radio +} from "antd"; +import './../testioncss/testioncss.css'; +const tagArray = [ + 'A.', 'B.', 'C.', 'D.', 'E.', 'F.', 'G.', 'H.', 'I.', + 'J.', 'K.', 'L.', 'M.', 'N.', 'O.', 'P.', 'Q.', 'R.', + 'S.', 'T.', 'U.', 'V.', 'W.', 'X.', 'Y.', 'Z.' +] +class Listjihe extends Component { + constructor(props) { + super(props); + this.state = { + page:1, + name:"单选题", + nd:"简单", + chakanjiexibool:false, + } + } + //初始化 + componentDidMount(){ + + + } + + chakanjiexibool=()=>{ + if(this.state.chakanjiexibool===true){ + this.setState({ + chakanjiexibool:false + }) + }else{ + this.setState({ + chakanjiexibool:true + }) + } + + } + //选用 + Selectingpracticaltraining=(id)=>{ + let data={ + item_ids:[id] + } + this.props.getitem_baskets(data); + } + //撤销 + Selectingpracticaltrainings=(id)=>{ + + this.props.getitem_basketss(id); + } + + + + + + render() { + let {page,name,nd,chakanjiexibool}=this.state; + let {defaultActiveKey,items}=this.props; + + ////console.log("Listjihe"); + ////console.log(this.props); + return ( +
+
+
+ + +
+
+

前端开发评测试题1

+
+

试题数:35

+

总分:100

+

难度:适中

+
+
+
+

+ 更新时间:2019-12-09 + +

+

+ 使用次数:1245 +

+

+ 创建者:王老师 +

+ +
+
+

+ + 删除 +

+ +

+ + 编辑 +

+
+

+ + 公开 +

+
+
+
+ +
+
+

发起考试

+
+
+ +
+ +
+ ) + + } + +} +export default Listjihe; diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index 356df158d..fb4bf231b 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -249,7 +249,7 @@ } .w100s{ - width:100%; + width:100% !important; } .stestcen{ text-align: center; @@ -425,6 +425,35 @@ } +.newbutoons{ + width:106px; + height:34px; + background:rgba(76,172,255,1); + border-radius:4px; + line-height: 34px; + color:#ffffff; +} +.newbutoonss{ + width:106px; + height:34px; + background:rgba(51,189,140,1); + border-radius:4px; + line-height: 34px; + color:#ffffff; + + +} + +.newbutoontess{ + width:100%; + height:34px; + font-size:14px; + color:#ffffff; + line-height:34px; + text-align: center; +} + + .newbutoontes{ width:100%; height:42px; @@ -739,3 +768,50 @@ .lh35{ line-height: 35px; } + +.mr39{ + margin-right: 30px; +} + +.sjimg{ + width: 104px; +} +.sjfqks{ + width: 100px; +} + +.sjtitle{ + width:100%; + height:21px; + font-size:16px; + color:#333333; + line-height:21px; +} + +.sjtitles{ + width:64px; + height:17px; + font-size:12px; + color:#888888; + line-height:17px; +} +.sjtitles span{ + color: #333333 !important; + +} +.ml48{ + margin-left: 48px; +} +.sjtitlesysl{ + height:17px; + font-size:12px; + color:#BBBBBB; + line-height:30px; + +} +.mt11{ + margin-top: 11px; +} +.ml37{ + margin-left: 37px; +} From 9b7a99b018b89820aa60107929afca2dc61286f3 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 09:33:31 +0800 Subject: [PATCH 07/13] =?UTF-8?q?git=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/gits_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index bbb0e293e..7484e84b6 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -39,7 +39,7 @@ class GitsController < ApplicationController # 用户是否对对象拥有权限 system_user = User.find_by_login(input_username) || User.find_by_mail(input_username) || User.find_by_phone(input_username) # 如果用户名密码错误 - if system_user && !system_user.check_password?(input_password) + if system_user.blank? || system_user && !system_user.check_password?(input_password) uid_logger_error("git start: password is wrong") result = false else From 7fd8a10bf3f15cbf9d4f851bc25f56a63a766c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 09:35:13 +0800 Subject: [PATCH 08/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/Resource/index.js | 6 +- .../react/src/modules/courses/boards/index.js | 1 + .../modules/courses/coursesPublic/NoneData.js | 3 +- .../courses/members/CourseGroupList.js | 1 + .../shixunHomework/Listofworksstudentone.js | 107 +++++++++++------- 5 files changed, 76 insertions(+), 42 deletions(-) diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index ce4fb8dc2..501176882 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -230,7 +230,8 @@ class Fileslists extends Component{ filesId:list.id, name:list.name, course_is_public:result.data.data.course_is_public, - isSpin:false + isSpin:false, + page:page }) } } @@ -423,7 +424,7 @@ class Fileslists extends Component{ onPressEnter = () => { let {searchValue}=this.state; let{pagesize,page,tagname,sort,sorttype,coursesecondcategoryid}=this.state; - this.getfileslist(pagesize,page,tagname,searchValue,sort,sorttype,coursesecondcategoryid); + this.getfileslist(pagesize,1,tagname,searchValue,sort,sorttype,coursesecondcategoryid); } onInputSearchChange = (e) => { @@ -850,6 +851,7 @@ class Fileslists extends Component{ searchValue={ searchValue } // searchtype={this.props.isAdmin||this.props.isStudent ?true:false} onInputSearchChange={this.onInputSearchChange} + allowClearonChange={this.onInputSearchChange} firstRowRight={ {/*{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)?this.addDir()} className={"mr30 font-16"}>新建目录:"":""}*/} diff --git a/public/react/src/modules/courses/boards/index.js b/public/react/src/modules/courses/boards/index.js index 5cfbbeba3..ea49e862b 100644 --- a/public/react/src/modules/courses/boards/index.js +++ b/public/react/src/modules/courses/boards/index.js @@ -346,6 +346,7 @@ class Boards extends Component{ title={boardName || "帖子列表"} searchValue={ searchValue } onInputSearchChange={this.onInputSearchChange} + allowClearonChange={this.onInputSearchChange} showSearchInput={messages.length >= 10} searchPlaceholder={ '请输入帖子名称进行搜索' } firstRowRight={ diff --git a/public/react/src/modules/courses/coursesPublic/NoneData.js b/public/react/src/modules/courses/coursesPublic/NoneData.js index e039fd0d0..825ca5832 100644 --- a/public/react/src/modules/courses/coursesPublic/NoneData.js +++ b/public/react/src/modules/courses/coursesPublic/NoneData.js @@ -6,7 +6,8 @@ class NoneData extends Component{ super(props) } render(){ - const { style } = this.props; + const { style,searchtypes } = this.props; + return(
- {datajs === undefined ? "" : } + + {datajs === undefined ? "" :
} + + } @@ -3898,12 +3911,18 @@ class Listofworksstudentone extends Component { { homework_status && homework_status.length && homework_status.length === 0 ?
- +
: homework_status && homework_status.length > 0 && homework_status && homework_status[0] === "未发布" ?
- +
: @@ -4029,7 +4048,7 @@ class Listofworksstudentone extends Component {
-

暂时还没有相关数据哦!

+

{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}

@@ -4069,12 +4088,18 @@ class Listofworksstudentone extends Component { { homework_status && homework_status.length === 0 ?
- +
: homework_status && homework_status.length > 0 && homework_status && homework_status[0] === "未发布" ?
- +
:
@@ -4226,9 +4251,9 @@ class Listofworksstudentone extends Component {
- {datas === undefined ? "" :
} + {datas === undefined ? "" : + +
+ + } { @@ -4270,7 +4299,7 @@ class Listofworksstudentone extends Component {
-

暂时还没有相关数据哦!

+

{this.state.searchtypes===false?"暂时还没有相关数据哦!":"抱歉没有您要搜索的内容,请换个词语试试看"}

From 831fb7a31289a3496d161f17c853155f1a097385 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 09:35:59 +0800 Subject: [PATCH 09/13] =?UTF-8?q?git=E7=A7=98=E9=92=A5=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/gits_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index bbb0e293e..3f275533e 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -1,5 +1,5 @@ class GitsController < ApplicationController - + skip_before_action :check_sign # 说明: # 以下Git认证只针对新版git,Gitlab的Git认证不走该控制器 # 思路: From 85b73a531324d82ea94800e133ab192667f88f6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 09:54:56 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E5=A0=82?= =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkList.js | 54 +++++++++++-------- .../modules/courses/coursesPublic/NoneData.js | 2 +- .../shixunHomework/Listofworksstudentone.js | 5 +- 3 files changed, 35 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index ca93833bb..d60f68b22 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -1,28 +1,17 @@ import React,{Component} from "react"; import { Form, Select, Input, Button,Checkbox,Upload,Icon,message,Modal, Table, Divider, Tag,DatePicker,Radio,Tooltip,Spin, Pagination} from "antd"; -import {Link} from 'react-router-dom'; -import locale from 'antd/lib/date-picker/locale/zh_CN'; -import {WordsBtn, ConditionToolTip, queryString, getImageUrl, on, off, NoneData, sortDirections} from 'educoder'; +import {WordsBtn, ConditionToolTip, queryString, publicSearchs, on, off, NoneData, sortDirections} from 'educoder'; import axios from 'axios'; -import Modals from '../../modals/Modals'; -import CoursesListType from '../coursesPublic/CoursesListType'; -import HomeworkModal from "../coursesPublic/HomeworkModal"; import CheckAllGroup from '../common/button/CheckAllGroup' import moment from 'moment'; import CheckCodeModal from '../coursesPublic/modal/CheckCodeModal' -import '../css/Courses.css' -import WorkDetailPageHeader from './common/WorkDetailPageHeader' +import '../css/Courses.css'; import PublishRightnow from './PublishRightnow' import ModulationModal from "../coursesPublic/ModulationModal"; import AccessoryModal from "../coursesPublic/AccessoryModal"; import LeaderIcon from './common/LeaderIcon' -const { Option} = Select; -const CheckboxGroup = Checkbox.Group; -const confirm = Modal.confirm; -let GraduationTasksnewtype=true; const $ = window.$; const Search = Input.Search; -const RadioGroup = Radio.Group; function renderScore(score, content) { let color = '#747A7F' @@ -414,6 +403,7 @@ class CommonWorkList extends Component{ left_time: {}, category: {}, b_order: 'desc', + searchtypes:false } } onTablePagination = (page) => { @@ -423,10 +413,26 @@ class CommonWorkList extends Component{ } onSearchValue = (val) => { + if (val === ""||val===undefined) { + this.setState({ + search: undefined, + searchtypes:false + }) + }else{ + this.setState({ + searchtypes:true + }) + } this.fetchList() } onSearchValueInput = (e) => { - this.setState({search: e.target.value}) + if (e.target.value === ""||e.target.value===undefined) { + this.setState({ + search: undefined, + }) + } else { + this.setState({search: e.target.value}) + } } componentDidMount() { @@ -789,13 +795,14 @@ class CommonWorkList extends Component{ {/* value={search} */}
- + {/**/} + {publicSearchs("请输入姓名或学号搜索",this.onSearchValue,this.onSearchValueInput,this.onSearchValueInput)}
} @@ -859,7 +866,10 @@ class CommonWorkList extends Component{
- +
diff --git a/public/react/src/modules/courses/coursesPublic/NoneData.js b/public/react/src/modules/courses/coursesPublic/NoneData.js index 825ca5832..6f0422f67 100644 --- a/public/react/src/modules/courses/coursesPublic/NoneData.js +++ b/public/react/src/modules/courses/coursesPublic/NoneData.js @@ -24,7 +24,7 @@ class NoneData extends Component{ `} -

暂时还没有相关数据哦!

+

{searchtypes===true?"抱歉没有您要搜索的内容,请换个词语试试看":"暂时还没有相关数据哦!"}

) } diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js index 84a04687e..8c73793f1 100644 --- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js +++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js @@ -2961,10 +2961,9 @@ class Listofworksstudentone extends Component { } //搜索学生 文字输入 inputSearchValuest = (e) => { - // console.log(e.target.value) - if (e.target.value === "") { + if (e.target.value === ""||e.target.value===undefined) { this.setState({ - searchtext: undefined + searchtext: undefined, }) } else { this.setState({ From 827d8b568c624bf4d4d835adcfc607e63f92e64e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 2 Jan 2020 09:56:42 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/shixuns_controller.rb | 15 +++++++++++++-- config/routes.rb | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index 4f2a19536..c641231a6 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -19,7 +19,7 @@ class ShixunsController < ApplicationController :add_file, :jupyter_exec] before_action :allowed, only: [:update, :close, :update_propaedeutics, :settings, :publish, :apply_public, - :shixun_members_added, :change_manager, :collaborators_delete, + :shixun_members_added, :change_manager, :collaborators_delete, :upload_git_file, :cancel_apply_public, :cancel_publish, :add_collaborators, :add_file] before_action :portion_allowed, only: [:copy] @@ -883,7 +883,18 @@ class ShixunsController < ApplicationController author_name = current_user.real_name author_email = current_user.git_mail @content = update_file_content content, @repo_path, @path, author_email, author_name, "Edit by browser" - end + end + + def upload_git_file + upload_file = params["file"] + uid_logger("#########################file_params####{params["#{params[:file]}"]}") + raise "未上传文件" unless upload_file + content = upload_file.tempfile.read + author_name = current_user.real_name + author_email = current_user.git_mail + update_file_content(content, @repo_path, author_email, author_name, "upload by browser") + render_ok + end def add_collaborators member_ids = "(" + @shixun.shixun_members.map(&:user_id).join(',') + ")" diff --git a/config/routes.rb b/config/routes.rb index b61b2e608..69d6d9377 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -279,6 +279,7 @@ Rails.application.routes.draw do post :set_secret_dir post :commits post :file_content + post :upload_git_file post :update_file post :close post :add_file From 8dd3414c37eddf08bccf661f9682f22fd945a674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 2 Jan 2020 10:06:38 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/question/Question.js | 26 ++++++++-------- .../question/questioncss/questioncom.css | 4 ++- .../src/modules/testpaper/Testpaperlibrary.js | 26 ++++++++++++++-- .../testpaper/component/Contentpart.js | 3 ++ .../modules/testpaper/component/Listjihe.js | 31 +++++++++++-------- .../testpaper/testioncss/testioncss.css | 8 ++++- 6 files changed, 68 insertions(+), 30 deletions(-) diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js index 2da5f0d0e..26b909fea 100644 --- a/public/react/src/modules/question/Question.js +++ b/public/react/src/modules/question/Question.js @@ -394,19 +394,19 @@ class Question extends Component { this.setState({ keywords: e.target.value }) - var data = { - discipline_id:this.state.discipline_id, - sub_discipline_id:this.state.sub_discipline_id, - tag_discipline_id:this.state.tag_discipline_id, - public: this.state.defaultActiveKey, - difficulty: this.state.difficulty, - item_type: this.state.item_type, - keywords: e.target.value, - page: this.state.page, - per_page:10, - }; - - this.getdata(data); + // var data = { + // discipline_id:this.state.discipline_id, + // sub_discipline_id:this.state.sub_discipline_id, + // tag_discipline_id:this.state.tag_discipline_id, + // public: this.state.defaultActiveKey, + // difficulty: this.state.difficulty, + // item_type: this.state.item_type, + // keywords: e.target.value, + // page: this.state.page, + // per_page:10, + // }; + // + // this.getdata(data); } setdatafuns = (value) => { diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css index 1eaed0f85..6c5e54924 100644 --- a/public/react/src/modules/question/questioncss/questioncom.css +++ b/public/react/src/modules/question/questioncss/questioncom.css @@ -258,8 +258,10 @@ width:70%; } .w30s{ - width:70%; + width:30%; } + + .w50s{ width: 50%; } diff --git a/public/react/src/modules/testpaper/Testpaperlibrary.js b/public/react/src/modules/testpaper/Testpaperlibrary.js index 4c2ae7a00..89768e2fc 100644 --- a/public/react/src/modules/testpaper/Testpaperlibrary.js +++ b/public/react/src/modules/testpaper/Testpaperlibrary.js @@ -35,7 +35,7 @@ class Testpaperlibrary extends Component { booljupyterurls:false, Contentdata:[], items_count:0, - + defaultActiveKey:"0", } } getContainer = () => { @@ -86,9 +86,28 @@ class Testpaperlibrary extends Component { this.getdata(data); } + setdatafunsval = (e) => { + this.setState({ + keywords: e.target.value + }) - callback=()=>{ + } + setdatafuns = (value) => { + this.setState({ + keywords: value, + }) + } + callback = (key) => { + this.setState({ + defaultActiveKey: key, + }) + var data={ + page:1, + per_page:10, + public:key, + } + this.getdata(data); } //搜索框的内容 @@ -217,6 +236,9 @@ class Testpaperlibrary extends Component { this.setdatafuns(key)} + callback={(key)=>this.callback(key)} + setdatafunsval={(key)=>this.setdatafunsval(key)} setdifficulty={(bool)=>this.setdifficulty(bool)} > diff --git a/public/react/src/modules/testpaper/component/Contentpart.js b/public/react/src/modules/testpaper/component/Contentpart.js index fa20b3093..765be880f 100644 --- a/public/react/src/modules/testpaper/component/Contentpart.js +++ b/public/react/src/modules/testpaper/component/Contentpart.js @@ -69,6 +69,9 @@ class Contentpart extends Component { width: 31px !important; left: 14px; } + .ant-tabs-nav{ + z-index: 1000; + } ` } diff --git a/public/react/src/modules/testpaper/component/Listjihe.js b/public/react/src/modules/testpaper/component/Listjihe.js index cd541f429..da10214a0 100644 --- a/public/react/src/modules/testpaper/component/Listjihe.js +++ b/public/react/src/modules/testpaper/component/Listjihe.js @@ -64,8 +64,13 @@ class Listjihe extends Component { let {page,name,nd,chakanjiexibool}=this.state; let {defaultActiveKey,items}=this.props; - ////console.log("Listjihe"); - ////console.log(this.props); + const names= items&&items.name&&items.name; + const question_counts=items&&items.question_count&&items.question_count; + const total_scores =items&&items.total_score&&items.total_score; + const difficultys=items&&items.difficulty&&items.difficulty===1?"简单":items&&items.difficulty&&items.difficulty===2?"适中":items&&items.difficulty&&items.difficulty===3?"困难":"" + const update_times=items&&items.update_time&&items.update_time; + const quotess =items&&items.quotes&&items.quotes; + const authors=items&&items.author&&items.author.name; return (
@@ -74,27 +79,27 @@ class Listjihe extends Component {
-

前端开发评测试题1

+

{names}

-

试题数:35

-

总分:100

-

难度:适中

+

试题数:{question_counts}

+

总分:{total_scores}

+

难度:{difficultys}

-
+

- 更新时间:2019-12-09 + 更新时间:{update_times}

-

- 使用次数:1245 +

+ 使用次数:{quotess}

-

- 创建者:王老师 +

+ 创建者:{authors}

-
+

删除 diff --git a/public/react/src/modules/testpaper/testioncss/testioncss.css b/public/react/src/modules/testpaper/testioncss/testioncss.css index fb4bf231b..6cfb3a724 100644 --- a/public/react/src/modules/testpaper/testioncss/testioncss.css +++ b/public/react/src/modules/testpaper/testioncss/testioncss.css @@ -258,7 +258,13 @@ width:70%; } .w30s{ - width:70%; + width:30%; +} +.w60s{ + width:60%; +} +.w40s{ + width:40%; } .w50s{ width: 50%; From 54474ccbb5706bcaaf51115baf719d0ba93a71f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Thu, 2 Jan 2020 10:12:36 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/busyWork/CommonWorkList.js | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index d60f68b22..35b2a1ee8 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -403,7 +403,8 @@ class CommonWorkList extends Component{ left_time: {}, category: {}, b_order: 'desc', - searchtypes:false + searchtypes:false, + loadingstate:false } } onTablePagination = (page) => { @@ -420,9 +421,11 @@ class CommonWorkList extends Component{ }) }else{ this.setState({ - searchtypes:true + searchtypes:true, + loadingstate:true }) } + this.fetchList() } onSearchValueInput = (e) => { @@ -482,7 +485,8 @@ class CommonWorkList extends Component{ if (response.data) { this.setState({ ...response.data, - isSpin:false + isSpin:false, + loadingstate:false }) this.props.initWorkDetailCommonState && this.props.initWorkDetailCommonState( Object.assign({...response.data}, { @@ -492,7 +496,8 @@ class CommonWorkList extends Component{ }).catch((error)=>{ console.log(error) this.setState({ - isSpin:false + isSpin:false, + loadingstate:false }) }) @@ -850,9 +855,9 @@ class CommonWorkList extends Component{