@@ -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 3/5] =?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(
- {datajs === undefined ? "" :
}
+
+ {datajs === undefined ? "" : }
+
+
}
@@ -3898,12 +3911,18 @@ class Listofworksstudentone extends Component {
{
homework_status && homework_status.length && homework_status.length === 0 ?