project_pack
杨树明 6 years ago
parent eb75d02c3a
commit 038405e8c6

@ -0,0 +1,36 @@
import { bytesToSize } from 'educoder';
export function isImageExtension(fileName) {
return fileName ? !!(fileName.match(/.(jpg|jpeg|png|gif)$/i)) : false
}
export function markdownToHTML(oldContent, selector) {
window.$('#md_div').html('')
// markdown to html
var markdwonParser = window.editormd.markdownToHTML("md_div", {
markdown: oldContent,
emoji: true,
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
const content = window.$('#md_div').html()
if (selector) {
window.$(selector).html(content)
}
return content
}
export function appendFileSizeToUploadFile(item) {
return `${item.title}${uploadNameSizeSeperator}${item.filesize}`
}
export function appendFileSizeToUploadFileAll(fileList) {
return fileList.map(item => {
if (item.name.indexOf(uploadNameSizeSeperator) == -1) {
return Object.assign({}, item, {name: `${item.name}${uploadNameSizeSeperator}${bytesToSize(item.size)}`})
}
return item
})
}
export const uploadNameSizeSeperator = '  '

@ -13,6 +13,8 @@ export { updatePageParams as updatePageParams } from './RouterUti
export { bytesToSize as bytesToSize } from './UnitUtil';
export { markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension } from './TextUtil'
export { handleDateString, getNextHalfHourOfMoment,formatDuring } from './DateUtil'
export { isDev as isDev } from './Env'

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {Link} from "react-router-dom";
import axios from 'axios';
import { Input ,Icon,Button,Pagination,DatePicker,Breadcrumb} from 'antd';
import { handleDateString} from 'educoder';
import { handleDateString,markdownToHTML} from 'educoder';
import locale from 'antd/lib/date-picker/locale/zh_CN';
import MDEditors from '../MDEditors';
import PhoneModel from '../PackageIndexNewandEdit/PhoneModel';
@ -14,7 +14,8 @@ class PackageIndexNEITaskDetails extends Component {
super(props)
this.contentMdRef = React.createRef();
this.state = {
modalCancel:false
modalCancel:false,
overtype:false
}
}
@ -50,20 +51,31 @@ class PackageIndexNEITaskDetails extends Component {
})
}
setover=()=>{
this.setState({
overtype:true
})
}
setout=()=>{
this.setState({
overtype:false
})
}
render() {
let {modalCancel}=this.state;
let {overtype}=this.state;
console.log(overtype)
return (
<div>
<div className="clearfix">
<div className={"educontent mt20 mb50"}>
<Breadcrumb separator={'>'}>
<Breadcrumb.Item>Home</Breadcrumb.Item>
<Breadcrumb.Item>admin</Breadcrumb.Item>
<Breadcrumb.Item>
<a href="">Application Center</a>
<a href="/project_packages">任务大厅</a>
</Breadcrumb.Item>
<Breadcrumb.Item>An Application</Breadcrumb.Item>
<Breadcrumb.Item>详情</Breadcrumb.Item>
</Breadcrumb>
<div className="mb20">
@ -86,14 +98,28 @@ class PackageIndexNEITaskDetails extends Component {
{/*<span className="publicword publicwords"> 待发布 </span>*/}
{/*</div>*/}
<div className="project-package-item project-package-items">
<div className="project-package-item project-package-items height185">
<div className="item-image">
<div className="fl edu-back-white ml10 ">
<img alt="头像" className="radius mt10" height="70" id="nh_user_logo" name="avatar_image"
<div className="fl edu-back-white ">
<img alt="头像" className="radius mt10 ml5" height="70" id="nh_user_logo" name="avatar_image"
src={"https://www.educoder.net/images/avatars/User/1"}
width="70"/>
<div className=" edu-back-white ml28 mt10 ">
张三
</div>
<div className=" edu-back-white ml5 mt10 "
onMouseOver={this.setover}
onMouseOut={this.setout}
>
{overtype===false?<a className="ContacttheTA fl"> <img alt="头像" class="mr5" src={require('./newsone.png')} />联系TA</a>:
<a className="ContacttheTAs fl"> <img alt="头像" className="mr5"
src={require('./newstwo.png')}/>联系TA</a>}
</div>
</div>
</div>
<div className=" item-body">
@ -137,7 +163,37 @@ class PackageIndexNEITaskDetails extends Component {
{/*详情*/}
<div className={"stud-class-set padding30 coursenavbox edu-back-white mt20"}>
<div>
<div className={"longboxs"}>
需求详情
<a className="task-btn-nebules fr">编辑</a>
<a className="task-btn-nebules fr">删除</a>
</div>
<div className={"padding020"}>
每天电视上都有好多产品在电视上卖有美白减肥健身腰带面膜还有让头发变黑的产品**产品这些都是怎样在电视上打广告的是和电视台分成还是直接付广告
要是想做电视购物应该做哪些准备 应该找哪些负责任人 一个产品想做电视购物在电视上卖大概需要投资多少钱请知道的朋友说详细些越详细越好
</div>
{/*<div className={"markdown-body"} dangerouslySetInnerHTML={{__html: markdownToHTML(item.ques_title).replace(/▁/g,"▁▁▁")}}></div>*/}
</div>
<div>
<div className={"longboxs"}>
需求文件
</div>
<div className={"newForm newFormbox mt10 "}>
<i className="color-green iconfont icon-fujian mr5 fl"></i>
<a className="upload_filename color-grey readonly hidden fl mtf3 mr10 ml5"> 每天电视上都有好多产品在电视上卖有美白减肥 &nbsp; &nbsp;12.62KB </a>
</div>
<div className={"newForm newFormbox mt10 "}>
<i className="color-green iconfont icon-fujian mr5 fl"></i>
<a className="upload_filename color-grey readonly hidden fl mtf3 mr10 ml5"> 每天电视上都有好多产品在电视上卖有美白减肥 &nbsp; &nbsp;12.62KB </a>
</div>
</div>
</div>
@ -148,7 +204,7 @@ class PackageIndexNEITaskDetails extends Component {
</div>
{/*发布人选择状态*/}
<div className={"stud-class-set padding30 coursenavbox edu-back-white mt20"}>

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

@ -203,4 +203,70 @@
.project-packages-list .project-package-items .item-image{
width:100px !important;
}
.height185{
height: 185px;
}
.ContacttheTA{
width: 80px;
height: 26px;
font-size: 14px;
line-height: 26px;
display: block;
border: 1px solid #4CACFF !important;
background-color: #fff;
color: #4CACFF !important;
text-align: center;
border-radius: 4px;
}
.ContacttheTAs{
width: 80px;
height: 26px;
font-size: 14px;
line-height: 26px;
display: block;
border: 1px solid #fff !important;
background-color: #4CACFF;
color: #fff !important;
text-align: center;
border-radius: 4px;
}
.ml28{
margin-left: 28px;
}
.longboxs{
font-size: 16px;
font-family: MicrosoftYaHei-Bold;
font-weight: bold;
color: rgba(5,16,26,1);
border-left: 4px solid rgba(76,172,255,1);
padding-left: 10px;
margin-bottom: 20px;
}
.padding020{
padding: 0px 20px 20px;
}
.mtf3{
margin-top:-3px;
}
.task-btn-nebules{
background: #fff!important;
color: #4CACFF!important;
border: 1px solid #4CACFF!important;
margin-left: 20px;
cursor: pointer;
display: inline-block;
padding: 0 12px;
letter-spacing: 1px;
text-align: center;
font-size: 14px;
height: 30px;
line-height: 30px;
border-radius: 2px;
}
Loading…
Cancel
Save