yee лет назад: 8
Родитель
Сommit
7d693de7cf
29 измененных файлов с 4444 добавлено и 4146 удалено
  1. 1 1
      js/admin/set.js
  2. 377 0
      js/component/DicPfsList.js
  3. 1141 0
      js/component/DicProvinceList.js
  4. 1005 0
      js/component/DicTechFieldList.js
  5. 1698 0
      js/component/DicTechList.js
  6. 2 1
      js/component/account/services/activity.jsx
  7. 2 1
      js/component/account/services/cognizance.jsx
  8. 1 1
      js/component/account/services/intellectual.jsx
  9. 2 1
      js/component/account/services/techProduct.jsx
  10. 3 3
      js/component/account/set/company.jsx
  11. 1 2
      js/component/account/set/edu.jsx
  12. 4 4
      js/component/account/set/eduPfsSelect.jsx
  13. 0 1
      js/component/account/set/pfs.jsx
  14. 4 4
      js/component/account/set/techSelect.jsx
  15. 1 3955
      js/component/dataDic.js
  16. 3 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx
  17. 1 1
      js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectual.jsx
  18. 3 2
      js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx
  19. 2 1
      js/component/manageCenter/servicesManage/highTech/highTechApply.jsx
  20. 1 1
      js/component/manageCenter/servicesManage/highTech/highTechFoster.jsx
  21. 12 10
      js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx
  22. 18 0
      js/component/manageCenter/set/content.less
  23. 3 3
      js/component/manageCenter/set/member.jsx
  24. 29 18
      js/component/manageCenter/set/modal.jsx
  25. 43 37
      js/component/manageCenter/set/permission.jsx
  26. 69 65
      js/component/manageCenter/set/role.jsx
  27. 6 6
      js/component/manageCenter/topTab.jsx
  28. 11 25
      js/component/tools.js
  29. 1 1
      package.json

+ 1 - 1
js/admin/set.js

