liting2017 лет назад: 6
Родитель
Сommit
00fd5620ac

+ 5 - 1
js/admin/index/content.jsx

@@ -11,7 +11,9 @@ import UserLibrary from '@/administration/business/userLibrary';
 import News from '@/administration/news/newsList';
 import Policy from '@/administration/policy/policyList';
 import Order from '@/administration/order/order';
-import SystemMessage from '@/administration/messagePush/systemMessage';
+import SystemMessage from '@/administration/messagePush/messageIn/systemMessage';
+import SystemMessageOut from '@/administration/messagePush/messageOut/systemMessage';
+import SystemMessagePhoto from '@/administration/messagePush/messagePhoto/systemMessage';
 import Tags from '@/administration/tags/tags';
 import AuthLibrary from '@/administration/authentication/techAuth';
 import AuthExamine from '@/administration/authentication/authExamine';
@@ -44,6 +46,8 @@ export default class ContentRouter extends React.Component {
             <Route path="/policy" component={Policy} />
             <Route path="/order" component={Order} />
             <Route path="/systemMessage" component={SystemMessage} />
+            <Route path="/systemMessageOut" component={SystemMessageOut} />
+            <Route path="/systemMessagePhoto" component={SystemMessagePhoto} />
             <Route path="/banner" component={Banner} />
         </Router>
       </Content>

+ 3 - 1
js/admin/menu.jsx

@@ -84,7 +84,9 @@ module.exports = {
         url: 'sub7',
         icon: 'notification',
         children: [
-          { name: '系统消息', url: 'systemMessage' },
+          { name: 'App站内消息管理', url: 'systemMessage' },
+          { name: '短信消息管理', url: 'systemMessagePhoto' },
+          { name: 'App推送消息管理', url: 'systemMessageOut' },
         ]
       }
     ]

