提交 e7839b3a authored 作者: 姚鑫国's avatar 姚鑫国

在 window.smartFormGlobalProps.publicComponent 中新增组件方便后面需求行编辑使用

上级 cdd60bb4
import React from 'react';
import moment from 'moment';
import { Modal, message, notification, Tooltip, Spin, Popover, Popconfirm, Tag, Badge } from 'antd';
import {
Modal,
message,
notification,
Tooltip,
Spin,
Popover,
Popconfirm,
Tag,
Badge,
Input,
InputNumber,
Select,
Checkbox,
Radio,
DatePicker,
} from 'antd';
import md5 from 'js-md5';
import { giveFilePostDataInfoForTrue } from '@/webPublic/one_stop_public/Base16';
import {
......@@ -18,17 +34,16 @@ import {
renderContentRow,
downloadFile,
getListWord,
upObjKey
upObjKey,
} from './globalFunction';
import { getTransformApi } from '@/webPublic/one_stop_public/2022beidianke/localstorageTransform';
export function getSystemCode(){
export function getSystemCode() {
const systemCode = localStorage.getItem('antd-pro-type') || '';
const exp = new RegExp('/*', 'mg');
return systemCode.replace(exp, '');
}
export function giveSmartFormGlobalProps({
fromStart = false, // 是否是 发起申请
hasSingle = false,
......@@ -39,8 +54,6 @@ export function giveSmartFormGlobalProps({
nextUsers = {}, //
calculateFlowData = [], // 移动端使用 用于分块块 禅道 23933 移动端全表单后审核步骤的显示问题优化
}) {
window.smartFormGlobalProps = {
fromStart,
hasSingle,
......@@ -71,35 +84,21 @@ export function giveSmartFormGlobalProps({
md5,
remark: {
downloadFile: '下载文件函数.',
'giveFilePostDataInfoForTrue(params, url) ':
`将接口参数 二进制文件化 并返回新的接口地址与参数';`,
'getSpanJson(mergeKey, data, eliminateStr)':
`列表获取纵向合并数据 ;参数-> mergeKey : 需要合并的表头key data : 列表数据 eliminateStr : 需要忽略合并的数据`,
'getColumns(columns)':
`获取ant表头的属性 ;参数->columns : ant的表头`,
'getColumnsData({data, mergeKey, columns, styles, defect, fileName, ext , eliminateStr})':
`获取列表合并的数据;参数-> 前三个必填data, mergeKey, columns`,
'getCustomData({data, mergeKey, columnsList,columnsMerges,columnsKey, styles, defect, fileName, ext , eliminateStr})':
`获取列表合并的数据;参数-> 前五个个必填data, mergeKey, columnsList,columnsMerges,columnsKey`,
'getColumnsDataRealize({data, mergeKey, columns, styles, defect, fileName, ext , eliminateStr})':
`下载列表合并的数据;参数-> 前三个必填data, mergeKey, columns`,
'getCustomDataRealize({data, mergeKey,columnsList ,columnsMerges,columnsKey,bottomList,bottomMerges, styles, defect, fileName, ext , eliminateStr})':
`下载列表合并的数据;参数-> 前五个必填data, mergeKey,columnsList ,columnsMerges,columnsKey`,
'getColumnsSqlKeyRealize({sqlKey, columns, styles, fileName, ext})':
`下载列表表头合并的数据;参数->前两个必填sqlKey, columns`,
'getCustomSqlKeyRealize({sqlKey, columnsList,columnsMerges,columnsKey, styles, fileName, ext})':
`下载列表表头合并的数据;参数->前四个必填sqlKey, columnsList,columnsMerges,columnsKey`,
'getWord({templatePath,params, title, allValues, listConfig, ext})':
`下载文档地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`,
'getFileAndShow({templatePath,params, title, allValues, listConfig, ext})':
`下载一个文件并直接展示出来地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`,
'getListWord({templatePath,paramsList, title,sonTitleKey, allValuesKey, listConfig, ext,sonExt})':
`批量下载文档地址 ;参数->前五个必填 templatePath,paramsList, title,sonTitleKey, allValuesKey`,
'renderContentAll(value, row, index, key, spanData, cloumnNames) ':
`ant表头横向、纵向合并 ;参数->所有必填 value, row, index, key, spanData, cloumnNames 实例:render:(value, row, index)=>{return renderContentAll(value, row, index,"inst_name",spanData,cloumnNames)}`,
'renderContentRow(value, row, index, key, spanData, cloumnNames) ':
`ant表头纵向合并 ;参数->所有必填 value, row, index, key, spanData, cloumnNames 实例:render:(value, row, index)=>{return renderContentRow(value, row, index,"inst_name",spanData,cloumnNames)}`,
'getTransformApi': '接口转换函数用于一站式接口地址加密',
'giveFilePostDataInfoForTrue(params, url) ': `将接口参数 二进制文件化 并返回新的接口地址与参数';`,
'getSpanJson(mergeKey, data, eliminateStr)': `列表获取纵向合并数据 ;参数-> mergeKey : 需要合并的表头key data : 列表数据 eliminateStr : 需要忽略合并的数据`,
'getColumns(columns)': `获取ant表头的属性 ;参数->columns : ant的表头`,
'getColumnsData({data, mergeKey, columns, styles, defect, fileName, ext , eliminateStr})': `获取列表合并的数据;参数-> 前三个必填data, mergeKey, columns`,
'getCustomData({data, mergeKey, columnsList,columnsMerges,columnsKey, styles, defect, fileName, ext , eliminateStr})': `获取列表合并的数据;参数-> 前五个个必填data, mergeKey, columnsList,columnsMerges,columnsKey`,
'getColumnsDataRealize({data, mergeKey, columns, styles, defect, fileName, ext , eliminateStr})': `下载列表合并的数据;参数-> 前三个必填data, mergeKey, columns`,
'getCustomDataRealize({data, mergeKey,columnsList ,columnsMerges,columnsKey,bottomList,bottomMerges, styles, defect, fileName, ext , eliminateStr})': `下载列表合并的数据;参数-> 前五个必填data, mergeKey,columnsList ,columnsMerges,columnsKey`,
'getColumnsSqlKeyRealize({sqlKey, columns, styles, fileName, ext})': `下载列表表头合并的数据;参数->前两个必填sqlKey, columns`,
'getCustomSqlKeyRealize({sqlKey, columnsList,columnsMerges,columnsKey, styles, fileName, ext})': `下载列表表头合并的数据;参数->前四个必填sqlKey, columnsList,columnsMerges,columnsKey`,
'getWord({templatePath,params, title, allValues, listConfig, ext})': `下载文档地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`,
'getFileAndShow({templatePath,params, title, allValues, listConfig, ext})': `下载一个文件并直接展示出来地址 ;参数->前五个必填 templatePath,params, title, allValues, listConfig`,
'getListWord({templatePath,paramsList, title,sonTitleKey, allValuesKey, listConfig, ext,sonExt})': `批量下载文档地址 ;参数->前五个必填 templatePath,paramsList, title,sonTitleKey, allValuesKey`,
'renderContentAll(value, row, index, key, spanData, cloumnNames) ': `ant表头横向、纵向合并 ;参数->所有必填 value, row, index, key, spanData, cloumnNames 实例:render:(value, row, index)=>{return renderContentAll(value, row, index,"inst_name",spanData,cloumnNames)}`,
'renderContentRow(value, row, index, key, spanData, cloumnNames) ': `ant表头纵向合并 ;参数->所有必填 value, row, index, key, spanData, cloumnNames 实例:render:(value, row, index)=>{return renderContentRow(value, row, index,"inst_name",spanData,cloumnNames)}`,
getTransformApi: '接口转换函数用于一站式接口地址加密',
'upObjKey({}/[{}],{lodKey:newKey})': '用于修改对象或数组对象KEY',
md5: 'md5加密函数',
},
......@@ -117,6 +116,12 @@ export function giveSmartFormGlobalProps({
moment,
Tag,
Badge,
Input,
InputNumber,
Select,
Checkbox,
Radio,
DatePicker,
},
routePath: window.location.href.split('#')[1],
systemCode: getSystemCode(),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论