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" <div className="alltask edu-back-white"
style={ 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"}> <p className={"winth540"}>
<style>{` <style>{`

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

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

@ -1205,7 +1205,7 @@ class ShixunHomework extends Component{
<div className="alltask " <div className="alltask "
style={ 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 = () => { 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=()=>{ loginEDU=()=>{

@ -5,7 +5,7 @@ import {
} from "antd"; } from "antd";
import axios from 'axios'; import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
import {getImageUrl,markdownToHTML} from 'educoder'; import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder';
import "../css/messagemy.css" import "../css/messagemy.css"
import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal';
//私信页面 //私信页面
@ -46,12 +46,14 @@ class Leftdialogue extends Component{
{ {
this.props.objeysl&&this.props.objeysl.sender.image_url ? this.props.objeysl&&this.props.objeysl.sender.image_url ?
<img alt="头像" className="mr10 radius fl myimgw48 myimgh48" <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> </a>
<div className="fl pr OtherSide-info"> <div className="fl pr OtherSide-info">
<span className="trangle"></span> <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"> <div className="edu-txt-right mt5">
<a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除</a> <a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} >删除</a>
</div> </div>

@ -575,12 +575,12 @@ class MessagChat extends Component{
} }
{ {
parseInt(item.sender_id)===parseInt(this.props.match.params.userid)? 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> </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( return(
<div className="private-part clearfix" key={key} onClick={(i)=>this.Clickedontheuser(item.target)}> <div className="private-part clearfix" key={key} onClick={(i)=>this.Clickedontheuser(item.target)}>
<div className="part-line df"> <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"> <div className="flex1">
<p className="clearfix mb15 lineh-17"> <p className="clearfix mb15 lineh-17">
<span className="fl pr"> <span className="fl pr">
@ -650,7 +650,10 @@ class MessagChat extends Component{
</span> </span>
<span className="color-grey-c fr">{moment(item.send_time).fromNow()}</span> <span className="color-grey-c fr">{moment(item.send_time).fromNow()}</span>
</p> </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>
</div> </div>

@ -121,7 +121,7 @@ class MessagSub extends Component{
return( return(
<div className="pl25 ridinglist edu-back-white" key={key}> <div className="pl25 ridinglist edu-back-white" key={key}>
<div className="ridinglist-sub clearfix df tiding_item"> <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"> <div className="fl flex1">
<p> <p>
<a className="mr20 private_message_a" onMouseDown={()=>this.myCome(item)}>{item.trigger_user.name}</a> <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)}> <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)}> <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> </a>
<div className="fl flex1"> <div className="fl flex1">
<p> <p>

@ -160,7 +160,7 @@ class Messagerouting extends Component{
<a > <a >
{ {
this.props.current_user!== undefined? 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"; } from "antd";
import axios from 'axios'; import axios from 'axios';
import moment from 'moment'; import moment from 'moment';
import {getImageUrl,markdownToHTML} from 'educoder'; import {getImageUrl,markdownToHTML,ImageLayerHook} from 'educoder';
import "../css/messagemy.css" import "../css/messagemy.css"
import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal'; import WriteaprivateletterModal from '../messagemodal/WriteaprivateletterModal';
//私信页面 //私信页面
@ -46,12 +46,14 @@ class Rightdialogue extends Component{
<a onMouseDown={()=>this.myCome(this.props.objeysl.sender)}> <a onMouseDown={()=>this.myCome(this.props.objeysl.sender)}>
{this.props.objeysl&&this.props.objeysl.sender.image_url ? {this.props.objeysl&&this.props.objeysl.sender.image_url ?
<img alt="头像" className="ml10 radius fr myimgw48 myimgh48" <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> </a>
<div className="fr pr ThisSide-info"> <div className="fr pr ThisSide-info">
<span className="trangle"></span> <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"> <div className="edu-txt-left mt5">
<a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)} <a className="color-grey-c" onClick={()=>this.mydelete(this.props.objeysl.sender.id,this.props.objeysl.id)}
>删除</a> >删除</a>

@ -283,7 +283,7 @@ class WriteaprivateletterModal extends Component {
onFocus={this.myonFocus} onFocus={this.myonFocus}
onChange={this.setdatafunsval} onChange={this.setdatafunsval}
suffix={ 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> </div>
@ -296,7 +296,7 @@ class WriteaprivateletterModal extends Component {
users.map((item,key)=>{ users.map((item,key)=>{
return( return(
<p className="clearfix recently_item" key={key} onMouseDown={(c)=>this.Getuserinformation(item)}> <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> <span className="recently_name">{item.name}</span>
</p> </p>

@ -18,7 +18,7 @@ let categorylist=[
{name:"云计算和大数据",value:"cloud_compute_and_big_data"}, {name:"云计算和大数据",value:"cloud_compute_and_big_data"},
{name:"人工智能",value:"ai"}, {name:"人工智能",value:"ai"},
{name:"运维与测试",value:"devops_and_test"}, {name:"运维与测试",value:"devops_and_test"},
{name:"其",value:"other"}, {name:"其",value:"other"},
] ]
// //
function setcategorylist(val){ function setcategorylist(val){
@ -30,7 +30,6 @@ function setcategorylist(val){
} }
} }
) )
return vals 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() { render() {
let {data,page,category,sort_by,sort_direction,project_packages, let {data,page,category,sort_by,sort_direction,project_packages,
isRender,AccountProfiletype isRender,AccountProfiletype
@ -270,7 +280,7 @@ class PackageConcent extends Component {
</p> </p>
</div> </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)=>{ {project_packages&&project_packages.map((item,key)=>{
return( return(
<div className="educontent project-packages-list mb30" key={key}> <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 mbf10">
<div className=" item-head-title"> <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)} onClick={()=>this.onReleaseRequirements("/crowdsourcing/"+item.id)}
title={item.title} title={item.title}
>{item.title}</a> >{item.title}</a>
@ -338,6 +348,7 @@ class PackageConcent extends Component {
) )
})} })}
</Spin> </Spin>
{project_packages&&project_packages.length===0?<div className="edu-back-white"> {project_packages&&project_packages.length===0?<div className="edu-back-white">
<div className="edu-tab-con-box clearfix edu-txt-center"> <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" /> <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>:""}
<div className={"mt40"}> <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> </div>

@ -311,7 +311,7 @@ class PackageIndexNEITaskDetails extends Component {
<div className=" item-head mbf10 mt15 "> <div className=" item-head mbf10 mt15 ">
<div className=" item-head-title "> <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} title={data&&data.title}
>{data&&data.title} >{data&&data.title}
</span> </span>

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

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

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

@ -384,11 +384,11 @@ class Infos extends Component{
to={`/users/${username}/projects`}>项目</Link> to={`/users/${username}/projects`}>项目</Link>
</li> </li>
{/*<li className={`${moduleName == 'package' ? 'active' : '' }`}>*/} <li className={`${moduleName == 'package' ? 'active' : '' }`}>
{/*<Link*/} <Link
{/*onClick={() => this.setState({moduleName: 'package'})}*/} onClick={() => this.setState({moduleName: 'package'})}
{/*to={`/users/${username}/package`}>众包</Link>*/} to={`/users/${username}/package`}>众包</Link>
{/*</li>*/} </li>
{/*{ data && data.identity!="学生" && <li> <a href={`${this.props.Headertop && this.props.Headertop.old_url}/users/${username}?type=m_bank`}>题库</a></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 */} {/* http://localhost:3007/courses/1309/homework/9300/setting */}
{/*<Route exact path="/users/:username/package"*/} <Route exact path="/users/:username/package"
{/*render={*/} render={
{/*(props) => (<InfosPackage {...this.props} {...props} {...this.state} />)*/} (props) => (<InfosPackage {...this.props} {...props} {...this.state} />)
{/*}*/} }
{/*></Route>*/} ></Route>
{/* 课堂 */} {/* 课堂 */}
{/* http://localhost:3007/courses/1309/homework/9300/setting */} {/* 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 {Tooltip,Menu,Pagination,Spin} from 'antd';
import axios from 'axios'; import axios from 'axios';
import {getImageUrl} from 'educoder'; 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 "./usersInfo.css"
import moment from 'moment'; import moment from 'moment';
let categorylist=[ 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(){ render(){
let{ let{
category, category,
@ -127,6 +159,13 @@ class InfosPackage extends Component{
// console.log(data) // console.log(data)
return( return(
<div className="educontent mb50"> <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}> <Spin size="large" spinning={isSpin}>
<div className="white-panel edu-back-white pt25 pb25 clearfix "> <div className="white-panel edu-back-white pt25 pb25 clearfix ">
<li className={category ? "" : "active"}><a onClick={()=>this.changeCategory()}>全部</a></li> <li className={category ? "" : "active"}><a onClick={()=>this.changeCategory()}>全部</a></li>
@ -160,21 +199,27 @@ class InfosPackage extends Component{
{/*type: "bidden"*/} {/*type: "bidden"*/}
{data===undefined?<NoneData></NoneData>:data.project_packages.length===0?<NoneData></NoneData>:data.project_packages.map((item,key)=>{ {data===undefined?<NoneData></NoneData>:data.project_packages.length===0?<NoneData></NoneData>:data.project_packages.map((item,key)=>{
return( return(
<div className="educontent project-packages-list" key={key}> <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"> <div className="item-image">
<img alt="图片" src={`/images/educoder/project_packages/${setcategorylist(item.category_name)}.png`} /> <img alt="图片" src={`/images/educoder/project_packages/${setcategorylist(item.category_name)}.png`} />
</div> </div>
<div className="item-body"> <div className="item-body">
<div className="item-head"> <div className="item-head">
<div className="item-head-title" title={item.title}> <div className="item-head-title" title={item.title}>
<a href={`/crowdsourcing/${item.id}`}>{item.title}</a> <a href={`/crowdsourcing/${item.id}`}>{item.title}</a>
</div> </div>
<div className="item-head-tags"> <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>
<div className="item-head-blank"></div> <div className="item-head-blank"></div>
<div className="item-head-price mtf15"> <div className="item-head-price mtf15">
{item.min_price===null?"":<span>{item.min_price}</span>} {item.min_price===null?"":<span>{item.min_price}</span>}
@ -205,6 +250,28 @@ class InfosPackage extends Component{
</div> </div>
</div> </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>
</div> </div>
)})} )})}

@ -95,3 +95,28 @@
.mtf15{ .mtf15{
margin-top:-15px; 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