+ 2 - 2
js/component/administration/messagePush/messageDesc.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { Modal } from 'antd';
-import NewForm from '@/administration/messagePush/messageForm';
-import NewDetaiel from '@/administration/messagePush/messageDetails';
+import NewForm from '@/administration/messagePush/messageIn/messageForm';
+import NewDetaiel from '@/administration/messagePush/messageIn/messageDetails';
 
 class DemandDesc extends React.Component {
 	constructor(props) {

+ 4 - 1
js/component/administration/messagePush/messageDetails.jsx

@@ -3,7 +3,7 @@ import {
 	Spin,
 	Form,
 } from 'antd';
-import '../policy/policy.less';
+import '../../policy/policy.less';
 
 const NewDetail = Form.create()(React.createClass({
     getInitialState() {
@@ -47,6 +47,9 @@ const NewDetail = Form.create()(React.createClass({
 			<Form layout="horizontal" id="demand-form">
 				<Spin spinning={this.state.loading}>
                     <div className="clearfix">
+                        <FormItem className="half-item" {...formItemLayout} label="推送类型">
+                            <span>app站内消息</span>
+                        </FormItem>
                         <FormItem className="half-item" {...formItemLayout} label="创建人">
                             <span>{theData.admin?theData.admin:'管理员'}</span>
                         </FormItem>	

+ 5 - 1
js/component/administration/messagePush/messageForm.jsx

@@ -41,7 +41,8 @@ const NewDetailForm = Form.create()(React.createClass({
 					dataType: "json",
 					async:true,
                     url: this.props.data.id?globalConfig.context +"/api/admin/message/updMessageById":globalConfig.context +"/api/admin/message/createMyMessage",
-                    data: {
+					data: {
+						subject:0,
 						id: this.props.data.id,
 						title: values.title,
 						subject:0,					//消息类别 0-系统消息
@@ -105,6 +106,9 @@ const NewDetailForm = Form.create()(React.createClass({
 			<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,1)}} id="demand-form">
 				<Spin spinning={this.state.loading}>
 					<div className="clearfix">
+						<FormItem className="half-item" {...formItemLayout} label="推送类型">
+                            <span>app站内消息</span>
+                        </FormItem>	
 						{this.props.data&&this.props.data.id?<div>
 							<FormItem className="half-item" {...formItemLayout} label="创建人">
 								<span>{theData.admin?theData.admin:'管理员'}</span>

+ 3 - 2
js/component/administration/messagePush/systemMessage.jsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, message, DatePicker } from 'antd';
 import $ from 'jquery/src/ajax';
 import moment from 'moment';
-import NewDesc from '@/administration/messagePush/messageDesc';
+import NewDesc from '@/administration/messagePush/messageIn/messageDesc';
 import '@/account/demand/techDemand.less';
 import '@/administration/news/news.less';
 
@@ -23,6 +23,7 @@ const DemandList = React.createClass({
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
                 title: this.state.nameSearch, //需求名称
+                subject:0,
                 isSend:this.state.auditStatusSearch,
                 sendStartTime: this.state.releaseDate[0],
                 sendEndTime: this.state.releaseDate[1],
@@ -237,7 +238,7 @@ const DemandList = React.createClass({
         return (
             <div className="user-content" >
                 <div className="content-title">
-                    <span>APP系统消息推送</span>
+                    <span>APP站内消息推送</span>
                     <div style={{float:'right'}}>
                         <Button type="primary" onClick={this.addClick}>添加消息<Icon type="plus" /></Button>
                     </div>

+ 69 - 0
js/component/administration/messagePush/messageOut/messageDesc.jsx

@@ -0,0 +1,69 @@
+import React from 'react';
+import { Modal } from 'antd';
+import NewForm from '@/administration/messagePush/messageOut/messageForm';
+import NewDetaiel from '@/administration/messagePush/messageOut/messageDetails';
+
+class DemandDesc extends React.Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+			loading: false,
+			pictureUrl: [],
+			showState:false
+		};
+	}
+	handleCancel() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, false);
+	}
+	handOk() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, true);
+	}
+	componentWillReceiveProps(nextProps) {
+		this.state.visible = nextProps.showDesc;
+	}
+	render() {
+		let data = this.props.data || [];
+		return (
+			<div className="patent-desc">
+				<Modal
+					maskClosable={false}
+					visible={this.state.visible}
+					onOk={this.handOk.bind(this)}
+					onCancel={this.handleCancel.bind(this)}
+					width="600px"
+					title={!data.id ? '新建消息' : '消息详情'}
+					footer=""
+					className="admin-desc-content"
+				>
+					<div>
+						<div>
+								{data.isSend?
+									<NewDetaiel
+									closeDesc={this.handleCancel.bind(this)}
+									data={this.props.data}
+									visible={this.state.visible}
+									handOk={this.handOk.bind(this)}
+									/>
+									:
+									<NewForm 
+										closeDesc={this.handleCancel.bind(this)}
+										data={this.props.data}
+										visible={this.state.visible}
+										handOk={this.handOk.bind(this)}
+										/>
+								} 
+						</div>
+					</div>
+				</Modal>
+			</div>
+		);
+	}
+}
+
+export default DemandDesc;

+ 84 - 0
js/component/administration/messagePush/messageOut/messageDetails.jsx

@@ -0,0 +1,84 @@
+import React from 'react';
+import {
+	Spin,
+	Form,
+} from 'antd';
+import '../../policy/policy.less';
+
+const NewDetail = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+        };
+    },
+	cancelFun(){
+		this.props.closeDesc(false,false);
+    },
+   
+    componentWillMount() {
+        if (this.props.data.id) {
+           
+        } else {
+            this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.videoFileList = [];
+            if (nextProps.data.id) {
+               
+            } else {
+				this.state.data = {};
+            };
+            this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.props.data || {};
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span:12},
+            wrapperCol: { span: 12 },
+        };
+        return (
+			<div className='login'>
+			<Form layout="horizontal" id="demand-form">
+				<Spin spinning={this.state.loading}>
+                    <div className="clearfix">
+                        <FormItem className="half-item" {...formItemLayout} label="创建人">
+                            <span>{theData.admin?theData.admin:'管理员'}</span>
+                        </FormItem>	
+                    </div>
+                    <div>
+						<FormItem labelCol={{ span: 6 }} wrapperCol={{ span: 14 }} label="标题">
+							<span>{theData.title}</span>
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem labelCol={{ span:6 }} wrapperCol={{ span: 18 }} label="消息内容">
+							<span>{theData.body}</span>
+						</FormItem>
+					</div>
+                    <div className="clearfix">
+						<FormItem labelCol={{ span:6 }} wrapperCol={{ span: 14 }} label="推送内容">
+							<span>{theData.resourceName}</span>
+						</FormItem>
+					</div>
+                    <div className="clearfix">
+                        <FormItem labelCol={{ span:6 }} wrapperCol={{ span: 18 }} label="推送时间">
+                            <span>{theData.releaseDate}</span>
+                        </FormItem>
+                    </div>
+				</Spin>
+			</Form>    
+		</div>
+        )
+    }
+}));
+export default NewDetail;
+
+
+
+

+ 216 - 0
js/component/administration/messagePush/messageOut/messageForm.jsx

@@ -0,0 +1,216 @@
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import {
+	message,
+	Spin,
+	Input,
+	Button,
+	Form,
+} from 'antd';
+import SelectContent from './selectContent' 
+import {getZiYuanType} from '@/tools'
+
+const NewDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+			loading: false,
+			visibleSel:false,
+            auditStatus: 0,
+            textFileList: [],
+			videoFileList: [],
+			objData:[],
+			objName:'',
+			objId:''
+        };
+    },
+    getPictureUrl(e) {
+        this.setState({ pictureUrl: e });
+    },
+    handleSubmit(e,index) {
+		e.preventDefault();
+		if(this.props.data.id&&!this.state.objTitle){
+			message.warning('请选择推送内容!');
+			return;
+		}
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({
+                    loading: true
+				});
+				let hours =new Date(),
+					year = hours.getFullYear(),
+					month = (hours.getMonth()+1)<10?'0'+(hours.getMonth()+1):(hours.getMonth()+1),
+					day = hours.getDate()<10?'0'+hours.getDate():hours.getDate(),
+					hour=hours.getHours()<10?'0'+hours.getHours():hours.getHours(),
+					mins = hours.getMinutes()<10?'0'+hours.getMinutes():hours.getMinutes(),
+					sec = hours.getSeconds()<10?'0'+hours.getSeconds():hours.getSeconds();
+				let times = year+'-'+month+'-'+day+' '+hour+':'+mins+':'+sec;
+                $.ajax({
+                    method: "post",
+					dataType: "json",
+					async:true,
+                    url: this.props.data.id?globalConfig.context +"/api/admin/message/updMessageById":globalConfig.context +"/api/admin/message/createMyMessage",
+                    data: {
+						subject:1,
+						id: this.props.data.id,
+						title: values.title,
+						subject:1,					//消息类别 0-系统消息
+						isDraft:index=='1'?1:0, 	//是否草稿 0-否 1-是
+						deleteSign:0,	  			//删除标识 0-否 ,1-是
+						isSend:index=='2'?1:0,  	//是否发送0-否 1-是
+						body:values.body,
+						messageCreateTime:!(this.props.data.id)?times:'null',
+						resourceId:this.state.objData.rowId,
+						resourceType:getZiYuanType(this.state.objData.fromTable),
+						resourceName:this.state.objData.title
+                    }
+                }).done(function (data) {
+                    this.setState({
+                        loading: false
+					});
+                    if (!data.error.length) {
+                        message.success('保存成功!');
+                        this.setState({
+                            visible: false
+                        });
+                        this.props.handOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+	},
+	cancelFun(){
+		this.props.closeDesc(false,false);
+	},
+    componentWillMount() {
+        if (this.props.data.id) {
+           
+        } else {
+			this.state.visible=true;
+			this.state.data = {};
+        };
+	},
+	visFun(state,data){
+		this.setState({
+			visibleSel:state,
+			objData:data,
+			objTitle:data.title
+		});
+	},
+	selContent(){
+		this.setState({
+			visibleSel:true
+		})
+	},
+	componentWillMount(){
+		this.setState({
+			objTitle:this.props.data.resourceName
+	   })
+	},
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+			this.state.videoFileList = [];
+            if (nextProps.data.id) {
+               this.setState({
+					objTitle:nextProps.data.resourceName
+			   })
+            } else {
+				this.state.visible=true;
+				this.state.visibleSel=false
+				this.state.data = {};
+            };
+			this.props.form.resetFields();
+        };
+    },
+    render() {
+		const theData = this.props.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item;
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+		};
+        return (
+			<div className='login'>
+			<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,1)}} id="demand-form">
+				<Spin spinning={this.state.loading}>
+					<div className="clearfix">
+						{this.props.data&&this.props.data.id?<div>
+							<FormItem className="half-item" {...formItemLayout} label="创建人">
+								<span>{theData.admin?theData.admin:'管理员'}</span>
+							</FormItem>	
+							</div>:''}	
+					</div>
+					<div className="clearfix">
+						<FormItem  labelCol={{ span: 3 }} wrapperCol={{ span: 14 }} label="标题">
+							{getFieldDecorator('title', {
+								rules: [ { required: true, message: '此项为必填项!' } ],
+								initialValue: theData.title
+							})(<Input placeholder="请输入消息标题" />)}
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="消息内容">
+							{getFieldDecorator('body', {
+								rules: [ { required: true, message: '此项为必填项!' } ],
+								initialValue: theData.body
+							})(<Input type="textarea" rows={4} placeholder="输入内容" />)}
+						</FormItem>
+					</div>
+					{this.props.data&&this.props.data.id?<div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label={<span><strong style={{color:'#f00'}}> * </strong>推送内容</span>}>
+							<div>
+								<span>{this.state.objTitle}</span>
+								<Button 
+									onClick={this.selContent.bind(this)} 
+									type="primary" 
+									style={{marginLeft:10}}>选择</Button>
+							</div>
+						</FormItem>
+					</div>:''}
+					{this.props.data&&this.props.data.id?<div>
+						<div className="clearfix">
+							<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="创建时间">
+								<span>{theData.createTime}</span>
+							</FormItem>
+						</div>
+					</div>:''}
+					<div className="clearfix">
+						<FormItem wrapperCol={{ span: 12, offset: 3 }}>
+						    <Button className="set-submit" type="primary" htmlType="submit">
+								保存
+							</Button>
+							{this.props.data&&this.props.data.id?<Button
+								className="set-submit"
+								style={{background: 'rgb(63, 207, 158)',border:'none',color:'#FFF'}}
+								type="ghost"
+								onClick={(e) => {
+										this.handleSubmit(e,2)
+								}}
+							>
+								推送
+							</Button>:''}
+							<Button className="set-submit" type="ghost" onClick={this.cancelFun}>
+								取消
+							</Button>
+						</FormItem>
+					</div>
+				</Spin>
+			</Form>  
+			<SelectContent 
+				visible={this.state.visibleSel}
+				visFun={this.visFun.bind(this)}
+			/>  
+		</div>
+        )
+    }
+}));
+export default NewDetailForm;
+
+
+
+

