liting2017 6 jaren geleden
bovenliggende
commit
52f347003d

+ 3 - 3
js/component/account/demand/demandDetaiel.jsx

@@ -182,11 +182,11 @@ const DemandDetail = Form.create()(React.createClass({
                                 <span>{getDemandType(theData.demandType)}</span>
 						</FormItem>
 						{theData.demandType=='5'&&
-							<FormItem className="half-item" {...formItemLayout} label="人才需求酬劳">
-							     <span>{theData.crowdCost} 元/月</span>
+							<FormItem className="half-item" {...formItemLayout} label="人才酬劳">
+							     <span>{theData.budgetCost} 元/月</span>
 						    </FormItem>}
 						{theData.demandType=='3'&&<div className="clearfix"><FormItem className="half-item" {...formItemLayout} label="资金需求额度">
-                            <span>{theData.budgetCost}万元</span>
+                            <span>{theData.crowdCost}万元</span>
 						</FormItem>
 						<FormItem className="half-item" {...formItemLayout} label="资金用途">
 							<span>{theData.researchType?'扩大再生产':'研发'}</span>

+ 5 - 5
js/component/account/demand/demandForm.jsx

@@ -392,17 +392,17 @@ const DemandDetailForm = Form.create()(React.createClass({
 							)}
 						</FormItem>
 						{demandType=='5'||theData.demandType=='5'?
-							<FormItem className="half-item" {...formItemLayout} label="人才需求酬劳">
-							{getFieldDecorator('crowdCost', {
+							<FormItem className="half-item" {...formItemLayout} label="人才酬劳">
+							{getFieldDecorator('budgetCost', {
 								rules: [ { required: false } ],
-								initialValue: theData.crowdCost
+								initialValue: theData.budgetCost
 							})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入酬劳."/>)}
 							<span style={{ marginLeft: '20px' }}>元/月</span>
 						</FormItem>:''}
 						{demandType=='3'||theData.demandType=='3'?<div className="clearfix"><FormItem className="half-item" {...formItemLayout} label="资金需求额度">
-							{getFieldDecorator('budgetCost', {
+							{getFieldDecorator('crowdCost', {
 								rules: [ { required: false } ],
-								initialValue: theData.budgetCost
+								initialValue: theData.crowdCost
 							})(<InputNumber min={0} max={999999} step={0.01} placeholder="输入资金需求额度."/>)}
 							<span style={{ marginLeft: '10px' }}>万元</span>
 						</FormItem>

+ 6 - 30
js/component/account/index/normal.jsx

@@ -1,6 +1,5 @@
 import React from 'react';
 import { Spin, Button, Tabs, message, Modal } from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 import { Link } from 'react-router';
 import '../content.less';
@@ -13,13 +12,6 @@ import weibo from '../../../../image/weibo-w.png';
 
 import defaultAvatar from '../../../../image/avatarImg.png'
 
-import level1 from '../../../../image/level_1.png';
-import level2 from '../../../../image/level_2.png';
-import level3 from '../../../../image/level_3.png';
-import level4 from '../../../../image/level_4.png';
-import level5 from '../../../../image/level_5.png';
-
-
 const Content = React.createClass({
     getInitialState () {
         return {
@@ -55,7 +47,7 @@ const Content = React.createClass({
                     techProjectNum: data.data.techProjectNum,
                     type: data.data.type,
                     uid: data.data.uid,
-                    visible: !data.data.lvl || data.data.lvl == 0 ? true : false
+                    visible: data.data.type == '0'||data.data.type=='1' ? false : true
                 })
             }
         }.bind(this)).always(function () {
@@ -67,9 +59,6 @@ const Content = React.createClass({
     componentWillMount () {
         this.getData();
     },
-    tabChange (key) {
-
-    },
     render () {
         return (
             <Spin spinning={this.state.loading} className='spin-box'>
@@ -138,23 +127,12 @@ const Content = React.createClass({
                     </div>
                     <div className="index-record">
                         <p className="acc-title">我的轨迹</p>
-                        {this.state.type ? <ul className="record-list clearfix">
-                            <li>专利:<a href={globalConfig.context + "/user/account/services.html#patent"}>{this.state.patentNum || 0}</a> 项</li>
-                            <li>软著:<a href={globalConfig.context + "/user/account/services.html#copyright"}>{this.state.copyrightNum || 0}</a> 项</li>
-                            <li>知识产权:<a href={globalConfig.context + "/user/account/services.html#intellectual"}>{this.state.intellectualPropertyNum || 0}</a> 项</li>
-                            <li>科技项目:<a href={globalConfig.context + "/user/account/services.html#technology"}>{this.state.techProjectNum || 0}</a> 项</li>
-                            <li>技术成果:<a href={globalConfig.context + "/user/account/achievement.html#techAchievement"}>{this.state.achievementNum || 0}</a> 项</li>
-                            <li>发布需求:<a href={globalConfig.context + "/user/account/demand.html#techDemand"}>{this.state.demandNum || 0}</a> 项</li>
-                        </ul> : <ul className="record-list clearfix">
-                                <li>技术成果:<a href={globalConfig.context + "/user/account/achievement.html#techAchievement"}>{this.state.achievementNum || 0}</a> 项</li>
-                                <li>发布需求:<a href={globalConfig.context + "/user/account/demand.html#techDemand"}>{this.state.demandNum || 0}</a> 项</li>
-                            </ul>}
                     </div>
                     <div className="index-activity">
                         <Collection />
                     </div>
                 </div>
-                {/* <Modal maskClosable={false}
+                <Modal maskClosable={false}
                     title="实名认证提示"
                     visible={this.state.visible}
                     onCancel={() => {
@@ -165,15 +143,13 @@ const Content = React.createClass({
                     width='400px'
                     footer={[]} >
                     <p style={{ textAlign: 'center' }}>
-                        <span>您还未进行实名认证,请完成实名认证,为您提供更多服务</span>
+                        <span>您还未进行认证,请完成认证,为您提供更多服务</span>
                     </p>
                     <div style={{ marginTop: '20px', textAlign: 'center' }}>
-                        <Button type="primary"
-                            onClick={() => {
-                                window.open(this.state.type == 1 ? globalConfig.context + "/user/groupCertify.html" : globalConfig.context + "/user/certify.html")
-                            }}>马上去</Button>
+                        <Button type="primary" style={{marginRight:15}}><Link to="/personal">个人认证</Link></Button>
+                        <Button type="primary"><Link to="/unit">企业认证</Link></Button>
                     </div>
-                </Modal> */}
+                </Modal>
             </Spin>
         )
     }

+ 5 - 15
js/component/account/setAccount/personal.jsx

@@ -348,16 +348,14 @@ const Personal = React.createClass({
 							</Col>
 						</Row>
 						<div className="clearfix">
-							<FormItem className="half-item" {...formItemLayout} label="姓名">
+							<FormItem className="half-item" {...formItemLayout} label={<span><span className="color-red"> * </span>姓名</span>}>
 								<Input
-									style={{ width: '90%' }}
 									placeholder="输入姓名"
 									value={this.state.identifyName}
 									onChange={(e) => {
 										this.setState({ identifyName: e.target.value });
 									}}
 								/>
-								<span className="color-red"> * </span>
 							</FormItem>
 							<FormItem className="half-item" {...formItemLayout} label="性别">
 								<Radio.Group
@@ -370,11 +368,10 @@ const Personal = React.createClass({
 									<Radio value={'女'}>女</Radio>
 								</Radio.Group>
 							</FormItem>
-							<FormItem className="half-item" {...formItemLayout} label="行业">
+							<FormItem className="half-item" {...formItemLayout} label={<span><span className="color-red"> * </span>行业</span>}>
 								<Select
 									placeholder="选择行业"
 									value={this.state.industry}
-									style={{ width: '90%' }}
 									onChange={(e) => {
 										this.setState({ industry: e });
 									}}
@@ -383,13 +380,11 @@ const Personal = React.createClass({
 										return <Select.Option key={item.value}>{item.key}</Select.Option>;
 									})}
 								</Select>
-								<span className="color-red"> * </span>
 							</FormItem>
-							<FormItem className="half-item" {...formItemLayout} label="社会属性">
+							<FormItem className="half-item" {...formItemLayout} label={<span><span className="color-red"> * </span>社会属性</span>}>
 								<Select
 									placeholder="客户社会属性"
 									value={this.state.societyTag}
-									style={{ width: '90%' }}
 									onChange={(e) => {
 										this.setState({ societyTag: e });
 									}}
@@ -398,7 +393,6 @@ const Personal = React.createClass({
 										return <Select.Option key={item.value}>{item.key}</Select.Option>;
 									})}
 								</Select>
-								<span className="color-red"> * </span>
 							</FormItem>
 							<FormItem className="half-item" {...formItemLayout} label="出生日期">
 								{!this.state.yearMonth ? (
@@ -431,17 +425,15 @@ const Personal = React.createClass({
                         </div>
                        
                         <div className="clearfix">
-                            <FormItem className="half-item" {...formItemLayout} label="省-市-区">
+                            <FormItem className="half-item" {...formItemLayout} label={<span><span className="color-red"> * </span>省-市-区</span>}>
                                 <Cascader
                                     options={areaSelect()}
                                     value={this.state.ProvinceCity}
                                     placeholder="选择城市"
-                                    style={{ width: '90%' }}
                                     onChange={(e, pre) => {
                                         this.setState({ ProvinceCity: e });
                                     }}
                                 />
-                                <span className="color-red"> * </span>
                             </FormItem>
                             <FormItem className="half-item" {...formItemLayout} label="通信地址">
                                 <Input
@@ -452,16 +444,14 @@ const Personal = React.createClass({
                                     }}
                                 />
                             </FormItem>
-                            <FormItem className="half-item" {...formItemLayout} label="手机号码">
+                            <FormItem className="half-item" {...formItemLayout} label={<span><span className="color-red"> * </span>手机号码</span>}>
                                 <Input
-                                    style={{width:'90%'}}
                                     placeholder="手机号码"
                                     value={this.state.mobile}
                                     onChange={(e) => {
                                         this.setState({ mobile: e.target.value });
                                     }}
                                 />
-                                <span className="color-red"> * </span>
                             </FormItem>
                             <FormItem className="half-item" {...formItemLayout} label="固定电话">
                                 <Input

+ 29 - 52
js/component/account/setAccount/unit.jsx

@@ -27,7 +27,8 @@ import {
 	Form,
 	Row,
 	Col,
-	TimePicker
+	TimePicker,
+	InputNumber
 } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
@@ -221,22 +222,15 @@ const Unit = React.createClass({
 			message.warning('请选择社会性质!');
 			return false;
 		}
-		// if (!this.state.ProvinceCity) {
-		// 	message.warning('请选择省-市-区!');
-		// 	return false;
-		// }
+		
 		if (isNaN(this.state.registeredCapital)) {
 			message.warning('注册资本只能输入数字!');
 			return false;
 		}
-		if (isNaN(this.state.enterpriseScale)) {
-			message.warning('单位规模只能输入数字!');
-			return false;
-		}
 		this.setState({
 			selectedRowKeys: []
 		});
-
+		
 		let theorgCodeUrl = [];
 		if (this.state.orgCodeUrl.length) {
 			let picArr = [];
@@ -280,7 +274,7 @@ const Unit = React.createClass({
 				fixedTel: this.state.fixedTel,
 				contactsFax: this.state.contactsFax,
 				registeredCapital: this.state.registeredCapital ? this.state.registeredCapital : 0,
-				enterpriseScale: this.state.enterpriseScale ? this.state.enterpriseScale : 0,
+				enterpriseScale: this.state.enterpriseScale,
 				legalPerson: this.state.legalPerson,
 				legalPersonIdCard: this.state.legalPersonIdCard,
 				legalPersonTel: this.state.legalPersonTel,
@@ -359,25 +353,40 @@ const Unit = React.createClass({
 								className="half-item"
 								labelCol={{ span: 4 }}
 								wrapperCol={{ span: 18 }}
-								label="企业名称"
+								label={<span><span className="color-red"> * </span>企业名称</span>}
 							>
 								<Input
-								    style={{width:'90%'}}
 									value={this.state.identifyName}
 									onChange={(e) => {
 										this.setState({ identifyName: e.target.value });
 									}}
 									placeholder="请输入企业名称"
 								/>
-								<span className="color-red"> * </span>
+								
+							</FormItem>
+							<FormItem
+								className="half-item"
+								labelCol={{ span: 4 }}
+								wrapperCol={{ span: 18 }}
+								label="企业规模"
+							>
+								<InputNumber
+									placeholder="企业规模"
+									value={this.state.enterpriseScale}
+									InputNumber min={0} max={999999}
+									style={{width:120,marginRight:10}}
+									onChange={(e) => {
+										this.setState({ enterpriseScale: e });
+									}}
+								/>
+								<span>人</span>
 							</FormItem>
 						</div>
 						<div className="clearfix" style={{ paddingLeft: '60px' }}>
-							<FormItem className="half-item" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }} label="行业">
+							<FormItem className="half-item" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }} label={<span><span className="color-red"> * </span>行业</span>}>
 								<Select
 									placeholder="选择行业"
 									value={this.state.industry}
-									style={{width:'90%'}}
 									onChange={(e) => {
 										this.setState({ industry: e });
 									}}
@@ -386,18 +395,17 @@ const Unit = React.createClass({
 										return <Select.Option key={item.value}>{item.key}</Select.Option>;
 									})}
 								</Select>
-								<span className="color-red"> * </span>
 							</FormItem>
 							<FormItem
 								className="half-item"
 								labelCol={{ span: 4 }}
 								wrapperCol={{ span: 18 }}
-								label="社会属性"
+								label={<span><span className="color-red"> * </span>社会属性</span>}
 							>
 								<Select
 									placeholder="客户社会属性"
 									value={this.state.societyTag}
-									style={{width:'90%'}}
+									
 									onChange={(e) => {
 										this.setState({ societyTag: e });
 									}}
@@ -406,25 +414,8 @@ const Unit = React.createClass({
 										return <Select.Option key={item.value}>{item.key}</Select.Option>;
 									})}
 								</Select>
-								<span className="color-red"> * </span>
+								
 							</FormItem>
-							{/* <FormItem
-								className="half-item"
-								labelCol={{ span: 4 }}
-								wrapperCol={{ span: 18 }}
-								label="省-市-区"
-							>
-								<Cascader
-									options={areaSelect()}
-									value={this.state.ProvinceCity}
-									placeholder="选择城市"
-									style={{width:'90%'}}
-									onChange={(e, pre) => {
-										this.setState({ ProvinceCity: e });
-									}}
-								/>
-								<span className="color-red"> * </span>
-							</FormItem> */}
 							<FormItem
 								className="half-item"
 								labelCol={{ span: 4 }}
@@ -482,21 +473,7 @@ const Unit = React.createClass({
 									}}
 								/>
 							</FormItem>
-							<FormItem
-								className="half-item"
-								labelCol={{ span: 4 }}
-								wrapperCol={{ span: 18 }}
-								label="企业规模"
-							>
-								<Input
-									placeholder="企业规模"
-									value={this.state.enterpriseScale}
-									maxLength="1"
-									onChange={(e) => {
-										this.setState({ enterpriseScale: e.target.value });
-									}}
-								/>
-							</FormItem>
+							
 							<FormItem
 								className="half-item"
 								labelCol={{ span: 4 }}

+ 1 - 16
js/component/administration/achievement/achievementDetaiel.jsx

@@ -1,30 +1,15 @@
 import React from 'react';
 import $ from 'jquery/src/ajax';
 import {
-	Icon,
-	Tabs,
-	Table,
-	Tooltip,
 	Modal,
-	Popover,
 	message,
 	Spin,
 	Upload,
 	Input,
-	InputNumber,
-	Select,
-	DatePicker,
 	Button,
-	Radio,
 	Form,
-	Cascader,
-    Tag,
-    Checkbox,
-    Row,
-    Col
 } from 'antd';
-import { getTechField } from '@/DicTechFieldList.js';
-import {areaSelect,getProvince } from '@/NewDicProvinceList';
+
 import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
 import {  splitUrl ,getMaturity,getAchievementType,getTransaction,getAchievementPosition,getAchievementCategory,getReleaseStateList,getInnovation} from '@/tools.js';
 const FormItem = Form.Item;

+ 2 - 4
js/component/administration/achievement/achievementExamine.jsx

@@ -1,13 +1,11 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
+import {  Button, Input, Select, Spin, Table, Switch, message, DatePicker} from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './techAchievement.less';
 import TechDemandDesc from './achievementDesc.jsx';
 import {achievementCategoryList,achievementType } from '@/dataDic.js';
-import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
-import { getTransaction,getReleaseStateList,getAchievementCategory,getAchievementType } from '@/tools.js';
+import {getReleaseStateList,getAchievementCategory,getAchievementType } from '@/tools.js';
 
 const DemandList = React.createClass({
     loadData(pageNo) {

+ 5 - 20
js/component/administration/demand/demandDetaiel.jsx

@@ -1,33 +1,18 @@
 import React from 'react';
 import $ from 'jquery/src/ajax';
 import {
-	Icon,
-	Tabs,
-	Table,
-	Tooltip,
 	Modal,
-	Popover,
 	message,
 	Spin,
 	Upload,
 	Input,
-	InputNumber,
-	Select,
-	DatePicker,
 	Button,
-	Radio,
-	Form,
-	Cascader,
-    Tag,
-    Checkbox,
-    Row,
-    Col
+	Form
 } from 'antd';
-import { getTechField } from '@/DicTechFieldList.js';
-import {areaSelect,getProvince } from '@/NewDicProvinceList';
-import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
-import {  splitUrl, companySearch, getDemandType, getAchievementCategory,getReleaseStateList,getReleasePositionList } from '@/tools.js';
-const FormItem = Form.Item;
+
+import {  getIndustryCategory } from '@/DicIndustryList.js';
+import {  splitUrl, getDemandType,getReleaseStateList,getReleasePositionList } from '@/tools.js';
+
 
 const DemandDetail = Form.create()(React.createClass({
     getInitialState() {

+ 1 - 3
js/component/administration/demand/demandExamine.jsx

@@ -1,12 +1,10 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
+import {  Button, Input, Select, Spin, Table, Switch, message, DatePicker } from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './techDemand.less';
 import TechDemandDesc from './demandDesc.jsx';
 import { demandTypeList } from '@/dataDic.js';
-import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
 import { getDemandType,getReleaseStateList } from '@/tools.js';
 
 const DemandList = React.createClass({

+ 1 - 3
js/component/administration/demand/techDemand.jsx

@@ -1,12 +1,10 @@
 import React from 'react';
-import { Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal } from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js';
+import {Button, Input, Select, Spin, Table, Switch, message, DatePicker } from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
 import './techDemand.less';
 import TechDemandDesc from './demandDesc.jsx';
 import { demandTypeList } from '@/dataDic.js';
-import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
 import { getDemandType,getReleaseStateList } from '@/tools.js';
 
 const DemandList = React.createClass({

+ 1 - 1
js/component/administration/news/newDesc.jsx

@@ -36,7 +36,7 @@ class DemandDesc extends React.Component {
 					visible={this.state.visible}
 					onOk={this.handOk.bind(this)}
 					onCancel={this.handleCancel.bind(this)}
-					width="1000px"
+					width="1100px"
 					title={!data.id ? '新建新闻' : '新闻详情'}
 					footer=""
 					className="admin-desc-content"

+ 2 - 1
js/component/administration/news/newDetails.jsx

@@ -9,6 +9,7 @@ import {
 	Form,
 } from 'antd';
 import {getProvince} from '@/NewDicProvinceList';
+import '../policy/policy.less';
 import {getReleaseStateList,getNewPosition,splitUrl} from '@/tools';
 const NewDetail = Form.create()(React.createClass({
     getInitialState() {
@@ -221,7 +222,7 @@ const NewDetail = Form.create()(React.createClass({
 							<span>{theData.summary}</span>
 						</FormItem>
                         <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="新闻正文">
-							<span className="txt"></span>
+							<div className="txt"></div>
 						</FormItem>
 					</div>
 					<div className="clearfix">

+ 4 - 4
js/component/administration/news/newForm.jsx

@@ -133,11 +133,11 @@ const NewDetailForm = Form.create()(React.createClass({
     },
     handleSubmit(e,index) {
 		e.preventDefault();
-		if((this.state.edit).content==undefined){
-			message.warning('请填写新闻正文');
-			return false;
-		}
         this.props.form.validateFields((err, values) => {
+			if((this.state.edit).content==undefined||!(this.state.edit).content||(this.state.edit).content=='<p><br></p>'){
+				message.warning('请填写政策正文');
+				return false;
+			}
             //url转化
             let thePictureUrl = [];
             if (this.state.pictureUrl.length) {

+ 7 - 0
js/component/administration/policy/policy.less

@@ -0,0 +1,7 @@
+.txt{
+   
+    p{
+        word-wrap:break-word;
+        width: 726px;
+    }
+}

+ 1 - 1
js/component/administration/policy/policyDesc.jsx

@@ -36,7 +36,7 @@ class DemandDesc extends React.Component {
 					visible={this.state.visible}
 					onOk={this.handOk.bind(this)}
 					onCancel={this.handleCancel.bind(this)}
-					width="1000px"
+					width="1100px"
 					title={!data.id ? '新建政策' : '政策详情'}
 					footer=""
 					className="admin-desc-content"

+ 7 - 18
js/component/administration/policy/policyDetails.jsx

@@ -9,6 +9,7 @@ import {
 	Form,
 } from 'antd';
 import {getProvince} from '@/NewDicProvinceList';
+import './policy.less'
 import {getReleaseStateList,getPolicyPosition,splitUrl} from '@/tools';
 const NewDetail = Form.create()(React.createClass({
     getInitialState() {
@@ -29,7 +30,7 @@ const NewDetail = Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context +  '/api/admin/news/detail' ,
+            url: globalConfig.context +  '/api/admin/policy/detail' ,
             data: {
                 id: id
             },
@@ -42,27 +43,15 @@ const NewDetail = Form.create()(React.createClass({
                     thisData = {};
                 };
                 document.querySelector('.txt').innerHTML='';
-                let publishPagesArr = [];
-                let pageList =  thisData.publishPages?(thisData.publishPages).split(','):[];
-                pageList.map(item=>{
-					publishPagesArr.push(item.publishPage)
-                });
-                let ProvinceS = thisData.provinceId,page=[], //getprovince
+                let ProvinceS = thisData.province, 
                     ProvinceCity = getProvince(ProvinceS);
-                    let pages =thisData.newsPublishs ||[];
-                    pages.map(item=>{
-                        page.push(item.publishPage)
-                    })
-                    console.log(page)
                     let eleDiv = document.createElement('div');
                     eleDiv.innerHTML=thisData.content;
-                    console.log(eleDiv);
                     document.querySelector('.txt').append(eleDiv);
                 this.setState({
                     id:thisData.id,
-                    publishPagesArr:publishPagesArr,
+                    page:thisData.publishPages,
                     data: thisData,
-                    page:page,
                     eleDiv:eleDiv,
                     ProvinceCity:ProvinceCity,
                     edit:{content:thisData.content},
@@ -89,7 +78,7 @@ const NewDetail = Form.create()(React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context +'/api/admin/news/updateStatus',
+            url: globalConfig.context +'/api/admin/policy/updateStatus',
             data: {
                 id: this.state.id,
                 auditStatus:this.state.auditStatus,
@@ -117,7 +106,7 @@ const NewDetail = Form.create()(React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context +  '/api/admin/news/updateStatus',
+            url: globalConfig.context +  '/api/admin/policy/updateStatus',
             data: {
                 id: this.state.id,
                 auditStatus:4,
@@ -221,7 +210,7 @@ const NewDetail = Form.create()(React.createClass({
 							<span>{theData.summary}</span>
 						</FormItem>
                         <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="政策正文">
-							<span className="txt"></span>
+							<div className="txt" ></div>
 						</FormItem>
 					</div>
 					<div className="clearfix">

+ 23 - 23
js/component/administration/policy/policyForm.jsx

@@ -94,7 +94,7 @@ const NewDetailForm = Form.create()(React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context +  '/api/admin/news/detail' ,
+            url: globalConfig.context +  '/api/admin/policy/detail' ,
             data: {
                 id: id
             },
@@ -106,17 +106,13 @@ const NewDetailForm = Form.create()(React.createClass({
                     };
                     thisData = {};
 				};
-				let publishPagesArr = [];
-                let pageList =  thisData.newsPublishs
-                pageList.map(item=>{
-					publishPagesArr.push(item.publishPage)
-                });
-				provice.push(thisData.provinceId);
+				let proArr=[];
+				proArr.push(thisData.province);
                 this.setState({
 					id:thisData.id,
 					data: thisData,
-					Province:provice,
-					publishPages:publishPagesArr,
+					Province:proArr,
+					publishPages:thisData.publishPages,
 					auditStatus:thisData.auditStatus,
 					edit:{content:thisData.content},
                     pictureUrl: thisData.titleImg ? splitUrl(thisData.titleImg, ',', globalConfig.avatarHost + '/upload') : []
@@ -133,12 +129,12 @@ const NewDetailForm = Form.create()(React.createClass({
     },
     handleSubmit(e,index) {
 		e.preventDefault();
-		if((this.state.edit).content==undefined){
-			message.warning('请填写政策正文');
-			return false;
-		}
         this.props.form.validateFields((err, values) => {
-            //url转化
+			//url转化
+			if((this.state.edit).content==undefined||!(this.state.edit).content||(this.state.edit).content=='<p><br></p>'){
+				message.warning('请填写政策正文');
+				return false;
+			}
             let thePictureUrl = [];
             if (this.state.pictureUrl.length) {
                 let picArr = [];
@@ -150,6 +146,7 @@ const NewDetailForm = Form.create()(React.createClass({
                 thePictureUrl = picArr.join(",");
 			};
             if (!err) {
+				
 				let publishPages =(values.publishPages).join(',')
                 this.setState({
                     loading: true
@@ -158,7 +155,7 @@ const NewDetailForm = Form.create()(React.createClass({
                     method: "post",
 					dataType: "json",
 					async:true,
-                    url: this.props.data.id ? globalConfig.context + '/api/admin/news/updateNews' : globalConfig.context + '/api/admin/news/apply',
+                    url: this.props.data.id ? globalConfig.context + '/api/admin/policy/update' : globalConfig.context + '/api/admin/policy/apply',
                     data: {
 						id: this.props.data.id,
 						type:0,
@@ -171,7 +168,7 @@ const NewDetailForm = Form.create()(React.createClass({
 						sourceUrl:values.sourceUrl,
 						auditStatus:index,
                         summary: values.summary,
-						provinceId: (values.ProvinceCity)[0],
+						province: (values.ProvinceCity)[0],
 						publishPages:publishPages
                     }
                 }).done(function (data) {
@@ -193,6 +190,7 @@ const NewDetailForm = Form.create()(React.createClass({
         });
 	},
 	cancelFun(){
+		this.state.edit={};
 		this.props.closeDesc();
 	},
     componentWillMount() {
@@ -200,10 +198,11 @@ const NewDetailForm = Form.create()(React.createClass({
             this.loadData(this.props.data.id);
         } else {
 			this.state.data = {};
-			this.state.edit={};
 			this.state.pictureUrl = [];
+			this.state.Province=undefined;
 			this.setState({
-				publishPages:['web_index','app_policy_index']
+				edit:{content:''},
+				publishPages:['web_policy_main','app_policy_main']
 			})
         };
     },
@@ -215,11 +214,12 @@ const NewDetailForm = Form.create()(React.createClass({
                 this.loadData(nextProps.data.id);
             } else {
 				this.state.data = {};
-				this.state.edit={};
 				this.state.pictureUrl = [];
 				this.state.theData={};
+				this.state.Province=undefined;
 				this.setState({
-					publishPages:['web_index','app_policy_index']
+					edit:{content:''},
+					publishPages:['web_policy_main','app_policy_main']
 				})
             };
 			this.props.form.resetFields();
@@ -323,11 +323,11 @@ const NewDetailForm = Form.create()(React.createClass({
 							})(
 								<Checkbox.Group>
 									<Row>
-										<Col span={6}><Checkbox value="index" >网站首页</Checkbox></Col>
-										<Col span={6}><Checkbox value="web_index" disabled>网站政策首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="web_index" >网站首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="web_policy_main" disabled>网站政策首页</Checkbox></Col>
 										<Col span={6}><Checkbox value="web_tech_service_index">网站科技服务首页</Checkbox></Col>
 										<Col span={6}><Checkbox value="app_index">APP首页</Checkbox></Col>
-										<Col span={6}><Checkbox value="app_policy_index" disabled>app政策首页</Checkbox></Col>
+										<Col span={6}><Checkbox value="app_policy_main" disabled>app政策首页</Checkbox></Col>
 										<Col span={6}><Checkbox value="app_tech_service_index">APP科技服务首页</Checkbox></Col>
 									</Row>
 								</Checkbox.Group>

+ 8 - 10
js/component/administration/policy/policyList.jsx

@@ -10,7 +10,6 @@ import {getReleaseStateList, } from '@/tools.js';
 
 const PolicyList = React.createClass({
     loadData(pageNo) {
-        
         this.state.data = [];
         this.setState({
             page:pageNo,
@@ -20,13 +19,13 @@ const PolicyList = React.createClass({
             method: "get",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/news/list",
+            url: globalConfig.context + "/api/admin/policy/list",
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                title: this.state.nameSearch, //需求名称
-                startCreateTime: this.state.releaseDate[0],
-                endCreateTime: this.state.releaseDate[1],
+                title: this.state.nameSearch, //政策标题
+                startReleaseDate: this.state.releaseDate[0],
+                endReleaseDate: this.state.releaseDate[1],
                 auditStatus:this.state.auditStatusSearch,
             },
             success: function (data) {
@@ -121,7 +120,6 @@ const PolicyList = React.createClass({
                     render:(text,recard) => {
                         return  <div className="btnRight">
                                    {recard.auditStatus!='1'&&recard.auditStatus!='2'&&<Button type="primary" style={{ background: "#3fcf9e", border: "none", color: "#fff" }} onClick={(e)=>{e.stopPropagation(),this.submission(recard)}}>发布</Button>}
-                                  
                                    {recard.auditStatus!='1'&&recard.auditStatus=='2'&&<Button type="success" onClick={(e)=>{ e.stopPropagation(),this.updateFun(recard)}}>刷新发布</Button>}
                                    {recard.auditStatus!='1'&&recard.auditStatus=='2'&&<Button type="danger" onClick={(e)=>{e.stopPropagation(),this.revokeFun(recard)}}>撤销发布</Button>}
                                 </div>
@@ -142,7 +140,7 @@ const PolicyList = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/news/updateStatus",
+            url: globalConfig.context + "/api/admin/policy/updateStatus",
             data: {
                 id:record.id,
                 auditStatus:2
@@ -168,7 +166,7 @@ const PolicyList = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context +'/api/admin/news/updateStatus',
+            url: globalConfig.context +'/api/admin/policy/updateStatus',
             data: {
                 id: recard.id,
                 auditStatus:recard.auditStatus,
@@ -195,7 +193,7 @@ const PolicyList = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context +  '/api/admin/news/updateStatus',
+            url: globalConfig.context +  '/api/admin/policy/updateStatus',
             data: {
                 id: recard.id,
                 auditStatus:4,
@@ -230,7 +228,7 @@ const PolicyList = React.createClass({
             method: "POST",
             dataType: "json",
             crossDomain: false,
-            url: globalConfig.context + "/api/admin/news/deleteById",
+            url: globalConfig.context + "/api/admin/policy/delete",
             data: {
                 id: ids
             }

+ 3 - 3
js/component/dataDic.js

@@ -2243,10 +2243,10 @@ module.exports = {
     ],
     policyPosition:[
         {
-	        value: "index",
+	        value: "web_index",
 	        key: "网站首页"
 	    },{
-	        value: "web_index",
+	        value: "web_policy_main",
 	        key: "网站政策首页"
 	    },{
 	        value: "web_tech_service_index",
@@ -2255,7 +2255,7 @@ module.exports = {
 	        value: "app_index",
 	        key: "app首页"
 	    },{
-	        value: "app_policy_index",
+	        value: "app_policy_main",
 	        key: "app政策首页"
 	    },{
 	        value: "app_tech_service_index",