dev_hjm
commit
9d34878955
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 18 KiB |
@ -1,39 +1,56 @@
|
|||||||
.ant-checkbox-group > div .boardsList{
|
.ant-checkbox-group > div .boardsList{
|
||||||
/* border-top: 1px solid #ebebeb; */
|
/* border-top: 1px solid #ebebeb; */
|
||||||
padding:10px 0px 20px!important;
|
padding:10px 0px 20px!important;
|
||||||
}
|
}
|
||||||
.ant-checkbox-group > div:first-child .boardsList{
|
.ant-checkbox-group > div:first-child .boardsList{
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
.boardsList .contentSection {
|
.boardsList .contentSection {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.ant-select-selection--single,.ant-select-selection__rendered{
|
.ant-select-selection--single,.ant-select-selection__rendered{
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input:focus + .ant-input-group-addon{
|
.ant-input:focus + .ant-input-group-addon{
|
||||||
background-color: #fff!important;
|
background-color: #fff!important;
|
||||||
}
|
}
|
||||||
.ant-input-group-addon{
|
.ant-input-group-addon{
|
||||||
color: #666!important;
|
color: #666!important;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border: 1px solid #d9d9d9!important;
|
border: 1px solid #d9d9d9!important;
|
||||||
border-left: none!important;
|
border-left: none!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.courseForm .ant-form-item-label{
|
.courseForm .ant-form-item-label{
|
||||||
margin-left: unset;
|
margin-left: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 毕设选题列表 */
|
/* 毕设选题列表 */
|
||||||
.TopicDetailTable .topHead{background-color: #F5F5F5;height: 56px;color: #666666;padding:0px 30px}
|
.TopicDetailTable .topHead{background-color: #F5F5F5;height: 56px;color: #666666;padding:0px 30px}
|
||||||
.TopicDetailTable .topHead span,.TopicDetailTable .bottomBody li span{display: block;float: left;justify-content: center;align-items: center;display: -webkit-flex;height: 56px;}
|
.TopicDetailTable .topHead span,.TopicDetailTable .bottomBody li span{display: block;float: left;justify-content: center;align-items: center;display: -webkit-flex;height: 56px;}
|
||||||
.TopicDetailTable .bottomBody{padding:0px 30px}
|
.TopicDetailTable .bottomBody{padding:0px 30px}
|
||||||
.TopicDetailTable .bottomBody li{border-bottom: 1px solid #eee;clear: both;}
|
.TopicDetailTable .bottomBody li{border-bottom: 1px solid #eee;clear: both;}
|
||||||
.TopicDetailTable .bottomBody li:last-child{border-bottom: none;}
|
.TopicDetailTable .bottomBody li:last-child{border-bottom: none;}
|
||||||
|
|
||||||
|
.maxnamewidth100{
|
||||||
|
max-width: 100px;
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
white-space:nowrap;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.maxnamewidth110{
|
||||||
|
max-width: 110px;
|
||||||
|
overflow:hidden;
|
||||||
|
text-overflow:ellipsis;
|
||||||
|
white-space:nowrap;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.ysyslxh{
|
||||||
|
background: #fafafa;
|
||||||
|
}
|
@ -1,216 +1,213 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Modal,Checkbox,Input } from "antd";
|
import { Modal,Checkbox,Input } from "antd";
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const Search = Input.Search;
|
const Search = Input.Search;
|
||||||
const CheckboxGroup = Checkbox.Group;
|
const CheckboxGroup = Checkbox.Group;
|
||||||
class addCollaborators extends Component{
|
class addCollaborators extends Component{
|
||||||
constructor(props){
|
constructor(props){
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
addPartner:false,
|
addPartner:false,
|
||||||
page:1,
|
page:1,
|
||||||
partnerList:undefined,
|
partnerList:undefined,
|
||||||
search:'',
|
search:'',
|
||||||
partnerListid:[],
|
partnerListid:[],
|
||||||
checkAll: false,
|
checkAll: false,
|
||||||
optionss:[]
|
optionss:[]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addBox=()=>{
|
addBox=()=>{
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
addPartner:true,
|
addPartner:true,
|
||||||
search:"",
|
search:"",
|
||||||
page:1,
|
page:1,
|
||||||
partnerList:undefined,
|
partnerList:undefined,
|
||||||
optionss:[]
|
optionss:[]
|
||||||
})
|
})
|
||||||
this.searchList("")
|
this.searchList("")
|
||||||
|
|
||||||
}
|
}
|
||||||
hideAddBox=()=>{
|
hideAddBox=()=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
addPartner:false,
|
addPartner:false,
|
||||||
optionss:[],
|
optionss:[],
|
||||||
partnerListid:[]
|
partnerListid:[]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 搜索框输入
|
// 搜索框输入
|
||||||
changeSearchValue=(e)=>{
|
changeSearchValue=(e)=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
search: e.target.value
|
search: e.target.value
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 回车搜索--搜索成功后page为1
|
// 回车搜索--搜索成功后page为1
|
||||||
searchList=()=>{
|
searchList=()=>{
|
||||||
let id=this.props.match.params.pathId;
|
let id=this.props.match.params.pathId;
|
||||||
let {search,page}=this.state;
|
let {search,page}=this.state;
|
||||||
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+page;
|
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+page;
|
||||||
axios.post(url).then((result)=>{
|
axios.post(url).then((result)=>{
|
||||||
if(result.status==200){
|
if(result.status==200){
|
||||||
let list=result.data.users;
|
let list=result.data.users;
|
||||||
let optionss=[]
|
let optionss=[]
|
||||||
for(var i=0; i<list.length;i++){
|
for(var i=0; i<list.length;i++){
|
||||||
optionss.push(list[i].user_id)
|
optionss.push(list[i].user_id)
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
partnerList:result.data.users,
|
partnerList:result.data.users,
|
||||||
page:1,
|
page:1,
|
||||||
optionss:optionss
|
optionss:optionss
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch((error)=>{
|
}).catch((error)=>{
|
||||||
console.log(error);
|
console.log(error);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SaveAddBox=()=>{
|
SaveAddBox=()=>{
|
||||||
let {partnerListid} =this.state;
|
let {partnerListid} =this.state;
|
||||||
let id=this.props.match.params.pathId;
|
let id=this.props.match.params.pathId;
|
||||||
let url="/paths/"+id+"/add_subject_members.json"
|
let url="/paths/"+id+"/add_subject_members.json"
|
||||||
axios.post(url,{
|
axios.post(url,{
|
||||||
user_ids:partnerListid
|
user_ids:partnerListid
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
if(response.status==200){
|
if(response.status==200){
|
||||||
this.setState({
|
this.setState({
|
||||||
addPartner:false,
|
addPartner:false,
|
||||||
optionss:[],
|
optionss:[],
|
||||||
partnerListid:[]
|
partnerListid:[]
|
||||||
})
|
})
|
||||||
this.props.updatadetailInfoLists();
|
this.props.updatadetailInfoLists();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
addCollaboratorsid=(id)=>{
|
addCollaboratorsid=(id)=>{
|
||||||
this.setState({
|
this.setState({
|
||||||
partnerListid:id
|
partnerListid:id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onCheckAllChange = (e) => {
|
onCheckAllChange = (e) => {
|
||||||
let {optionss} =this.state;
|
let {optionss} =this.state;
|
||||||
|
|
||||||
if(e.target.checked===true){
|
if(e.target.checked===true){
|
||||||
this.setState({
|
this.setState({
|
||||||
checkAll: e.target.checked,
|
checkAll: e.target.checked,
|
||||||
partnerListid:optionss
|
partnerListid:optionss
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
checkAll: e.target.checked,
|
checkAll: e.target.checked,
|
||||||
partnerListid:[]
|
partnerListid:[]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contentViewScroll=(e)=>{
|
contentViewScroll=(e)=>{
|
||||||
//滑动到底判断
|
//滑动到底判断
|
||||||
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
|
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
|
||||||
// console.log("到达底部");
|
// console.log("到达底部");
|
||||||
|
|
||||||
let id=this.props.match.params.pathId;
|
let id=this.props.match.params.pathId;
|
||||||
let {search,page,partnerList,optionss}=this.state;
|
let {search,page,partnerList,optionss}=this.state;
|
||||||
let newpage=page+1;
|
let newpage=page+1;
|
||||||
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+newpage;
|
let url='/paths/'+id+'/search_members.json?search='+search+"&page="+newpage;
|
||||||
|
|
||||||
axios.post(url).then((result)=>{
|
axios.post(url).then((result)=>{
|
||||||
if(result.status==200){
|
if(result.status==200){
|
||||||
let list=result.data.users;
|
let list=result.data.users;
|
||||||
let newlist=partnerList;
|
let newlist=partnerList;
|
||||||
for(var j=0; j<list.length;j++){
|
for(var j=0; j<list.length;j++){
|
||||||
newlist.push(list[j])
|
newlist.push(list[j])
|
||||||
}
|
}
|
||||||
let newoptionss=optionss
|
let newoptionss=optionss
|
||||||
for(var i=0; i<list.length;i++){
|
for(var i=0; i<list.length;i++){
|
||||||
newoptionss.push(list[i].user_id)
|
newoptionss.push(list[i].user_id)
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
partnerList:newlist,
|
partnerList:newlist,
|
||||||
page:newpage,
|
page:newpage,
|
||||||
optionss:optionss
|
optionss:optionss
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch((error)=>{
|
}).catch((error)=>{
|
||||||
console.log(error);
|
console.log(error);
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render(){
|
render(){
|
||||||
let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state;
|
let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state;
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="edu-back-white bor-top-greyE addTeamMember">
|
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
|
||||||
{
|
<div className="edu-back-white bor-top-greyE addTeamMember">
|
||||||
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
|
<a onClick = {this.addBox} className="color-blue">+ 添加合作者</a>
|
||||||
<a onClick = {this.addBox} className="color-blue">+ 添加合作者</a>
|
<Modal
|
||||||
:""
|
keyboard={false}
|
||||||
}
|
title="添加合作者"
|
||||||
|
visible={addPartner}
|
||||||
<Modal
|
closable={false}
|
||||||
keyboard={false}
|
footer={null}
|
||||||
title="添加合作者"
|
destroyOnClose={true}
|
||||||
visible={addPartner}
|
>
|
||||||
closable={false}
|
<div className="newupload_conbox clearfix">
|
||||||
footer={null}
|
<div className="mb20">
|
||||||
destroyOnClose={true}
|
<Search placeholder="输入用户的真实姓名进行搜索" id="search_not_collaborators" style={{"width":"100%"}}
|
||||||
>
|
autocomplete="off"
|
||||||
<div className="newupload_conbox clearfix">
|
value={search}
|
||||||
<div className="mb20">
|
onInput={this.changeSearchValue}
|
||||||
<Search placeholder="输入用户的真实姓名进行搜索" id="search_not_collaborators" style={{"width":"100%"}}
|
onSearch={search => this.searchList(search)} />
|
||||||
autocomplete="off"
|
</div>
|
||||||
value={search}
|
<p className="clearfix pt10 pl10 pr10" style={{"background":"#F4FAFF","marginBottom":"0px"}}>
|
||||||
onInput={this.changeSearchValue}
|
<Checkbox className="fl"
|
||||||
onSearch={search => this.searchList(search)} />
|
onChange={this.onCheckAllChange}
|
||||||
</div>
|
checked={this.state.checkAll}
|
||||||
<p className="clearfix pt10 pl10 pr10" style={{"background":"#F4FAFF","marginBottom":"0px"}}>
|
></Checkbox>
|
||||||
<Checkbox className="fl"
|
<span className="span1 fl edu-txt-w80 task-hide font-bd">姓名</span>
|
||||||
onChange={this.onCheckAllChange}
|
<span className="span3 fl edu-txt-w80 task-hide font-bd">昵称</span>
|
||||||
checked={this.state.checkAll}
|
<span className="span2 fl edu-txt-w80 task-hide font-bd">职位</span>
|
||||||
></Checkbox>
|
<span className="span3 fl edu-txt-w260 task-hide font-bd">单位</span>
|
||||||
<span className="span1 fl edu-txt-w80 task-hide font-bd">姓名</span>
|
</p>
|
||||||
<span className="span3 fl edu-txt-w80 task-hide font-bd">昵称</span>
|
<ul className="upload_select_box fl clearfix mb15"
|
||||||
<span className="span2 fl edu-txt-w80 task-hide font-bd">职位</span>
|
style={{"overflow-y":"auto"}}
|
||||||
<span className="span3 fl edu-txt-w260 task-hide font-bd">单位</span>
|
id="search_not_members_list"
|
||||||
</p>
|
|
||||||
<ul className="upload_select_box fl clearfix mb15"
|
onScroll={this.contentViewScroll}
|
||||||
style={{"overflow-y":"auto"}}
|
>
|
||||||
id="search_not_members_list"
|
<CheckboxGroup style={{ width: '100%' }} value={checkAll===true?optionss:partnerListid} onChange={this.addCollaboratorsid}>
|
||||||
|
{
|
||||||
onScroll={this.contentViewScroll}
|
partnerList && partnerList.map((item,key)=>{
|
||||||
>
|
return(
|
||||||
<CheckboxGroup style={{ width: '100%' }} value={checkAll===true?optionss:partnerListid} onChange={this.addCollaboratorsid}>
|
<li className="clearfix">
|
||||||
{
|
<Checkbox value={item.user_id} key={key} className="fl"></Checkbox>
|
||||||
partnerList && partnerList.map((item,key)=>{
|
<a target="_blank" className="task-hide color-grey3 fl span1 edu-txt-w80">{item.user_name}</a>
|
||||||
return(
|
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.nickname}</span>
|
||||||
<li className="clearfix">
|
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identity}</span>
|
||||||
<Checkbox value={item.user_id} key={key} className="fl"></Checkbox>
|
<span className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span>
|
||||||
<a target="_blank" className="task-hide color-grey3 fl span1 edu-txt-w80">{item.user_name}</a>
|
</li>
|
||||||
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.nickname}</span>
|
)
|
||||||
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identity}</span>
|
})
|
||||||
<span className="span3 color-grey fl edu-txt-w260 task-hide">{item.school_name}</span>
|
}
|
||||||
</li>
|
</CheckboxGroup>
|
||||||
)
|
</ul>
|
||||||
})
|
<div className="mt20 marginauto clearfix edu-txt-center">
|
||||||
}
|
<a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a>
|
||||||
</CheckboxGroup>
|
<a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a>
|
||||||
</ul>
|
</div>
|
||||||
<div className="mt20 marginauto clearfix edu-txt-center">
|
</div>
|
||||||
<a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a>
|
</Modal>
|
||||||
<a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a>
|
</div>:""
|
||||||
</div>
|
|
||||||
</div>
|
)
|
||||||
</Modal>
|
}
|
||||||
</div>
|
}
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export default addCollaborators;
|
export default addCollaborators;
|
@ -1,251 +1,253 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Redirect } from 'react-router';
|
import { Redirect } from 'react-router';
|
||||||
|
|
||||||
import { BrowserRouter as Router, Route} from "react-router-dom";
|
import { BrowserRouter as Router, Route} from "react-router-dom";
|
||||||
|
|
||||||
import { Switch ,Input,Tooltip,Icon} from 'antd';
|
import { Switch ,Input,Tooltip,Icon} from 'antd';
|
||||||
|
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
|
|
||||||
import 'antd/lib/switch/style/index.css'
|
import 'antd/lib/switch/style/index.css'
|
||||||
|
|
||||||
import './shixunCss/ShixunCardList.css';
|
import './shixunCss/ShixunCardList.css';
|
||||||
|
|
||||||
import { on, off } from 'educoder'
|
import { on, off } from 'educoder'
|
||||||
|
|
||||||
const $ = window.$;
|
const $ = window.$;
|
||||||
|
|
||||||
const Search = Input.Search;
|
const Search = Input.Search;
|
||||||
|
|
||||||
class ShixunCardList extends Component {
|
class ShixunCardList extends Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state={
|
this.state={
|
||||||
allevent:"desc",
|
allevent:"desc",
|
||||||
mine:0,
|
mine:0,
|
||||||
InputValue: props.keyword || "",
|
InputValue: props.keyword || "",
|
||||||
typemy:0,
|
typemy:0,
|
||||||
hots:0,
|
hots:0,
|
||||||
news:0,
|
news:0,
|
||||||
shixunid:"",
|
shixunid:"",
|
||||||
upcircle:false,
|
upcircle:false,
|
||||||
typekeyid:undefined,
|
typekeyid:undefined,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate = (prevProps, prevState) => {
|
componentDidUpdate = (prevProps, prevState) => {
|
||||||
if (this.props.keyword != prevProps.keyword) {
|
if (this.props.keyword != prevProps.keyword) {
|
||||||
this.setState({
|
this.setState({
|
||||||
InputValue: this.props.keyword
|
InputValue: this.props.keyword
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
componentDidMount = () => {
|
componentDidMount = () => {
|
||||||
on('searchKeywordChange', (event, data) => {
|
on('searchKeywordChange', (event, data) => {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
this.Input_search(data)
|
this.Input_search(data)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
componentWillUnmount = () => {
|
componentWillUnmount = () => {
|
||||||
off('searchKeywordChange')
|
off('searchKeywordChange')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
latestHot=(e,key)=>{
|
latestHot=(e,key)=>{
|
||||||
|
|
||||||
let{upcircle,typekeyid}=this.state;
|
let{upcircle,typekeyid}=this.state;
|
||||||
|
|
||||||
let id = e.target.id;
|
let id = e.target.id;
|
||||||
$("#"+id).siblings().removeClass("active");
|
$("#"+id).siblings().removeClass("active");
|
||||||
$("#"+id).addClass("active");
|
$("#"+id).addClass("active");
|
||||||
|
|
||||||
let type;
|
let type;
|
||||||
|
|
||||||
if(id==="all"){
|
// if(id==="all"){
|
||||||
type="publish_time";
|
// type="publish_time";
|
||||||
}
|
// }
|
||||||
if(id==="hot"){
|
if(id==="hot"){
|
||||||
type="hot";
|
type="hot";
|
||||||
}else if(id==="new"){
|
}else if(id==="new"){
|
||||||
type="new";
|
type="new";
|
||||||
|
|
||||||
}
|
}
|
||||||
if(typekeyid===key){
|
if(typekeyid===key){
|
||||||
if(upcircle===true){
|
if(upcircle===true){
|
||||||
this.setState({
|
this.setState({
|
||||||
upcircle:false,
|
upcircle:false,
|
||||||
})
|
})
|
||||||
this.props.Shixunsupcircles("desc")
|
this.props.Shixunsupcircles("desc")
|
||||||
}else if(upcircle===false){
|
}else if(upcircle===false){
|
||||||
this.setState({
|
this.setState({
|
||||||
upcircle:true,
|
upcircle:true,
|
||||||
})
|
})
|
||||||
this.props.Shixunsupcircles("asc")
|
this.props.Shixunsupcircles("asc")
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
typekeyid:key
|
typekeyid:key
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//allevent
|
//allevent
|
||||||
this.props.ShixunsState(false,type);
|
this.props.ShixunsState(false,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onSwitchChange=(e,key)=>{
|
onSwitchChange=(e,key)=>{
|
||||||
let id=e.target.id
|
let id=e.target.id
|
||||||
$("#"+id).siblings().removeClass("active");
|
$("#"+id).siblings().removeClass("active");
|
||||||
$("#"+id).addClass("active");
|
$("#"+id).addClass("active");
|
||||||
let {typemy,upcircle,typekeyid}=this.state;
|
let {typemy,upcircle,typekeyid}=this.state;
|
||||||
|
|
||||||
if(typekeyid===key){
|
if(typekeyid===key){
|
||||||
if(upcircle===true){
|
if(upcircle===true){
|
||||||
this.setState({
|
this.setState({
|
||||||
upcircle:false,
|
upcircle:false,
|
||||||
})
|
})
|
||||||
this.props.Shixunsupcircles("desc")
|
this.props.Shixunsupcircles("desc")
|
||||||
}else if(upcircle===false){
|
}else if(upcircle===false){
|
||||||
this.setState({
|
this.setState({
|
||||||
upcircle:true
|
upcircle:true
|
||||||
})
|
})
|
||||||
this.props.Shixunsupcircles("asc")
|
this.props.Shixunsupcircles("asc")
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
typekeyid:key
|
typekeyid:key
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(typemy===0){
|
if(typemy===0){
|
||||||
this.setState({
|
this.setState({
|
||||||
typemy:1
|
typemy:1
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.setState({
|
this.setState({
|
||||||
typemy:0
|
typemy:0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// allevent
|
// allevent
|
||||||
this.props.ShixunsSwitch();
|
this.props.ShixunsSwitch();
|
||||||
}
|
}
|
||||||
//输入框搜索
|
//输入框搜索
|
||||||
Input_search = (value) => {
|
Input_search = (value) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
InputValue: value
|
InputValue: value
|
||||||
})
|
})
|
||||||
this.props.OnSearchInput(value,true);
|
this.props.OnSearchInput(value,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Input_searchs = (e) => {
|
Input_searchs = (e) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
InputValue: e.target.value
|
InputValue: e.target.value
|
||||||
})
|
})
|
||||||
this.props.OnSearchInput(e.target.value,false);
|
this.props.OnSearchInput(e.target.value,false);
|
||||||
}
|
}
|
||||||
upcircles=(val)=>{
|
upcircles=(val)=>{
|
||||||
if(val==="asc"){
|
if(val==="asc"){
|
||||||
this.setState({
|
this.setState({
|
||||||
upcircle:false,
|
upcircle:false,
|
||||||
})
|
})
|
||||||
this.props.Shixunsupcircles("desc")
|
this.props.Shixunsupcircles("desc")
|
||||||
}else if(val==="desc"){
|
}else if(val==="desc"){
|
||||||
this.setState({
|
this.setState({
|
||||||
upcircle:true
|
upcircle:true
|
||||||
})
|
})
|
||||||
this.props.Shixunsupcircles("asc")
|
this.props.Shixunsupcircles("asc")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render(){
|
render(){
|
||||||
let {mine,InputValue,upcircle}=this.state;
|
let {mine,InputValue,upcircle}=this.state;
|
||||||
return (
|
return (
|
||||||
<div className="educontent mt20">
|
<div className="educontent mt20">
|
||||||
<div className="clearfix">
|
<div className="clearfix">
|
||||||
|
|
||||||
<div className="fl mr20 font-16 bestChoose shixun_repertoire active"
|
{/*<div className="fl mr20 font-16 bestChoose shixun_repertoire active"*/}
|
||||||
id={"all"}
|
{/*id={"all"}*/}
|
||||||
onClick={(e)=>this.latestHot(e,1)}>全部
|
{/*onClick={(e)=>this.latestHot(e,1)}>全部*/}
|
||||||
</div>
|
{/*</div>*/}
|
||||||
<div className="fl mr20 font-16 bestChoose shixun_repertoire"
|
{/*<div className="fl mr20 font-16 bestChoose shixun_repertoire"*/}
|
||||||
id={mine}
|
{/*id={mine}*/}
|
||||||
onClick={(e)=>this.onSwitchChange(e,2)}>我的
|
{/*onClick={(e)=>this.onSwitchChange(e,2)}>我的*/}
|
||||||
</div>
|
{/*</div>*/}
|
||||||
|
|
||||||
<div className="fl mr20 font-16 bestChoose shixun_repertoire"
|
<div className="fl mr20 font-16 bestChoose shixun_repertoire active"
|
||||||
id="hot"
|
id="new"
|
||||||
onClick={(e)=>this.latestHot(e,3)}>最热
|
onClick={(e)=>this.latestHot(e,4)}>最新
|
||||||
</div>
|
</div>
|
||||||
<div className="fl font-16 bestChoose shixun_repertoire"
|
|
||||||
id="new"
|
<div className="fl font-16 bestChoose shixun_repertoire"
|
||||||
onClick={(e)=>this.latestHot(e,4)}>最新
|
id="hot"
|
||||||
</div>
|
onClick={(e)=>this.latestHot(e,3)}>最热
|
||||||
|
</div>
|
||||||
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"
|
|
||||||
style={{display:upcircle===true?"block":"none"}}
|
|
||||||
// onClick={()=>this.upcircles("asc")}
|
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
|
||||||
>
|
{/*style={{display:upcircle===true?"block":"none"}}*/}
|
||||||
<Tooltip placement="bottom" title={"升序"}>
|
{/*// onClick={()=>this.upcircles("asc")}*/}
|
||||||
<Icon type="up-circle" theme="twoTone" />
|
{/*>*/}
|
||||||
{/*<Icon type="sort-descending" />*/}
|
{/*<Tooltip placement="bottom" title={"升序"}>*/}
|
||||||
</Tooltip>
|
{/*<Icon type="up-circle" theme="twoTone" />*/}
|
||||||
</div>
|
{/*/!*<Icon type="sort-descending" />*!/*/}
|
||||||
<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"
|
{/*</Tooltip>*/}
|
||||||
// onClick={()=>this.upcircles("desc")}
|
{/*</div>*/}
|
||||||
style={{display:upcircle===true?"none":"block"}}
|
{/*<div className="fl font-16 bestChoose shixun_repertoire ml20 mt1"*/}
|
||||||
>
|
{/*// onClick={()=>this.upcircles("desc")}*/}
|
||||||
<Tooltip placement="bottom" title={"降序"}>
|
{/*style={{display:upcircle===true?"none":"block"}}*/}
|
||||||
<Icon type="down-circle" theme="twoTone" />
|
{/*>*/}
|
||||||
{/*<Icon type="sort-ascending" />*/}
|
{/*<Tooltip placement="bottom" title={"降序"}>*/}
|
||||||
</Tooltip>
|
{/*<Icon type="down-circle" theme="twoTone" />*/}
|
||||||
</div>
|
{/*/!*<Icon type="sort-ascending" />*!/*/}
|
||||||
|
{/*</Tooltip>*/}
|
||||||
<div className="fr mt3">
|
{/*</div>*/}
|
||||||
{/*<Search*/}
|
|
||||||
{/*style={{ width: 300 }}*/}
|
{/*<div className="fr mt3">*/}
|
||||||
{/*className="search-new-input fl"*/}
|
{/*<Search*/}
|
||||||
{/*placeholder="请输入创建者/实训/关卡名称进行搜索"*/}
|
{/*style={{ width: 300 }}*/}
|
||||||
{/*value={InputValue}*/}
|
{/*className="search-new-input fl"*/}
|
||||||
{/*onInput={this.Input_searchs}*/}
|
{/*placeholder="请输入创建者/实训/关卡名称进行搜索"*/}
|
||||||
{/*onSearch={value => this.Input_search(value)}*/}
|
{/*value={InputValue}*/}
|
||||||
{/*enterButton*/}
|
{/*onInput={this.Input_searchs}*/}
|
||||||
{/*/>*/}
|
{/*onSearch={value => this.Input_search(value)}*/}
|
||||||
|
{/*enterButton*/}
|
||||||
{/* <Search
|
{/*/>*/}
|
||||||
style={{ width: 300 }}
|
|
||||||
className="fl"
|
{/* <Search
|
||||||
placeholder="请输入创建者/实训/关卡名称进行搜索"
|
style={{ width: 300 }}
|
||||||
value={InputValue}
|
className="fl"
|
||||||
onInput={this.Input_searchs}
|
placeholder="请输入创建者/实训/关卡名称进行搜索"
|
||||||
onSearch={value => this.Input_search(value)}
|
value={InputValue}
|
||||||
autoComplete="off"
|
onInput={this.Input_searchs}
|
||||||
></Search> */}
|
onSearch={value => this.Input_search(value)}
|
||||||
</div>
|
autoComplete="off"
|
||||||
<div className="fr">
|
></Search> */}
|
||||||
<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{
|
{/*</div>*/}
|
||||||
this.props.search_tags === null ? "" : this.props.search_tags
|
{/*<div className="fr">*/}
|
||||||
}</span>
|
{/*<span className="fl color-grey-6 mr30 font-16 mt5" id="search_name">{*/}
|
||||||
{/*<div className="fl mr5" style={{marginTop:'1px'}}>*/}
|
{/*this.props.search_tags === null ? "" : this.props.search_tags*/}
|
||||||
{/*/!* <div className="controlblue"></div>*/}
|
{/*}</span>*/}
|
||||||
{/*<span className="controlring"></span> *!/*/}
|
{/*<div className="fl mr5" style={{marginTop:'1px'}}>*/}
|
||||||
{/*<Switch*/}
|
{/*/!* <div className="controlblue"></div>*/}
|
||||||
{/*className="controlbtn mr10 mt10 pr"*/}
|
{/*<span className="controlring"></span> *!/*/}
|
||||||
{/*size="small"*/}
|
{/*<Switch*/}
|
||||||
{/*style={{marginTop:'1px'}}*/}
|
{/*className="controlbtn mr10 mt10 pr"*/}
|
||||||
{/*onChange={this.onSwitchChange}*/}
|
{/*size="small"*/}
|
||||||
{/*/>*/}
|
{/*style={{marginTop:'1px'}}*/}
|
||||||
{/*</div>*/}
|
{/*onChange={this.onSwitchChange}*/}
|
||||||
{/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/}
|
{/*/>*/}
|
||||||
|
{/*</div>*/}
|
||||||
</div>
|
{/*<span className="fl font-16 cdefault" data-tip-down="隐藏我学习的实训">隐藏我的</span>*/}
|
||||||
<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>
|
|
||||||
</div>
|
{/*</div>*/}
|
||||||
</div>
|
{/*<span className="fr color-grey-6 mr30 font-16" id="search_name"></span>*/}
|
||||||
);
|
</div>
|
||||||
}
|
</div>
|
||||||
}
|
);
|
||||||
|
}
|
||||||
export default ShixunCardList;
|
}
|
||||||
|
|
||||||
|
export default ShixunCardList;
|
||||||
|
Loading…
Reference in new issue