+ 222 - 0
js/component/administration/messagePush/messageOut/selectContent.jsx

@@ -0,0 +1,222 @@
+import {Component} from 'react';
+import {Button,Modal,message,Table,Spin,Input, Row,Col,Card,Form} from 'antd';
+import './selectContent.less';
+import {getMsgType} from '@/tools';
+class SelectContent extends Component {
+    constructor(props) {
+        super(props);
+        this.state = { 
+            loading:false,
+            RowData:[],
+            recD:[],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                 {
+                    title: '名称',
+                    dataIndex: 'title',
+                    key: 'title',
+                },
+                {
+                    title: '简介',
+                    dataIndex: 'summary',
+                    key: 'summary',
+                    render: text => { return text&&text.length>16?text.substr(0,16)+'...':text}
+                },
+                {
+                    title: '类型',
+                    dataIndex: 'fromTable',
+                    key: 'fromTable',
+                    render:(text)=>{
+                        return getMsgType(text)
+                    }
+                },
+                {
+                    title: '关键字',
+                    dataIndex: 'keyword',
+                    key: 'keyword',
+                    render: text => { return text&&text.length>16?text.substr(0,16)+'...':text}
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'caozuo',
+                    key: 'caozuo',
+                    render:(text,recard) => {
+                        return  <div className="btnRight">
+                                    <Button type="primary" style={{ background: "#3fcf9e", border: "none", color: "#fff" }} onClick={(e)=>{e.stopPropagation();this.subVal(recard)}}>选择</Button>
+                                </div>
+                    }
+                }
+            ],
+            dataSource: [],
+         }
+    }
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            selectedRowKeys:[],
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/portal/globalSearch",
+            data: {
+                pageNo: pageNo || 1,
+            	pageSize: 5,
+                name:this.state.searchVal
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            rowId: thisdata.rowId,
+                            keyword: thisdata.keyword,
+                            summary:thisdata.summary,
+                            title:thisdata.title,
+                            fromTable:thisdata.fromTable
+                        });
+                    };
+                };
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				};
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    }
+    //点推送时
+    subVal(recard){
+        this.setState({
+            recD:recard
+        })
+        this.props.visFun(false,recard)
+    }
+    handOk(){
+        this.setState({
+            visible:false
+        })
+        this.props.visFun(false,this.state.recD);
+    }
+    handleCancel(){
+        this.setState({
+            visible:false
+        })
+        this.props.visFun(false,this.state.recD);
+    }
+    componentWillReceiveProps(nextProps){
+        this.state.visible = nextProps.visible;
+    }
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            DetailVis: true
+        });
+    }
+    searchFun(){
+        this.loadData()
+    }
+    okDetail(){
+        this.setState({
+            DetailVis: false
+        });
+    }
+    
+    render() { 
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+        };
+        const FormItem = Form.Item
+        let RowData=this.state.RowData||[];
+        return ( <div>
+               <Modal
+                visible={this.state.visible}
+                onOk={this.handOk.bind(this)}
+                onCancel={this.handleCancel.bind(this)}
+                width="800px"
+                title="选择推送内容"
+                footer=""
+               >
+                <div className="sendBody">
+                    <div className="megSearch">
+                       <Input type="text" 
+                        size="large" 
+                        value={this.state.searchVal} 
+                        onChange={(e)=>{this.setState({searchVal:e.target.value})}}/>
+                        <Button type="primary" size="large" onClick={this.searchFun.bind(this)}>搜索</Button>
+                    </div>
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick.bind(this)} />
+                    </Spin>
+                </div>
+               </Modal>
+               <Modal
+                    visible={this.state.DetailVis}
+                    title="详情"
+                    onOk={this.okDetail.bind(this)}
+                    onCancel={this.okDetail.bind(this)}
+                    footer=''
+                    width="600px"
+                >
+                    <div className="detailList">
+                        <div className="clearfix">
+                            <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="名称">
+                                <span>{RowData.title}</span>
+                            </FormItem>	
+                        </div>
+                        <div className="clearfix">
+                            <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="简介">
+                                <p>{RowData.summary}</p>  
+                            </FormItem>	
+                        </div>
+                        <div className="clearfix">
+                            <FormItem className="half-item" {...formItemLayout} label="类型">
+                                <p>{getMsgType(RowData.fromTable)}</p>  
+                            </FormItem>	
+                            <FormItem className="half-item" {...formItemLayout} label="关键字">
+                                <p>{RowData.keyword}</p>  
+                            </FormItem>	
+                        </div>
+                    </div>
+                </Modal>
+            </div> );
+    }
+}
+ 
+export default SelectContent;

