Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_admin
hjm 6 years ago
commit 9b2ad1f2dd

@ -950,7 +950,7 @@ class Fileslists extends Component{
<div className="alltask edu-back-white"
style={
{
display: files===undefined?'block' :files.length===0? 'block' : 'none'
display: files===undefined?'none' :files.length===0? 'block' : 'none'
}
}
>

@ -467,7 +467,7 @@ class Sendresource extends Component{
{/*)*/}
{/*})}*/}
{newfileListtype===true?<p className={"color-red"}>请先上传资源</p>:""}
{newfileListtype===true&&this.state.fileListtype===false?<p className={"color-red"}>请先上传资源</p>:""}
<p className={"winth540"}>
<style>{`

@ -767,7 +767,7 @@ class GraduationTasks extends Component{
<div className="alltask edu-back-white"
style={
{
display: all_count===undefined?'block' :all_count===0? 'block' : 'none'
display: all_count===undefined?'none' :all_count===0? 'block' : 'none'
}
}
>

@ -28,7 +28,7 @@ class Boards extends Component{
checkAllValue: false,
checkBoxValues: [],
data:[],
topicList: [],
topicList: undefined,
course_public:1,
page:1,
totalCount:undefined,
@ -412,7 +412,7 @@ onBoardsNew=()=>{
}
onPressEnter={this.onPressEnter}
searchPlaceholder={"请输入名称进行搜索"}
showSearchInput={topicList.length >= pageSize}
showSearchInput={topicList&&topicList.length >= pageSize}
></Titlesearchsection>
<Spin size="large" spinning={this.state.isSpin}>
{
@ -475,7 +475,7 @@ onBoardsNew=()=>{
>
</Modals>
</div>
):(<NoneData></NoneData>)
):(topicList && topicList.length===0?<NoneData></NoneData>:<div className="clearfix stu_table mt20"></div>)
}
</Spin>
{

@ -143,6 +143,7 @@ class CoursesNew extends Component {
handleSubmit = (e) => {
e.preventDefault();
let first_category_url=this.props.current_user.first_category_url;
let coursesId = this.props.match.params.coursesId;
let {is_public,datatime} = this.state
// console.log(is_public)
@ -201,7 +202,8 @@ class CoursesNew extends Component {
).then((response) => {
// debugger
if (response.data.status === 0) {
this.goback()
// this.goback()
this.props.history.push(first_category_url);
}
}).catch((error) => {
console.log(error)
@ -244,7 +246,8 @@ class CoursesNew extends Component {
}
).then((response) => {
if (response.status === 200) {
this.goback()
// this.goback
this.props.history.push(response.data.first_category_url);
}
}).catch((error) => {
console.log(error)

@ -1205,7 +1205,7 @@ class ShixunHomework extends Component{
<div className="alltask "
style={
{
display: datas===undefined?'block' :datas.task_count===0? 'block' : 'none'
display: datas===undefined?'none' :datas.task_count===0? 'block' : 'none'
}
}
>

@ -398,23 +398,23 @@ class LoginDialog extends Component {
});
}
handleDialogClose = () => {
// if(this.props.match===undefined){
// window.location.href="/";
// }else if(this.props.match.path==="/"){
// this.setState({
// isRender: false
// })
// }else{
// window.location.href="/";
// }
this.setState({
isRender: false
})
try {
this.props.Modifyloginvalue();
}catch (e) {
if(this.props.match===undefined){
window.location.href="/";
}else{
this.setState({
isRender: false
})
this.props.Modifyloginvalue();
}
// this.setState({
// isRender: false
// })
// try {
// this.props.Modifyloginvalue();
// }catch (e) {
//
// }
}
loginEDU=()=>{

@ -5,7 +5,7 @@ import {
} from "antd";
import axios from 'axios';
import moment from 'moment';
import {getImageUrl,markdownToHTML} from 'educoder';
import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder';
import "../css/messagemy.css"
import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal';
//私信页面
@ -46,12 +46,14 @@ class Leftdialogue extends Component{
{
this.props.objeysl&&this.props.objeysl.sender.image_url ?
<img alt="头像" className="mr10 radius fl myimgw48 myimgh48"
src={getImageUrl("/images/" + this.props.objeysl.sender.image_url)} />:""
src={getImageUrl("images/" + this.props.objeysl.sender.image_url)} />:""
}
</a>
<div className="fl pr OtherSide-info">
<span className="trangle"></span>
<div className="sms break_word" id="message_content_show_25148" dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.objeysl.content).replace(/▁/g, "▁▁▁")}}></div>
<ImageLayerHook parentSel={`#Leftdialogue${this.props.keys}`} parentSel={`#Leftdialogue${this.props.keys}`}>
</ImageLayerHook>
<div className="sms break_word" id={`Leftdialogue${this.props.keys}`} dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.objeysl.content).replace(/▁/g, "▁▁▁")}}></div>
<div className="edu-txt-right mt5">
<a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除</a>
</div>

