Commit 07038a22 authored by 陈龙's avatar 陈龙

fix: 修复函数未引用导致的bug

parent 7bc835a7
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
"test": "echo \"Error: run tests from root\" && exit 1" "test": "echo \"Error: run tests from root\" && exit 1"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.17.9" "@babel/runtime": "^7.17.9",
"@wisdom-components/basictable": "^1.5.25"
} }
} }
import style from '../ReportsManage.less'; import style from '../ReportsManage.less';
import extraComponents from '../extra/extraComponents'; import extraComponents from '../extra/extraComponents';
import moment from 'moment'; import moment from 'moment';
import { Tag } from 'antd'; import {Tag} from 'antd';
import { hasMoney, isNumber } from './utils'; import {hasMoney, isNumber, returnHandledNumber} from './utils';
import { tagColors, tagBackgroundColors } from './constant'; import {tagColors, tagBackgroundColors} from './constant';
/** /**
* @params: config下的数值的configRule结构如下,[{最大值: 10,最小值: 0,颜色:'#AAAAAA'}]; * @params: config下的数值的configRule结构如下,[{最大值: 10,最小值: 0,颜色:'#AAAAAA'}];
...@@ -17,7 +17,8 @@ import { tagColors, tagBackgroundColors } from './constant'; ...@@ -17,7 +17,8 @@ import { tagColors, tagBackgroundColors } from './constant';
const clickLink = (config) => { const clickLink = (config) => {
return window.open(config.configItems, '_blank'); return window.open(config.configItems, '_blank');
}; };
const handleUrl = (allWidgets, config) => {}; const handleUrl = (allWidgets, config) => {
};
const handleConfigUrl = (config, record) => { const handleConfigUrl = (config, record) => {
let _configs = config.configItems.split('|'); let _configs = config.configItems.split('|');
// type = 替换|跳转; // type = 替换|跳转;
...@@ -44,7 +45,7 @@ const handleConfigUrl = (config, record) => { ...@@ -44,7 +45,7 @@ const handleConfigUrl = (config, record) => {
_url = _urlArray[0]; _url = _urlArray[0];
} }
}); });
return { url: _url, type: _type, params: _params }; return {url: _url, type: _type, params: _params};
}; };
const clickWidget = (config, text, record, showComponents, setDetailsConfig) => { const clickWidget = (config, text, record, showComponents, setDetailsConfig) => {
// 功能跳转接口 // 功能跳转接口
...@@ -118,7 +119,7 @@ export const handleNumber = (config, number) => { ...@@ -118,7 +119,7 @@ export const handleNumber = (config, number) => {
> >
{returnHandledNumber(config.configItems, number)} {returnHandledNumber(config.configItems, number)}
</span> </span>
<span className={style.prefixOrSuffix} style={{ color: _color }}> <span className={style.prefixOrSuffix} style={{color: _color}}>
{config.suffix || ''} {config.suffix || ''}
</span> </span>
</span> </span>
...@@ -218,7 +219,7 @@ const mapTag = (map, key) => { ...@@ -218,7 +219,7 @@ const mapTag = (map, key) => {
} }
}; };
export const handleText = (config, text) => { export const handleText = (config, text) => {
return <span style={{ color: config.color || 'rgba(0,0,0,.85)' }}>{text}</span>; return <span style={{color: config.color || 'rgba(0,0,0,.85)'}}>{text}</span>;
}; };
export const handleLink = (config, text) => { export const handleLink = (config, text) => {
return ( return (
...@@ -236,7 +237,7 @@ export const handleLink = (config, text) => { ...@@ -236,7 +237,7 @@ export const handleLink = (config, text) => {
export const handleWidget = (config, text, record, showComponents, setDetailsConfig) => { export const handleWidget = (config, text, record, showComponents, setDetailsConfig) => {
return ( return (
<span <span
style={{ color: config.color }} style={{color: config.color}}
className={style.link} className={style.link}
onClick={() => clickWidget(config, text, record, showComponents, setDetailsConfig)} onClick={() => clickWidget(config, text, record, showComponents, setDetailsConfig)}
> >
...@@ -248,7 +249,7 @@ export const handleModal = (config, text, showModal, setExtra) => { ...@@ -248,7 +249,7 @@ export const handleModal = (config, text, showModal, setExtra) => {
return ( return (
<span <span
className={style.link} className={style.link}
style={{ color: config.color || 'rgba(0,0,0,.85)' }} style={{color: config.color || 'rgba(0,0,0,.85)'}}
onClick={() => clickModal(config, showModal, setExtra)} onClick={() => clickModal(config, showModal, setExtra)}
> >
{text} {text}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment