diff --git a/public/react/src/common/DateUtil.js b/public/react/src/common/DateUtil.js new file mode 100644 index 00000000..652b72eb --- /dev/null +++ b/public/react/src/common/DateUtil.js @@ -0,0 +1,46 @@ +import moment from "moment"; + +// 处理整点 半点 +// 取传入时间往后的第一个半点 +export function handleDateString(dateString) { + if (!dateString) return dateString; + const ar = dateString.split(':') + if (ar[1] == '00' || ar[1] == '30') { + return dateString + } + const miniute = parseInt(ar[1]); + if (miniute < 30 || miniute == 60) { + return [ar[0], '30'].join(':') + } + if (miniute < 60) { + // 加一个小时 + const tempStr = [ar[0], '00'].join(':'); + const format = "YYYY-MM-DD HH:mm"; + const _moment = moment(tempStr, format) + _moment.add(1, 'hours') + return _moment.format(format) + } + + return dateString +} + +// 给moment对象取下一个半点或整点 +export function getNextHalfHourOfMoment(moment) { + if (!moment) { + return moment + } + const minutes = moment.minutes() + if (minutes < 30) { + moment.minutes(30) + } else if (minutes < 60) { + moment.minutes(0).add(1, 'hours') + } + return moment +} + +export function formatDuring(mss){ + var days = parseInt(mss / (1000 * 60 * 60 * 24)); + var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60)); + return days + "天" + hours + "小时" + minutes + "分"; +} \ No newline at end of file diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js index 41efb375..e25ecb9d 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 { handleDateString, getNextHalfHourOfMoment,formatDuring } from './DateUtil' + export { isDev as isDev } from './Env' export { toStore as toStore, fromStore as fromStore } from './Store' diff --git a/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js b/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js index 2ba39f9c..0902bcc4 100644 --- a/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndex/PackageConcent.js @@ -92,7 +92,10 @@ class PackageConcent extends Component {
- xxxxxx + 做电视购物产品流程做电视购物产品流程做电视购物产品流程做电视购物产品流程做电视购 + 物产品流程产品流程产品流程产品流程做电
diff --git a/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js new file mode 100644 index 00000000..772d2f3c --- /dev/null +++ b/public/react/src/modules/projectPackages/PackageIndexNEITaskDetails/PackageIndexNEITaskDetails.js @@ -0,0 +1,258 @@ +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 locale from 'antd/lib/date-picker/locale/zh_CN'; +import MDEditors from '../MDEditors'; +import PhoneModel from '../PackageIndexNewandEdit/PhoneModel'; +import '../packageconcnet.css'; +const { Search } = Input; + +class PackageIndexNEITaskDetails extends Component { + constructor(props) { + super(props) + this.contentMdRef = React.createRef(); + this.state = { + modalCancel:false + } + } + + componentDidMount() { + + + } + + setclick=()=>{ + const mdContnet = this.contentMdRef.current.getValue().trim(); + console.log(mdContnet) + } + + onChangeTimePicker = (value, dateString) => { + this.setState({ + TimePickervalue: dateString + }) + } + + setPublication=()=>{ + this.props.setPublicationfun() + } + + modalCancel=()=>{ + this.setState({ + modalCancel:false + }) + } + + editmodels=()=>{ + this.setState({ + modalCancel:true + }) + } + + + render() { + let {modalCancel}=this.state; + return ( +
+
+
+ + '}> + Home + + Application Center + + An Application + + +
+ +

+ +

+
+ +
+
+
+ + 未申请 +
+ + {/*
*/} + {/*
*/} + {/**/} + {/* 待发布 */} + {/*
*/} + +
+ +
+ +
+ +
+ + + +
+
人工智能
+
+ +
+
+ 发布时间:2019-03-05 12:23 +
+
+ 竞标截止时间:2019-09-12 24:00 +
+
+ +
+ +
+
+ +
+
+ +
+
+
+ +
+

+ 竞标截止: + +

+

+ 支付费用: + ¥ + } + /> + + ¥ + } + /> +

+
+ +
+

+ 姓名: + +

+

+ 手机号: + + + this.editmodels()}> + +

+ +

+ + + {/*未注册才显示!*/} + + 手机号: + + + + + + 获取验证码} + /> + + + + {/**/} + + +

