Browse Source

标准管理

dev01 10 months ago
parent
commit
486943f938

+ 16 - 0
js/admin/standard.js

@@ -0,0 +1,16 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import '../../css/base.less';
+
+import TopTab from '../component/manageCenter/topTab.jsx';
+import Footer from '../component/manageCenter/bottom.jsx';
+import Content from '../component/manageCenter/standard/content.jsx';
+
+ReactDOM.render(
+    <div className="wrap clearfix">
+        <TopTab active={'standard'}/>
+        <Content />
+        <Footer />
+    </div>,
+    document.getElementById('root')
+)

+ 16 - 12
js/component/common/imgList/index.js

@@ -72,6 +72,7 @@ class ImgList extends Component {
   }
 
   beforeUpload(file) {
+    const { isSupportPDF = false } = this.props
     const isLt2M = file.size / 1024 / 1024 < 20;
     if (!isLt2M) {
       message.error('文件大小不能超过 20MB!');
@@ -87,13 +88,16 @@ class ImgList extends Component {
       return isLt2M;
     } else {
       const isJPG = file.type.split('/');
-      // if (isJPG[0] !== 'image' && isJPG[0] !== "application") {
-      //   message.error('只能上传图片或pdf文件!');
-      //   return false;
-      // }
-      if (isJPG[0] !== 'image') {
-        message.error('只能上传图片!');
-        return false;
+      if (isSupportPDF) {
+        if (isJPG[0] !== 'image' && isJPG[0] !== "application") {
+          message.error('只能上传图片或pdf文件!');
+          return false;
+        }
+      } else {
+        if (isJPG[0] !== 'image') {
+          message.error('只能上传图片!');
+          return false;
+        }
       }
       if (isJPG && isLt2M) {
         // 用于计算当次选择的图片数量
@@ -196,11 +200,11 @@ class ImgList extends Component {
                   let url = file.response.data.indexOf("/upload") == -1
                     ? globalConfig.avatarHost + "/upload" + file.response.data
                     : file.response.data
-                  this.setState({
-                    isPDF: true,
-                    file: url,
-                  })
-                  // window.open(url)
+                  // this.setState({
+                  //   isPDF: true,
+                  //   file: url,
+                  // })
+                  window.open(url)
                 } else {
                   if (Object.keys(this.props.uploadConfig).length !== 0) {
                     //TODO 上传组件,查看图片临时解决方法,无法查看下一张

+ 1 - 1
js/component/dataDic.js

@@ -2374,7 +2374,7 @@ module.exports = {
     { value: "平台管理", key: "operate" },
     { value: "渠道管理", key: "channelList" },
     { value: "阿米巴", key: "amiba" },
-    { value: "查询管理", key: "povertyInquiry" }
+    { value: "查询管理", key: "povertyInquiry" },
   ],
   //意向进度
   intentProgress: [

+ 142 - 142
js/component/manageCenter/set/content.jsx

@@ -5,149 +5,149 @@ import LeftTab from '../leftTab';
 import { getMenu } from '../publicMenu.js'
 
 class Content extends Component {
-    constructor() {
-        super();
-        this.state = {
-            loading: false,
-            component: <div />,
-        };
-    }
-    componentWillMount() {
-        var ids = window.location.href.indexOf('rid=');
-        var idk = window.location.href.substr(ids + 4);
-        var rid = idk.split('#');
-        let menu = getMenu(rid);
-        let curry;
-        if (menu[0].subMenus.length > 0) {
-            curry = menu[0].subMenus[0].url.split('#');
-        } else {
-            curry = menu[0].url.split('#');
-        };
-        if (window.location.hash) {
-            this.getKey(window.location.hash.substr(1));
-        } else {
-            this.getKey(curry[1]);
-        };
-    }
-    getKey(key) {
-        switch (key) {
-            case 'softwareConfigure':
-                require.ensure([], () => {
-                    const SoftwareConfigure = require('./projectConfigure/softwareConfigure').default;
-                    this.setState({
-                        component: <SoftwareConfigure />,
-                    });
-                });
-                break;
-            case 'officialFees':
-                require.ensure([], () => {
-                    const OfficialFees = require('./projectConfigure/officialFees').default;
-                    this.setState({
-                        component: <OfficialFees />,
-                    });
-                });
-                break;
-            case 'patentFees':
-                require.ensure([], () => {
-                    const PatentFees = require('./projectConfigure/patentFees').default;
-                    this.setState({
-                        component: <PatentFees />,
-                    });
-                });
-                break;
-            case 'organization':
-                require.ensure([], () => {
-                    const Organization = require('./organization/organization').default;
-                    this.setState({
-                        component: <Organization />,
-                    });
-                });
-                break;
-            case 'workeTimes':
-                require.ensure([], () => {
-                    const WorkeTimes = require('./workeTimes/index').default;
-                    this.setState({
-                        component: <WorkeTimes />,
-                    });
-                });
-                break;
-            case 'businessCategory':
-                require.ensure([], () => {
-                    const BusinessCategory = require('./business/businessCategory').default;
-                    this.setState({
-                        component: <BusinessCategory />
-                    });
-                });
-                break;
-            case 'businessProject':
-                require.ensure([], () => {
-                    const BusinessProject = require('./business/businessProject').default;
-                    this.setState({
-                        component: <BusinessProject />
-                    });
-                });
-                break;
-            case 'businessQuery':
-                require.ensure([], () => {
-                    const BusinessQuery = require('./business/businessQuery').default;
-                    this.setState({
-                        component: <BusinessQuery />
-                    });
-                });
-                break;
-            case 'user':
-                require.ensure([], () => {
-                    const User = require('./userManagementS/user').default;
-                    this.setState({
-                        component: <User />
-                    });
-                });
-                break;
+  constructor() {
+    super();
+    this.state = {
+      loading: false,
+      component: <div />,
+    };
+  }
+  componentWillMount() {
+    var ids = window.location.href.indexOf('rid=');
+    var idk = window.location.href.substr(ids + 4);
+    var rid = idk.split('#');
+    let menu = getMenu(rid);
+    let curry;
+    if (menu[0].subMenus.length > 0) {
+      curry = menu[0].subMenus[0].url.split('#');
+    } else {
+      curry = menu[0].url.split('#');
+    };
+    if (window.location.hash) {
+      this.getKey(window.location.hash.substr(1));
+    } else {
+      this.getKey(curry[1]);
+    };
+  }
+  getKey(key) {
+    switch (key) {
+      case 'softwareConfigure':
+        require.ensure([], () => {
+          const SoftwareConfigure = require('./projectConfigure/softwareConfigure').default;
+          this.setState({
+            component: <SoftwareConfigure />,
+          });
+        });
+        break;
+      case 'officialFees':
+        require.ensure([], () => {
+          const OfficialFees = require('./projectConfigure/officialFees').default;
+          this.setState({
+            component: <OfficialFees />,
+          });
+        });
+        break;
+      case 'patentFees':
+        require.ensure([], () => {
+          const PatentFees = require('./projectConfigure/patentFees').default;
+          this.setState({
+            component: <PatentFees />,
+          });
+        });
+        break;
+      case 'organization':
+        require.ensure([], () => {
+          const Organization = require('./organization/organization').default;
+          this.setState({
+            component: <Organization />,
+          });
+        });
+        break;
+      case 'workeTimes':
+        require.ensure([], () => {
+          const WorkeTimes = require('./workeTimes/index').default;
+          this.setState({
+            component: <WorkeTimes />,
+          });
+        });
+        break;
+      case 'businessCategory':
+        require.ensure([], () => {
+          const BusinessCategory = require('./business/businessCategory').default;
+          this.setState({
+            component: <BusinessCategory />
+          });
+        });
+        break;
+      case 'businessProject':
+        require.ensure([], () => {
+          const BusinessProject = require('./business/businessProject').default;
+          this.setState({
+            component: <BusinessProject />
+          });
+        });
+        break;
+      case 'businessQuery':
+        require.ensure([], () => {
+          const BusinessQuery = require('./business/businessQuery').default;
+          this.setState({
+            component: <BusinessQuery />
+          });
+        });
+        break;
+      case 'user':
+        require.ensure([], () => {
+          const User = require('./userManagementS/user').default;
+          this.setState({
+            component: <User />
+          });
+        });
+        break;
 
-            case 'roles':
-                require.ensure([], () => {
-                    const Roles = require('./userManagementS/roles').default;
-                    this.setState({
-                        component: <Roles />,
-                    });
-                });
-                break;
-            case 'permission':
-                require.ensure([], () => {
-                    const Jurisdiction = require('./userManagementS/jurisdiction').default;
-                    this.setState({
-                        component: <Jurisdiction />
-                    });
-                });
-                break;
-            case 'bar':
-                require.ensure([], () => {
-                    const Bar = require('./amoeba/barList').default;
-                    this.setState({
-                        component: <Bar />
-                    });
-                });
-                break;
-            default:
-                require.ensure([], () => {
-                    const Module = require('../module').default;
-                    this.setState({
-                        component: <Module />
-                    });
-                });
-        };
-        window.location.hash = key;
-    }
-    render() {
-        return (
-            <div className="manage-content">
-                <LeftTab handlekey={this.getKey.bind(this)} />
-                <div className="content-right">
-                    {this.state.component}
-                </div>
-            </div>
-        )
-    }
+      case 'roles':
+        require.ensure([], () => {
+          const Roles = require('./userManagementS/roles').default;
+          this.setState({
+            component: <Roles />,
+          });
+        });
+        break;
+      case 'permission':
+        require.ensure([], () => {
+          const Jurisdiction = require('./userManagementS/jurisdiction').default;
+          this.setState({
+            component: <Jurisdiction />
+          });
+        });
+        break;
+      case 'bar':
+        require.ensure([], () => {
+          const Bar = require('./amoeba/barList').default;
+          this.setState({
+            component: <Bar />
+          });
+        });
+        break;
+      default:
+        require.ensure([], () => {
+          const Module = require('../module').default;
+          this.setState({
+            component: <Module />
+          });
+        });
+    };
+    window.location.hash = key;
+  }
+  render() {
+    return (
+      <div className="manage-content">
+        <LeftTab handlekey={this.getKey.bind(this)} />
+        <div className="content-right">
+          {this.state.component}
+        </div>
+      </div>
+    )
+  }
 }
 
 export default Content;

+ 64 - 0
js/component/manageCenter/standard/content.jsx

@@ -0,0 +1,64 @@
+import React, { Component } from 'react';
+import '../content.less';
+import './content.less';
+import LeftTab from '../leftTab';
+import { getMenu } from '../publicMenu.js'
+
+class Content extends Component {
+  constructor() {
+    super();
+    this.state = {
+      loading: false,
+      component: <div />,
+    };
+  }
+  componentWillMount() {
+    var ids = window.location.href.indexOf('rid=');
+    var idk = window.location.href.substr(ids + 4);
+    var rid = idk.split('#');
+    let menu = getMenu(rid);
+    let curry;
+    if (menu[0].subMenus.length > 0) {
+      curry = menu[0].subMenus[0].url.split('#');
+    } else {
+      curry = menu[0].url.split('#');
+    };
+    if (window.location.hash) {
+      this.getKey(window.location.hash.substr(1));
+    } else {
+      this.getKey(curry[1]);
+    };
+  }
+  getKey(key) {
+    switch (key) {
+      case 'standard':
+        require.ensure([], () => {
+          const Standard = require('./stList/index').default;
+          this.setState({
+            component: <Standard />
+          });
+        });
+        break;
+      default:
+        require.ensure([], () => {
+          const Module = require('../module').default;
+          this.setState({
+            component: <Module />
+          });
+        });
+    };
+    window.location.hash = key;
+  }
+  render() {
+    return (
+      <div className="manage-content">
+        <LeftTab handlekey={this.getKey.bind(this)} />
+        <div className="content-right">
+          {this.state.component}
+        </div>
+      </div>
+    )
+  }
+}
+
+export default Content;

+ 112 - 0
js/component/manageCenter/standard/content.less

@@ -0,0 +1,112 @@
+.user-content {
+  background: #fff;
+  padding: 20px;
+
+  .content-title {
+    color: #333;
+    font-size: 16px;
+  }
+
+  .user-search {
+    margin-bottom: 10px;
+
+    >input {
+      width: 140px;
+    }
+
+    >* {
+      margin-right: 10px;
+      margin-top: 10px;
+    }
+
+    >input,
+    >button,
+    .ant-select {
+      margin-top: 10px;
+      margin-right: 10px;
+    }
+
+    .ant-switch {
+      margin-left: 10px;
+    }
+
+    .search-more {
+      margin: 10px 0;
+    }
+
+    .search-div {
+      display: inline-block;
+      margin-top: 10px;
+      margin-right: 10px;
+    }
+  }
+}
+
+.ant-modal-body {
+  .modal-box {
+    overflow: hidden;
+    line-height: 28px;
+    margin-bottom: 10px;
+
+    .modal-box-title {
+      float: left;
+      width: 84px;
+      text-align: right;
+      margin-right: 20px;
+    }
+
+    .modal-box-detail {
+      float: left;
+      width: 400px;
+
+      >span {
+        margin-right: 6px;
+      }
+    }
+
+    >button {
+      margin-right: 20px;
+    }
+  }
+}
+
+.no-all-select {
+  .ant-table-selection {
+    .ant-checkbox {
+      display: none;
+    }
+  }
+}
+
+.addButton {
+  float: right;
+  margin-right: 50px !important;
+}
+
+.tip {
+  color: red;
+  font-size: 12px;
+}
+
+.division {
+  margin: 0 auto;
+  margin-top: 25px;
+  width: 80%;
+}
+
+.fa {
+  display: flex;
+  justify-content: space-around;
+}
+
+// .ant-upload-select{
+// 	vertical-align: top;
+// }
+
+.ant-upload.ant-upload-select {
+  vertical-align: top;
+}
+
+.ant-upload-list-item {
+  font-size: 14px;
+}

+ 802 - 0
js/component/manageCenter/standard/stList/index.jsx

@@ -0,0 +1,802 @@
+import React from 'react';
+import $ from 'jquery/src/ajax';
+import {
+  Form, Icon, Button, Input, Select, AutoComplete, Spin, Table,
+  message, DatePicker, Modal, Tabs
+} from 'antd';
+import moment from 'moment';
+import { ShowModal, splitUrl } from '../../../tools.js';
+import { ChooseList } from "../../order/orderNew/chooseList";
+import "./index.less";
+import ImgList from "../../../common/imgList";
+
+const PicturesWall = React.createClass({
+
+  getInitialState() {
+    return {
+      previewVisible: false,
+      previewImage: "",
+      fileList: this.props.pictureUrl,
+    };
+  },
+
+  getDefaultProps() {
+    return {
+      changeClick: this.modifyChange,
+    };
+  },
+
+  handleCancel() {
+    this.setState({ previewVisible: false });
+  },
+
+  handlePreview(file) {
+    this.setState({
+      previewImage: file.url || file.thumbUrl,
+      previewVisible: true,
+    });
+  },
+
+  handleChange(info) {
+    let fileList = info.fileList;
+    this.setState({ fileList });
+    this.props.fileList(fileList);
+  },
+
+  componentWillReceiveProps(nextProps) {
+    this.state.fileList = nextProps.pictureUrl;
+  },
+
+  render() {
+    const { fileList } = this.state;
+    return (
+      <div style={{ display: "inline-block" }}>
+        <ImgList
+          isSupportPDF={true}
+          domId={this.props.domId}
+          uploadConfig={{
+            action: globalConfig.context + "/api/admin/standard/uploadPicture",
+            data: { sign: "standard_document" },
+            multiple: true,
+            listType: "picture-card",
+          }}
+          onChange={(infor) => {
+            this.handleChange(infor);
+          }}
+          fileList={fileList}
+        />
+      </div>
+    );
+  },
+
+});
+
+const { TabPane } = Tabs
+const FormItem = Form.Item;
+const Standard = Form.create()(React.createClass({
+
+  getInitialState() {
+    return {
+      searchValues: {},
+      loading: false,
+      changeList: undefined, // 更改后的表格显示数据
+      dataSource: [],
+      departmentArr: [],
+      typeList: [
+        { key: "国家标准", value: 0, },
+        { key: "行业标准", value: 1, },
+        { key: "地方标准", value: 2, },
+        { key: "团体标准", value: 3, },
+        { key: "国际标准", value: 4, },
+      ],
+      pagination: {
+        defaultCurrent: 1,
+        defaultPageSize: 10,
+        showQuickJumper: true,
+        pageSize: 20,
+        onChange: function (page) {
+          this.loadData(page);
+        }.bind(this),
+        showTotal: function (total) {
+          return '共' + total + '条数据';
+        }
+      },
+      columns: [
+        {
+          title: '标准编号',
+          dataIndex: 'serialNumber',
+          key: 'serialNumber',
+        },
+        {
+          title: '标准名称',
+          dataIndex: 'name',
+          key: 'name',
+        },
+        {
+          title: '参考',
+          dataIndex: 'reference',
+          key: 'reference',
+          render: (text, record) => <span>{['国家 ', '行业 ', '地方 ', '团体 ', '国际 '][record.type]}{text}</span>
+        },
+        {
+          title: '部门',
+          dataIndex: 'depName',
+          key: 'depName',
+        },
+        {
+          title: '负责人',
+          dataIndex: 'adminName',
+          key: 'adminName',
+        },
+        {
+          title: '标准状态',
+          dataIndex: 'status',
+          key: 'status',
+          render: text => <span style={{ color: ["red", "green"][text] }}>{["关闭", "开启"][text]}</span>
+        },
+        {
+          title: '更新时间',
+          dataIndex: 'updateTime',
+          key: 'updateTime',
+        },
+        {
+          title: '附件',
+          dataIndex: 'url',
+          key: 'url',
+          render: (text, record, index) =>
+            <div className='selStandard'>
+              <ImgList
+                fileList={text ? splitUrl(text, ',', globalConfig.avatarHost + '/upload') : []}
+                domId={"selStandard" + index}
+              />
+            </div>
+        },
+      ],
+      visible: "",
+      data: {},
+      orgCodeUrl: [],
+    };
+  },
+
+  componentWillMount() {
+    this.loadData();
+    this.departmentList();
+  },
+
+  // 列表接口
+  loadData(pageNo) {
+    const { searchValues, pagination } = this.state;
+    this.setState({
+      loading: true,
+    });
+    let datas = Object.assign(searchValues, {
+      pageNo: pageNo || 1,
+      pageSize: pagination.pageSize,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/standard/list",
+      data: datas,
+      success: function (data) {
+        ShowModal(this);
+        this.setState({
+          loading: false,
+        });
+        if (data.error && data.error.length === 0) {
+          if (data.data.list) {
+            pagination.current = data.data.pageNo;
+            pagination.total = data.data.totalCount;
+            if (data.data && data.data.list && !data.data.list.length) {
+              pagination.current = 0;
+              pagination.total = 0;
+            }
+            this.setState({
+              dataSource: data.data.list,
+              pagination: this.state.pagination,
+              pageNo: data.data.pageNo,
+            });
+          } else {
+            this.setState({
+              dataSource: data.data,
+              pagination: false,
+            });
+          }
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  //部门
+  departmentList() {
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/organization/selectSuperId",
+      data: {},
+      success: function (data) {
+        let thedata = data.data;
+        let theArr = [];
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+        } else {
+          thedata.map(function (item, index) {
+            theArr.push({
+              key: index,
+              name: item.name,
+              id: item.id
+            });
+          });
+        }
+        this.setState({
+          departmentArr: theArr
+        });
+      }.bind(this)
+    }).always(
+      function () {
+
+      }.bind(this)
+    );
+  },
+
+  search() {
+    this.loadData();
+  },
+
+  reset() {
+    this.setState({
+      searchValues: {}
+    }, () => {
+      this.loadData();
+    })
+  },
+
+  changeList(arr) {
+    const newArr = [];
+    this.state.columns.forEach(item => {
+      arr.forEach(val => {
+        if (val === item.title) {
+          newArr.push(item);
+        }
+      });
+    });
+    this.setState({
+      changeList: newArr
+    });
+  },
+
+  addClick() {
+    this.setState({
+      visible: "add"
+    })
+  },
+
+  tableRowClick(e) {
+    if (!adminData.isSuperAdmin) {
+      return
+    }
+    this.setState({
+      visible: "edit",
+    })
+    this.getDetails(e.id)
+    // const orgCodeUrl = e.url ? splitUrl(e.url, ',', globalConfig.avatarHost + '/upload') : []
+    // this.setState({
+    //   visible: "edit",
+    //   data: e,
+    //   orgCodeUrl,
+    //   adminName: e.adminName,
+    // })
+  },
+
+  getDetails(id) {
+    this.setState({
+      loading: true
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/standard/get",
+      data: {
+        id,
+      },
+      success: function (data) {
+        let thedata = data.data || {};
+        let orgCodeUrl = []
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          };
+        } else {
+          orgCodeUrl = thedata.url ? splitUrl(thedata.url, ',', globalConfig.avatarHost + '/upload') : []
+        }
+        this.setState({
+          data: thedata,
+          orgCodeUrl,
+          adminName: thedata.adminName,
+        })
+      }.bind(this),
+    }).always(function () {
+      this.setState({
+        loading: false
+      });
+    }.bind(this));
+  },
+
+  getOrgCodeUrl(e) {
+    this.setState({
+      orgCodeUrl: e
+    });
+  },
+
+  handleCancel() {
+    this.setState({
+      visible: "",
+      adminName: undefined,
+      data: {},
+      orgCodeUrl: [],
+    })
+  },
+
+  handleSubmit() {
+    const { data } = this.state
+    if (!data.serialNumber) {
+      message.warning('标准编号不能为空!');
+      return;
+    }
+    if (!data.name) {
+      message.warning('标准名称不能为空!');
+      return;
+    }
+    if (!data.depId) {
+      message.warning('部门不能为空!');
+      return;
+    }
+    if (!data.status && data.status != 0) {
+      message.warning('请选择状态!');
+      return;
+    }
+    let pictureUrl = "";
+    if (this.state.orgCodeUrl.length) {
+      let picArr = [];
+      this.state.orgCodeUrl.map(function (item) {
+        if (
+          item.response &&
+          item.response.data &&
+          item.response.data.length
+        ) {
+          picArr.push(item.response.data);
+        }
+      });
+      pictureUrl = picArr.join(",");
+    }
+    $.ajax({
+      method: "POST",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        data.id
+          ? globalConfig.context + '/api/admin/standard/update'
+          : globalConfig.context + '/api/admin/standard/add',
+      data: Object.assign(data, {
+        url: pictureUrl,
+      }),
+    }).done(function (data) {
+      this.setState({
+        loading: false
+      });
+      if (!data.error.length) {
+        message.success('保存成功!');
+        this.handleCancel();
+        this.loadData();
+      } else {
+        message.warning(data.error[0].message);
+      }
+    }.bind(this));
+  },
+
+  followUp(e) {
+    this.setState({
+      adminName: e
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: globalConfig.context + "/api/admin/customer/listAdminByName",
+      data: {
+        adminName: e,
+      },
+      success: function (data) {
+        let thedata = data.data || [];
+        if (!thedata) {
+          if (data.error && data.error.length) {
+            message.warning(data.error[0].message);
+          }
+          thedata = {};
+        }
+        this.setState({
+          fjlist: thedata,
+        });
+      }.bind(this),
+    }).always(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  selectF(value) {
+    const { data, fjlist } = this.state;
+    const newdataSources = JSON.stringify(fjlist) == "{}" ? [] : fjlist;
+    this.setState({
+      data: Object.assign(data, {
+        aid: newdataSources.find((item) => item.name == value).id,
+      }),
+    });
+  },
+
+  render() {
+    const { RangePicker } = DatePicker;
+    let departmentArr = this.state.departmentArr || [];
+    const { searchValues, data } = this.state
+    const dataSources = this.state.fjlist || [];
+    const options = dataSources.map((group) => (
+      <Select.Option key={group.id} value={group.name}>
+        {group.name}
+      </Select.Option>
+    ));
+    const formItemLayout = {
+      labelCol: { span: 8 },
+      wrapperCol: { span: 14 },
+    };
+    return (
+      <div className="user-content">
+        <div className="content-title">
+          <Tabs defaultActiveKey="1" className="test">
+            <TabPane tab="搜索" key="1">
+              <div className="user-search" style={{ marginLeft: 10 }}>
+                <Input
+                  placeholder="请输入标准名称"
+                  value={searchValues["name"]
+                    ? searchValues["name"]
+                    : ""}
+                  onChange={(e) => {
+                    searchValues["name"] = e.target.value;
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                />
+                <Select
+                  placeholder="请输入部门名称"
+                  style={{ width: 230 }}
+                  value={searchValues["depId"]
+                    ? searchValues["depId"]
+                    : undefined}
+                  onChange={e => {
+                    searchValues["depId"] = e;
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                >
+                  {departmentArr.map(function (item) {
+                    return (
+                      <Select.Option key={item.id}>{item.name}</Select.Option>
+                    );
+                  })}
+                </Select>
+                <Select
+                  placeholder="状态"
+                  style={{ width: 140 }}
+                  value={searchValues["status"]}
+                  onChange={(e) => {
+                    searchValues["status"] = e;
+                    this.setState({
+                      searchValues: searchValues,
+                    });
+                  }}
+                >
+                  <Select.Option value={null}>全部</Select.Option>
+                  <Select.Option value={0}>关闭</Select.Option>
+                  <Select.Option value={1}>开启</Select.Option>
+                </Select>
+                <span>时间:</span>
+                <RangePicker
+                  style={{ width: 300 }}
+                  value={[
+                    searchValues.startTime ? moment(searchValues.startTime) : null,
+                    searchValues.endTime ? moment(searchValues.endTime) : null,
+                  ]}
+                  onChange={(data, dataString) => {
+                    this.setState({
+                      searchValues: Object.assign(searchValues, {
+                        startTime: dataString[0],
+                        endTime: dataString[1],
+                      }),
+                    });
+                  }}
+                />
+                <Button
+                  type="primary"
+                  onClick={this.search}
+                  style={{ margin: "0 10px" }}
+                >搜索</Button>
+                <Button onClick={this.reset}>重置</Button>
+              </div>
+            </TabPane>
+            <TabPane tab="更改表格显示数据" key="2">
+              <div style={{ marginLeft: 10 }}>
+                <ChooseList
+                  columns={this.state.columns}
+                  changeFn={this.changeList}
+                  changeList={this.state.changeList}
+                  top={55}
+                  margin={11}
+                />
+              </div>
+            </TabPane>
+            {adminData.isSuperAdmin ?
+              <TabPane tab="新增" key="3">
+                <Button
+                  type="primary"
+                  className="addButton"
+                  style={{ float: "left", marginBottom: 10, marginTop: 12 }}
+                  onClick={this.addClick}
+                >
+                  新增
+                </Button>
+              </TabPane> : ""}
+          </Tabs>
+          <div className="patent-table">
+            <Spin spinning={this.state.loading}>
+              <Table
+                bordered
+                columns={
+                  this.state.changeList
+                    ? this.state.changeList
+                    : this.state.columns
+                }
+                style={{
+                  cursor: 'pointer',
+                }}
+                dataSource={this.state.dataSource}
+                pagination={this.state.pagination}
+                onRowDoubleClick={this.tableRowClick}
+              />
+            </Spin>
+          </div>
+        </div>
+        {
+          this.state.visible != "" &&
+          <Modal
+            title={!!data.id ? "编辑标准" : "新增标准"}
+            visible={this.state.visible != ""}
+            width="600px"
+            onCancel={this.handleCancel}
+            maskClosable={false}
+            footer=""
+            className="admin-desc-content"
+          >
+            <Form
+              layout="horizontal"
+              // onSubmit={this.handleSubmit}
+              id="demand-form"
+            >
+              <Spin spinning={this.state.loading}>
+                <div className="clearfix">
+                  <FormItem
+                    className="half-middle"
+                    {...formItemLayout}
+                    label="标准编号"
+                  >
+                    <Input
+                      placeholder="标准编号"
+                      value={data["serialNumber"]
+                        ? data["serialNumber"]
+                        : ""}
+                      style={{ width: "230px" }}
+                      onChange={(e) => {
+                        data["serialNumber"] = e.target.value;
+                        this.setState({
+                          data: data
+                        });
+                      }}
+                    />
+                    <span className="mandatory">*</span>
+                  </FormItem>
+
+                  <FormItem
+                    className="half-middle"
+                    {...formItemLayout}
+                    label="标准名称"
+                  >
+                    <Input
+                      placeholder="标准名称"
+                      value={data["name"]
+                        ? data["name"]
+                        : ""}
+                      style={{ width: "230px" }}
+                      onChange={(e) => {
+                        data["name"] = e.target.value;
+                        this.setState({
+                          data: data
+                        });
+                      }}
+                    />
+                    <span className="mandatory">*</span>
+                  </FormItem>
+
+                  <FormItem
+                    className="half-middle"
+                    {...formItemLayout}
+                    label="参考"
+                  >
+                    <Select
+                      placeholder="请选择"
+                      style={{ width: "80px" }}
+                      value={data.type}
+                      onChange={(e) => {
+                        data["type"] = e;
+                        this.setState({
+                          data: data
+                        });
+                      }}
+                    >
+                      {this.state.typeList.map(function (item) {
+                        return (
+                          <Select.Option key={item.value} value={item.value}>
+                            {item.key}
+                          </Select.Option>
+                        );
+                      })}
+                    </Select>
+                    <Input
+                      placeholder="请输入参考网址"
+                      value={data["reference"]
+                        ? data["reference"]
+                        : ""}
+                      style={{ width: "140px", marginLeft: "10px" }}
+                      onChange={(e) => {
+                        data["reference"] = e.target.value;
+                        this.setState({
+                          data: data
+                        });
+                      }}
+                    />
+                  </FormItem>
+
+                  <FormItem
+                    className="half-middle"
+                    {...formItemLayout}
+                    label="部门"
+                  >
+                    <Select
+                      placeholder="请选择部门"
+                      style={{ width: 230 }}
+                      value={data["depId"]
+                        ? data["depId"]
+                        : undefined}
+                      onChange={e => {
+                        data["depId"] = e;
+                        this.setState({
+                          data: data,
+                        });
+                      }}
+                    >
+                      {departmentArr.map(function (item) {
+                        return (
+                          <Select.Option key={item.id}>{item.name}</Select.Option>
+                        );
+                      })}
+                    </Select>
+                    <span className="mandatory">*</span>
+                  </FormItem>
+
+                  <FormItem
+                    className="half-middle"
+                    {...formItemLayout}
+                    label="负责人"
+                  >
+                    <AutoComplete
+                      className="certain-category-search"
+                      dropdownClassName="certain-category-search-dropdown"
+                      dropdownMatchSelectWidth={false}
+                      style={{ width: 230 }}
+                      dataSource={options}
+                      placeholder="营销员名称"
+                      value={this.state.adminName}
+                      onChange={this.followUp.bind(this)}
+                      filterOption={true}
+                      onSelect={this.selectF.bind(this)}
+                    >
+                      <Input />
+                    </AutoComplete>
+                  </FormItem>
+
+                  <FormItem
+                    className="half-middle"
+                    {...formItemLayout}
+                    label="状态"
+                  >
+                    <Select
+                      placeholder=""
+                      style={{ width: "80px" }}
+                      value={data.status}
+                      onChange={(e) => {
+                        data["status"] = e;
+                        this.setState({
+                          data: data,
+                        });
+                      }}
+                    >
+                      {[
+                        { key: "关闭", value: 0 },
+                        { key: "开启", value: 1 },
+                      ].map(function (item) {
+                        return (
+                          <Select.Option key={item.value} value={item.value}>
+                            {item.key}
+                          </Select.Option>
+                        );
+                      })}
+                    </Select>
+                    <span className="mandatory">*</span>
+                  </FormItem>
+
+                  <FormItem
+                    className="half-middle"
+                    {...formItemLayout}
+                    label="上附件"
+                  >
+                    <PicturesWall
+                      domId={'standard'}
+                      fileList={this.getOrgCodeUrl}
+                      pictureUrl={this.state.orgCodeUrl}
+                    />
+                  </FormItem>
+                  <span className="mandatory" style={{ marginLeft: 210 }}>支持图片,pdf</span>
+
+                </div>
+                <FormItem className="half-middle">
+                  <Button
+                    className="set-submit"
+                    type="primary"
+                    onClick={this.handleSubmit}
+                    style={{ marginLeft: "150px" }}
+                  >
+                    保存
+                  </Button>
+                  <Button
+                    className="set-submit"
+                    type="ghost"
+                    onClick={this.handleCancel}
+                  >
+                    取消
+                  </Button>
+                </FormItem>
+              </Spin>
+            </Form>
+          </Modal>
+        }
+      </div>
+    );
+  }
+}));
+
+export default Standard;

+ 106 - 0
js/component/manageCenter/standard/stList/index.less

@@ -0,0 +1,106 @@
+.user-content {
+  background: #fff;
+  padding: 20px;
+
+  .content-title {
+    color: #333;
+    font-size: 16px;
+    overflow: hidden;
+  }
+
+  .user-search {
+
+    // margin-bottom: 10px;
+    >input {
+      width: 140px;
+    }
+
+    >button,
+    .ant-select,
+    >input {
+      margin-right: 10px;
+      // margin-top: 10px;
+    }
+
+    .ant-switch {
+      margin-left: 10px;
+    }
+
+    .search-more {
+      margin: 10px 0;
+
+      >span {
+        margin-right: 10px;
+      }
+    }
+  }
+
+  .addButton {
+    float: right;
+    margin-right: 10px !important;
+  }
+}
+
+.ant-tabs-bar {
+  margin-bottom: 10px;
+}
+
+.half-item {
+  float: left;
+  width: 50%;
+  min-height: 36px;
+  margin-bottom: 10px;
+
+  button {
+    margin-left: 20px;
+  }
+}
+
+.half-middle {
+  width: 80%;
+  margin: 10px auto;
+  height: 36px;
+
+  button {
+    margin-left: 20px;
+  }
+}
+
+.patent-table {
+  clear: both;
+}
+
+.set-submit {
+  margin-right: 15px;
+}
+
+.deletButton {
+  float: right;
+  margin-bottom: 15px;
+}
+
+.clearfix {
+  clear: both;
+}
+
+.mandatory {
+  color: red;
+  margin-left: 8px;
+}
+
+.search-more .ant-select-auto-complete.ant-select-lg .ant-input {
+  height: 28px
+}
+
+.rolesCol {
+  width: 90%;
+}
+
+.selStandard {
+  .ant-upload-list-picture-card .ant-upload-list-item {
+    float: left;
+    width: 40px;
+    height: 40px;
+    margin: 0 8px 0 0;
+  }
+}

+ 1 - 1
package.json

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

+ 6 - 0
webpack.config.js

@@ -312,6 +312,12 @@ module.exports = (function () {
             template: './template/template.html',
             chunks: ['user/account/evaluateInfo', 'vendors'],
         }),
+        new HtmlWebpackPlugin({
+          title: '管理员-标准管理',
+          filename: 'admin/standard.html',
+          template: './template/template.html',
+          chunks: ['admin/standard', 'vendors'],
+      }),
         //portal 门户
         // new HtmlWebpackPlugin({
         //     title: '主页-需求搜索',

+ 7 - 1
webpack/entry.config.js

@@ -20,6 +20,8 @@ module.exports = {
     "admin/set": "./js/admin/set.js",
     "admin/userManage": "./js/admin/userManage.js",
     "admin/idea": "./js/admin/idea.js",
+    "admin/amiba": "./js/admin/amiba.js",
+    "admin/standard": "./js/admin/standard.js",
     //admin-servicesManage
     "admin/servicesManage/contract": "./js/admin/servicesManage/contract.js",
     "admin/servicesManage/patent": "./js/admin/servicesManage/patent.js",
@@ -36,7 +38,6 @@ module.exports = {
     "admin/customerService": "./js/admin/customerService.js",
     "admin/legalAffairs": "./js/admin/legalAffairs.js",
     "admin/channelList": "./js/admin/channelList.js",
-    "admin/amiba": "./js/admin/amiba.js",
     "admin/povertyInquiry": "./js/admin/povertyInquiry.js",
     "admin/achievement": "./js/admin/achievement.js",
     "admin/customer": "./js/admin/customer.js",
@@ -156,6 +157,11 @@ module.exports = {
       "webpack/hot/only-dev-server",
       "./js/admin/amiba.js",
     ],
+    "admin/standard": [
+      "webpack-dev-server/client?http://127.0.0.1:80", // WebpackDevServer host and port
+      "webpack/hot/only-dev-server",
+      "./js/admin/standard.js",
+    ],
     "admin/povertyInquiry": [
       "webpack-dev-server/client?http://127.0.0.1:80", // WebpackDevServer host and port
       "webpack/hot/only-dev-server",