@@ -8,7 +8,7 @@ import Content from '../component/manageCenter/set/content.jsx';
 
 ReactDOM.render(
     <div className="wrap clearfix">
-        <TopTab active={'set'}/>
+        <TopTab active={'system'}/>
         <Content />
         <Footer />
     </div>,

+ 377 - 0
js/component/DicPfsList.js

@@ -0,0 +1,377 @@
+module.exports = {
+    eduPfsList: [{
+        value: 1,
+        label: "数理科学",
+        children: [{
+            value: 2,
+            label: "数学"
+        }, {
+            value: 3,
+            label: "力学"
+        }, {
+            value: 4,
+            label: "天文学"
+        }, {
+            value: 5,
+            label: "物理学"
+        }]
+    }, {
+        value: 6,
+        label: "化学科学",
+        children: [{
+            value: 7,
+            label: "无机化学"
+        }, {
+            value: 8,
+            label: "有机化学"
+        }, {
+            value: 9,
+            label: "物理化学"
+        }, {
+            value: 10,
+            label: "高分子科学"
+        }, {
+            value: 11,
+            label: "分析化学"
+        }, {
+            value: 12,
+            label: "化学工程及工业化学"
+        }, {
+            value: 13,
+            label: "环境化学"
+        }]
+    }, {
+        value: 14,
+        label: "生命科学",
+        children: [{
+            value: 15,
+            label: "微生物学"
+        }, {
+            value: 16,
+            label: "植物学"
+        }, {
+            value: 17,
+            label: "生态学"
+        }, {
+            value: 18,
+            label: "动物学"
+        }, {
+            value: 19,
+            label: "生物物理、生物化学与分子生物学"
+        }, {
+            value: 20,
+            label: "遗传学与生物信息学"
+        }, {
+            value: 21,
+            label: "细胞生物学"
+        }, {
+            value: 22,
+            label: "免疫学"
+        }, {
+            value: 23,
+            label: "神经科学、认知科学与心理学"
+        }, {
+            value: 24,
+            label: "生物力学与组织工程学"
+        }, {
+            value: 25,
+            label: "生理学与整合生物学"
+        }, {
+            value: 26,
+            label: "发育生物学与生殖生物学"
+        }, {
+            value: 27,
+            label: "农学基础与作物学"
+        }, {
+            value: 28,
+            label: "植物保护学"
+        }, {
+            value: 29,
+            label: "园艺学与植物营养学"
+        }, {
+            value: 30,
+            label: "林学"
+        }, {
+            value: 31,
+            label: "畜牧学与草地科学"
+        }, {
+            value: 32,
+            label: "兽医学"
+        }, {
+            value: 33,
+            label: "水产学"
+        }, {
+            value: 34,
+            label: "食品科学"
+        }]
+    }, {
+        value: 35,
+        label: "地球科学",
+        children: [{
+            value: 36,
+            label: "地理学"
+        }, {
+            value: 37,
+            label: "地质学"
+        }, {
+            value: 38,
+            label: "地球化学"
+        }, {
+            value: 39,
+            label: "地球物理学和空间物理学"
+        }, {
+            value: 40,
+            label: "大气科学"
+        }, {
+            value: 41,
+            label: "海洋科学"
+        }]
+    }, {
+        value: 42,
+        label: "工程材料",
+        children: [{
+            value: 43,
+            label: "金属材料"
+        }, {
+            value: 44,
+            label: "无机非金属材料"
+        }, {
+            value: 45,
+            label: "有机高分子材料"
+        }, {
+            value: 46,
+            label: "冶金与矿业"
+        }, {
+            value: 47,
+            label: "机械工程"
+        }, {
+            value: 48,
+            label: "工程热物理与能源利用"
+        }, {
+            value: 49,
+            label: "电气科学与工程"
+        }, {
+            value: 50,
+            label: "建筑环境与结构工程"
+        }, {
+            value: 51,
+            label: "水利科学与海洋工程"
+        }]
+    }, {
+        value: 52,
+        label: "信息科学",
+        children: [{
+            value: 53,
+            label: "电子学与信息系统"
+        }, {
+            value: 54,
+            label: "计算机科学"
+        }, {
+            value: 55,
+            label: "自动化"
+        }, {
+            value: 56,
+            label: "半导体科学与信息器件"
+        }, {
+            value: 57,
+            label: "光学和光电子学"
+        }]
+    }, {
+        value: 58,
+        label: "医学科学",
+        children: [{
+            value: 59,
+            label: "呼吸系统"
+        }, {
+            value: 60,
+            label: "循环系统"
+        }, {
+            value: 61,
+            label: "消化系统"
+        }, {
+            value: 62,
+            label: "生殖系统/围生医学/新生儿"
+        }, {
+            value: 63,
+            label: "泌尿系统"
+        }, {
+            value: 64,
+            label: "运动系统"
+        }, {
+            value: 65,
+            label: "内分泌系统/代谢和营养支持"
+        }, {
+            value: 66,
+            label: "血液系统"
+        }, {
+            value: 67,
+            label: "神经系统和精神疾病"
+        }, {
+            value: 68,
+            label: "医学免疫学"
+        }, {
+            value: 69,
+            label: "皮肤及其附属器"
+        }, {
+            value: 70,
+            label: "眼科学"
+        }, {
+            value: 71,
+            label: "耳鼻咽喉头颈科学"
+        }, {
+            value: 72,
+            label: "口腔颅颌面科学"
+        }, {
+            value: 73,
+            label: "急重症医学/创伤/烧伤/整形"
+        }, {
+            value: 74,
+            label: "肿瘤学"
+        }, {
+            value: 75,
+            label: "康复医学"
+        }, {
+            value: 76,
+            label: "影像医学与生物医学工程"
+        }, {
+            value: 77,
+            label: "医学病原微生物与感染"
+        }, {
+            value: 78,
+            label: "检验医学"
+        }, {
+            value: 79,
+            label: "特种医学"
+        }, {
+            value: 80,
+            label: "放射医学"
+        }, {
+            value: 81,
+            label: "法医学"
+        }, {
+            value: 82,
+            label: "地方病学/职业病学"
+        }, {
+            value: 83,
+            label: "老年医学"
+        }, {
+            value: 84,
+            label: "预防医学"
+        }, {
+            value: 85,
+            label: "中医学"
+        }, {
+            value: 86,
+            label: "中药学"
+        }, {
+            value: 87,
+            label: "中西医结合"
+        }, {
+            value: 88,
+            label: "药物学"
+        }, {
+            value: 89,
+            label: "药理学"
+        }]
+    }, {
+        value: 90,
+        label: "人文学科",
+        children: [{
+            value: 91,
+            label: " 哲学"
+        }, {
+            value: 92,
+            label: "中国语言文学"
+        }, {
+            value: 93,
+            label: "外国语言文学"
+        }, {
+            value: 94,
+            label: "新闻传播学"
+        }, {
+            value: 95,
+            label: "艺术学"
+        }, {
+            value: 96,
+            label: "历史学"
+        }]
+    }, {
+        value: 97,
+        label: "社会科学",
+        children: [{
+            value: 98,
+            label: "经济学"
+        }, {
+            value: 99,
+            label: "法学"
+        }, {
+            value: 100,
+            label: "政治学"
+        }, {
+            value: 101,
+            label: "社会学"
+        }, {
+            value: 102,
+            label: "民族学"
+        }, {
+            value: 103,
+            label: "马克思主义理论"
+        }, {
+            value: 104,
+            label: "教育学"
+        }, {
+            value: 105,
+            label: "心理学(可授教育学、理学学位)"
+        }, {
+            value: 106,
+            label: "体育学"
+        }]
+    }, {
+        value: 107,
+        label: "军事科学",
+        children: [{
+            value: 108,
+            label: "军事思想及军事历史"
+        }, {
+            value: 109,
+            label: "战略学"
+        }, {
+            value: 110,
+            label: "战役学"
+        }, {
+            value: 111,
+            label: "战术学"
+        }, {
+            value: 112,
+            label: "军队指挥学"
+        }, {
+            value: 113,
+            label: "军制学"
+        }, {
+            value: 114,
+            label: "军队政治工作学"
+        }, {
+            value: 115,
+            label: "军事后勤学与军事装备学"
+        }]
+    }, {
+        value: 116,
+        label: "管理科学",
+        children: [{
+            value: 117,
+            label: "管理科学与工程(可授管理学、工学学位)"
+        }, {
+            value: 118,
+            label: "工商管理"
+        }, {
+            value: 119,
+            label: "农林经济管理"
+        }, {
+            value: 120,
+            label: "公共管理"
+        }, {
+            value: 121,
+            label: "图书馆、情报与档案管理"
+        }]
+    }]
+}

Разница между файлами не показана из-за своего большого размера
+ 1141 - 0
js/component/DicProvinceList.js


Разница между файлами не показана из-за своего большого размера
+ 1005 - 0
js/component/DicTechFieldList.js


Разница между файлами не показана из-за своего большого размера
+ 1698 - 0
js/component/DicTechList.js


+ 2 - 1
js/component/account/services/activity.jsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
-import { techFieldList, technicalSourceList } from '../../dataDic.js';
+import { technicalSourceList } from '../../dataDic.js';
+import { techFieldList } from '../../DicTechFieldList.js';
 import { getTechField, getTechnicalSource, beforeUploadFile, downloadFile } from '../../tools.js';
 import './activity.less';
 import moment from 'moment';

+ 2 - 1
js/component/account/services/cognizance.jsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import { Icon, InputNumber, Form, Button, Input, Radio, Select, Spin, Table, message, Cascader, Modal } from 'antd';
-import { techFieldList, provinceArr, cognizanceStateList } from '../../dataDic.js';
+import { provinceArr, cognizanceStateList } from '../../dataDic.js';
+import { techFieldList } from '../../DicTechFieldList.js';
 import { getTime, getCognizanceState } from '../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';

+ 1 - 1
js/component/account/services/intellectual.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Icon, Button, Input, Spin, Table, message, Select, Modal, DatePicker } from 'antd';
-import { techFieldList, technicalSourceList } from '../../dataDic.js';
+import { technicalSourceList } from '../../dataDic.js';
 import { getCatagory, getIntellectualObtainWay } from '../../tools.js';
 import './intellectual.less';
 import moment from 'moment';

