Commit 372c06f3 authored by 陈龙's avatar 陈龙

fix: 删除无效引用

parent 77ea9495
/**
** 用来动态加载配置的组件功能函数
** create by ChenLong on 2022/7/28
** @Params: url 功能路径,加载需要的业务组件
** onCancel 从详情组件回到当前功能的函数
** params 其他的必要参数
** 功能路径:src\pages\product\ReportsManage\extra\detailsComponent.js
** 菜单参数列表:*变量名*(变量说明,数据类型,是否必填,取值范围)
**/
import React from 'react';
import { Button } from 'antd';
const DetailsComponent = ({ url, onCancel, params }) => {
const BusinessComponent = React.lazy(() => import(`@/pages/${url}`));
return <BusinessComponent onCancel={onCancel} {...params} />;
};
export default DetailsComponent;
import AccountPermissionScan from '../../AccountManage/AccountPermissionScan';
import pic from '../assets/pic.webp';
const extraComponents = {
renderAccount: (props) => {
return <AccountPermissionScan accountName={props.accountName} />;
},
returnImage: (data) => {
return <img width={200} height={200} src={pic} alt={data.alt} />;
},
default: () => <span>若需要使用弹窗功能,请开发或配置功能函数</span>,
};
export default extraComponents;
...@@ -12,20 +12,26 @@ ...@@ -12,20 +12,26 @@
* @params: <ReportManage * @params: <ReportManage
* params={{reportName,pageSize,filterFields,filterValues,state,customerState}}> * params={{reportName,pageSize,filterFields,filterValues,state,customerState}}>
* *
*
* reportName: 报表名称; * reportName: 报表名称;
* pageSize: 按需配置,默认加载100; * pageSize: 按需配置,默认加载100;
* filterFields: * filterFields:
*
* 需要默认加载的过滤条件的field,英文逗号分割,与filterValues一一对应; * 需要默认加载的过滤条件的field,英文逗号分割,与filterValues一一对应;
* filterValues: * filterValues:
*
* 需要默认加载的过滤条件的value,英文逗号分割,与filterFields一一对应; * 需要默认加载的过滤条件的value,英文逗号分割,与filterFields一一对应;
* state: delete|edit|scan 各种权限; * state: delete|edit|scan 各种权限;
* *
*
* customerState: ['filters','sortBtn','exportBtn','editBtn','deleteBtn','pagination']; * customerState: ['filters','sortBtn','exportBtn','editBtn','deleteBtn','pagination'];
* *
*
* sortFields: '排序字段1,排序字段2,排序字段3' * sortFields: '排序字段1,排序字段2,排序字段3'
* @config: * @config:
* 【数值】 [prefix]_d%|0.00|_d%[suffix]|金额 = 前缀|精度|后缀|金额类的数据(千分位),可分别设置。 * 【数值】 [prefix]_d%|0.00|_d%[suffix]|金额 = 前缀|精度|后缀|金额类的数据(千分位),可分别设置。
* 【标签】 split=, 分隔符。 * 【标签】 split=,
* 分隔符。
* *
* 【功能】 功能配置框内,配置需要跳转功能所需参数,type、url是必须功能,需要type判断类型,需要通过url去解析加载组件。 * 【功能】 功能配置框内,配置需要跳转功能所需参数,type、url是必须功能,需要type判断类型,需要通过url去解析加载组件。
* @type: * @type:
...@@ -33,12 +39,15 @@ ...@@ -33,12 +39,15 @@
* 【数值】数值类型的文本 * 【数值】数值类型的文本
* 【标签】文本渲染成标签,具有不同颜色; * 【标签】文本渲染成标签,具有不同颜色;
* 【功能】“功能”会在当前页内去展示,会卸载掉列表页,加载功能组件。配置 type + * 【功能】“功能”会在当前页内去展示,会卸载掉列表页,加载功能组件。配置 type +
*
* url + 自定义字段 的配置项,自行解析加载即可; * url + 自定义字段 的配置项,自行解析加载即可;
* -------------------- 待需求提出后开发 ----------------- * -------------------- 待需求提出后开发 -----------------
* *
*
* 【链接】内链外链,点击可跳转;配置规则:配置链接即可; * 【链接】内链外链,点击可跳转;配置规则:配置链接即可;
* 【弹窗】modal弹窗弹出,弹窗内的具体业务自行配置;配置规则:[function_name];[...params]; * 【弹窗】modal弹窗弹出,弹窗内的具体业务自行配置;配置规则:[function_name];[...params];
* *
*
* ------------------------------------------------------ * ------------------------------------------------------
* @table: * @table:
* 表头:表头需要支持多级表头、合并; * 表头:表头需要支持多级表头、合并;
...@@ -47,9 +56,11 @@ ...@@ -47,9 +56,11 @@
* @control: * @control:
* 固定筛选:拥有固定筛选框,根据配置显示可搜索字段; * 固定筛选:拥有固定筛选框,根据配置显示可搜索字段;
* *
*
* 可配置筛选框:根据字段配置,将字段设置成筛选条件,枚举出该字段所有值,提供用户进行选择,然后进行筛选;筛选框具体形态可根据配置字段来渲染; * 可配置筛选框:根据字段配置,将字段设置成筛选条件,枚举出该字段所有值,提供用户进行选择,然后进行筛选;筛选框具体形态可根据配置字段来渲染;
* 导出功能:各类导出功能按钮; * 导出功能:各类导出功能按钮;
* *
*
* 时间筛选框:单表唯一;需要变更,支持多时间参数的筛选 * 时间筛选框:单表唯一;需要变更,支持多时间参数的筛选
* @state: 参考台账权限 delete 全部权限 * @state: 参考台账权限 delete 全部权限
* edit 除删除外的权限 * edit 除删除外的权限
...@@ -83,7 +94,6 @@ import style from './index.less'; ...@@ -83,7 +94,6 @@ import style from './index.less';
import { exportAccountData } from './api/service/report'; import { exportAccountData } from './api/service/report';
import DatePickerGroup from './components/DatePickerGroup'; import DatePickerGroup from './components/DatePickerGroup';
import moment from 'moment'; import moment from 'moment';
import DetailsComponent from './extra/detailsComponent';
import { import {
handleNumber, handleNumber,
handleTag, handleTag,
...@@ -782,16 +792,6 @@ const BasicReport = (props) => { ...@@ -782,16 +792,6 @@ const BasicReport = (props) => {
}); });
return ( return (
<div className={style.reportManage} ref={tableWrapperRef}> <div className={style.reportManage} ref={tableWrapperRef}>
{/* 预留容器,提供给点击后的功能显示 */}
{detailsComponentVisible ? (
<DetailsComponent
url={detailConfig.url}
params={detailConfig.params}
onCancel={() => setDetailsComponentVisible(false)}
/>
) : (
''
)}
{/* 为方便阅读,分开两部分代码 */} {/* 为方便阅读,分开两部分代码 */}
{!detailsComponentVisible ? ( {!detailsComponentVisible ? (
<div className={style.contentWrapper}> <div className={style.contentWrapper}>
......
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