@ -575,12 +575,12 @@ class MessagChat extends Component{
}
{
parseInt(item.sender_id)===parseInt(this.props.match.params.userid)?
<Rightdialogue objeysl={item} {...this.state} {...this.props} DELETEsetreplyfun={(user_id,id)=>this.DELETEsetreplyfun(user_id,id)}>
<Rightdialogue keys={key} objeysl={item} {...this.state} {...this.props} DELETEsetreplyfun={(user_id,id)=>this.DELETEsetreplyfun(user_id,id)}>
{/*自己的*/}
</Rightdialogue>
:<Leftdialogue objeysl={item} {...this.state} {...this.props} DELETEsetreplyfun={(user_id,id)=>this.DELETEsetreplyfun(user_id,id)}>
:<Leftdialogue keys={key} objeysl={item} {...this.state} {...this.props} DELETEsetreplyfun={(user_id,id)=>this.DELETEsetreplyfun(user_id,id)}>
{/*他人的*/}
@ -639,7 +639,7 @@ class MessagChat extends Component{
return(
<div className="private-part clearfix" key={key} onClick={(i)=>this.Clickedontheuser(item.target)}>
<div className="part-line df">
<img src={getImageUrl("/images/"+item.target.image_url)} className="radius mr10 myimgw48 myimgh48"/>
<img src={getImageUrl("images/"+item.target.image_url)} className="radius mr10 myimgw48 myimgh48"/>
<div className="flex1">
<p className="clearfix mb15 lineh-17">
<span className="fl pr">
@ -650,7 +650,10 @@ class MessagChat extends Component{
</span>
<span className="color-grey-c fr">{moment(item.send_time).fromNow()}</span>
</p>
<p className="color-grey-6 lineh-20 justify break_word task-hide-2" style={{wordBreak:"break-word"}} dangerouslySetInnerHTML={{__html:item.content}}></p>
<p className="color-grey-6 lineh-20 justify break_word task-hide-2" style={{wordBreak:"break-word"}} id="MakedownHTML" dangerouslySetInnerHTML={{__html:item.content}}>
</p>
</div>
</div>

@ -121,7 +121,7 @@ class MessagSub extends Component{
return(
<div className="pl25 ridinglist edu-back-white" key={key}>
<div className="ridinglist-sub clearfix df tiding_item">
<img onMouseDown={()=>this.myCome(item)} src={getImageUrl("/images/"+item.trigger_user.image_url)} className="radius mr10 fl myimgw48 myimgh48"/>
<img onMouseDown={()=>this.myCome(item)} src={getImageUrl("images/"+item.trigger_user.image_url)} className="radius mr10 fl myimgw48 myimgh48"/>
<div className="fl flex1">
<p>
<a className="mr20 private_message_a" onMouseDown={()=>this.myCome(item)}>{item.trigger_user.name}</a>

@ -135,7 +135,7 @@ class MessagePrivate extends Component{
<div className="private-item clearfix df" key={key} onClick={()=>this.smyJump(3,item.target.id)}>
<a className="fl mr10 private_message_a" onMouseDown={()=>this.myCome(item)}>
<img onMouseDown={()=>this.myCome(item)} src={getImageUrl("/images/"+item.target.image_url)} className="radius myimgw48 myimgh48"/>
<img onMouseDown={()=>this.myCome(item)} src={getImageUrl("images/"+item.target.image_url)} className="radius myimgw48 myimgh48"/>
</a>
<div className="fl flex1">
<p>

@ -160,7 +160,7 @@ class Messagerouting extends Component{
<a >
{
this.props.current_user!== undefined?
<img className="person radius myw120 myh120" src={getImageUrl("/images/"+this.props.current_user.image_url)}/>
<img className="person radius myw120 myh120" src={getImageUrl("images/"+this.props.current_user.image_url)}/>
:""
}

@ -5,7 +5,7 @@ import {
} from "antd";
import axios from 'axios';
import moment from 'moment';
import {getImageUrl,markdownToHTML} from 'educoder';
import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder';
import "../css/messagemy.css"
import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal';
//私信页面
@ -46,12 +46,14 @@ class Rightdialogue extends Component{
<a onMouseDown={()=>this.myCome(this.props.objeysl.sender)}>
{this.props.objeysl&&this.props.objeysl.sender.image_url ?
<img alt="头像" className="ml10 radius fr myimgw48 myimgh48"
src={getImageUrl("/images/" + this.props.objeysl.sender.image_url)}/>:""
src={getImageUrl("images/" + this.props.objeysl.sender.image_url)}/>:""
}
</a>
<div className="fr pr ThisSide-info">
<span className="trangle"></span>
<div className="sms break_word" id="message_content_show_25137" dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.objeysl.content).replace(/▁/g, "▁▁▁")}}></div>
<ImageLayerHook parentSel={`#Rightdialogue${this.props.keys}`} parentSel={`#Rightdialogue${this.props.keys}`}>
</ImageLayerHook>
<div className="sms break_word" id={`Rightdialogue${this.props.keys}`} dangerouslySetInnerHTML={{__html: markdownToHTML(this.props.objeysl.content).replace(/▁/g, "▁▁▁")}}></div>
<div className="edu-txt-left mt5">
<a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)}
>删除</a>

@ -283,7 +283,7 @@ class WriteaprivateletterModal extends Component {
onFocus={this.myonFocus}
onChange={this.setdatafunsval}
suffix={
<img src={getImageUrl("/images/"+"educoder/icon/search.svg")} onClick={()=>this.search_message_person()}/>
<img src={getImageUrl("images/"+"educoder/icon/search.svg")} onClick={()=>this.search_message_person()}/>
}
/>
</div>
@ -296,7 +296,7 @@ class WriteaprivateletterModal extends Component {
users.map((item,key)=>{
return(
<p className="clearfix recently_item" key={key} onMouseDown={(c)=>this.Getuserinformation(item)}>
<img alt="1?1558048024" className="radius fl mr10 myimgw48 myimgh48" src={getImageUrl("/images/"+item.image_url)}
<img alt="头像" className="radius fl mr10 myimgw48 myimgh48" src={getImageUrl("images/"+item.image_url)}
/>
<span className="recently_name">{item.name}</span>
</p>

@ -18,7 +18,7 @@ let categorylist=[
{name:"云计算和大数据",value:"cloud_compute_and_big_data"},
{name:"人工智能",value:"ai"},
{name:"运维与测试",value:"devops_and_test"},
{name:"其",value:"other"},
{name:"其",value:"other"},
]
//
function setcategorylist(val){
@ -30,7 +30,6 @@ function setcategorylist(val){
}
}
)
return vals
}
@ -185,6 +184,17 @@ class PackageConcent extends Component {
})
}
onChangePagelist=(pageNum)=> {
this.setState({
page: pageNum
})
let {category, keyword, sort_by, sort_direction} = this.state;
this.setdatas(category, keyword, sort_by, sort_direction, pageNum)
}
render() {
let {data,page,category,sort_by,sort_direction,project_packages,
isRender,AccountProfiletype
@ -270,7 +280,7 @@ class PackageConcent extends Component {
</p>
</div>
<Spin size="large" spinning={this.state.isSpin}>
<Spin size="large" className="educontent project-packages-list" spinning={this.state.isSpin}>
{project_packages&&project_packages.map((item,key)=>{
return(
<div className="educontent project-packages-list mb30" key={key}>
@ -286,7 +296,7 @@ class PackageConcent extends Component {
<div className=" item-head mbf10">
<div className=" item-head-title">
<a className={"fl mt3 font-20 font-bd color-dark maxwidth700 "}
<a className={"fl mt3 font-20 font-bd color-dark maxwidth670 "}
onClick={()=>this.onReleaseRequirements("/crowdsourcing/"+item.id)}
title={item.title}
>{item.title}</a>
@ -338,6 +348,7 @@ class PackageConcent extends Component {
)
})}
</Spin>
{project_packages&&project_packages.length===0?<div className="edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center">
<img className="edu-nodata-img mb20" src="https://www.educoder.net/images/educoder/nodata.png" />
@ -345,7 +356,7 @@ class PackageConcent extends Component {
</div>:""}
<div className={"mt40"}>
<Pagination className="edu-txt-center" hideOnSinglePage={true} pageSize={20} current={page} total={data&&data.count} />
<Pagination className="edu-txt-center" onChange={this.onChangePagelist} hideOnSinglePage={true} pageSize={20} current={page} total={data&&data.count} />
</div>

@ -311,7 +311,7 @@ class PackageIndexNEITaskDetails extends Component {
<div className=" item-head mbf10 mt15 ">
<div className=" item-head-title ">
<span className={"fl mt3 font-18 font-bd color-dark maxwidth700 "}
<span className={"fl mt3 font-18 font-bd color-dark maxwidth670 "}
title={data&&data.title}
>{data&&data.title}
</span>

@ -36,7 +36,8 @@ class ProjectPackageIndex extends Component {
}
render() {
console.log(this.props)
console.log(this.state)
return (
<div className="newMain clearfix">

@ -31,8 +31,8 @@
color:#8F8F8F !important;
}
.maxwidth700{
max-width: 700px;
.maxwidth670{
max-width: 670px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;

@ -874,9 +874,17 @@ class TPMBanner extends Component {
style={{width: '100%'}}
/>
</div>
<style>
{`
.edu-h270{
height:270px;
overflow-y: auto;
}
`}
</style>
<div id="search_course_list" className={courses_count > 12?"cdefault ":"cdefault "}>
<div className="clearfix mb5 edu-bg-light-blue edu-h315">
<div className="clearfix mb20 edu-bg-light-blue edu-h270">
<ul>
<RadioGroup onChange={this.onChangeSenttothevcalue} value={Senttothevcalue}>
{

@ -384,11 +384,11 @@ class Infos extends Component{
to={`/users/${username}/projects`}>项目</Link>
</li>
{/*<li className={`${moduleName == 'package' ? 'active' : '' }`}>*/}
{/*<Link*/}
{/*onClick={() => this.setState({moduleName: 'package'})}*/}
{/*to={`/users/${username}/package`}>众包</Link>*/}
{/*</li>*/}
<li className={`${moduleName == 'package' ? 'active' : '' }`}>
<Link
onClick={() => this.setState({moduleName: 'package'})}
to={`/users/${username}/package`}>众包</Link>
</li>
{/*{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></li>}*/}
@ -404,11 +404,11 @@ class Infos extends Component{
{/* 众包 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
{/*<Route exact path="/users/:username/package"*/}
{/*render={*/}
{/*(props) => (<InfosPackage {...this.props} {...props} {...this.state} />)*/}
{/*}*/}
{/*></Route>*/}
<Route exact path="/users/:username/package"
render={
(props) => (<InfosPackage {...this.props} {...props} {...this.state} />)
}
></Route>
{/* 课堂 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */}

@ -4,7 +4,8 @@ import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import {Tooltip,Menu,Pagination,Spin} from 'antd';
import axios from 'axios';
import {getImageUrl} from 'educoder';
import NoneData from '../../courses/coursesPublic/NoneData'
import Modals from '../../modals/Modals';
import NoneData from '../../courses/coursesPublic/NoneData';
import "./usersInfo.css"
import moment from 'moment';
let categorylist=[
@ -113,6 +114,37 @@ class InfosPackage extends Component{
}
}
delectprojectModal=(id)=>{
this.setState({
Modalstype: true,
Modalstopval: '是否确认删除?',
ModalSave: () => this.delectproject(id),
ModalCancel: this.cancelProject
})
}
cancelProject=()=>{
this.setState({
Modalstype: false,
})
}
delectproject=(id)=>{
let {cate,status}=this.state;
let url=`/project_packages/${id}.json`
axios.delete(url).then((response) => {
if (response.data.status == 0) {
this.getCourses(cate,status,1);
}
})
.catch(function (error) {
console.log(error);
});
this.cancelProject;
}
render(){
let{
category,
@ -127,6 +159,13 @@ class InfosPackage extends Component{
// console.log(data)
return(
<div className="educontent mb50">
{/*提示*/}
<Modals
modalsType={this.state.Modalstype}
modalsTopval={this.state.Modalstopval}
modalCancel={this.state.ModalCancel}
modalSave={this.state.ModalSave}
/>
<Spin size="large" spinning={isSpin}>
<div className="white-panel edu-back-white pt25 pb25 clearfix ">
<li className={category ? "" : "active"}><a onClick={()=>this.changeCategory()}>全部</a></li>
@ -160,21 +199,27 @@ class InfosPackage extends Component{
{/*type: "bidden"*/}
{data===undefined?<NoneData></NoneData>:data.project_packages.length===0?<NoneData></NoneData>:data.project_packages.map((item,key)=>{
return(
<div className="educontent project-packages-list" key={key}>
<div className="project-package-item project-package-11">
<div className="project-package-item with-operator project-package-11">
<div className="item-image">
<img alt="图片" src={`/images/educoder/project_packages/${setcategorylist(item.category_name)}.png`} />
</div>
<div className="item-body">
<div className="item-head">
<div className="item-head-title" title={item.title}>
<a href={`/crowdsourcing/${item.id}`}>{item.title}</a>
</div>
<div className="item-head-tags">
{item.bidden_status==="pending"?<span className="pending">竞标中</span>:""}
{item.bidden_status==="bidding_won"?<span className="bidding_won">已中标</span>:""}
{item.bidden_status==="bidding_lost"?<span className="bidding_lost">未中标</span>:""}
</div>
<div className="item-head-blank"></div>
<div className="item-head-price mtf15">
{item.min_price===null?"":<span>{item.min_price}</span>}
@ -205,6 +250,28 @@ class InfosPackage extends Component{
</div>
</div>
</div>
{category=="manage"?item.operation.can_edit===true&&item.operation.can_delete===true?
<div className="item-operator none">
<a href={`/crowdsourcing/${item.id}/edit`} title="编辑">
<i className="fa fa-pencil"></i>
</a>
<a className="delete-project-package-btn" onClick={()=>this.delectprojectModal(item.id)} data-id="10" title="删除">
<i className="fa fa-trash-o"></i>
</a>
</div>:"":""}
{category=="manage"?item.operation.can_edit===true&&item.operation.can_delete===false?
<div className="item-operator none">
<a href={`/crowdsourcing/${item.id}/edit`} title="编辑">
<i className="fa fa-pencil"></i>
</a>
</div>:"":""}
</div>
</div>
)})}

@ -94,4 +94,29 @@
.mtf15{
margin-top:-15px;
}
.project-package-item.with-operator .item-operator {
width: 0;
transition: width .2s;
-moz-transition: width .2s; /* Firefox 4 */
-webkit-transition: width .2s; /* Safari 和 Chrome */
-o-transition: width .2s; /* Opera */
}
.project-package-item.with-operator:hover .item-operator {
margin: -20px -20px -20px 20px;
padding: 20px 0;
width: 100px;
display: flex;
justify-content: space-around;
flex-direction: column;
align-items: center;
background: #f0f0f0;
}
.project-package-item.with-operator .item-operator a {
display: none;
}
.project-package-item.with-operator:hover .item-operator a {
display: block;
font-size: 20px;
}
Loading…
Cancel
Save