+ 8 - 0
js/component/administration/messagePush/messageOut/selectContent.less

@@ -0,0 +1,8 @@
+.megSearch{
+    text-align: center;
+    margin-bottom: 15px;
+    input{
+        width: 60%;
+        margin-right: 10px;
+    }
+}

+ 284 - 0
js/component/administration/messagePush/messageOut/systemMessage.jsx

@@ -0,0 +1,284 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, message, DatePicker } from 'antd';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import NewDesc from '@/administration/messagePush/messageOut/messageDesc';
+import '@/account/demand/techDemand.less';
+import '@/administration/news/news.less';
+
+const DemandList = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            selectedRowKeys:[],
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/message/getMessageList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                title: this.state.nameSearch, //需求名称
+                subject:1,
+                isSend:this.state.auditStatusSearch,
+                sendStartTime: this.state.releaseDate[0],
+                sendEndTime: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            title: thisdata.title,
+                            isSend:thisdata.isSend,
+                            admin:thisdata.admin?thisdata.admin:'管理员',
+                            body: thisdata.body, 
+                            resourceName:thisdata.resourceName,
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            releaseDate:thisdata.sendTime?(new Date(thisdata.sendTime)).toLocaleString():''
+                        });
+                    };
+                };
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				};
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            validityPeriodDate: [],
+            releaseDate: [],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                 {
+                    title: '消息标题',
+                    dataIndex: 'title',
+                    key: 'title',
+                },
+                {
+                    title: '消息内容',
+                    dataIndex: 'body',
+                    key: 'body',
+                    render: text => { return text&&text.length>16?text.substr(0,16)+'...':text}
+                },
+                {
+                    title: '创建人',
+                    dataIndex: 'admin',
+                    key: 'admin'
+                },
+                {
+                    title: '创建时间',
+                    dataIndex: 'createTime',
+                    key: 'createTime'
+                },
+                {
+                    title: '推送时间',
+                    dataIndex: 'releaseDate',
+                    key: 'releaseDate'
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'caozuo',
+                    key: 'caozuo',
+                    render:(text,recard) => {
+                        return  <div className="btnRight">
+                                   {!recard.isSend?<Button type="primary" style={{ background: "#3fcf9e", border: "none", color: "#fff" }} onClick={(e)=>{e.stopPropagation();this.submission(recard)}}>推送</Button>:''}
+                                   {!recard.isSend?<Button type="danger" style={{ margin:10 }} onClick={(e)=>{e.stopPropagation(),this.del(recard)}}>删除</Button>:''}
+                                </div>
+                    }
+                }
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    //发布
+    submission(record){
+        this.setState({
+            loading:true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/message/sendMessage",
+            data: {
+                messageId:record.id,
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('推送成功.');
+                this.setState({
+                    loading: false,
+                });
+                this.loadData(this.state.page)
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    tableRowClick(record, index) {
+        this.state.RowData = record;
+        this.setState({
+            showDesc: true
+        });
+    },
+    del(recard) {
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/message/updMessageById",
+            data: {
+                id: recard.id,
+                title: recard.title,
+                subject:1,					//消息类别 0-系统消息
+                isDraft:1, 	//是否草稿 0-否 1-是
+                deleteSign:1,	  			//删除标识 0-否 ,1-是
+                isSend:0,  	        //是否发送0-否 1-是
+                body:recard.body
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false
+                });
+                if(this.state.pagination.total%10==1){
+                    this.loadData((this.state.page)-1);
+                }else{
+                    this.loadData(this.state.page);
+                }
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    addClick() {
+        this.state.RowData = {};
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData(this.state.page);
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.releaseDate = [];
+        this.state.auditStatusSearch = undefined;
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const { RangePicker } = DatePicker;
+        const hasSelect = this.state.selectedRowKeys.length;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>APP推送消息管理</span>
+                    <div style={{float:'right'}}>
+                        <Button type="primary" onClick={this.addClick}>添加消息<Icon type="plus" /></Button>
+                    </div>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="消息标题"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                    <Select placeholder="推送状态" style={{ width: 120 }}
+                        value={this.state.auditStatusSearch}
+                        onChange={(e) => { this.setState({ auditStatusSearch: e }) }}>
+                        <Select.Option value="0" >草稿</Select.Option>
+                        <Select.Option value="1" >已推送</Select.Option>
+                    </Select>
+                    <span>推送时间 : </span>
+                    <RangePicker
+                        style={{marginRight:10}}
+                        value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                        this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                        onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            onRowClick={this.tableRowClick} />
+                    </Spin>
+                </div>
+                <NewDesc
+                    data={this.state.RowData}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default DemandList;

+ 69 - 0
js/component/administration/messagePush/messagePhoto/messageDesc.jsx

@@ -0,0 +1,69 @@
+import React from 'react';
+import { Modal } from 'antd';
+import NewForm from '@/administration/messagePush/messagePhoto/messageForm';
+import NewDetaiel from '@/administration/messagePush/messagePhoto/messageDetails';
+
+class DemandDesc extends React.Component {
+	constructor(props) {
+		super(props);
+		this.state = {
+			loading: false,
+			pictureUrl: [],
+			showState:false
+		};
+	}
+	handleCancel() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, false);
+	}
+	handOk() {
+		this.setState({
+			visible: false,
+		});
+		this.props.closeDesc(false, true);
+	}
+	componentWillReceiveProps(nextProps) {
+		this.state.visible = nextProps.showDesc;
+	}
+	render() {
+		let data = this.props.data || [];
+		return (
+			<div className="patent-desc">
+				<Modal
+					maskClosable={false}
+					visible={this.state.visible}
+					onOk={this.handOk.bind(this)}
+					onCancel={this.handleCancel.bind(this)}
+					width="400px"
+					title={!data.id ? '新建消息' : '消息详情'}
+					footer=""
+					className="admin-desc-content"
+				>
+					<div>
+						<div>
+								{data.isSend?
+									<NewDetaiel
+									closeDesc={this.handleCancel.bind(this)}
+									data={this.props.data}
+									visible={this.state.visible}
+									handOk={this.handOk.bind(this)}
+									/>
+									:
+									<NewForm 
+										closeDesc={this.handleCancel.bind(this)}
+										data={this.props.data}
+										visible={this.state.visible}
+										handOk={this.handOk.bind(this)}
+										/>
+								} 
+						</div>
+					</div>
+				</Modal>
+			</div>
+		);
+	}
+}
+
+export default DemandDesc;

+ 82 - 0
js/component/administration/messagePush/messagePhoto/messageDetails.jsx

@@ -0,0 +1,82 @@
+import React from 'react';
+import {
+	Spin,
+	Form,
+} from 'antd';
+import '../../policy/policy.less';
+
+const NewDetail = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+        };
+    },
+	cancelFun(){
+		this.props.closeDesc(false,false);
+    },
+   
+    componentWillMount() {
+        if (this.props.data.id) {
+           
+        } else {
+            this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.videoFileList = [];
+            if (nextProps.data.id) {
+               
+            } else {
+				this.state.data = {};
+            };
+            this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.props.data || {};
+        const FormItem = Form.Item
+        const formItemLayout = {
+            labelCol: { span: 12 },
+            wrapperCol: { span: 12 },
+        };
+        return (
+			<div className='login'>
+			<Form layout="horizontal" id="demand-form">
+				<Spin spinning={this.state.loading}>
+                    <div className="clearfix">
+                        <FormItem {...formItemLayout} label="发送对象">
+                            <span>所有用户</span>
+                        </FormItem>	
+                        <FormItem{...formItemLayout} label="创建人">
+                            <span>{theData.admin?theData.admin:'管理员'}</span>
+                        </FormItem>	
+                    </div>
+                    <div>
+						<FormItem {...formItemLayout} label="标题">
+							<span>{theData.title}</span>
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="消息内容">
+							<span>{theData.body}</span>
+						</FormItem>
+					</div>
+                    <div className="clearfix">
+                        <FormItem labelCol={{ span: 3 }} wrapperCol={{ span: 18 }} label="推送时间">
+                            <span>{theData.releaseDate}</span>
+                        </FormItem>
+                    </div>
+				</Spin>
+			</Form>    
+		</div>
+        )
+    }
+}));
+export default NewDetail;
+
+
+
+

