dengzhiguo 6 years ago
parent
commit
ca4ce240d0

+ 8 - 0
js/component/account/business/businessDetails.jsx

@@ -252,6 +252,14 @@ const DemandDetail = Form.create()(
 								</FormItem>
 								<FormItem
 									className="half-item"
+									labelCol={{ span:8 }}
+									wrapperCol={{ span: 12 }}
+									label="关键字"
+								>
+									<span>{theData.keyword}</span>
+								</FormItem>
+								<FormItem
+									className="half-item"
 									labelCol={{ span: 8}}
 									wrapperCol={{ span: 12 }}
 									label="创建时间"

+ 25 - 0
js/component/account/business/businessForm.jsx

@@ -125,6 +125,10 @@ const DemandDetailForm = Form.create()(
 				message.warning('请输入正确的市场价');
 				return;
 			}
+			if (!this.state.keyword) {
+				message.warning('请输入关键字');
+				return;
+			}
 			if(this.state.advertisement&&(this.state.advertisement).length>30){
 				message.warning('项目营销说明字数不得超过30个字。');
 				return;
@@ -165,6 +169,7 @@ const DemandDetailForm = Form.create()(
 					auditStatus:index,
 					id: this.state.id, //业务名称
 					name: this.state.name, //业务名称
+					keyword:this.state.keyword, //关键字
 					categoryId: this.state.categoryId[1], //业务品类
 					price: this.state.price, //市场价
 					advertisement:this.state.advertisement,//项目营销说明
@@ -237,6 +242,7 @@ const DemandDetailForm = Form.create()(
 						this.setState({
 							id: thisdata.id, //业务名称
 							name: thisdata.name, //业务名称
+							keyword:this.state.keyword, //关键字
 							tagTxt:tagTxt.join(' - '),
 							tagArr:tagArr,
 							categoryId: categoryIdArr, //业务品类
@@ -400,6 +406,7 @@ const DemandDetailForm = Form.create()(
 				data: {
 					id: this.state.id, //业务名称
 					name: this.state.name, //业务名称
+					keyword:this.state.keyword, //关键字
 					categoryId: this.state.categoryId[1], //业务品类
 					price: this.state.price, //市场价
 					advertisement:this.state.advertisement,//项目营销说明
@@ -635,6 +642,24 @@ const DemandDetailForm = Form.create()(
 									className="half-item"
 									labelCol={{ span: 4 }}
 									wrapperCol={{ span: 12 }}
+									label={
+										<span>
+											<strong style={{ color: 'red' }}>*</strong>关键字
+										</span>
+									}
+								>
+									<Input
+										placeholder="请填写关键字"
+										value={this.state.keyword}
+										onChange={(e) => {
+											this.setState({ keyword: e.target.value });
+										}}
+									/>
+								</FormItem>
+								<FormItem
+									className="half-item"
+									labelCol={{ span: 4 }}
+									wrapperCol={{ span: 12 }}
 									label="创建时间"
 								>
 									<span style={{ width: '94%' }}>{this.state.createTime}</span>

+ 32 - 14
js/component/account/setAccount/expert.jsx

@@ -26,7 +26,7 @@ import moment from 'moment';
 import './unit.less';
 import { areaSelect } from '@/NewDicProvinceList';
 import { socialAttribute, industry,adviserType } from '@/dataDic.js';
-import { splitUrl,getAuthState,getAdviserType  } from '@/tools.js';
+import { splitUrl,getAuthState,getAdviserType ,getSocialAttribute } from '@/tools.js';
 const FormItem = Form.Item;
 const monthFormat = 'YYYY/MM';
 //图片组件
@@ -392,18 +392,6 @@ const Expert = React.createClass({
 									</Select>
 								)}
 							</FormItem>
-							<FormItem className="half-item" {...formItemLayout} label="社会属性">
-								{getFieldDecorator('societyTag', {
-									rules: [ { required: true, message: '此项为必填项!' } ],
-									initialValue: theData.societyTag
-								})(
-									<Select placeholder="客户社会属性">
-										{socialAttribute.map(function(item) {
-											return <Select.Option key={item.value}>{item.key}</Select.Option>;
-										})}
-									</Select>
-								)}
-							</FormItem>
 							<FormItem className="half-item" {...formItemLayout} label="性别">
 								{getFieldDecorator('sex', {
 									initialValue: theData.sex
@@ -474,7 +462,7 @@ const Expert = React.createClass({
 								})(<Input type="textarea" rows={4} maxLength={512} placeholder="输入个人简介"/>)}
 							</FormItem>
 						</div>
-						{(this.state.expert=='0'||this.state.auditStatus=='0'||this.state.expert==null)&&this.state.type!=null?
+						{(this.state.expert=='0'||this.state.auditStatus=='0'||this.state.expert==null||this.state.auditStatus=='3')&&this.state.type!=null?
 						<div>
 							<div className="clearfix btnGrounp">
 								<Radio.Group 
@@ -519,6 +507,18 @@ const Expert = React.createClass({
 										rules: [ { required: true, message: '此项为必填项!' } ],
 									})(<Input placeholder="输入职称" maxLength={32}/>)}
 								</FormItem>
+								<FormItem className="half-item" {...formItemLayout} label="社会属性">
+									{getFieldDecorator('societyTag', {
+										rules: [ { required: true, message: '此项为必填项!' } ],
+										initialValue: theData.societyTag
+									})(
+										<Select placeholder="客户社会属性">
+											{socialAttribute.map(function(item) {
+												return <Select.Option key={item.value}>{item.key}</Select.Option>;
+											})}
+										</Select>
+									)}
+								</FormItem>
 							</div>:this.state.authenticationState=='1'?
 							<div>
 								<FormItem className="half-item" {...formItemLayout} label="顾问类型">
@@ -533,6 +533,18 @@ const Expert = React.createClass({
 									</Select>
 								)}
 								</FormItem>
+								<FormItem className="half-item" {...formItemLayout} label="社会属性">
+									{getFieldDecorator('societyTag', {
+										rules: [ { required: true, message: '此项为必填项!' } ],
+										initialValue: theData.societyTag
+									})(
+										<Select placeholder="客户社会属性">
+											{socialAttribute.map(function(item) {
+												return <Select.Option key={item.value}>{item.key}</Select.Option>;
+											})}
+										</Select>
+									)}
+								</FormItem>
 							</div>:''}
 							{this.state.authenticationState=='1'||this.state.authenticationState=='0'?<div className="clearfix pictures">
 								<div className="clearfix">
@@ -586,6 +598,9 @@ const Expert = React.createClass({
 							<FormItem className="half-item" {...formItemLayout} label="职称">
 								<span>{theData.professionalTitle}</span>
 							</FormItem>
+							<FormItem className="half-item" {...formItemLayout} label="社会属性">
+								<span>{getSocialAttribute(theData.societyTag)}</span>
+							</FormItem>
 							<div className="clearfix">
 								<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 13 }} label="专家照片">
 										<Upload className="demandDetailShow-upload"
@@ -649,6 +664,9 @@ const Expert = React.createClass({
 							<FormItem className="half-item" {...formItemLayout} label="顾问类型">
 								<span>{getAdviserType(theData.consultantType)}</span>
 							</FormItem>
+							<FormItem className="half-item" {...formItemLayout} label="社会属性">
+								<span>{getSocialAttribute(theData.societyTag)}</span>
+							</FormItem>
 							<div className="clearfix">
 								<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 13 }} label="顾问照片">
 										<Upload className="demandDetailShow-upload"

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

@@ -184,9 +184,14 @@ const NewDetail = Form.create()(React.createClass({
 						</FormItem>
 					</div>
                     <div>
-                    <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="来源链接">
+                    	<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="来源链接">
 							<span>{theData.sourceUrl}</span>
 						</FormItem>
+                    </div> 
+                    <div>
+                    	<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="关键字">
+							<span>{theData.keyword}</span>
+						</FormItem>
                     </div>
                     <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="新闻图片">
                         <div className="clearfix">

+ 12 - 0
js/component/administration/news/newForm.jsx

@@ -172,6 +172,7 @@ const NewDetailForm = Form.create()(React.createClass({
 						hot:values.hot,
 						source:values.source,
 						sourceUrl:values.sourceUrl,
+						keyword:values.keyword,
 						auditStatus:index,
                         summary: values.summary,
 						provinceId: (values.ProvinceCity)[0],
@@ -240,6 +241,10 @@ const NewDetailForm = Form.create()(React.createClass({
             labelCol: { span: 6 },
             wrapperCol: { span: 12 },
 		};
+		const formItemLayouts = {
+            labelCol: { span: 3 },
+            wrapperCol: { span: 18 },
+		};
         return (
 			<div className='login'>
 			<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
@@ -301,6 +306,13 @@ const NewDetailForm = Form.create()(React.createClass({
 						</FormItem>
 					</div>
 					<div className="clearfix">
+						<FormItem  {...formItemLayouts} label="关键字">
+							{getFieldDecorator('keyword', {
+								initialValue: theData.keyword
+							})(<Input placeholder="请输入关键字" />)}
+						</FormItem>
+					</div>
+					<div className="clearfix">
 						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="新闻图片">
 							<PicturesWall
 								fileList={this.getPictureUrl}

+ 5 - 0
js/component/administration/policy/policyDetails.jsx

@@ -176,6 +176,11 @@ const NewDetail = Form.create()(React.createClass({
 							<span>{theData.sourceUrl}</span>
 						</FormItem>
                     </div>
+                    <div>
+                        <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }}  label="关键字">
+							<span>{theData.keyword}</span>
+						</FormItem>
+                    </div>
                     <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="政策图片">
                         <div className="clearfix">
                                 <Upload className="demandDetailShow-upload"

+ 13 - 1
js/component/administration/policy/policyForm.jsx

@@ -165,6 +165,7 @@ const NewDetailForm = Form.create()(React.createClass({
 						hot:values.hot,
 						source:values.source,
 						sourceUrl:values.sourceUrl,
+						keyword:values.keyword,
 						auditStatus:index,
                         summary: values.summary,
 						province: (values.ProvinceCity)[0],
@@ -232,7 +233,10 @@ const NewDetailForm = Form.create()(React.createClass({
             labelCol: { span: 6 },
             wrapperCol: { span: 12 },
 		};
-		
+		const formItemLayouts = {
+            labelCol: { span: 3 },
+            wrapperCol: { span: 18 },
+		};
         return (
 			<div className='login'>
 			<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,0)}} id="demand-form">
@@ -279,6 +283,14 @@ const NewDetailForm = Form.create()(React.createClass({
 							 <Cascader options={provinceSelect()}   placeholder="选择城市" />
 							 )}
 						</FormItem>
+						
+					</div>
+					<div className="clearfix">
+						<FormItem  {...formItemLayouts} label="关键字">
+							{getFieldDecorator('keyword', {
+								initialValue: theData.keyword
+							})(<Input placeholder="请输入关键字" />)}
+						</FormItem>
 					</div>
 					<div className="clearfix">
 						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="政策图片">

+ 1 - 1
package.json

@@ -12,7 +12,7 @@
     "buildtest": "node bin/clean.js && webpack --progress --colors --env.deploy test",
     "buildstage": "node bin/clean.js && webpack --progress --colors --env.deploy stage",
     "pro": "node bin/clean.js && webpack --progress --colors --env.deploy prod",
-    "dev": "webpack-dev-server --port 80 --devtool eval --progress --colors --hot --content-base build --env.deploy dev --env.watch watch"
+    "dev": "webpack-dev-server --port 8088 --devtool eval --progress --colors --hot --content-base build --env.deploy dev --env.watch watch"
   },
   "repository": {
     "type": "git",

+ 1 - 1
webpack-dll.config.js

@@ -10,7 +10,7 @@ let theme = {
   '@link-color': '#58a3ff'
 };
 module.exports = (function () {
-	let staticHost = 'http://192.168.0.190';    
+	let staticHost = 'http://192.168.0.190:8088';    
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://statics.jishutao.com';

+ 3 - 3
webpack.config.js

@@ -121,7 +121,7 @@ module.exports = (function () {
         }));
     }
 
-    let staticHost = 'http://192.168.0.190';    
+    let staticHost = 'http://192.168.0.190:8088';    
     switch (argv.env.deploy) {
         case 'test':
             staticHost = 'http://statics.jishutao.com';
@@ -157,8 +157,8 @@ module.exports = (function () {
         devServer: {
             disableHostCheck: true,
             host: '192.168.0.190',
-            port: 80,
-            allowedHosts: ['127.0.0.1','192.168.0.20','192.168.0.99'],
+            port: 8088,
+            allowedHosts: ['192.168.0.190:8088','192.168.0.20','192.168.0.99'],
             headers: {
                 "Access-Control-Allow-Origin": "*"
             }

+ 7 - 7
webpack/entry.config.js

@@ -11,32 +11,32 @@ module.exports = {
     'admin/index': './js/admin/index.js',
   },
   watch: {
-    'user/index': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+    'user/index': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/index.js'
     ],
-    'user/login': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+    'user/login': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/login.js'
     ],
-    'user/signIn': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+    'user/signIn': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/signIn.js'
     ],
-    'user/account/index': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+    'user/account/index': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/account/index.js'
     ],
-    'user/account/evaluateInfo': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+    'user/account/evaluateInfo': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/user/account/assessment.js'
     ],
     //admin
-    'admin/login': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+    'admin/login': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
     'webpack/hot/only-dev-server',
     './js/user/adminLogin.js'
     ],
-    'admin/index': ['webpack-dev-server/client?http://192.168.0.190', // WebpackDevServer host and port
+    'admin/index': ['webpack-dev-server/client?http://192.168.0.190:8088', // WebpackDevServer host and port
       'webpack/hot/only-dev-server',
       './js/admin/index.js'
     ]