+ + +
+
+ +

+
+ + 保存 +
+
+ + +
+
+
+ ) + } +} + +export default PackageIndexNEITaskDetails; + diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js index 0f3d86b7..ffb28d3d 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBanner.js @@ -1,7 +1,6 @@ import React, {Component} from 'react'; import {Link} from "react-router-dom"; import { Steps, Divider } from 'antd'; -import 'antd/dist/antd.css'; const { Step } = Steps; class PackageIndexNEIBanner extends Component { diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index 22032639..85fc4bee 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -2,8 +2,10 @@ import React, {Component} from 'react'; import {Link} from "react-router-dom"; import axios from 'axios'; import { Input ,Icon,Button,Pagination,DatePicker} from 'antd'; +import { handleDateString} from 'educoder'; import locale from 'antd/lib/date-picker/locale/zh_CN'; import MDEditors from '../MDEditors'; +import PhoneModel from './PhoneModel'; import '../packageconcnet.css'; const { Search } = Input; @@ -12,7 +14,7 @@ class PackageIndexNEIBannerConcent extends Component { super(props) this.contentMdRef = React.createRef(); this.state = { - + modalCancel:false } } @@ -32,9 +34,31 @@ class PackageIndexNEIBannerConcent extends Component { }) } + setPublication=()=>{ + this.props.setPublicationfun() + } + + modalCancel=()=>{ + this.setState({ + modalCancel:false + }) + } + + editmodels=()=>{ + this.setState({ + modalCancel:true + }) + } + + render() { + let {modalCancel}=this.state; return ( -
+
+

@@ -93,17 +117,13 @@ class PackageIndexNEIBannerConcent extends Component { id="_file" multiple="multiple" name="attachments[dummy][file]" onChange={() => { - debugger; + // debugger; window.addInputFiles(window.$('.file_selector')[0]) }} style={{'display': 'none'}} type="file"> - - - -
@@ -146,7 +166,7 @@ class PackageIndexNEIBannerConcent extends Component { onChange={this.onChangeTimePicker} suffix={ - ¥ + ¥ } />

@@ -168,21 +188,56 @@ class PackageIndexNEIBannerConcent extends Component {
- + this.editmodels()}>

+ +

+ + + {/*未注册才显示!*/} + + 手机号: + + + + + + 获取验证码} + /> + + + + {/**/} + + +

+ +

- + 保存
diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEISubmit.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEISubmit.js new file mode 100644 index 00000000..2113df48 --- /dev/null +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEISubmit.js @@ -0,0 +1,50 @@ +import React, {Component} from 'react'; +import {Link} from "react-router-dom"; +import { Icon ,Button} from 'antd'; + +class PackageIndexNEISubmit extends Component { + constructor(props) { + super(props) + this.state = { + current:0 + } + } + componentDidMount() { + + + } + setageload=(sum)=>{ + if(sum===undefined){ + window.location.href="/project_packages/new" + }else{ + // this.props.history.push("/project_packages/"+sum) + window.location.href="/project_packages/"+sum + } + + } + render() { + + return ( +
+ +

+

+
+
恭喜!
+
提交成功
+
平台正在审核您的申请,审核结果将以平台消息的形式通知您
+
+ this.setageload(1)}>查看发布需求 + +
+
+

+ + +
+ ) + } +} + +export default PackageIndexNEISubmit; + diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNewandEditIndex.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNewandEditIndex.js index 465b0b60..f36ae4d6 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNewandEditIndex.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNewandEditIndex.js @@ -3,34 +3,51 @@ import {BrowserRouter as Router,Route,Switch} from 'react-router-dom'; //业务组件 import PackageIndexNEIBanner from "./PackageIndexNEIBanner"; -//业务组件 + import PackageIndexNEIBannerConcent from "./PackageIndexNEIBannerConcent" +import PackageIndexNEISubmit from './PackageIndexNEISubmit' import '../packageconcnet.css'; class PackageIndexNewandEditIndex extends Component{ constructor(props) { super(props) + this.state = { + setPublication:false + } } componentDidMount(){ console.log(this.props) } - + setPublicationfun=()=>{ + this.setState({ + setPublication:true + }) + } render() { + let {setPublication}=this.state; return (
-
+ {setPublication===false?

新建

- + - + -
+
: +
+ +
}
) diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PhoneModel.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PhoneModel.js new file mode 100644 index 00000000..b51a7f2d --- /dev/null +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PhoneModel.js @@ -0,0 +1,60 @@ +import React, { Component } from 'react'; +import { Spin, Icon , Modal,Input,Button} from 'antd'; +class PhoneModel extends Component { + constructor(props) { + super(props); + this.state = { + funmodalsType:false, + istype:false + } + } + render() { + const antIcons = + return( + +
+

+ 手机号码: + + +

+

+ + + 验证码: + + + + + + {/**/} + + + +

+ +
+ 取消 + 确定 +
+ +
+ + ) + } +} + +export default PhoneModel; \ No newline at end of file diff --git a/public/react/src/modules/projectPackages/ProjectPackageIndex.js b/public/react/src/modules/projectPackages/ProjectPackageIndex.js index a22e2712..d490568a 100644 --- a/public/react/src/modules/projectPackages/ProjectPackageIndex.js +++ b/public/react/src/modules/projectPackages/ProjectPackageIndex.js @@ -21,6 +21,11 @@ const PackageIndexNewandEdit = Loadable({ loading: Loading, }) +const PackageIndexNEITaskDetails = Loadable({ + loader: () => import('./PackageIndexNEITaskDetails/PackageIndexNEITaskDetails'), + loading: Loading, +}) + class ProjectPackageIndex extends Component { constructor(props) { super(props) @@ -34,6 +39,7 @@ class ProjectPackageIndex extends Component { {/*众包首页*/} + diff --git a/public/react/src/modules/projectPackages/packageconcnet.css b/public/react/src/modules/projectPackages/packageconcnet.css index f6ee42e6..07127a70 100644 --- a/public/react/src/modules/projectPackages/packageconcnet.css +++ b/public/react/src/modules/projectPackages/packageconcnet.css @@ -27,8 +27,8 @@ color:#8F8F8F !important; } -.maxwidth580{ - max-width: 580px; +.maxwidth700{ + max-width: 700px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; @@ -78,7 +78,12 @@ .fafas .ant-input:focus{ background-color: #fff!important; } - +.fafas .ant-input-group-addon .ant-btn{ + width:140px !important; + font-size: 14px; + height: 40px; + background:rgba(76,172,255,1); +} .upload_filename{ line-height: 32px; @@ -112,7 +117,7 @@ .defalutCancelbtns{ display: block; border: 1px solid #4CACFF !important; - background-color: #fafafa; + background-color: #fff; color: #4CACFF !important; width:130px; height:40px; @@ -124,4 +129,74 @@ .defalutSubmitbtns{ background-color: #4CACFF; height:40px; +} + +.defalutSubmitbtnmodels{ + width:127px; + height:30px; + background-color: #4CACFF; +} + +.ant-steps-item-process .ant-steps-item-icon{ + background-color: #4CACFF !important; +} + +.ant-steps-item-process .ant-steps-item-icon{ + background-color: #4CACFF !important; +} + +.padding200{ + padding: 115px 200px 215px 200px; +} + +.fontcircle{ + font-size: 80px; + display: inherit; +} + +.sumbtongs{ + font-size: 24px; + display: inherit; + text-align: center; +} + +.terraces{ + font-size: 16px; + display: inherit; + text-align: center; + color:#999; +} +.padding251{ + padding: 0px 251px; +} + +.ant-modal-title{ + text-align: center; +} +.ml17{ + margin-left: 17px; +} + +.project-package-items{ + display: -webkit-flex; + display: flex; + flex-direction: row; + margin:0px !important; + padding: 20px; + background: white; + margin-bottom:0px !important; + box-shadow: none !important; +} + +.mtf7{ + margin-top:-7px; +} + +.publicpart.orangeGreen { + border-left: 80px solid #29BD8B; +} + +.publicwords{ + left: 3px; + top: 18px; } \ No newline at end of file diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index a2c6609e..d9765ef5 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -264,8 +264,8 @@ class NewHeader extends Component { - console.log(match.path) - console.log(match.path.startsWith("/ec_courses")) + // console.log(match.path) + // console.log(match.path.startsWith("/ec_courses")) return (