diff --git a/public/react/src/common/TextUtil.js b/public/react/src/common/TextUtil.js new file mode 100644 index 00000000..f5dca6e5 --- /dev/null +++ b/public/react/src/common/TextUtil.js @@ -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 = '  ' \ No newline at end of file diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index e25ecb9d..7a5e5bc1 100644 --- a/public/react/src/common/educoder.js +++ b/public/react/src/common/educoder.js @@ -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' diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js index 87e00c6e..5d0f9af8 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js +++ b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js @@ -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 (
'}> - Home + admin - Application Center + 任务大厅 - An Application + 详情
@@ -86,14 +98,28 @@ class PackageIndexNEITaskDetails extends Component { {/* 待发布 */} {/*
*/} -
+
-
- + +
+ 张三 +
+ +
+ {overtype===false? 头像联系TA: + 头像联系TA} +
+ +
@@ -137,7 +163,37 @@ class PackageIndexNEITaskDetails extends Component { {/*详情*/}
+
+
+ 需求详情: + 编辑 + 删除 +
+
+ 每天电视上都有好多产品在电视上卖,有美白,减肥,健身腰带,面膜,还有让头发变黑的产品,**产品,这些都是怎样在电视上打广告的,是和电视台分成还是直接付广告 + 费,要是想做电视购物应该做哪些准备 应该找哪些负责任人 一个产品想做电视购物在电视上卖,大概需要投资多少钱,请知道的朋友说详细些越详细越好。 +
+ {/*
*/} +
+
@@ -148,7 +204,7 @@ class PackageIndexNEITaskDetails extends Component {
- + {/*发布人选择状态*/}
diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/newsone.png b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/newsone.png new file mode 100755 index 00000000..9aadd57c Binary files /dev/null and b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/newsone.png differ diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/newstwo.png b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/newstwo.png new file mode 100755 index 00000000..8ac58b2c Binary files /dev/null and b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/newstwo.png differ diff --git a/public/react/src/modules/projectPackages/packageconcnet.css b/public/react/src/modules/projectPackages/packageconcnet.css index 16a04434..3cbd99cc 100644 --- a/public/react/src/modules/projectPackages/packageconcnet.css +++ b/public/react/src/modules/projectPackages/packageconcnet.css @@ -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; } \ No newline at end of file