|
@@ -14,11 +14,12 @@ import {
|
|
Cascader,
|
|
Cascader,
|
|
Row,
|
|
Row,
|
|
Select,
|
|
Select,
|
|
- Col
|
|
|
|
|
|
+ Col, DatePicker
|
|
} from 'antd';
|
|
} from 'antd';
|
|
import { splitUrl} from '@/tools.js';
|
|
import { splitUrl} from '@/tools.js';
|
|
import {provinceSelect } from '@/NewDicProvinceList';
|
|
import {provinceSelect } from '@/NewDicProvinceList';
|
|
import Editors from '@/richTextEditors';
|
|
import Editors from '@/richTextEditors';
|
|
|
|
+import moment from "moment";
|
|
|
|
|
|
const PicturesWall = React.createClass({
|
|
const PicturesWall = React.createClass({
|
|
getInitialState() {
|
|
getInitialState() {
|
|
@@ -73,7 +74,7 @@ const PicturesWall = React.createClass({
|
|
);
|
|
);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+
|
|
const NewDetailForm = Form.create()(React.createClass({
|
|
const NewDetailForm = Form.create()(React.createClass({
|
|
getInitialState() {
|
|
getInitialState() {
|
|
return {
|
|
return {
|
|
@@ -176,6 +177,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
auditStatus:index,
|
|
auditStatus:index,
|
|
summary: values.summary,
|
|
summary: values.summary,
|
|
provinceId: (values.ProvinceCity)[0],
|
|
provinceId: (values.ProvinceCity)[0],
|
|
|
|
+ releaseDateStr:moment(values.releaseDateStr).format('YYYY-MM-DD HH:mm:ss'),
|
|
// publishPages:publishPages
|
|
// publishPages:publishPages
|
|
}
|
|
}
|
|
}).done(function (data) {
|
|
}).done(function (data) {
|
|
@@ -249,7 +251,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
<div className='login'>
|
|
<div className='login'>
|
|
<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
|
|
<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
|
|
<Spin spinning={this.state.loading}>
|
|
<Spin spinning={this.state.loading}>
|
|
-
|
|
|
|
|
|
+
|
|
<div className="clearfix">
|
|
<div className="clearfix">
|
|
<FormItem className="half-item" {...formItemLayout} label="标题">
|
|
<FormItem className="half-item" {...formItemLayout} label="标题">
|
|
{getFieldDecorator('title', {
|
|
{getFieldDecorator('title', {
|
|
@@ -293,10 +295,10 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
initialValue: theData.sourceUrl
|
|
initialValue: theData.sourceUrl
|
|
})(<Input placeholder="请输入新闻来源链接" />)}
|
|
})(<Input placeholder="请输入新闻来源链接" />)}
|
|
</FormItem>
|
|
</FormItem>
|
|
- <FormItem className="half-item"
|
|
|
|
|
|
+ <FormItem className="half-item"
|
|
{...formItemLayout}
|
|
{...formItemLayout}
|
|
label="省-市-区"
|
|
label="省-市-区"
|
|
- >
|
|
|
|
|
|
+ >
|
|
{getFieldDecorator('ProvinceCity', {
|
|
{getFieldDecorator('ProvinceCity', {
|
|
rules: [ { required: true, message: '此项为必填项!' } ],
|
|
rules: [ { required: true, message: '此项为必填项!' } ],
|
|
initialValue: this.state.Province
|
|
initialValue: this.state.Province
|
|
@@ -342,9 +344,18 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="是否发布">
|
|
<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="是否发布">
|
|
<span>{theData.releaseStatus?'已发布':'未发布'}</span>
|
|
<span>{theData.releaseStatus?'已发布':'未发布'}</span>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
+ <FormItem className="half-item" {...formItemLayout} label="发布日期">
|
|
|
|
+ {getFieldDecorator('releaseDateStr',{
|
|
|
|
+ rules:[{required:true,message:"发布时间不能为空"}],
|
|
|
|
+ initialValue: moment()
|
|
|
|
+ })(<DatePicker showTime
|
|
|
|
+ format="YYYY-MM-DD HH:mm:ss" />)}
|
|
|
|
+
|
|
|
|
+ </FormItem>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
{/* <div className="clearfix">
|
|
{/* <div className="clearfix">
|
|
- <FormItem className="full-item"
|
|
|
|
|
|
+ <FormItem className="full-item"
|
|
labelCol={{ span: 3 }}
|
|
labelCol={{ span: 3 }}
|
|
wrapperCol={{ span: 18 }} label="发布位置">
|
|
wrapperCol={{ span: 18 }} label="发布位置">
|
|
{getFieldDecorator('publishPages', {
|
|
{getFieldDecorator('publishPages', {
|
|
@@ -382,7 +393,7 @@ const NewDetailForm = Form.create()(React.createClass({
|
|
</FormItem>
|
|
</FormItem>
|
|
</div>
|
|
</div>
|
|
</Spin>
|
|
</Spin>
|
|
- </Form>
|
|
|
|
|
|
+ </Form>
|
|
</div>
|
|
</div>
|
|
)
|
|
)
|
|
}
|
|
}
|