+ 125 - 0
js/component/administration/messagePush/messagePhoto/messageForm.jsx

@@ -0,0 +1,125 @@
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import {
+	message,
+	Spin,
+	Input,
+	Button,
+	Form,
+} from 'antd';
+ 
+const NewDetailForm = Form.create()(React.createClass({
+    getInitialState() {
+        return {
+            visible: false,
+            loading: false,
+            textFileList: [],
+            videoFileList: [],
+        };
+    },
+    handleSubmit(e,index) {
+		e.preventDefault();
+        this.props.form.validateFields((err, values) => {
+            if (!err) {
+                this.setState({
+                    loading: true
+				});
+                $.ajax({
+                    method: "get",
+					dataType: "json",
+                    url: globalConfig.context +"/api/admin/message/mobileMessage",
+                    data: {
+						messageCode: values.messageCode,
+                    }
+                }).done(function (data) {
+                    this.setState({
+                        loading: false
+					});
+                    if (!data.error.length) {
+                        message.success('推送成功!');
+                        this.setState({
+                            visible: false
+                        });
+                        this.props.handOk();
+                    } else {
+                        message.warning(data.error[0].message);
+                    }
+                }.bind(this));
+            }
+        });
+	},
+	cancelFun(){
+		this.props.closeDesc(false,false);
+	},
+    componentWillMount() {
+        if (this.props.data.id) {
+           
+        } else {
+			this.state.visible=true;
+			this.state.data = {};
+        };
+    },
+    componentWillReceiveProps(nextProps) {
+        if (!this.props.visible && nextProps.visible) {
+            this.state.textFileList = [];
+            this.state.videoFileList = [];
+            if (nextProps.data.id) {
+               
+            } else {
+				this.state.visible=true;
+				this.state.data = {};
+            };
+			this.props.form.resetFields();
+        };
+    },
+    render() {
+        const theData = this.props.data || {};
+        const { getFieldDecorator } = this.props.form;
+        const FormItem = Form.Item;
+        const formItemLayout = {
+            labelCol: { span: 6 },
+            wrapperCol: { span: 12 },
+		};
+        return (
+			<div className='login'>
+			<Form layout="horizontal" onSubmit={(e)=>{this.handleSubmit(e,1)}} id="demand-form">
+				<Spin spinning={this.state.loading}>
+					<div className="clearfix">
+						<FormItem  {...formItemLayout} label="发送对象">
+                            <span>所有用户</span>
+                        </FormItem>	
+					</div>
+					<div>
+						<FormItem {...formItemLayout} label="创建人">
+							<span>{theData.admin?theData.admin:'管理员'}</span>
+						</FormItem>	
+					</div>
+					<div className="clearfix">
+						<FormItem  {...formItemLayout} label="短信模板">
+							{getFieldDecorator('messageCode', {
+								rules: [ { required: true, message: '此项为必填项!' } ],
+								initialValue: theData.messageCode
+							})(<Input placeholder="请输入短信模板" />)}
+						</FormItem>
+					</div>
+					<div className="clearfix">
+						<FormItem wrapperCol={{ span: 12, offset: 6 }}>
+						    <Button className="set-submit" type="primary" htmlType="submit">
+								推送
+							</Button>
+							<Button className="set-submit" type="ghost" onClick={this.cancelFun}>
+								取消
+							</Button>
+						</FormItem>
+					</div>
+				</Spin>
+			</Form>    
+		</div>
+        )
+    }
+}));
+export default NewDetailForm;
+
+
+
+

