/* * @Author: lusx * @Date: 2020-03-12 17:10:05 * @Last Modified by: lusx * @Last Modified time: 2020-04-20 17:01:46 */ import { Button } from 'antd'; import { WeaLocaleProvider } from 'ecCom'; import _ from 'lodash'; const getLabel = WeaLocaleProvider.getLabel; import { objDocument, objFlow, objCustomer, objProject, objTask, upload, toolbarfun } from './configUtil'; const ckConfig = (visibleDialog) => { const height = visibleDialog ? (window.screen.width>=1920?600 - 31:400 - 31) : 50; const autoGrow_minHeight = visibleDialog ? (window.screen.width>=1920?600 - 31:400 - 31) : 150; const autoGrow_maxHeight = visibleDialog ? (window.screen.width>=1920?600 - 31:400 - 31) : 160; const toolbar = toolbarfun(visibleDialog); return { toolbar: toolbar, extraPlugins: 'autogrow', height: height, autoGrow_minHeight: autoGrow_minHeight, autoGrow_maxHeight: autoGrow_maxHeight, removePlugins: 'resize', uploadUrl: (window.ecologyContentPath || '')+'/api/doc/upload/uploadFile?model=reply', } } const bottomBarRight = (submitfun, loading="false",fun) => { return { Component:
} }; const bottomBarConfig = (params, fun) => { const { exchangeList = {}, type } = params; const barConfig1 = [{ name: 'Component', show: {getLabel('518320','全屏编辑')}, }]; let barConfig2 = []; if (Object.keys(exchangeList).length > 0) { exchangeList.docids && barConfig2.push(objDocument);//相关文档 exchangeList.relatedwf && barConfig2.push(objFlow);//相关流程 exchangeList.relatedcus && barConfig2.push(objCustomer);//相关客户 exchangeList.projectids && barConfig2.push(objProject);//相关项目 exchangeList.relatedprj && barConfig2.push(objTask);//相关任务 exchangeList.relateddoc && barConfig2.push(upload({ exchangeList })); } return _.get({ 'simple': barConfig1, 'complex': barConfig2 }, type) } export { ckConfig, bottomBarRight, bottomBarConfig }