import {Button,Row,Col,Icon,message} from 'antd'; import {WeaNewScroll,WeaTextarea,WeaSearchGroup ,WeaRichText,WeaLocaleProvider } from 'ecCom'; import {inject, observer} from "mobx-react"; import {toJS} from 'mobx'; import * as Util from '../../util/index' const getLabel = WeaLocaleProvider.getLabel; @observer export default class RelateExchange extends React.Component { constructor(props) { super(props); this.state ={ showGroup:true, richValue:"", status:"", "doc":"", "task":"", "crm":"", "workflow":"", "project":"", file:"" } } componentDidMount(){ } componentWillReceiveProps(nextProps) { } render() { const {showGroup,richValue} = this.state; const basicToolBar = { toolbar: [ { name: 'document', items: [ 'Source'] }, { name: 'styles', items: [ 'Format', 'Font', 'FontSize' ] }, { name: 'colors', items: [ 'TextColor' ] }, { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', ] }, ], extraPlugins: 'autogrow', height:150, autoGrow_minHeight: 150, autoGrow_maxHeight: 600, removePlugins: 'resize', }; // 顶部,底部工具栏扩展 const bottomBarConfig = [ { name: 'Browser', // 浏览按钮组件 show: {getLabel(857,"相关文档")}, // 使用组件库图标 type: '37', // 浏览按钮类型 文档 title: getLabel(58,"文档"), // 浏览按钮标题 }, { name: 'Browser', // 浏览按钮组件 show: {getLabel(1044,"相关流程")}, type: '152', // 浏览按钮类型 title: getLabel(18015,"流程"), // 浏览按钮标题 }, { name: 'Browser', show: {getLabel(783,"相关客户")}, type: '18', // 浏览按钮类型 title: getLabel(136,"客户"), // 浏览按钮标题 }, { name: 'Browser', show: {getLabel(782,"相关项目")}, type: '135', // 浏览按钮类型 title: getLabel(101,"项目"), // 浏览按钮标题 }, { name: 'Browser', show: {getLabel(33414,"相关任务")}, type: 'prjtsk', // 浏览按钮类型 --目前没有,等待开发 title: getLabel(1332,"任务"), // 浏览按钮标题 }, { name: 'Upload', // 上传组件 type: 'file', // 上传组件类型 show: {getLabel(156,"附件")+"("+getLabel(18642,"此目录下上传附件最大大小")+":5M)"}, // 使用 antd 图标 uploadUrl: (window.ecologyContentPath || '')+'/api/doc/upload/uploadFile?model=reply', // 上传地址 --目前没有,等待开发 category: (window.ecologyContentPath || '')+'/api/doc/upload/uploadFile?model=reply', // 文档目录 --目前没有,等待开发 maxUploadSize:5 }, { name: 'Component', style: {float: 'right'}, show: ( ) } ]; return (
{getLabel(1044,"相关交流")}
this.setState({showGroup:!showGroup})}/>
this.setState({richValue: v})} onStatusChange={s => this.setState({status: s})} onToolsChange={this.transfStr} />
{ //
// 相关交流 // // // //
// // }
) } transfStr = (name = '', ids = '', list = [], type = '') => { const {doc,task,workflow,crm,project,} = this.state; if(type == "37"){ }else if(type== "prjtsk"){ }else if(type== "18"){ }else if(type== "152"){ }else if(type== "135"){ }else if(type== "file"){ } let str = ''; const mirror = { 37: "doc", prjtsk: "task", 18: "crm", 152: "workflow", 135: "project", } list.map(item => { if(name === 'Upload' && type === 'image'){ str += '' } if(name === 'Upload' && type === 'file'){ str += (`${item.filename}
`) } if(name === 'Browser'){ str += ( `${item.name || item.showname}
`) } }) return str } handleSubmitExchange=()=>{ let { richValue} = this.state; let ckref = this.refs.prjRelateExchange; if (!ckref.checkMode()) { message.error(getLabel(27541,"请将编辑器切换到可视化模式")); return; } this.refs.prjRelateExchange.setData(''); } }