+ 263 - 0
js/component/administration/messagePush/messagePhoto/systemMessage.jsx

@@ -0,0 +1,263 @@
+import React from 'react';
+import { Icon, Button, Input, Select, Spin, Table, message, DatePicker } from 'antd';
+import $ from 'jquery/src/ajax';
+import moment from 'moment';
+import NewDesc from '@/administration/messagePush/messagePhoto/messageDesc';
+import '@/account/demand/techDemand.less';
+import '@/administration/news/news.less';
+
+const DemandList = React.createClass({
+    loadData(pageNo) {
+        this.state.data = [];
+        this.setState({
+            selectedRowKeys:[],
+            page:pageNo,
+            loading: true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/message/getMessageList",
+            data: {
+                pageNo: pageNo || 1,
+                pageSize: this.state.pagination.pageSize,
+                title: this.state.messageCode, //短信模板
+                subject:2,
+                sendStartTime: this.state.releaseDate[0],
+                sendEndTime: this.state.releaseDate[1],
+            },
+            success: function (data) {
+                let theArr = [];
+                if (!data.data || !data.data.list) {
+                    if (data.error && data.error.length) {
+                        message.warning(data.error[0].message);
+                    };
+                } else {
+                    for (let i = 0; i < data.data.list.length; i++) {
+                        let thisdata = data.data.list[i];
+                        theArr.push({
+                            key: i,
+                            id: thisdata.id,
+                            messageCode: thisdata.messageCode,
+                            isSend:thisdata.isSend,
+                            admin:thisdata.admin?thisdata.admin:'管理员',
+                            createTime:thisdata.createTime?(new Date(thisdata.createTime)).toLocaleString():'',
+                            releaseDate:thisdata.sendTime?(new Date(thisdata.sendTime)).toLocaleString():''
+                        });
+                    };
+                };
+                this.state.pagination.current = data.data.pageNo;
+                this.state.pagination.total = data.data.totalCount;
+                if(data.data&&data.data.list&&!data.data.list.length){
+					this.state.pagination.current=0;
+					this.state.pagination.total=0;
+				};
+                this.setState({
+                    dataSource: theArr,
+                    pagination: this.state.pagination
+                });
+            }.bind(this),
+        }).always(function () {
+            this.setState({
+                loading: false
+            });
+        }.bind(this));
+    },
+    getInitialState() {
+        return {
+            searchMore: true,
+            validityPeriodDate: [],
+            releaseDate: [],
+            selectedRowKeys: [],
+            selectedRows: [],
+            loading: false,
+            pagination: {
+                defaultCurrent: 1,
+                defaultPageSize: 10,
+                showQuickJumper: true,
+                pageSize: 10,
+                onChange: function (page) {
+                    this.loadData(page);
+                }.bind(this),
+                showTotal: function (total) {
+                    return '共' + total + '条数据';
+                }
+            },
+            columns: [
+                 {
+                    title: '短信模板',
+                    dataIndex: 'messageCode',
+                    key: 'messageCode',
+                },
+                {
+                    title: '创建人',
+                    dataIndex: 'admin',
+                    key: 'admin'
+                },
+                {
+                    title: '推送时间',
+                    dataIndex: 'releaseDate',
+                    key: 'releaseDate'
+                },
+                {
+                    title: '操作',
+                    dataIndex: 'caozuo',
+                    key: 'caozuo',
+                    render:(text,recard) => {
+                        return  <div className="btnRight">
+                                   {!recard.isSend?<Button type="danger" style={{ margin:10 }} onClick={(e)=>{e.stopPropagation(),this.del(recard)}}>删除</Button>:''}
+                                </div>
+                    }
+                }
+            ],
+            dataSource: [],
+            searchTime: [,]
+        };
+    },
+    //发布
+    submission(record){
+        this.setState({
+            loading:true
+        });
+        $.ajax({
+            method: "get",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/message/sendMessage",
+            data: {
+                messageId:record.id,
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('推送成功.');
+                this.setState({
+                    loading: false,
+                });
+                this.loadData(this.state.page)
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    componentWillMount() {
+        this.loadData();
+    },
+    // tableRowClick(record, index) {
+    //     this.state.RowData = record;
+    //     this.setState({
+    //         showDesc: true
+    //     });
+    // },
+    del(recard) {
+        this.setState({
+            loading:true
+        })
+        $.ajax({
+            method: "POST",
+            dataType: "json",
+            crossDomain: false,
+            url: globalConfig.context + "/api/admin/message/updMessageById",
+            data: {
+                id: recard.id,
+                title: recard.title,
+                subject:2,					//消息类别 0-系统消息
+                isDraft:1, 	//是否草稿 0-否 1-是
+                deleteSign:1,	  			//删除标识 0-否 ,1-是
+                isSend:0,  	        //是否发送0-否 1-是
+                body:recard.body
+            }
+        }).done(function (data) {
+            if (!data.error.length) {
+                message.success('删除成功!');
+                this.setState({
+                    loading: false
+                });
+                if(this.state.pagination.total%10==1){
+                    this.loadData((this.state.page)-1);
+                }else{
+                    this.loadData(this.state.page);
+                }
+            } else {
+                message.warning(data.error[0].message);
+            };
+        }.bind(this));
+    },
+    addClick() {
+        this.state.RowData = {};
+        this.setState({
+            showDesc: true
+        });
+    },
+    closeDesc(e, s) {
+        this.state.showDesc = e;
+        if (s) {
+            this.loadData(this.state.page);
+        };
+    },
+    search() {
+        this.loadData();
+    },
+    reset() {
+        this.state.nameSearch = '';
+        this.state.releaseDate = [];
+        this.loadData();
+    },
+    searchSwitch() {
+        this.setState({
+            searchMore: !this.state.searchMore
+        });
+    },
+    render() {
+        const rowSelection = {
+            selectedRowKeys: this.state.selectedRowKeys,
+            onChange: (selectedRowKeys, selectedRows) => {
+                this.setState({
+                    selectedRows: selectedRows.slice(-1),
+                    selectedRowKeys: selectedRowKeys.slice(-1)
+                });
+            }
+        };
+        const { RangePicker } = DatePicker;
+        const hasSelect = this.state.selectedRowKeys.length;
+        return (
+            <div className="user-content" >
+                <div className="content-title">
+                    <span>手机短信消息推送管理</span>
+                    <div style={{float:'right'}}>
+                        <Button type="primary" onClick={this.addClick}>添加消息<Icon type="plus" /></Button>
+                    </div>
+                </div>
+                <div className="user-search">
+                    <Input placeholder="短信模板"
+                        value={this.state.nameSearch}
+                        onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
+                   
+                    <span>推送时间 : </span>
+                    <RangePicker
+                        style={{marginRight:10}}
+                        value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
+                        this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
+                        onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
+                    <Button type="primary" onClick={this.search}>搜索</Button>
+                    <Button onClick={this.reset}>重置</Button>
+                </div>
+                <div className="patent-table">
+                    <Spin spinning={this.state.loading}>
+                        <Table columns={this.state.columns}
+                            dataSource={this.state.dataSource}
+                            rowSelection={rowSelection}
+                            pagination={this.state.pagination}
+                            />
+                    </Spin>
+                </div>
+                <NewDesc
+                    data={this.state.RowData}
+                    showDesc={this.state.showDesc}
+                    closeDesc={this.closeDesc} />
+            </div >
+        );
+    }
+});
+
+export default DemandList;

+ 78 - 0
js/component/dataDic.js

@@ -2381,6 +2381,84 @@ module.exports = {
 	        value: "5",
 	        key: "科技项目"
         }
+    ],
+     //消息推送搜索类型
+     msgType:[
+        {
+            value:'achievement',
+            key:'成果'
+        },
+        {
+            value:'demand',
+            key:'需求'
+        },
+        {
+            value:'patent',
+            key:'专利'
+        },
+        {
+            value:'policy',
+            key:'政策'
+        },
+        {
+            value:'jt_business_project',
+            key:'项目'
+        },
+        {
+            value:'expert',
+            key:'专家'
+        },
+        {
+            value:'adviser',
+            key:'顾问'
+        },
+        {
+            value:'news',
+            key:'新闻'
+        },
+        {
+            value:'legal_adviser',
+            key:'法律顾问'
+        },
+    ],
+    //资源类型
+    ziYuanType:[
+        {
+            value:'1',
+            key:'achievement'
+        },
+        {
+            value:'2',
+            key:'demand'
+        },
+        {
+            value:'0',
+            key:'patent'
+        },
+        {
+            value:'7',
+            key:'policy'
+        },
+        {
+            value:'0',
+            key:'jt_business_project'
+        },
+        {
+            value:'3',
+            key:'expert'
+        },
+        {
+            value:'4',
+            key:'adviser'
+        },
+        {
+            value:'6',
+            key:'news'
+        },
+        {
+            value:'5',
+            key:'legal_adviser'
+        },
     ]
 
 };

+ 29 - 1
js/component/tools.js

@@ -84,7 +84,9 @@ import {
     adviserType,
     authState,
     typeModule,
-    lowType
+    lowType,
+    msgType,
+    ziYuanType
 } from './dataDic.js';
 
 import { provinceList} from './NewDicProvinceList.js';
@@ -1540,5 +1542,31 @@ module.exports = {
             });
             return theType;
         }
+     },
+      //消息推送搜索类型转换ziYuanType
+      getMsgType:function(e){
+        if (e) {
+            let str=e.toString();
+            let theType = '';
+            msgType.map(function (item) {
+                if (item.value == str) {
+                    theType = item.key;
+                };
+            });
+            return theType;
+        }
+     },
+      //消息推送搜索类型转换数字
+      getZiYuanType:function(e){
+        if (e) {
+            let str=e.toString();
+            let theType = '';
+            ziYuanType.map(function (item) {
+                if (item.key == str) {
+                    theType = item.value;
+                };
+            });
+            return theType;
+        }
      }
 }