123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062 |
- import React from 'react';
- import ReactDom from 'react-dom';
- import ajax from 'jquery/src/ajax/xhr.js';
- import $ from 'jquery/src/ajax';
- import './content.less';
- import { Form,Radio, Icon, Button, Input, Select, Spin, Table, Switch, message, DatePicker, Modal, Upload,Popconfirm,AutoComplete } from 'antd';
- import {patternOrganization,conditionOrganization,client,stick,auditStatusL,industry } from '../../../dataDic.js';
- import {getPattern,getAchievementCategory,getboutique,getClient,getSocialAttribute,getCertification,getAuditStatus,getWhether,getStick,getIndustry} from '../../../tools.js';
- const Organization=Form.create()(React.createClass({
- loadData(pageNo) {
- this.state.data = [];
- this.setState({
- loading: true,
- ispage:pageNo,
- });
- let nameText=this.state.SuperArr;
- let superText=(this.state.superId)?nameText[parseInt(this.state.superId)].id:undefined;
- let nameTexts=this.state.SuperArrs;
- let superTexts=(this.state.publishPage)?nameTexts[parseInt(this.state.publishPage)].id:undefined;
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/expert/listPublish',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- name: this.state.name, //成果名称
- publishPlatform:superText,//发布子平台
- publishClient:this.state.publishClient,//发布客户端
- publishPage:superTexts,//发布页面
- ifTop:this.state.ifTop,//是否置顶
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !data.data.list) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for (let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: i,
- id: thisdata.id,//发布成果ID
- achievementId:thisdata.expertId,//成果ID
- publishPlatform:thisdata.publishPlatform,//发布子平台ID
- platformName:thisdata.platformName,//发布子平台
- publishClient:thisdata.publishClient.toString(),//发布客户端
- publishPage:thisdata.publishPage,//发布页面
- publishPageName:thisdata.publishPageName,//发布页面
- ifTop:thisdata.ifTop.toString(),//是否置顶
- industry:thisdata.industry,//行业
- topNumber:thisdata.topNumber,//置顶编号
- showNumber:thisdata.showNumber,//显示编号
- publisher:thisdata.publisher,//发布人ID
- publishTime:thisdata.publishTime,//发布时间
- name:thisdata.name,//成果名称
- publisherName:thisdata.publisherName,//发布人名称
- publishTimeFormattedDate:thisdata.publishTimeFormattedDate,//发布时间
- });
- };
- this.state.pagination.current = data.data.pageNo;
- this.state.pagination.total = data.data.totalCount;
- };
- if(data.data&&data.data.list&&!data.data.list.length){
- this.state.pagination.current=0
- this.state.pagination.total=0
- };
- this.setState({
- dataSource: theArr,
- pagination: this.state.pagination
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- loadDatas(pageNo, apiUrl) {
- this.state.data = [];
- this.setState({
- loading: true,
- });
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/customer/listAllPersonalCustomer',
- data: {
- pageNo: pageNo || 1,
- pageSize: this.state.pagination.pageSize,
- expertAudit:2,
- type: this.state.typeSearch, //名称1
- name: this.state.nameSearch,
- status: this.state.statusSearch,
- industry: this.state.industrySearch,
- businessAudit: this.state.serviceCertificationSearch,
- auditStatus: this.state.userCertificationSearch,
- currentMemberStatus: this.state.currentMemberStatusSearch,
- lvl: this.state.lvlSearch,
- listed: this.state.listedSearch, //是否上市
- highTechZone: this.state.highTechZoneSearch, //是否高新
- startDate: this.state.releaseDate[0],
- endDate: this.state.releaseDate[1],
- isMember: this.state.isMemberSearch,
- international: this.state.internationalSearch,
- celebrity: this.state.celebritySearch,
- expert: this.state.expertSearch,
- industry: this.state.industrySearch,
- shareType: this.state.shareTypeSearch,
- },
- success: function(data) {
- let theArr = [];
- if(data.error.length || data.data.list == "") {
- if(data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- } else {
- for(let i = 0; i < data.data.list.length; i++) {
- let thisdata = data.data.list[i];
- theArr.push({
- key: thisdata.uid,
- id: thisdata.uid,
- type: thisdata.type,
- name: thisdata.name,
- status: thisdata.status,
- contacts: thisdata.contacts,
- contactMobile: thisdata.contactMobile,
- industry: thisdata.industry,
- createTime: thisdata.createTime,
- businessAudit: thisdata.businessAudit,
- auditStatus: thisdata.auditStatus,
- lvl: thisdata.lvl,
- shareType: thisdata.shareType,
- isMember: thisdata.isMember,
- consultant: thisdata.consultant,
- societyTag: thisdata.societyTag,
- currentMemberStatus: thisdata.currentMemberStatus,
- international: thisdata.international,
- listed: thisdata.listed,
- international: thisdata.international,
- expert: thisdata.expert,
- celebrity: thisdata.celebrity,
- adminName: thisdata.adminName,
- releaseStatus: thisdata.releaseStatus,
- highTechZone: thisdata.highTechZone,
- locationProvince: thisdata.province ? thisdata.province + '-' + thisdata.city || '' + '-' + thisdata.area : '--'
- });
- };
- this.state.paginations.current = data.data.pageNo ;
- this.state.paginations.total = data.data.totalCount ;
- };
- this.setState({
- dataSourcesli: theArr,
- paginations: this.state.paginations,
- selectedRowKeys:[]
- });
- }.bind(this),
- }).always(function() {
- this.setState({
- loading: false,
- visible: true
- });
- }.bind(this));
- },
- getInitialState() {
- return {
- searchMore: true,
- selectedRowKeys: [],
- selectedRowKeysli:[],
- selectedRows: [],
- releaseDate: [],
- releaseDateS: [],
- loading: false,
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- paginations: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadDatas(page);
- }.bind(this),
- showTotal: function (total) {
- return '共' + total + '条数据';
- }
- },
- columns: [
- {
- title: '专家名称',
- dataIndex: 'name',
- key: 'name',
- },{
- title: '行业',
- dataIndex: 'industry',
- key: 'industry',
- render: text => { return getIndustry(text) }
- }, {
- title: '发布子平台',
- dataIndex: 'platformName',
- key: 'platformName',
- },{
- title: '发布客户端',
- dataIndex: 'publishClient',
- key: 'publishClient',
- render: text => { return getClient(text) }
- }, {
- title: '发布页面',
- dataIndex: 'publishPageName',
- key: 'publishPageName',
- },{
- title: '是否置顶',
- dataIndex: 'ifTop',
- key: 'ifTop',
- render: text => { return getStick(text) }
- }, {
- title: '展示序号',
- dataIndex: 'showNumber',
- key: 'showNumber',
- }, {
- title: '置顶序号',
- dataIndex: 'topNumber',
- key: 'topNumber',
- }, {
- title: '发布人',
- dataIndex: 'publisherName',
- key: 'publisherName',
- }, {
- title: '发布时间',
- dataIndex: 'publishTimeFormattedDate',
- key: 'publishTimeFormattedDate',
- }, {
- title: '操作',
- dataIndex: 'ee',
- key: 'ee',
- render: (text, record, index) => {
- return <div>
- <Popconfirm title={'请确认撤销发布专家【'+record.name+'】'} onConfirm={(e)=>{this.examine(record)}} okText="确认" cancelText="取消">
- <Button style={{marginRight:'5px'}} onClick={(e) =>{ e.stopPropagation()}} type="danger">撤销发布</Button>
- </Popconfirm>
- </div>
- }
- }
- ],
- dataSource: [],
- searchTime: [,],
- column: [{
- title: '专家姓名',
- dataIndex: 'name',
- key: 'name',
- },
- {
- title: '公共客户',
- dataIndex: 'shareType',
- key: 'shareType',
- render: (text, record) => { return record.shareType == '1' ? <span>公共客户</span> : <span>个人客户</span> }
- },
- {
- title: '行业',
- dataIndex: 'industry',
- key: 'industry',
- },
- {
- title: '社会性质',
- dataIndex: 'societyTag',
- key: 'societyTag',
- render: text => { return getSocialAttribute(text) }
- },
- {
- title: '创建时间',
- dataIndex: 'createTime',
- key: 'createTime',
- },{
- title: '所属人',
- dataIndex: 'adminName',
- key: 'adminName',
- },
- {
- title: '业务认证',
- dataIndex: 'businessAudit',
- key: 'businessAudit',
- render: text => { return getCertification(text) }
- },
- {
- title: '实名认证',
- dataIndex: 'auditStatus',
- key: 'auditStatus',
- render: text => { return getAuditStatus(text) }
- },
- {
- title: '是否国际',
- dataIndex: 'international',
- key: 'international',
- render: text => { return getWhether(text) }
- }
- ],
- dataSourcesli: [],
- searchTime: [,]
- };
- },
- componentWillMount() {
- this.selectSuperIds();
- //行业
- let intentionalArr = [];
- industry.map(function(item) {
- intentionalArr.push(
- <Select.Option value={item.value} key={item.key}>{item.key}</Select.Option>
- )
- });
- this.state.intentionalOption = intentionalArr;
- },
- examine(record) {
- this.setState({
- selectedRowKeys: [],
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + '/api/admin/expert/deletePublish',
- data: {
- id:record.id,
- }
- }).done(function (data) {
- if (!data.error.length) {
- message.success('操作成功');
- this.setState({
- loading: false,
- });
- } else {
- message.warning(data.error[0].message);
- };
- this.loadData(this.state.ispage);
- }.bind(this));
- },
- //获取发布子平台
- selectSuperId() {
- this.state.data = []
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/achievement/getBranchInformation",
- data:{
- },
- success: function (data) {
- let theArr = [];
- let thedata=data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thedata = {};
- };
- var contactIds=[];
- for(var i=0;i<data.data.length;i++){
- let theData = data.data[i];
- theArr.push(
- <Select.Option value={i.toString()} key={theData.platformName}>{theData.platformName}</Select.Option>
- );
- };
- this.setState({
- SuperArr:thedata,
- contactsOption: theArr,
- orderStatusOptions:data.data,
- });
- }.bind(this),
- }).always(function () {
- this.loadData();
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //获取发布页面
- selectSuperIds() {
- this.state.data = []
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/expert/getPublishPage",
- data:{
- },
- success: function (data) {
- let theArr = [];
- let thedata=data.data;
- if (!thedata) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- };
- thedata = {};
- };
- var contactIds=[];
- for(var i=0;i<data.data.length;i++){
- let theData = data.data[i];
- theArr.push(
- <Select.Option value={i.toString()} key={theData.name}>{theData.name}</Select.Option>
- );
- };
- this.setState({
- SuperArrs:thedata,
- contactsOptions: theArr,
- orderStatusOptions:data.data,
- });
- }.bind(this),
- }).always(function () {
- this.selectSuperId();
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //编辑部门,保存
- edithandleSubmit(e){
- e.preventDefault();
- if(!this.state.editifTop){
- message.warning('请确认是否置顶');
- return false;
- }
- let topNumbers=(this.state.edittopNumber==9999999)?undefined:this.state.edittopNumber;
- topNumbers=topNumbers?topNumbers:undefined;
- if(this.state.editifTop==0){
- if(!topNumbers){
- message.warning('请输入置顶序号');
- return false;
- }
- let b=this.state.edittopNumber.toString().split('');
- for(var i=0;i<b.length;i++){
- if(parseInt(b[i]).toString()=='NaN'){
- message.warning('置顶序号请输入数字');
- return false;
- };
- }
- }else{
- if(topNumbers){
- message.warning('请清空置顶序号');
- return false;
- }
- if(!this.state.editshowNumber){
- message.warning('请输入展示序号');
- return false;
- }
- let b=this.state.editshowNumber.toString().split('');
- for(var i=0;i<b.length;i++){
- if(parseInt(b[i]).toString()=='NaN'){
- message.warning('展示序号请输入数字');
- return false;
- };
- }
- }
- //上级组织字典
- let nameText=this.state.SuperArr;
- let nameTexts=this.state.SuperArrs;
- let superText=(parseInt(this.state.editpublishPlatform).toString()=='NaN')?undefined:nameText[parseInt(this.state.editpublishPlatform)].id;
- let superTexts=(parseInt(this.state.editpublishPage).toString()=='NaN')?undefined:nameTexts[parseInt(this.state.editpublishPage)].id;
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/expert/updatePublish',
- data:{
- id:this.state.editid,//成果发布ID
- expertId:this.state.editachievementId, //成果ID
- publishPlatform:superText,//发布平台
- publishClient:this.state.editpublishClient,//发布客户端
- publishPage:superTexts,//发布页面
- ifTop:this.state.editifTop,//是否置顶
- topNumber:topNumbers,//置顶序号
- showNumber:this.state.editshowNumber,//展示序号
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('保存成功!');
- this.edithandleCancel();
- this.selectSuperId();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- },
- //整行点击
- tableRowClick(record, index) {
- this.selectSuperIds();
- this.state.RowData = record;
- this.setState({
- editvisible: true,
- selectedRowKeys:[],
- editid:record.id,
- editachievementId:record.achievementId,
- editpublishPlatform:record.platformName,
- editpublishClient:record.publishClient,
- editpublishPage:record.publishPageName,
- editifTop:record.ifTop,
- edittopNumber:record.topNumber,
- editshowNumber:record.showNumber,
- editserialNumber:record.serialNumber,
- editname:record.name,
- edituserName:record.userName,
- })
- },
- //新增一个部门,保存
- addhandleSubmit(e){
- e.preventDefault();
- if(!this.state.publishPlatform){
- message.warning('请选择发布子平台');
- return false;
- }
- if(!this.state.publishClient){
- message.warning('请选择发布客户端');
- return false;
- }
- if(!this.state.publishPage){
- message.warning('请选择发布页面');
- return false;
- }
- if(!this.state.ifTop){
- message.warning('请确认是否置顶');
- return false;
- }
- if(this.state.ifTop==0){
- if(!this.state.topNumber){
- message.warning('请输入置顶序号');
- return false;
- }
- let b=this.state.topNumber.split('');
- for(var i=0;i<b.length;i++){
- if(parseInt(b[i]).toString()=='NaN'){
- message.warning('置顶序号请输入数字');
- return false;
- };
- }
- }else{
- if(this.state.topNumber){
- message.warning('请清空置顶序号');
- return false;
- }
- if(!this.state.showNumber){
- message.warning('请输入展示序号');
- return false;
- }
- let b=this.state.showNumber.split('');
- for(var i=0;i<b.length;i++){
- if(parseInt(b[i]).toString()=='NaN'){
- message.warning('展示序号请输入数字');
- return false;
- };
- }
- }
- this.props.form.validateFields((err, values) => {
- if (!err) {
- this.setState({
- loading: true
- });
- let nameText=this.state.SuperArr;
- let superText=nameText[parseInt(this.state.publishPlatform)].id;
- let nameTexts=this.state.SuperArrs;
- let superTexts=nameTexts[parseInt(this.state.publishPage)].id;
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url:globalConfig.context + '/api/admin/expert/addExpertPublish',
- data:{
- ExpertId:this.state.selectedRowKeysli?this.state.selectedRowKeysli.join(","):undefined,//成果ID
- publishPlatform:superText,//发布平台
- publishClient:this.state.publishClient,//发布客户端
- publishPage:superTexts, //发布页面
- ifTop:this.state.ifTop,//是否置顶
- topNumber:this.state.topNumber,//置顶序号
- showNumber:this.state.showNumber,//展示序号
- }
- }).done(function (data) {
- this.setState({
- loading: false
- });
- if (!data.error.length) {
- message.success('保存成功!');
- this.handleCancel();
- this.reset();
- } else {
- message.warning(data.error[0].message);
- }
- }.bind(this));
- }
- });
- },
- //主管初始加载(自动补全)
- supervisor(e){
- $.ajax({
- method: "post",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/organization/selectName",
- data:{
- name: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({
- customerArr:thedata,
- });
- }.bind(this),
- }).always(function () {
- this.setState({
- loading: false
- });
- }.bind(this));
- },
- //上级主管输入框失去焦点是判断客户是否存在
- selectAuto(value,options){
- this.setState({
- managerIdOrganization:value
- })
- },
- //失去焦点时
- blurChange(e){
- // let theType='';
- // let contactLists=this.state.customerArr||[];
- // if (e) {
- // contactLists.map(function (item) {
- // if (item.name == e.toString()) {
- // theType = item.id;
- // }
- // });
- // }
- this.setState({
- theTypes:e
- })
- },
- //值改变时请求客户名称
- httpChange(e){
- if(e.length>=2){
- this.supervisor(e);
- }
- this.setState({
- managerIdOrganization:e
- })
- },
- addClick() {
- this.state.name = undefined;//成果名称清零
- this.state.publishPlatform = undefined;//发布子平台清零
- this.state.publishClient = undefined;//发布客户端清零
- this.state.publishPage = undefined;//发布页面清零
- this.state.ifTop = undefined;//是否置顶清零
- this.state.topNumber = undefined;//置顶序号清零
- this.state.showNumber = undefined;//展示序号清零
- this.state.selectedRowKeysli=undefined;//选定的成果ID清零
- this.state.RowData = {};
- this.selectSuperId();
- this.loadDatas();
- },
- editClick() {
- this.state.RowData = {};
- this.setState({
- editvisible: true
- });
- },
- handleCancel() {
- this.setState({ visible: false })
- },
- edithandleCancel() {
- this.setState({ editvisible: false })
- },
- search() {
- this.loadData();
- },
- searchs() {
- this.loadDatas();
- },
- //把搜索的部分置零
- reset() {
- this.state.name = undefined;//成果名称清零
- this.state.superId = undefined;//发布子平台清零
- this.state.publishClient = undefined;//发布客户端清零
- this.state.publishPage = undefined;//发布页面清零
- this.state.ifTop = undefined;//是否置顶清零
- this.selectSuperId();
- },
- resets() {
- this.state.expertSearch = undefined;
- this.state.celebritySearch = undefined;
- this.state.shareTypeSearch = undefined;
- this.state.typeSearch = undefined; //名称1
- this.state.nameSearch = '';
- this.state.addressSearch = [];
- this.state.provinceSearch = undefined;
- this.state.citySearch = undefined;
- this.state.statusSearch = undefined;
- this.state.contactsSearch = undefined;
- this.state.contactMobileSearch = undefined;
- this.state.industrySearch = undefined;
- this.state.serviceCertificationSearch = undefined;
- this.state.userCertificationSearch = undefined;
- this.state.currentMemberStatusSearch = undefined;
- this.state.lvlSearch = undefined;
- this.state.listedSearch = undefined;
- this.state.highTechZoneSearch = undefined;
- this.state.releaseDate[0] = undefined;
- this.state.releaseDate[1] = undefined;
- this.loadDatas();
- },
- searchSwitch() {
- this.setState({
- searchMore: !this.state.searchMore
- });
- },
- render() {
- const FormItem = Form.Item
- const rowSelection = {
- selectedRowKeys: this.state.selectedRowKeys,
- onChange: (selectedRowKeys, selectedRows) => {
- this.setState({
- selectedRows: selectedRows.slice(-1),
- selectedRowKeys: selectedRowKeys.slice(-1)
- });
- },
- onSelect: (recordt, selected, selectedRows) => {
- this.setState({
- recordt:recordt.id
- })
- },
- };
- const rowSelections = {
- selectedRowKeysli: this.state.selectedRowKeysli,
- onChange: (selectedRowKeysli, selectedRows) => {
- this.setState({
- selectedRows: selectedRows,
- selectedRowKeysli: selectedRowKeysli
- });
- },
- onSelect: (recordt, selected, selectedRows) => {
- this.setState({
- recordt:recordt.id
- })
- },
- };
- const formItemLayout = {
- labelCol: { span: 8 },
- wrapperCol: { span: 14 },
- };
- const { getFieldDecorator } = this.props.form;
- const hasSelected = this.state.selectedRowKeys.length > 0;
- const { RangePicker } = DatePicker;
- const dataSources=this.state.customerArr || [];
- const options = dataSources.map((group,index) =>
- <Option key={index} value={group.name}>{group.name}</Option>
- )
- return (
- <div className="user-content" >
- <div className="content-title">
- <div className="user-search">
- <Input placeholder="专家名称" style={{width:'150px',marginRight:'10px',marginBottom:'10px'}}
- value={this.state.name}
- onChange={(e) => { this.setState({ name: e.target.value }); }} />
- <Select placeholder="发布子平台"
- style={{ width:'200px',marginRight:'10px' }}
- value={this.state.superId}
- onChange={(e) => { this.setState({ superId: e }) }} notFoundContent="未获取到上级组织列表">
- {this.state.contactsOption}
- </Select>
- <Select placeholder="发布客户端"
- style={{width:'150px',marginRight:'20px'}}
- value={this.state.publishClient}
- onChange={(e) => { this.setState({ publishClient: e }) }}>
- <Select.Option value="0" >网站</Select.Option>
- <Select.Option value="1" >APP</Select.Option>
- </Select>
- <Button type="primary" onClick={this.search} style={{marginRight:'10px'}}>搜索</Button>
- <Button onClick={this.reset} style={{marginRight:'10px'}}>重置</Button>
- <span style={{marginRight:'20px'}}>更多搜索 <Switch defaultChecked={false} onChange={this.searchSwitch} /></span>
- <div style={this.state.searchMore ? { display: 'none' } : {display: 'inline-block'}}>
- <Select placeholder="发布页面"
- style={{ width:'200px',marginRight:'10px' }}
- value={this.state.publishPage}
- onChange={(e) => { this.setState({ publishPage: e }) }} notFoundContent="未获取到发布页面">
- {this.state.contactsOptions}
- </Select>
- <Select placeholder="是否置顶"
- style={{width:'150px',marginRight:'50px'}}
- value={this.state.ifTop}
- onChange={(e) => { this.setState({ ifTop: e }) }}>
- <Select.Option value="0" >置顶</Select.Option>
- <Select.Option value="1" >不置顶</Select.Option>
- </Select>
- </div>
- <Button type="primary" className="addButton" onClick={this.addClick} style={{marginBottom:'10px'}}>发布专家<Icon type="plus" /></Button>
- </div>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.columns}
- dataSource={this.state.dataSource}
- rowSelection={rowSelection}
- style={{
- cursor: 'pointer',
- }}
- pagination={this.state.pagination}
- onRowClick={this.tableRowClick} />
- </Spin>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.visible}
- onOk={this.checkPatentProcess} onCancel={this.handleCancel}
- width='1200px'
- title='发布专家'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.addhandleSubmit} id="add-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="发布子平台"
- >
- <Select placeholder="请选择子平台" value={this.state.publishPlatform} onChange={(e)=>{this.setState({publishPlatform:e})}}
- notFoundContent="未获取到子平台">
- {this.state.contactsOption}
- </Select>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="发布客户端"
- >
- <Select placeholder="选择客户端" value={this.state.publishClient}
- onChange={(e)=>{this.setState({publishClient:e})}}>
- {
- client.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="发布页面位置"
- >
- <Select placeholder="请选择页面位置" value={this.state.publishPage} onChange={(e)=>{this.setState({publishPage:e})}}
- notFoundContent="未获取到页面位置">
- {this.state.contactsOptions}
- </Select>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="是否置顶"
- >
- <Select placeholder="选择是否置顶" value={this.state.ifTop}
- onChange={(e)=>{this.setState({ifTop:e})}}>
- {
- stick.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12 }}
- label="置顶序号" >
- <Input placeholder="请输入置顶序号" value={this.state.topNumber}
- onChange={(e)=>{this.setState({topNumber:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 7 }}
- wrapperCol={{ span: 12}}
- label="展示序号" >
- <Input placeholder="请输入展示序号" value={this.state.showNumber}
- onChange={(e)=>{this.setState({showNumber:e.target.value})}}/>
- </FormItem>
- </div>
- <div className="user-search">
- <Input placeholder="专家姓名" style={{"width":"150px","display":"inlineBlock","marginRight":"10px",'marginBottom':"5px"}}
- value={this.state.nameSearch}
- onChange={(e) => { this.setState({ nameSearch: e.target.value }); }} />
- <Select placeholder="行业" style={{"width":"150px","display":"inlineBlock","marginRight":"10px"}}
- value={this.state.industrySearch}
- onChange={(e) => { this.setState({ industrySearch: e }) }}>
- {this.state.intentionalOption}
- </Select>
- <Select placeholder="实名认证" style={{"width":"130px","display":"inlineBlock","marginRight":"10px"}}
- value={this.state.userCertificationSearch}
- onChange={(e) => { this.setState({ userCertificationSearch: e }) }}>
- {
- auditStatusL.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- <Select placeholder="国际" style={{"width":"100px","display":"inlineBlock","marginRight":"10px"}}
- value={this.state.internationalSearch}
- onChange={(e) => { this.setState({ internationalSearch: e }) }}>
- <Select.Option value="0" >否</Select.Option>
- <Select.Option value="1" >是</Select.Option>
- </Select>
- <span style={{"marginRight":"5px"}}>创建时间 :</span>
- <RangePicker style={{"marginRight":"10px"}}
- value={[this.state.releaseDate[0] ? moment(this.state.releaseDate[0]) : null,
- this.state.releaseDate[1] ? moment(this.state.releaseDate[1]) : null]}
- onChange={(data, dataString) => { this.setState({ releaseDate: dataString }); }} />
- <Button type="primary" onClick={this.searchs} style={{"display":"inlineBlock",'marginRight':'10px'}}>搜索</Button>
- <Button onClick={this.resets} style={{"display":"inlineBlock"}}>重置</Button>
- </div>
- <div className="patent-table">
- <Spin spinning={this.state.loading}>
- <Table columns={this.state.column}
- dataSource={this.state.dataSourcesli}
- rowSelection={rowSelections}
- pagination={this.state.paginations}
- />
- </Spin>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
- <Button className="set-submit" type="ghost" onClick={this.handleCancel} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- <div className="patent-desc">
- <Modal maskClosable={false} visible={this.state.editvisible}
- onOk={this.checkPatentProcess} onCancel={this.edithandleCancel}
- width='1200px'
- title='编辑发布'
- footer=''
- className="admin-desc-content">
- <Form horizontal onSubmit={this.edithandleSubmit} id="edit-form">
- <Spin spinning={this.state.loading}>
- <div className="clearfix">
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="发布子平台"
- >
- <Select placeholder="请选择子平台" value={this.state.editpublishPlatform} onChange={(e)=>{this.setState({editpublishPlatform:e})}}
- notFoundContent="未获取到子平台">
- {this.state.contactsOption}
- </Select>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="发布客户端"
- >
- <Select placeholder="选择客户端" value={this.state.editpublishClient}
- onChange={(e)=>{this.setState({editpublishClient:e})}}>
- {
- client.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="发布页面位置"
- >
- <Select placeholder="请选择页面位置" value={this.state.editpublishPage} onChange={(e)=>{this.setState({editpublishPage:e})}}
- notFoundContent="未获取到页面位置">
- {this.state.contactsOptions}
- </Select>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="是否置顶"
- >
- <Select placeholder="选择是否置顶" value={this.state.editifTop}
- onChange={(e)=>{this.setState({editifTop:e})}}>
- {
- stick.map(function (item) {
- return <Select.Option key={item.value} >{item.key}</Select.Option>
- })
- }
- </Select>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12 }}
- label="置顶序号" >
- <Input placeholder="请输入置顶序号" value={this.state.edittopNumber}
- onChange={(e)=>{this.setState({edittopNumber:e.target.value})}}/>
- </FormItem>
- <FormItem className="half-item"
- labelCol={{ span: 6 }}
- wrapperCol={{ span: 12}}
- label="展示序号" >
- <Input placeholder="请输入展示序号" value={this.state.editshowNumber}
- onChange={(e)=>{this.setState({editshowNumber:e.target.value})}}/>
- </FormItem>
- </div>
- <div className="clearfix">
- <FormItem
- labelCol={{ span: 3 }}
- wrapperCol={{ span: 18 }}
- label="专家名称"
- >
- <span>{this.state.editname}</span>
- </FormItem>
- </div>
- <FormItem wrapperCol={{ span: 12, offset: 7 }}>
- <Button className="set-submit" type="primary" htmlType="submit">保存</Button>
- <Button className="set-submit" type="ghost" onClick={this.edithandleCancel} style={{marginLeft:'100px'}}>取消</Button>
- </FormItem>
- </Spin>
- </Form >
- </Modal>
- </div>
- </div>
- </div>
- );
- }
- }));
- export default Organization;
|