liting2017 6 years ago
parent
commit
62e5ec1a6e

+ 2 - 16
js/component/account/achievement/achievementDetails.jsx

@@ -1,29 +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 {  getIndustryCategory } from '@/DicIndustryList.js';
+import {  getIndustryCategory } from '@/industryList.js';
 import {  splitUrl ,getMaturity,getAchievementType,getTransaction,getAchievementPosition,getAchievementCategory,getReleaseStateList,getInnovation} from '@/tools.js';
 
 const DemandDetail = Form.create()(React.createClass({

+ 4 - 11
js/component/account/achievement/achievementForm.jsx

@@ -2,18 +2,13 @@ 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,
@@ -23,12 +18,10 @@ import {
     Row,
     Col
 } from 'antd';
-import { getTechField } from '@/DicTechFieldList.js';
-import {areaSelect } from '@/NewDicProvinceList';
+import {industry} from '@/industryList';
 import {achievementType,achievementCategoryList,maturityList,innovationList,transaction} from '@/dataDic';
-import { IndustryObject } from '@/DicIndustryList.js';
 import {  splitUrl} from '@/tools.js';
-const FormItem =Form.Item
+
 
 const KeyWordTagGroup = React.createClass({
     getInitialState() {
@@ -330,7 +323,7 @@ const DemandDetailForm = Form.create()(React.createClass({
     },
     render() {
         const theData = this.state.data || {};
-        const { getFieldDecorator,getFieldsValue } = this.props.form;
+        const { getFieldDecorator } = this.props.form;
         const FormItem = Form.Item
         const formItemLayout = {
             labelCol: { span: 6 },
@@ -386,7 +379,7 @@ const DemandDetailForm = Form.create()(React.createClass({
 						{getFieldDecorator('industryCategory', {
 							rules: [ { type: 'array', required: true, message: '此项为必填项!' } ],
 							initialValue: [ theData.fieldA, theData.fieldB ]
-						})(<Cascader style={{ width: 300 }} options={IndustryObject} placeholder="请选择一个行业" />)}
+						})(<Cascader style={{ width: 300 }} options={industry} placeholder="请选择一个行业" />)}
 					</FormItem>
 					<div className="clearfix">
 						<FormItem className="half-item" {...formItemLayout} label="成果类型">

+ 0 - 2
js/component/account/achievement/techAchievement.jsx

@@ -284,9 +284,7 @@ const DemandList = React.createClass({
                 });
             }
         };
-        const hasSelected = this.state.selectedRowKeys.length > 0;
         const { RangePicker } = DatePicker;
-        this.state.dataSource = [{key:1,id:1,auditStatus:0},{key:2,id:1,auditStatus:1},{key:3,id:1,auditStatus:2},{key:4,id:1,auditStatus:3}]
         return (
             <div className="user-content" >
                 <div className="content-title">

+ 4 - 20
js/component/account/demand/demandDetaiel.jsx

@@ -1,32 +1,17 @@
 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, companySearch, getDemandType, getAchievementCategory,getReleaseStateList,getReleasePositionList } from '@/tools.js';
+
+import {  getIndustryCategory } from '@/DicIndustryList.js';
+import {  splitUrl, getDemandType,getReleaseStateList,getReleasePositionList } from '@/tools.js';
 
 const DemandDetail = Form.create()(React.createClass({
     getInitialState() {
@@ -167,7 +152,6 @@ const DemandDetail = Form.create()(React.createClass({
     },
     render() {
         const theData = this.state.data || {};
-        const { getFieldDecorator } = this.props.form;
         const FormItem = Form.Item
         const formItemLayout = {
             labelCol: { span: 6 },

+ 4 - 6
js/component/account/demand/demandForm.jsx

@@ -23,11 +23,9 @@ import {
     Row,
     Col
 } from 'antd';
-import { getTechField } from '@/DicTechFieldList.js';
-import {areaSelect } from '@/NewDicProvinceList';
-import { IndustryObject, getIndustryCategory } from '@/DicIndustryList.js';
-import {  splitUrl, companySearch, getDemandType, getAchievementCategory } from '@/tools.js';
-const FormItem =Form.Item
+
+import {  splitUrl } from '@/tools.js';
+import {industry} from '@/industryList';
 
 const KeyWordTagGroup = React.createClass({
     getInitialState() {
@@ -379,7 +377,7 @@ const DemandDetailForm = Form.create()(React.createClass({
 						{getFieldDecorator('industryCategory', {
 							rules: [ { type: 'array', required: true, message: '此项为必填项!' } ],
 							initialValue: [ theData.industryCategoryA, theData.industryCategoryB ]
-						})(<Cascader style={{ width: 300 }} options={IndustryObject} placeholder="请选择一个行业" />)}
+						})(<Cascader style={{ width: 300 }} options={industry} placeholder="请选择一个行业" />)}
 					</FormItem>
 					<div className="clearfix">
 						<FormItem className="half-item" {...formItemLayout} label="需求类型">

+ 7 - 3
js/component/account/index/leftMenu.jsx

@@ -63,11 +63,11 @@ const LeftTab = React.createClass({
 			});
 		}
 	},
-	componentWillMount() {
-		this.loadData();
+	hashFun(){
 		if (window.location.hash) {
 			let current = window.location.hash.substr(2),
 				open = [];
+				console.log(current)
 			if (!current.length) {
 				window.location.hash = 'normal';
 				this.setState({
@@ -80,7 +80,6 @@ const LeftTab = React.createClass({
 						item.children.map((atem) => {
 							if (current == atem.url) {
 								open.push(item.url);
-								return false;
 							}
 						});
 					}
@@ -98,7 +97,12 @@ const LeftTab = React.createClass({
 			});
 		}
 	},
+	componentWillMount() {
+		this.loadData();
+		this.hashFun()
+	},
 	render() {
+		
 		let demandList = [
 			{
 				name: '我的需求',

+ 29 - 8
js/component/account/index/normal.jsx

@@ -2,7 +2,7 @@ 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';
 import './content.less';
 import Collection from './collection';
@@ -71,7 +71,6 @@ const Content = React.createClass({
 
     },
     render () {
-        const TabPane = Tabs.TabPane;
         return (
             <Spin spinning={this.state.loading} className='spin-box'>
                 <div className="index-content">
@@ -101,13 +100,35 @@ const Content = React.createClass({
                         </div>
                         <div className="userdata-content">
                             {(() => {
-                                if (this.state.level > 0) {
-                                    return <p className="userdata-lvl"><span>{this.state.gradeName}</span></p>;
-                                } else {
-                                    return <p className="userdata-lvl"><span>用户未认证</span><a style={{ marginLeft: '20px' }} href={userData.type == 1 ? globalConfig.context + "/user/groupCertify.html" : globalConfig.context + "/user/certify.html"}>进行实名认证</a></p>;
-                                };
+                                if (this.state.type == '0') {
+                                    return <p className="userdata-lvl">已个人认证</p>;
+                                } else if(this.state.type == '1'){
+                                    return <p className="userdata-lvl"><span>已企业认证</span></p>
+                                }
                             })()}
-                            <p><a href={globalConfig.context + "/user/account/set.html"}>填写完整资料</a>,有助于提高您的资信</p>
+                            <div>
+                                {
+                                    (()=>{
+                                        if (this.state.type=='0'||this.state.type=='1') {
+                                            if(this.state.type=='0'){
+                                                return <p><Link to="/personal">填写完整资料</Link>,有助于提高您的资信</p>
+                                            }
+                                            if(this.state.type=='1'){
+                                                return <p><Link to="/unit">填写完整资料</Link>,有助于提高您的资信</p>
+                                            }
+                                            
+                                        }else {
+                                            return <div>
+                                                <p>未认证,请填写相应资料进行认证</p>
+                                                <p>
+                                                    <Link to='/personal' style={{marginRight:20}}>个人认证</Link>
+                                                    <Link to='/unit'>企业认证</Link>
+                                                </p>
+                                            </div>
+                                        }
+                                    })()
+                                }
+                            </div>
                             <p className="userdata-relate" style={{ 'display': 'none' }}>
                                 <Button className="relateqq"><img src={qq} alt="" /> QQ账号登录</Button>
                                 <Button className="relateweibo"><img src={weibo} alt="" />微博账号登录</Button>

+ 1 - 1
js/component/account/setAccount/account.jsx

@@ -50,7 +50,7 @@ class Account extends React.Component {
 						accountData: data.data,
 						status:data.data.status,//用户状态 0-正常,1-注销 ,2-锁定
 						authentication:data.data.authentication, //实名认证状态 0-未认证,1-个人实名认
-						createTime:data.data.createTime  
+						createTime:data.data.createTime?new Date(data.data.createTime).toLocaleString():''  
 					});
 				}
 			}.bind(this)

+ 1 - 1
js/component/dataDic.js

@@ -2272,5 +2272,5 @@ module.exports = {
 	        value: "4",
 	        key: "合作开发"
 	    }
-    ],
+    ]
 };

File diff suppressed because it is too large
+ 1493 - 0
js/component/industryList.js