+ 2 - 1
js/component/account/services/techProduct.jsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import { Icon, Upload, Form, Button, Radio, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
-import { techFieldList, technicalSourceList } from '../../dataDic.js';
+import { technicalSourceList } from '../../dataDic.js';
+import { techFieldList } from '../../DicTechFieldList.js';
 import { getTechField, getTechnicalSource, beforeUploadFile, downloadFile } from '../../tools.js';
 import './techProduct.less';
 import moment from 'moment';

+ 3 - 3
js/component/account/set/company.jsx

@@ -5,7 +5,7 @@ import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
 import { addressInit, splitUrl, } from '../../tools.js';
-import { edulvlArr, zizhiArr, schoolArr } from '../../dataDic.js';
+import { eduLevelList, zizhiArr, schoolArr } from '../../dataDic.js';
 
 
 function getBase64(img, callback) {
@@ -316,8 +316,8 @@ const PersonFrom = Form.create()(React.createClass({
                     })(
                         <Select className="acc-edu-lvl" onChange={this.idttTypeChange}>
                             {
-                                edulvlArr.map(function (item, i) {
-                                    return <Option key={i} value={item} >{item}</Option>
+                                eduLevelList.map(function (item, i) {
+                                    return <Option key={i} value={item.value} >{item.key}</Option>
                                 })
                             }
                         </Select>

+ 1 - 2
js/component/account/set/edu.jsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import { Input, Button, Form, Select, Upload, Icon, Spin, message } from 'antd';
 import './edu.less';
+import { edulvlArr } from '../../dataDic.js';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
@@ -10,8 +11,6 @@ import YearSelect from '../../yearSelect.jsx';
 const FormItem = Form.Item;
 const Option = Select.Option;
 
-const edulvlArr = ["博士研究生", "硕士研究生", "本科", "大专及以下"];
-
 function getBase64(img, callback) {
     const reader = new FileReader();
     reader.addEventListener('load', () => callback(reader.result));

+ 4 - 4
js/component/account/set/eduPfsSelect.jsx

@@ -1,12 +1,12 @@
 import React from 'react';
 import { Cascader } from 'antd';
-import {eduPfsList} from '../../dataDic.js';
+import { eduPfsList } from '../../DicPfsList.js';
 
 const eduPfsSelect = React.createClass({
     getInitialState() {
         return {
             value: [],
-            propsbool:true
+            propsbool: true
         }
     },
     onChange(v, s) {
@@ -17,8 +17,8 @@ const eduPfsSelect = React.createClass({
     },
     componentWillReceiveProps(nextProps) {
         if (nextProps.defValue && this.state.propsbool) {
-                this.state.value = nextProps.defValue;
-                this.state.propsbool = false;
+            this.state.value = nextProps.defValue;
+            this.state.propsbool = false;
         };
     },
     render() {

+ 0 - 1
js/component/account/set/pfs.jsx

@@ -45,7 +45,6 @@ class Avatar extends React.Component {
         }
     }
     componentWillReceiveProps(nextProps) {
-        debugger
         if (nextProps.picUrl && this.state.propsbool) {
             this.state.imageUrl = globalConfig.avatarHost + "/upload" + nextProps.picUrl;
             this.state.propsbool = false;

+ 4 - 4
js/component/account/set/techSelect.jsx

@@ -1,12 +1,12 @@
 import React from 'react';
 import { Cascader } from 'antd';
-import {techList} from '../../dataDic.js';
+import { techList } from '../../DicTechList.js';
 
 
 const TechSelect = React.createClass({
-    onChange(value,s) {
-        if ( s.length > 0 ) {
-            this.props.techzone(s[0].label,s[1].label,s[2].label);
+    onChange(value, s) {
+        if (s.length > 0) {
+            this.props.techzone(s[0].label, s[1].label, s[2].label);
         }
     },
     render() {

Разница между файлами не показана из-за своего большого размера
+ 1 - 3955
js/component/dataDic.js


+ 3 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/activity.jsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import { Icon, Button, Upload, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
-import { techFieldList, technicalSourceList } from '../../../../dataDic.js';
+import { technicalSourceList } from '../../../../dataDic.js';
+import { techFieldList } from '../../../../DicTechFieldList.js';
 import { getTechField, getTechnicalSource, beforeUploadFile, downloadFile } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
@@ -277,7 +278,7 @@ const ActivityDesc = React.createClass({
                             <Upload
                                 name="ratepay"
                                 action={globalConfig.context + "/api/admin/uploadProof"}
-                                data={{ 'sign': 'proof','uid': this.props.uid }}
+                                data={{ 'sign': 'proof', 'uid': this.props.uid }}
                                 beforeUpload={beforeUploadFile}
                                 showUploadList={false}
                                 onChange={(info) => {

+ 1 - 1
js/component/manageCenter/servicesManage/highTech/fosterDesc/intellectual.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Icon, Button, Input, Spin, Table, message, Select, Modal, DatePicker } from 'antd';
-import { techFieldList, technicalSourceList } from '../../../../dataDic.js';
+import { technicalSourceList } from '../../../../dataDic.js';
 import { getCatagory, getIntellectualObtainWay } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';

+ 3 - 2
js/component/manageCenter/servicesManage/highTech/fosterDesc/techProduct.jsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import { Icon, Upload, Form, Button, Radio, Input, Spin, Table, message, Select, Modal, DatePicker, Cascader, Transfer, InputNumber } from 'antd';
-import { techFieldList, technicalSourceList } from '../../../../dataDic.js';
+import { technicalSourceList } from '../../../../dataDic.js';
+import { techFieldList } from '../../../../DicTechFieldList.js';
 import { getTechField, getTechnicalSource, beforeUploadFile, downloadFile } from '../../../../tools.js';
 import moment from 'moment';
 import ajax from 'jquery/src/ajax/xhr.js';
@@ -230,7 +231,7 @@ const TechProductDescFrom = Form.create()(React.createClass({
                     <Upload
                         name="ratepay"
                         action={globalConfig.context + "/api/admin/uploadTecProduct"}
-                        data={{ 'sign': 'tech_product','uid': this.props.uid }}
+                        data={{ 'sign': 'tech_product', 'uid': this.props.uid }}
                         beforeUpload={beforeUploadFile}
                         showUploadList={false}
                         onChange={(info) => {

+ 2 - 1
js/component/manageCenter/servicesManage/highTech/highTechApply.jsx

@@ -1,6 +1,7 @@
 import React from 'react';
 import { Icon, InputNumber, Form, Button, Input, Radio, Select, Spin, Table, DatePicker, message, Cascader, Modal } from 'antd';
-import { techFieldList, provinceArr, cognizanceStateList } from '../../../dataDic.js';
+import { provinceArr, cognizanceStateList } from '../../../dataDic.js';
+import { techFieldList } from '../../../DicTechFieldList.js';
 import { getTime, getCognizanceState, companySearch } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';

+ 1 - 1
js/component/manageCenter/servicesManage/highTech/highTechFoster.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import { Icon, Button, Input, Select, Spin, Table, DatePicker, message, Cascader } from 'antd';
-import { techFieldList, provinceArr } from '../../../dataDic.js';
+import { provinceArr } from '../../../dataDic.js';
 import { getTime, getPatentState, companySearch } from '../../../tools.js';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';

+ 12 - 10
js/component/manageCenter/servicesManage/patent/comPatentDesc.jsx

@@ -58,8 +58,8 @@ const PatentDesc = React.createClass({
             stateTable: [],
             stateColumns: [{
                 title: '申请状态',
-                dataIndex: 'status',
-                key: 'status',
+                dataIndex: 'state',
+                key: 'state',
                 render: (text) => { return getPatentState(text) }
             }, {
                 title: '处理时间',
@@ -113,14 +113,16 @@ const PatentDesc = React.createClass({
             };
             let _me = this;
             data2[0].data.map(function (item) {
-                _me.state.patentProcessList.push(
-                    <p className="patent-process-list" key={item.id}>
-                        <span>专利状态: {getPatentState(item.state)}</span>
-                        <span>处理时间: {getTime(item.recordTime)}</span>
-                        <span>负责人:{item.principal}</span>
-                        <span>操作人:{item.operator}</span>
-                    </p>
-                )
+                _me.state.stateTable.push({
+                    comment: item.comment,
+                    id: item.id,
+                    operator: item.operator,
+                    pid: item.pid,
+                    principal: item.principal,
+                    recordTime: item.recordTime,
+                    recordTimeFormattedDate: item.recordTimeFormattedDate,
+                    state: item.state,
+                });
             });
             if (data3[0].error.length) {
                 message.warning(data3[0].error[0].message);

+ 18 - 0
js/component/manageCenter/set/content.less

@@ -8,9 +8,27 @@
         }
         >button {
             float: right;
+            margin-right: 20px;
         }
     }
     .member-table {
         margin-top: 20px;
     }
+}
+
+.ant-modal-body {
+    .modal-content {
+        >li {
+            margin-bottom: 20px;
+            >span {
+                margin-right: 20px;
+                display: inline-block;
+                width: 60px;
+                text-align: right;
+            }
+            >input {
+                width: 200px;
+            }
+        }
+    }
 }

+ 3 - 3
js/component/manageCenter/set/member.jsx

@@ -104,7 +104,7 @@ const Member = React.createClass({
         })
         $.ajax({
             type: 'post',
-            url: globalConfig.context + "/api/user/reset",
+            url: globalConfig.context + "/api/admin/resetPwd",
             dataType: "json",
             data: {
                 id: e.id
@@ -124,8 +124,8 @@ const Member = React.createClass({
     render() {
         const columns = [{
             title: '编号',
-            dataIndex: 'id',
-            key: 'id'
+            dataIndex: 'number',
+            key: 'number'
         }, {
             title: '登录账号',
             dataIndex: 'mobile',

+ 29 - 18
js/component/manageCenter/set/modal.jsx

@@ -1,6 +1,8 @@
 import React from 'react';
 import { Modal, Input, Spin, Switch, Select, Message } from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js'
+import { provinceArr } from '../../dataDic.js';
+import { companySearch } from '../../tools.js';
+import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
 export default class TheModal extends React.Component {
@@ -10,15 +12,14 @@ export default class TheModal extends React.Component {
         });
         $.ajax({
             type: "POST",
-            url: this.state.id ? globalConfig.context + "/api/user/update" : globalConfig.context + "/api/user/create",
+            url: this.state.id ? globalConfig.context + "/api/admin/updateAdmin" : globalConfig.context + "/api/admin/insertAdmin",
             data: {
                 'id': this.state.id,
                 'name': this.state.name,
                 'email': this.state.email,
                 'mobile': this.state.mobile,
-                'status': this.state.status ? 1 : 0,
-                'roles': this.state.bindroles,
-                'rooms': this.state.bindrooms
+                'province':this.state.province,
+                'roles': this.state.bindroles
             }
         }).done((res) => {
             if (res.error.length) {
@@ -44,11 +45,10 @@ export default class TheModal extends React.Component {
             name: '',
             email: '',
             mobile: '',
-            rooms: [],
             roles: [],
             visible: false,
             loading: false,
-            bindrooms: [],
+            provinceOption: [],
             bindroles: []
         }
     }
@@ -58,12 +58,20 @@ export default class TheModal extends React.Component {
         });
         this.props.handleReturn(false, false);
     }
+    componentWillMount() {
+        let _me = this;
+        provinceArr.map(function (item) {
+            _me.state.provinceOption.push(
+                <Select.Option value={item} key={item}>{item}</Select.Option>
+            )
+        });
+    }
     loadInitialData() {
         this.setState({
             loading: true
         });
         $.ajax({
-            url: globalConfig.context + '/api/admin/roles',
+            url: globalConfig.context + '/api/roles',
             cache: false
         }).done((rolesres) => {
             this.setState({
@@ -75,13 +83,14 @@ export default class TheModal extends React.Component {
     componentWillReceiveProps(nextProps) {
         if (nextProps.show && !this.state.roles.length) {
             this.loadInitialData();
-        }
+        };
         let nextState = {
             visible: nextProps.show,
             id: nextProps.data ? nextProps.data.id : '',
             name: nextProps.data ? nextProps.data.name : '',
             email: nextProps.data ? nextProps.data.email : '',
             mobile: nextProps.data ? nextProps.data.mobile : '',
+            province: nextProps.data ? nextProps.data.province : '',
             bindroles: nextProps.data && nextProps.data.roles ? nextProps.data.roles.map((role) => { return String(role.id); }) : []
         };
         this.setState(nextState)
@@ -93,7 +102,7 @@ export default class TheModal extends React.Component {
                 <span className='modal-text'>角色</span>
                 <Select
                     multiple
-                    style={{ width: '90%' }}
+                    style={{ width: '60%' }}
                     placeholder="选择用户关联角色"
                     value={this.state.bindroles}
                     onChange={this.bindRoles.bind(this)}
@@ -101,7 +110,7 @@ export default class TheModal extends React.Component {
                     {this.getRolesOptions()}
                 </Select>
             </li>
-        } else if (this.state.id === 1) {
+        } else if (this.state.id == "1") {
             return <li><span className='modal-text'>角色</span><span>系统管理员</span></li>
         }
     }
@@ -117,13 +126,12 @@ export default class TheModal extends React.Component {
     getRolesOptions() {
         let options = [];
         for (let i = 0; i < this.state.roles.length; i++) {
-            options.push(<Option key={String(this.state.roles[i].id)}>{this.state.roles[i].name}</Option>);
+            options.push(<Select.Option key={String(this.state.roles[i].id)}>{this.state.roles[i].roleName}</Select.Option>);
         }
         return options;
     }
 
     render() {
-        const Option = Select.Option;
         return (
             <div className="modal" >
                 <Spin spinning={this.state.loading} >
@@ -144,16 +152,19 @@ export default class TheModal extends React.Component {
                             </li>
                             <li>
                                 <span className='modal-text'>省份</span>
-                                <Input value={this.state.email} onChange={(e) => { this.state.email = e.target.value; this.setState({ email: this.state.email }); }} />
+                                <Select placeholder="选择省份"
+                                    style={{ width: 200 }}
+                                    value={this.state.province}
+                                    showSearch
+                                    filterOption={companySearch}
+                                    onChange={(e) => { this.setState({ province: e }) }}>
+                                    {this.state.provinceOption}
+                                </Select>
                             </li>
                             <li>
                                 <span className='modal-text'>邮箱</span>
                                 <Input value={this.state.email} onChange={(e) => { this.state.email = e.target.value; this.setState({ email: this.state.email }); }} />
                             </li>
-                            <li>
-                                <span className='modal-text'>状态</span>
-                                <Switch disabled={this.state.id == 1} checked={this.state.status == 1 ? true : false} onChange={(e) => { this.setState({ status: e }) }} />
-                            </li>
                             {this.getRolesSelection()}
                         </ul>
                     </Modal>

+ 43 - 37
js/component/manageCenter/set/permission.jsx

@@ -1,22 +1,21 @@
 import React from 'react';
-import { Table, Button, Input, Spin, Message } from 'antd';
-import ajax from 'jquery/src/ajax/xhr.js'
+import { Table, Button, Input, Spin, Message, Icon } from 'antd';
+import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 
-export default class Permission extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
+const Permission = React.createClass({
+    getInitialState() {
+        return {
             data: [],
             selectedRowKeys: [],
             selectedRows: [],
             loading: false
         }
-    }
+    },
 
     componentDidMount() {
         this.loadData();
-    }
+    },
 
     loadData() {
         this.setState({
@@ -37,7 +36,7 @@ export default class Permission extends React.Component {
                 loading: false
             });
         });
-    }
+    },
 
     save() {
         this.setState({
@@ -61,7 +60,7 @@ export default class Permission extends React.Component {
                 loading: false
             });
         })
-    }
+    },
 
     remove() {
         let deletedIds = [];
@@ -70,15 +69,8 @@ export default class Permission extends React.Component {
             if (rowItem.id) {
                 deletedIds.push(rowItem.id)
             }
-        }
-        this.state.selectedRowKeys.sort((a, b) => { return b - a });
-        for (let idx = 0; idx < this.state.selectedRowKeys.length; idx++) {
-            let dataIndex = this.state.selectedRowKeys[idx];
-            this.state.data.splice(dataIndex, 1);
-        }
+        };
         this.setState({
-            data: this.state.data,
-            selectedRowKeys: [],
             loading: deletedIds.length > 0
         });
         if (deletedIds.length) {
@@ -91,6 +83,15 @@ export default class Permission extends React.Component {
             }).done((res) => {
                 if (!res.error.length) {
                     Message.success("删除成功");
+                    this.state.selectedRowKeys.sort((a, b) => { return b - a });
+                    for (let idx = 0; idx < this.state.selectedRowKeys.length; idx++) {
+                        let dataIndex = this.state.selectedRowKeys[idx];
+                        this.state.data.splice(dataIndex, 1);
+                    };
+                    this.setState({
+                        data: this.state.data,
+                        selectedRowKeys: []
+                    });
                 } else {
                     Message.error(res.error[0].message);
                 }
@@ -100,41 +101,34 @@ export default class Permission extends React.Component {
                 });
             })
         }
-    }
+    },
 
     addNew() {
         this.state.data.push({
-            id: '',
+            id: null,
             name: '',
             url: ''
         });
         this.setState({
             data: this.state.data
         })
-    }
+    },
 
     render() {
         const columns = [{
-            title: 'id',
-            dataIndex: 'id',
-            key: 'id',
-            width: '10%'
-        }, {
             title: '权限名字',
             dataIndex: 'name',
             key: 'name',
             render: (text, record, index) => {
                 return <Input value={record.name} onChange={(e) => { record.name = e.target.value; this.setState({ data: this.state.data }); }} />
-            },
-            width: '40%'
+            }
         }, {
             title: '接口路径',
             dataIndex: 'url',
             key: 'url',
             render: (text, record, index) => {
                 return <Input value={record.url} onChange={(e) => { record.url = e.target.value; this.setState({ data: this.state.data }); }} />
-            },
-            width: '50%'
+            }
         }];
         const rowSelection = {
             type: 'checkbox',
@@ -145,16 +139,28 @@ export default class Permission extends React.Component {
                     selectedRowKeys: selectedRowKeys
                 });
             }
-        }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
         return (
             <Spin spinning={this.state.loading}>
-                <div>
-                    <Button type="primary" onClick={this.save.bind(this)}>保存修改</Button>
-                    <Button onClick={this.addNew.bind(this)}>新增</Button>
-                    <Button onClick={this.remove.bind(this)}>删除选中</Button>
+                <div className="set-content">
+                    <div className="set-title">
+                        <span>权限控制</span>
+                        <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            onClick={this.addNew}>添加<Icon type="plus" /></Button>
+                        <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                            disabled={!hasSelected}
+                            onClick={this.remove}>删除<Icon type="minus" /></Button>
+                        <Button type="primary" onClick={this.save}>保存修改</Button>
+                    </div>
+                    <Table className="member-table"
+                        columns={columns}
+                        dataSource={this.state.data}
+                        pagination={false}
+                        rowSelection={rowSelection} />
                 </div>
-                <Table columns={columns} dataSource={this.state.data} pagination={false} scroll={{ y: 450 }} rowSelection={rowSelection} />
             </Spin>
         );
     }
-};
+});
+export default Permission;

+ 69 - 65
js/component/manageCenter/set/role.jsx

@@ -1,12 +1,11 @@
 import React from 'react';
-import { Table, Button, Input, Spin, Message, Select, Modal, Tag } from 'antd';
+import { Table, Button, Input, Spin, Message, Select, Modal, Tag, Icon } from 'antd';
 import ajax from 'jquery/src/ajax/xhr.js'
 import $ from 'jquery/src/ajax';
 
-export default class Role extends React.Component {
-    constructor(props) {
-        super(props);
-        this.state = {
+const Role = React.createClass({
+    getInitialState() {
+        return {
             visible: false,
             disabled: false,
             name: '',
@@ -24,11 +23,11 @@ export default class Role extends React.Component {
                 permissions: []
             }
         }
-    }
+    },
 
     componentWillMount() {
         this.loadData();
-    }
+    },
 
     loadData() {
         let _me = this;
@@ -51,7 +50,7 @@ export default class Role extends React.Component {
                     this.state.data.push({
                         key: i,
                         id: thisdata.id,
-                        name: thisdata.name,
+                        roleName: thisdata.roleName,
                         permissions: thisdata.permissions.map((p) => { return String(p.id) }) || []
                     });
                 };
@@ -70,7 +69,7 @@ export default class Role extends React.Component {
                 loading: false
             });
         });
-    }
+    },
 
     save() {
         this.setState({
@@ -94,7 +93,7 @@ export default class Role extends React.Component {
                 disabled: false
             });
         })
-    }
+    },
 
     remove() {
         let deletedIds = [];
@@ -103,15 +102,8 @@ export default class Role extends React.Component {
             if (rowItem.id) {
                 deletedIds.push(rowItem.id)
             }
-        }
-        this.state.selectedRowKeys.sort((a, b) => { return b - a });
-        for (let idx = 0; idx < this.state.selectedRowKeys.length; idx++) {
-            let dataIndex = this.state.selectedRowKeys[idx];
-            this.state.data.splice(dataIndex, 1);
-        }
+        };
         this.setState({
-            data: this.state.data,
-            selectedRowKeys: [],
             loading: deletedIds.length > 0
         });
         if (deletedIds.length) {
@@ -124,6 +116,15 @@ export default class Role extends React.Component {
             }).done((res) => {
                 if (!res.error.length) {
                     Message.success("删除成功");
+                    this.state.selectedRowKeys.sort((a, b) => { return b - a });
+                    for (let idx = 0; idx < this.state.selectedRowKeys.length; idx++) {
+                        let dataIndex = this.state.selectedRowKeys[idx];
+                        this.state.data.splice(dataIndex, 1);
+                    };
+                    this.setState({
+                        data: this.state.data,
+                        selectedRowKeys: []
+                    });
                 } else {
                     Message.error(res.error[0].message);
                 }
@@ -133,69 +134,62 @@ export default class Role extends React.Component {
                 });
             })
         }
-    }
+    },
 
     addNew() {
         this.setState({
             visible: true,
             modelRecord: {
-                id: '',
-                name: '',
+                id: null,
+                roleName: '',
                 permissions: []
             }
         })
-    }
+    },
 
     edit(e) {
         this.setState({
-            modelRecord: e,
+            modelRecord: {
+                id: e.id,
+                roleName: e.roleName,
+                permissions: e.permissions
+            },
             visible: true,
             disabled: false
         })
-    }
+    },
 
     handleCancel() {
         this.setState({
             visible: false,
             disabled: false
         })
-    }
+    },
 
     render() {
         const columns = [{
-            title: 'ID',
-            dataIndex: 'id',
-            key: 'id',
-            width: '10%'
-        }, {
             title: '名字',
-            dataIndex: 'name',
-            key: 'name',
-            width: '20%'
+            dataIndex: 'roleName',
+            key: 'roleName'
         }, {
             title: '绑定权限',
             dataIndex: 'permissions',
             key: 'permissions',
             render: (text, record, index) => {
                 let _me = this;
-                return <div>
-                    {record.permissions && record.permissions.map((tag) => {
-                        return <Tag key={tag} closable={false}>
-                            {_me.state.permissions[tag]}
-                        </Tag>
-                    }
-                    )}
-                </div>
-            },
-            width: '60%'
-        }, {
-            title: '操作',
-            dataIndex: 'act',
-            key: 'act',
-            render: (text, record, index) => {
-                return <Button type='primary' onClick={this.edit.bind(this, record)}>编辑</Button>
+                if (record.permissions) {
+                    return <div>
+                        {record.permissions.map((tag) => {
+                            return <Tag key={tag} closable={false}>
+                                {_me.state.permissions[tag]}
+                            </Tag>
+                        }
+                        )}
+                    </div>
+                } else {
+                    return <div></div>;
+                }
             },
-            width: '20%'
         }];
         const rowSelection = {
             type: 'checkbox',
@@ -206,20 +200,20 @@ export default class Role extends React.Component {
                     selectedRowKeys: selectedRowKeys
                 });
             }
-        }
+        };
+        const hasSelected = this.state.selectedRowKeys.length > 0;
         return (
             <Spin spinning={this.state.loading}>
                 <Modal title="用户编辑"
                     closable={false}
                     visible={this.state.visible}
-                    onOk={this.save.bind(this)}
-                    onCancel={this.handleCancel.bind(this)}
-                >
+                    onOk={this.save}
+                    onCancel={this.handleCancel}>
                     <ul className="modal-content">
                         <li>
                             <span className='modal-text'>名字</span>
-                            <Input value={this.state.modelRecord.name} onChange={(e) => {
-                                this.state.modelRecord.name = e.target.value;
+                            <Input value={this.state.modelRecord.roleName} onChange={(e) => {
+                                this.state.modelRecord.roleName = e.target.value;
                                 this.setState({
                                     modelRecord: this.state.modelRecord
                                 })
@@ -229,12 +223,11 @@ export default class Role extends React.Component {
                             <span className='modal-text'>权限</span>
                             <Select
                                 multiple
-                                style={{ width: '90%' }}
+                                style={{ width: '76%' }}
                                 placeholder="选择绑定权限"
                                 disabled={!this.state.modelRecord.id}
                                 value={this.state.modelRecord.permissions}
                                 onChange={(pids) => {
-                                    let _me = this;
                                     this.state.modelRecord.permissions = pids;
                                     this.setState({
                                         modelRecord: this.state.modelRecord
@@ -246,14 +239,25 @@ export default class Role extends React.Component {
                         </li>
                     </ul>
                 </Modal>
-                <div style={{
-                    marginBottom: '6px'
-                }}>
-                    <Button onClick={this.addNew.bind(this)}>新增</Button>
-                    <Button onClick={this.remove.bind(this)}>删除选中</Button>
+                <div className="set-content">
+                    <div className="set-title">
+                        <span>角色控制</span>
+                        <Button style={{ background: "#ea0862", border: "none", color: "#fff" }}
+                            onClick={this.addNew}>添加<Icon type="plus" /></Button>
+                        <Button style={{ background: "#3fcf9e", border: "none", color: "#fff" }}
+                            disabled={!hasSelected}
+                            onClick={this.remove}>删除<Icon type="minus" /></Button>
+                    </div>
+                    <Table className='member-table'
+                        columns={columns}
+                        dataSource={this.state.data}
+                        onRowClick={this.edit}
+                        pagination={false}
+                        rowSelection={rowSelection} />
                 </div>
-                <Table columns={columns} dataSource={this.state.data} pagination={false} scroll={{ y: 450 }} rowSelection={rowSelection} />
             </Spin>
         );
     }
-};
+});
+
+export default Role;

+ 6 - 6
js/component/manageCenter/topTab.jsx

@@ -38,12 +38,12 @@ const TopTab = React.createClass({
                 </div>
                 <div className="acc-top-tab">
                     <Row>
-                        <Col className={this.props.active === 'userManage' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/userManage.html"}>用户管理</a></Col>
-                        <Col className={this.props.active === 'services' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/servicesManage/patent.html"}>科技服务管理</a></Col>
-                        <Col className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href="">科技成果管理</a></Col>
-                        <Col className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href="">科技需求管理</a></Col>
-                        <Col className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href="">科技思想管理</a></Col>
-                        <Col className={this.props.active === 'set' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/set.html"}>后台设置</a></Col>
+                        <Col style={{ display: window.showUserMeManage ? 'block' : 'none' }} className={this.props.active === 'userManage' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/userManage.html"}>用户管理</a></Col>
+                        <Col style={{ display: window.showServices ? 'block' : 'none' }} className={this.props.active === 'services' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/servicesManage/patent.html"}>科技服务管理</a></Col>
+                        <Col style={{ display: window.showAchievement ? 'block' : 'none' }} className={this.props.active === 'achievement' ? 'active' : ''} span={3}><a href="">科技成果管理</a></Col>
+                        <Col style={{ display: window.showDemand ? 'block' : 'none' }} className={this.props.active === 'demand' ? 'active' : ''} span={3}><a href="">科技需求管理</a></Col>
+                        <Col style={{ display: window.showIdea ? 'block' : 'none' }} className={this.props.active === 'idea' ? 'active' : ''} span={3}><a href="">科技思想管理</a></Col>
+                        <Col style={{ display: window.showSystem ? 'block' : 'none' }} className={this.props.active === 'system' ? 'active' : ''} span={3}><a href={globalConfig.context + "/admin/set.html"}>系统设置</a></Col>
                     </Row>
                 </div>
             </div >

+ 11 - 25
js/component/tools.js

@@ -3,11 +3,9 @@ import React from 'react';
 import ajax from 'jquery/src/ajax/xhr.js';
 import $ from 'jquery/src/ajax';
 import {
-    provinceList,
     patentTypeList,
     patentStateList,
     patentFieldList,
-    techFieldList,
     technicalSourceList,
     catagoryList,
     intellectualGetList,
@@ -18,6 +16,8 @@ import {
     copyrightStateList,
     vocations
 } from './dataDic.js';
+import { provinceList } from './DicProvinceList.js';
+import { techFieldList } from './DicTechFieldList.js'
 module.exports = {
     addressInit: function (_cmbProvince, _cmbCity, _cmbArea, defaultProvince, defaultCity, defaultArea) {
         var cmbProvince = document.getElementById(_cmbProvince);
@@ -370,30 +370,16 @@ module.exports = {
 
     //各种通过接口获取下拉列表
 
-    setPatentStateOption(type) {
+    setPatentStateOption(permission) {
         let theArr = [];
-        const caiwu = ['1', '3', '13'];
-        const xiaoshou = [];
-        switch (type) {
-            case 'caiwu':
-                patentStateList.map(function (item) {
-                    for (let i = 0; i < caiwu.length; i++) {
-                        if (item.value == caiwu[i]) {
-                            theArr.push()
-                        };
-                    };
-                });
-                return theArr;
-            case 'caiwu':
-                patentStateList.map(function (item) {
-                    for (let i = 0; i < caiwu.length; i++) {
-                        if (item.value == caiwu[i]) {
-                            theArr.push()
-                        };
-                    };
-                });
-                return theArr;
-        }
+        patentStateList.map(function (item) {
+            for (let i = 0; i < permission.length; i++) {
+                if (item.value == permission[i]) {
+                    theArr.push(item);
+                };
+            };
+        });
+        return theArr;
     },
     setUserContactsList(){
         let theOption = [];

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.0.12",
+  "version": "1.0.13",
   "description": "",
   "main": "index.js",
   "scripts": {