/* * @Author: lusx * @Date: 2020-03-12 16:47:08 * @Last Modified by: lusx * @Last Modified time: 2020-04-21 10:45:05 */ import { WeaLocaleProvider } from 'ecCom'; const getLabel = WeaLocaleProvider.getLabel; const toolbarfun = (visibleDialog) => ( [ // { name: 'document', items: ['Source'], type: 'simple' }, { name: 'document', items: ['Source'] ,type: 'fuza'}, { name: 'paragraph', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', '-', 'NumberedList', 'BulletedList'] ,type: 'fuza'}, { name: 'styles', items: ['Format', 'Font', 'FontSize'], type: 'fuza'}, { name: 'styles', items: ['FontSize'], type: 'simple' }, { name: 'colors', items: ['TextColor'] ,type: 'fuza'}, { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike',], type: 'simple'}, { name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike',], type: 'fuza'}, { name: 'basicstyles', items: ['Bold', 'Italic'] ,type: 'fuza'} ].filter(i => { if (visibleDialog === true) { return i.type === 'fuza' } else { return i.type === 'simple' } }) ) const mirror = { Document: { type: 37, name: getLabel(126529, "文档"), icon: 'icon-blog-Document' }, Flow: { type: 152, name: getLabel(131692, "流程"), icon: 'icon-blog-Process' }, Customer: { type: 18, name: getLabel(30043, "客户"), icon: 'icon-blog-Personnel' }, Project: { type: 135, name: getLabel(30046, "项目"), icon: 'icon-blog-Project' }, Task: { type: 'prjtsk', name: getLabel(383349, "任务"), icon: 'icon-blog-Task' }, } const objDocument = { name: 'Browser', show:
{mirror['Document'].name}
, type: mirror['Document'].type, title: mirror['Document'].name, }; const objFlow = { name: 'Browser', show:
{mirror['Flow'].name}
, type: mirror['Flow'].type, title: mirror['Flow'].name, }; const objCustomer = { name: 'Browser', show:
{mirror['Customer'].name}
, type: mirror['Customer'].type, title: mirror['Customer'].name, }; const objProject = { name: 'Browser', show:
{mirror['Project'].name}
, type: mirror['Project'].type, title: mirror['Project'].name, }; const objTask = { name: 'Browser', show:
{mirror['Task'].name}
, type: mirror['Task'].type, title: mirror['Task'].name, }; const upload = (params) => { const { exchangeList } = params; return { name: 'Upload', show:
{getLabel(128158, "附件")}
, uploadId: 'project_edit', uploadUrl: `${exchangeList.relateddoc.uploadUrl}?category=${exchangeList.relateddoc.category}`, category: exchangeList.relateddoc.category, maxUploadSize: exchangeList.relateddoc.maxSize, style: { display: "inline-block", padding: 0 } } } export { objDocument, objFlow, objCustomer, objProject, objTask, upload, toolbarfun }