/* eslint-disable */
import React, { Component } from 'react';
import { Form } from '@ant-design/compatible';
// import '@ant-design/compatible/assets/index.css';
import { Layout, Spin, Slider, Tabs, Row, Col, Card } from 'antd-v4';
import baseChar from '@/components/Common/baseChar'; /* 获取图表配置及数据 */
import CommonListTabEvent from '@/components/Common/CommonListTabEvent';/* 继承销售模块业务功能 */
import * as commonFunc from '@/components/Common/commonFunc';/* 通用单据方法 */ /* 通用单据方法 */
import Toolbar from '@/components/Common/ToolBar/ToolBarNew';
import StaticEditTable from '@/components/Common/CommonTable';/* 可编辑表格 */
import styles from '@/index.less';
import customStyles from './index.less';
import CommonBase from '@/components/Common/CommonBase';/* 获取配置及数据 */
import * as commonBusiness from '@/components/Common/commonBusiness';/* 单据业务功能 */
import SearchComponent from '@/components/Common/SearchComponent';/* 搜索组件 */
import commonConfig from '@/utils/config';
import * as commonUtils from '@/utils/utils';
import StaticEditTree from '@/components/Common/Tree/StaticTree';
import Eject from '@/assets/eject.svg';/* 弹出图标 */
import Close from '@/assets/close.svg';/* 关闭图标 */
import AntdDraggableModal from '@/components/Common/AntdDraggableModal';
import CommonListSelect from '@/components/Common/CommonListSelect';/* 选择界面 */
import Bar from '../../Charts/Bar';
import Columnar from '../../Charts/Columnar';
import ColumnarGroup from '../../Charts/ColumnarGroup';
import BrokenLine from '../../Charts/BrokenLine';
import WaterWave from '../../Charts/WaterWave';
import Gauge from '../../Charts/Gauge';
import ColumnarStack from '../../Charts/ColumnarStack';
import PieGroup from '../../Charts/PieGroup';
import Pie from '../../Charts/Pie';
import TimeLineGroup from '../../Charts/TimeLineGroup';
import ColorBlock from '../../Charts/ColorBlock';
/**
* 此组件是N个列表,以Tab页签方式展示
*/
const { Header, Content } = Layout;
const { TabPane } = Tabs;
let NoTotalData = '';
class CommonListTab extends Component {
// componentDidUpdate() {
// const tempActiveKey = this.props.activeKey;
// if (!this.props[`activeKey${tempActiveKey}flag`]) {
// this.props.onSaveState({ [`activeKey${tempActiveKey}flag`]: true });
// }
// }
handleEject = () => {
const { currentPane, panes } = this.props.app;
if (commonUtils.isNotEmptyArr(panes) && commonUtils.isNotEmptyObject(currentPane)) {
// const index = panes.indexOf(currentPane);
const index = panes.findIndex(item => item.formId === currentPane.formId && item.key === currentPane.key && item.notCurrentPane === currentPane.notCurrentPane && item.route === currentPane.route && item.title === currentPane.title && item.sModelsType === currentPane.sModelsType && item.sProcName === currentPane.sProcName);
/* 当前页签 */
let currentTab = document.getElementById('navTabWrap').children[index];
if (commonUtils.isEmpty(currentTab)) {
const oChildren = document.getElementById('navTabWrap').getElementsByClassName('ant-tabs-content')[0].children;
for (const child of oChildren) {
if (child.nodeName === 'DIV' && index !== undefined && child.getAttribute('id') === `navTabWrap-panel-${panes[index].key}`) {
currentTab = child;
}
}
}
if (!commonUtils.isEmpty(currentTab)) {
const filterTreeArr = currentTab.getElementsByClassName('xly-filter-tree');/* 获取当前页签下的树组件 */
if (commonUtils.isNotEmptyArr(filterTreeArr)) {
const filterTree = filterTreeArr[0];
if (filterTree.style.display === 'block') {
filterTree.style.display = 'none';
} else {
filterTree.style.display = 'block';
}
}
}
}
};
/** 树节点选中 */
handleTreeSelect = (name, checkedKeys, e) => {
this.props.onSelect(name, checkedKeys, e); /* 调用CommonListEvent通用处理 */
};
handleCancelModal = (modelVisible) => {
this.props.onSaveState({
[modelVisible]: false,
});
}
handleSelectModal = (modelVisible) => {
this.props.onSaveState({
[modelVisible]: false,
});
}
onTabChange = async (key) => { /* 默认查第一张,第二张表 ,切换时根据key查对应表,若没数据则进行查询 否则不查询,搜索时 都进行查询 */
let { activeMap, onlySlave, slaveData, sModelsType } = this.props;
let addState = {};
let tag = '-1';
if(key === '1') {
tag = 'slave';
}else if(key === '2') {
tag = 'slave0';
}else if(key === '3') {
tag = 'slave1';
}else if(key === '4') {
tag = 'slave2';
}else if(key === '5') {
tag = 'slave3';
}else if(key === '6') {
tag = 'slave4';
}else if(key === '7') {
tag = 'slave5';
}else if(key === '8') {
tag = 'slave6';
}else if(key === '9') {
tag = 'slave7';
}else if(key === '10') {
tag = 'slave8';
}else if(key === '11') {
tag = 'slave9';
}else if(key === '12') {
tag = 'slave10';
}else if(key === '13') {
tag = 'slave11';
}else if(key === '14') {
tag = 'slave12';
}else if(key === '15') {
tag = 'slave13';
}else if(key === '16') {
tag = 'slave14';
}else if(key === '17') {
tag = 'slave15';
}else if(key === '18') {
tag = 'slave16';
}else if(key === '19') {
tag = 'slave17';
}else if(key === '20') {
tag = 'slave18';
}else if(key === '21') {
tag = 'slave19';
}else if(key === '22') {
tag = 'slave20';
}
if( tag !== '-1' && sModelsType !=='commonListTab/tabColor') {
const { [`${tag}Config`] : tableConfig, [`${tag}Data`] : tableData, [`${tag}FilterCondition`]: tableFilterCondition, slaveOrderBy, [`${tag}Pagination`] : tablePagination, slaveSelectedRowKeys,
} = this.props;
let bSearch = false; /* 默认不查询 */
if(onlySlave && commonUtils.isNotEmptyArr(slaveData) && slaveData.length > 1) { /* 只有从表展示出来,并且从表数据超过2行 */
if(commonUtils.isEmptyObject(activeMap)) {
activeMap = {};
bSearch = true;
if(commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) {
activeMap[key] = slaveSelectedRowKeys[0];
}
} else if(commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) {
const oldSlaveSelectedRowKey = activeMap[key];
if(commonUtils.isEmptyObject(oldSlaveSelectedRowKey) || oldSlaveSelectedRowKey !== slaveSelectedRowKeys[0]) {
bSearch = true;
activeMap[key] = slaveSelectedRowKeys[0];
}
}
}
if(commonUtils.isEmptyArr(tableData) || bSearch) {
const iPageSize = tableConfig.bPagination ? tableConfig.iPageSize : 10000 ; /* 根据后台主表配置bPagination判断 是否分页, 不分页默认10000,分页根据分页来 */
this.props.onSaveState({ pageLoading: true });
if( key!=="1" && commonUtils.isNotEmptyObject(tableConfig.sCharType)) { /* 加载图表 */
addState.charConfigAndData = await this.props.onGetCharOne(tag, tableConfig, tableFilterCondition, commonUtils.isEmpty(tablePagination) ? 1 : tablePagination.current, commonUtils.isEmpty(tablePagination) ? iPageSize : tablePagination.pageSize, slaveOrderBy, undefined, true);
console.log('查图表charConfigAndData:', key, addState.charConfigAndData);
} else {
addState = await this.props.onGetDataOne(tag, tableConfig, tableFilterCondition, commonUtils.isEmpty(tablePagination) ? 1 : tablePagination.current, commonUtils.isEmpty(tablePagination) ? iPageSize : tablePagination.pageSize, slaveOrderBy, undefined, true);
}
}
}
this.props.onSaveState({ activeKey: key ,...addState, pageLoading: false});
};
handleResizeLayout = (e) => {
const { sTabId, sModelsId } = this.props;
const originX = e.pageY;
const originWidth = commonUtils.isNotEmptyArr(document.getElementsByClassName('commonListTab-sider') + sTabId) ? document.getElementsByClassName('commonListTab-sider' + sTabId )[0].offsetHeight : 0 ;
let offset = 0;
window.onmousemove = function (e2) {
offset = e2.pageY - originX;
document.getElementsByClassName('commonListTab-sider'+ sTabId)[0].style.height = `${originWidth + offset + 30 + 12}px`;
const slaveDiv = commonUtils.isNotEmptyArr(document.getElementsByClassName('commonListTab-sider'+ sTabId)) ? document.getElementsByClassName('commonListTab-sider'+ sTabId)[0] : [];
if(commonUtils.isNotEmptyArr(slaveDiv)) {
const slaveHeight = `${originWidth + offset}px`; /* 将拖动后的高度赋值给从表表格高度 */
const slaveMaxHeight = `${originWidth + offset - 58}px`;
slaveDiv.getElementsByClassName('ant-table-body')[0].style.height = slaveHeight;
slaveDiv.getElementsByClassName('ant-table-body')[0].style.maxHeight = slaveMaxHeight;
document.getElementsByClassName('commonListTab-content'+ sTabId)[0].style.height = `calc(100% - ${originWidth + offset + 10}px)`;
}
};
window.onmouseup = () => {
window.onmousemove = null;
window.onmousemove = null;
localStorage.setItem('customCommonListTabHeight_' + sModelsId, originWidth + offset - 58); /* 取maxHeight高度 */
let customBottomHeight = window.innerHeight - 200 - 54- 60 - (originWidth + offset);
// console.log(21, window.innerHeight , originWidth, offset, window.innerHeight - 200 - 54- 60 - (originWidth + offset) )
localStorage.setItem('customBottomHeight_' + sModelsId, customBottomHeight); /* 取maxHeight高度 */
this.forceUpdate();
};
};
handleGetChart = () => {
let tag = '-1';
const { activeKey: key} = this.props;
const { charConfigAndData} = this.props;
if(commonUtils.isEmptyObject(key)) { /* 没有选中默认第二个 */
tag = 'slave0';
}
if(key === '1') {
tag = 'slave';
}else if(key === '2') {
tag = 'slave0';
}else if(key === '3') {
tag = 'slave1';
}else if(key === '4') {
tag = 'slave2';
}else if(key === '5') {
tag = 'slave3';
}else if(key === '6') {
tag = 'slave4';
}else if(key === '7') {
tag = 'slave5';
}else if(key === '8') {
tag = 'slave6';
}else if(key === '9') {
tag = 'slave7';
}else if(key === '10') {
tag = 'slave8';
}else if(key === '11') {
tag = 'slave9';
}else if(key === '12') {
tag = 'slave10';
}else if(key === '13') {
tag = 'slave11';
}else if(key === '14') {
tag = 'slave12';
}else if(key === '15') {
tag = 'slave13';
}else if(key === '16') {
tag = 'slave14';
}else if(key === '17') {
tag = 'slave15';
}else if(key === '18') {
tag = 'slave16';
}else if(key === '19') {
tag = 'slave17';
}else if(key === '20') {
tag = 'slave18';
}else if(key === '21') {
tag = 'slave19';
}else if(key === '22') {
tag = 'slave20';
}
if( tag !== '-1') {
const {
[`${tag}Config`]: tableConfig,
} = this.props;
if (commonUtils.isNotEmptyObject(tableConfig) && commonUtils.isNotEmptyObject(charConfigAndData) &&
commonUtils.isNotEmptyArr(charConfigAndData.data)) {
const { sCharType } = tableConfig;
console.log('charConfigAndData222', sCharType, charConfigAndData);
const child = charConfigAndData;
child.hasLend = true;
let content = '';
if (commonUtils.isNotEmptyObject(child)) {
child.height = 300;
if (sCharType === 'sBar') {
/* 横向条形图1 */
content = ;
} else if (sCharType === 'sColumnar') {
/* 纵向条形图 */
content = ;
} else if (sCharType === 'sColumnarGroup') {
/* 纵向条形图 */
content = ;
} else if (sCharType === 'sBrokenLine') {
content = ;
} else if (sCharType === 'sWaterWave') {
content = ;
} else if (sCharType === 'sGauge') {
content = ;
} else if (sCharType === 'sColumnarStack') {
content = ;
} else if (sCharType === 'sPieGroup') {
content = ;
} else if (sCharType === 'sPie') {
content = ;
} else if (sCharType === 'TimeLineGroup') {
content = ;
} else if (sCharType === 'commonList') {
content = ;
} else if (sCharType === 'ColorBlock') {
content = ;
}
}
return content;
}
}else {
return '';
}
};
render() {
const { pageLoading } = this.props;
return (
);
}
}
const CommonListTabComponent = Form.create({
mapPropsToFields(props) {
const { masterData } = props;
const obj = commonFunc.mapPropsToFields(masterData, Form);
return obj;
},
})((props) => {
const {
form, onReturnForm, slavePagination, slaveConfig, slaveColumn, isSmall, iHeight, logVisible, sModelsType, slaveData, app, iPageSize, masterConfig,
onlySlave,
onlySlave0,
onlyChart0,
onlySlave1,
onlyChart1,
onlyslave2,
onlyChart2,
onlyslave3,
onlyChart3,
onlyslave4,
onlyChart4,
onlyslave5,
onlyChart5,
onlyslave6,
onlyChart6,
onlyslave7,
onlyChart7,
onlyslave8,
onlyChart8,
onlyslave9,
onlyChart9,
onlyslave10,
onlyChart10,
onlyslave11,
onlyChart11,
onlyslave12,
onlyChart12,
onlyslave13,
onlyChart13,
onlyslave14,
onlyChart14,
onlyslave15,
onlyChart15,
slave0Data,
slave1Data,
slave2Data,
slave3Data,
slave4Data,
slave5Data,
slave6Data,
slave7Data,
slave8Data,
slave9Data,
slave10Data,
slave11Data,
slave12Data,
slave13Data,
slave14Data,
slave15Data,
slave0Config,
slave1Config,
slave2Config,
slave3Config,
slave4Config,
slave5Config,
slave6Config,
slave7Config,
slave8Config,
slaveSelectedRowKeys,
slave0SelectedRowKeys,
slave1SelectedRowKeys,
slave2SelectedRowKeys,
slave3SelectedRowKeys,
slave4SelectedRowKeys,
slave0Pagination,
slave1Pagination,
slave2Pagination,
slave3Pagination,
slave4Pagination,
slave5Pagination,
slave6Pagination,
slave7Pagination,
slave8Pagination,
slave9Pagination,
slave10Pagination,
slave11Pagination,
slave12Pagination,
slave13Pagination,
slave14Pagination,
slave15Pagination,
slavePageSize,
slave0PageSize,
slave1PageSize,
slave2PageSize,
slave3PageSize,
slave4PageSize,
slave5PageSize,
slave6PageSize,
slave7PageSize,
slave8PageSize,
slave9PageSize,
slave10PageSize,
slave11PageSize,
slave12PageSize,
slave13PageSize,
slave14PageSize,
slave15PageSize,
} = props;
// isSmall将分页变小,以及去掉跳转页面和总条数记录3333333
/* 回带表单 */
if (commonUtils.isNotEmptyObject(slavePagination)) {
if (isSmall) {
slavePagination.showTotal = null;
}
}
onReturnForm(form);
let customHeight= 260; /* 取从表高度 */
if (localStorage.getItem('customCommonListTabHeight_' + props.sModelsId) !== '') {
const localHeight = localStorage.getItem('customCommonListTabHeight_' + props.sModelsId);
if(localHeight) {
customHeight = Number(localHeight);
}
}
let slaveTableHeight = 230; /* 取从表高度 */
if (localStorage.getItem('customBottomHeight_' + props.sModelsId) !== '') {
const customBottomHeight = localStorage.getItem('customBottomHeight_' + props.sModelsId);
if(customBottomHeight) {
slaveTableHeight = Number(customBottomHeight);
}
} else {
const customBottomHeight = window.innerHeight - 254 - 60- 30 -customHeight;
slaveTableHeight = Number(customBottomHeight);
}
let slave0TableHeight = slaveTableHeight;
if(commonUtils.isNotEmptyObject(slave0Config)) {
const tableConfigSum = slave0Config?.gdsconfigformslave?.filter(item => commonUtils.isNotEmptyObject(item.sName) && item.bSum && item.bVisible);
if(commonUtils.isNotEmptyArr(tableConfigSum)) {
slave0TableHeight = slaveTableHeight -10;
}
}
const realHeight = window.screen.height * window.devicePixelRatio;
if (realHeight < 1600) {
slave0TableHeight = slave0TableHeight - 50;
}
const pagination = {
pageSize: commonUtils.isNotEmptyNumber(props.iPageSize) && props.iPageSize !== 0 ? props.iPageSize : commonConfig.pageSize,
...slavePagination,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
hideOnSinglePage: false,
};
const pagination0 = {
pageSize: commonUtils.isNotEmptyNumber(slave0PageSize) && slave0PageSize !== 0 ? slave0PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave0Data) ? 0 : slave0Data.length,
current: commonUtils.isEmptyObject(slave0Pagination) ? 1 : slave0Pagination.current,
...slave0Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination1 = {
pageSize: commonUtils.isNotEmptyNumber(slave1PageSize) && slave1PageSize !== 0 ? slave1PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave1Data) ? 0 : slave1Data.length,
current: commonUtils.isEmptyObject(slave1Pagination) ? 1 : slave1Pagination.current,
...slave1Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination2 = {
pageSize: commonUtils.isNotEmptyNumber(slave2PageSize) && slave2PageSize !== 0 ? slave2PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave2Data) ? 0 : slave2Data.length,
current: commonUtils.isEmptyObject(slave2Pagination) ? 1 : slave2Pagination.current,
...slave2Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination3 = {
pageSize: commonUtils.isNotEmptyNumber(slave3PageSize) && slave3PageSize !== 0 ? slave3PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave3Data) ? 0 : slave3Data.length,
current: commonUtils.isEmptyObject(slave3Pagination) ? 1 : slave3Pagination.current,
...slave3Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination4 = {
pageSize: commonUtils.isNotEmptyNumber(slave4PageSize) && slave4PageSize !== 0 ? slave4PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave4Data) ? 0 : slave4Data.length,
current: commonUtils.isEmptyObject(slave4Pagination) ? 1 : slave4Pagination.current,
...slave4Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination5 = {
pageSize: commonUtils.isNotEmptyNumber(slave5PageSize) && slave5PageSize !== 0 ? slave5PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave5Data) ? 0 : slave5Data.length,
current: commonUtils.isEmptyObject(slave5Pagination) ? 1 : slave5Pagination.current,
...slave5Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination6 = {
pageSize: commonUtils.isNotEmptyNumber(slave6PageSize) && slave6PageSize !== 0 ? slave6PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave6Data) ? 0 : slave6Data.length,
current: commonUtils.isEmptyObject(slave6Pagination) ? 1 : slave6Pagination.current,
...slave6Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination7 = {
pageSize: commonUtils.isNotEmptyNumber(slave7PageSize) && slave7PageSize !== 0 ? slave7PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave7Data) ? 0 : slave7Data.length,
current: commonUtils.isEmptyObject(slave7Pagination) ? 1 : slave7Pagination.current,
...slave7Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination8 = {
pageSize: commonUtils.isNotEmptyNumber(slave8PageSize) && slave8PageSize !== 0 ? slave8PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave8Data) ? 0 : slave8Data.length,
current: commonUtils.isEmptyObject(slave8Pagination) ? 1 : slave8Pagination.current,
...slave8Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination9 = {
pageSize: commonUtils.isNotEmptyNumber(slave9PageSize) && slave9PageSize !== 0 ? slave9PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave9Data) ? 0 : slave9Data.length,
current: commonUtils.isEmptyObject(slave9Pagination) ? 1 : slave9Pagination.current,
...slave9Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination10 = {
pageSize: commonUtils.isNotEmptyNumber(slave10PageSize) && slave10PageSize !== 0 ? slave10PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave10Data) ? 0 : slave10Data.length,
current: commonUtils.isEmptyObject(slave10Pagination) ? 1 : slave10Pagination.current,
...slave10Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination11 = {
pageSize: commonUtils.isNotEmptyNumber(slave11PageSize) && slave11PageSize !== 0 ? slave11PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave11Data) ? 0 : slave11Data.length,
current: commonUtils.isEmptyObject(slave11Pagination) ? 1 : slave11Pagination.current,
...slave11Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination12 = {
pageSize: commonUtils.isNotEmptyNumber(slave12PageSize) && slave12PageSize !== 0 ? slave12PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave12Data) ? 0 : slave12Data.length,
current: commonUtils.isEmptyObject(slave12Pagination) ? 1 : slave12Pagination.current,
...slave12Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination13 = {
pageSize: commonUtils.isNotEmptyNumber(slave13PageSize) && slave13PageSize !== 0 ? slave13PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave13Data) ? 0 : slave13Data.length,
current: commonUtils.isEmptyObject(slave13Pagination) ? 1 : slave13Pagination.current,
...slave13Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination14 = {
pageSize: commonUtils.isNotEmptyNumber(slave14PageSize) && slave14PageSize !== 0 ? slave14PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave14Data) ? 0 : slave14Data.length,
current: commonUtils.isEmptyObject(slave14Pagination) ? 1 : slave14Pagination.current,
...slave14Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
const pagination15 = {
pageSize: commonUtils.isNotEmptyNumber(slave15PageSize) && slave15PageSize !== 0 ? slave15PageSize : commonConfig.pageSize,
total: commonUtils.isEmptyArr(slave15Data) ? 0 : slave15Data.length,
current: commonUtils.isEmptyObject(slave15Pagination) ? 1 : slave15Pagination.current,
...slave15Pagination,
// showQuickJumper: true,
hideOnSinglePage: false,
size: isSmall ? 'small' : 'large',
pageSizeOptions: commonConfig.pageSizeOptions,
showSizeChanger: !isSmall,
showQuickJumper: !isSmall,
};
let slaveTreeData = [];
/* 包含子节点的通用列表 */
if (commonUtils.isNotEmptyObject(sModelsType) && sModelsType.includes('childrenList') && commonUtils.isNotEmptyArr(slaveData)) {
const addSate = props.onGetSlaveTreeData(slaveData);
if (commonUtils.isNotEmptyObject(addSate)) {
// eslint-disable-next-line prefer-destructuring
slaveTreeData = addSate.slaveTreeData;
}
} else {
slaveTreeData = slaveData;
}
/* 过滤部件数据 */
const dataFilter = (tableProps, type) => {
const { slave0Data } = props;
let oriData = commonUtils.isNotEmptyArr(tableProps.data) ? tableProps.data : [];
let config = commonUtils.isNotEmptyArr(tableProps.config) ? tableProps.config : [];
const sSqlCondition = config ? config.sSqlCondition : '';
let res = [];
let sType = '';
if ( commonUtils.isNotEmptyArr(slave0Data) && sSqlCondition && sSqlCondition.split('.').length > 2) {
let targetTbName = sSqlCondition.split('.')[0]; /* 1.表名 control */
let filteredValue = sSqlCondition.split('.')[1]; /* 2.解析filterValue: controlSelectedRowKeys */
let sParentKey = sSqlCondition.split('.')[2]; /* 2.解析本身表对应的值,如控制表筛选材料表 则材料表的sControlId = 控制表的controlSelectedRowKeys[0] */
/* 根据配置的条件过滤 */
if(commonUtils.isNotEmptyObject(targetTbName) && filteredValue && sParentKey){
res = slave0Data.filter(item => sParentKey && sParentKey.includes(item[filteredValue]));
}
}
return res;
};
const tableProps = {
...commonBusiness.getTableTypes('slave', props),
data: slaveTreeData,
tableProps: { rowKey: 'sSlaveId', pagination, onChange: props.onTitleChange.bind(this, 'slave'), AutoTableHeight: customHeight },
onSaveState: props.onSaveState,
clearArray: props.clearArray,
readOnly: true,
isSmall,
sGroupByList: props.sGroupByList,
customConfig: props.customConfig,
noVlistTable: sModelsType === 'production/productionPlanInfo' ? true : false,
};
const slave0TableProps = {
...commonBusiness.getTableTypes('slave0', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination : pagination0, onChange: props.onTitleChange.bind(this, 'slave0'), AutoTableHeight: slave0TableHeight
},
onSaveState: props.onSaveState,
};
const slave1TableProps = {
...commonBusiness.getTableTypes('slave1', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination1, onChange: props.onTitleChange.bind(this, 'slave1'), AutoTableHeight: slaveTableHeight
},
};
const slave2TableProps = {
...commonBusiness.getTableTypes('slave2', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination2, onChange: props.onTitleChange.bind(this, 'slave2'), AutoTableHeight: slaveTableHeight
},
onSaveState: props.onSaveState,
};
const slave3TableProps = {
...commonBusiness.getTableTypes('slave3', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination3, onChange: props.onTitleChange.bind(this, 'slave3'), AutoTableHeight: slaveTableHeight
},
onSaveState: props.onSaveState,
};
const slave4TableProps = {
...commonBusiness.getTableTypes('slave4', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination4, onChange: props.onTitleChange.bind(this, 'slave4'), AutoTableHeight: slaveTableHeight
},
};
const slave5TableProps = {
...commonBusiness.getTableTypes('slave5', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination5, onChange: props.onTitleChange.bind(this, 'slave5'), AutoTableHeight: slaveTableHeight
},
};
const slave6TableProps = {
...commonBusiness.getTableTypes('slave6', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination6, onChange: props.onTitleChange.bind(this, 'slave6'), AutoTableHeight: slaveTableHeight
},
};
const slave7TableProps = {
...commonBusiness.getTableTypes('slave7', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination7, onChange: props.onTitleChange.bind(this, 'slave7'), AutoTableHeight: slaveTableHeight
},
};
const slave8TableProps = {
...commonBusiness.getTableTypes('slave8', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination8, onChange: props.onTitleChange.bind(this, 'slave8'), AutoTableHeight: slaveTableHeight
},
};
const slave9TableProps = {
...commonBusiness.getTableTypes('slave9', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination9, onChange: props.onTitleChange.bind(this, 'slave9'), AutoTableHeight: slaveTableHeight
},
};
const slave10TableProps = {
...commonBusiness.getTableTypes('slave10', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination10, onChange: props.onTitleChange.bind(this, 'slave10'), AutoTableHeight: slaveTableHeight
},
};
const slave11TableProps = {
...commonBusiness.getTableTypes('slave11', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination11, onChange: props.onTitleChange.bind(this, 'slave11'), AutoTableHeight: slaveTableHeight
},
};
const slave12TableProps = {
...commonBusiness.getTableTypes('slave12', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination12, onChange: props.onTitleChange.bind(this, 'slave12'), AutoTableHeight: slaveTableHeight
},
};
const slave13TableProps = {
...commonBusiness.getTableTypes('slave13', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination13, onChange: props.onTitleChange.bind(this, 'slave13'), AutoTableHeight: slaveTableHeight
},
};
const slave14TableProps = {
...commonBusiness.getTableTypes('slave14', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination14, onChange: props.onTitleChange.bind(this, 'slave14'), AutoTableHeight: slaveTableHeight
},
};
const slave15TableProps = {
...commonBusiness.getTableTypes('slave15', props),
tableBelone: true ? 'list' : '', /* 新需求:做个1带N的只可查看不可编辑的表格,模块类型名:commonMultiList */
tableProps: {
pagination: pagination15, onChange: props.onTitleChange.bind(this, 'slave15'), AutoTableHeight: slaveTableHeight
},
};
/* 有树形的不用虚拟列表 */
if (commonUtils.isNotEmptyObject(sModelsType) && sModelsType.includes('childrenList') && commonUtils.isNotEmptyArr(slaveTreeData)) {
tableProps.noVlist = true;
}
let slaveRow = {};
if(commonUtils.isNotEmptyArr(slaveData)) {
if(commonUtils.isNotEmptyArr(slaveSelectedRowKeys)) {
const iSIndex = slaveData.findIndex(item => slaveSelectedRowKeys.includes(item.sSlaveId));
if(iSIndex > -1) {
slaveRow = slaveData[iSIndex];
}
}else {
slaveRow = slaveData[0];
}
}
let slaveInfo = '';
let materialsInfo = '';
let checkInfo = '';
let slaveInfo0 = '';
let slaveInfo1 = '';
let slaveInfo2 = '';
let slaveInfo3 = '';
let slaveInfo4 = '';
let slaveInfo5 = '';
let slaveInfo6 = '';
let slaveInfo7 = '';
let slaveInfo8 = '';
let slaveInfo9 = '';
let slaveInfo10 = '';
let slaveInfo11 = '';
let slaveInfo12 = '';
let slaveInfo13 = '';
let bWarnging0 = false;
let bWarnging1 = false;
let bWarnging2 = false;
let bWarnging3 = false;
let bWarnging4 = false;
let bWarnging5 = false;
let bWarnging6 = false;
let bWarnging7 = false;
let bWarnging8 = false;
let bWarnging9 = false;
let bWarnging10 = false;
let bWarnging11 = false;
let bWarnging12 = false;
let bWarnging13 = false;
let bWarnging14 = false;
let bWarnging15 = false;
if(sModelsType === 'commonListTab/tabColor') {
slave1TableProps.data = dataFilter(commonBusiness.getTableTypes('slave1', props), 'slave1');
slave2TableProps.data = dataFilter(commonBusiness.getTableTypes('slave2', props), 'slave2');
slave3TableProps.data = dataFilter(commonBusiness.getTableTypes('slave3', props), 'slave3');
slave4TableProps.data = dataFilter(commonBusiness.getTableTypes('slave4', props), 'slave4');
slave5TableProps.data = dataFilter(commonBusiness.getTableTypes('slave5', props), 'slave5');
slave6TableProps.data = dataFilter(commonBusiness.getTableTypes('slave6', props), 'slave6');
slave7TableProps.data = dataFilter(commonBusiness.getTableTypes('slave7', props), 'slave7');
slave8TableProps.data = dataFilter(commonBusiness.getTableTypes('slave8', props), 'slave8');
slave9TableProps.data = dataFilter(commonBusiness.getTableTypes('slave9', props), 'slave9');
slave10TableProps.data = dataFilter(commonBusiness.getTableTypes('slave10', props), 'slave10');
slave11TableProps.data = dataFilter(commonBusiness.getTableTypes('slave11', props), 'slave11');
slave12TableProps.data = dataFilter(commonBusiness.getTableTypes('slave12', props), 'slave12');
slave13TableProps.data = dataFilter(commonBusiness.getTableTypes('slave13', props), 'slave13');
slave14TableProps.data = dataFilter(commonBusiness.getTableTypes('slave14', props), 'slave14');
slave15TableProps.data = dataFilter(commonBusiness.getTableTypes('slave15', props), 'slave15');
bWarnging0 = commonUtils.isNotEmptyObject(slave0TableProps?.data);
bWarnging1 = commonUtils.isNotEmptyObject(slave1TableProps?.data);
bWarnging2 = commonUtils.isNotEmptyObject(slave2TableProps?.data);
bWarnging3 = commonUtils.isNotEmptyObject(slave3TableProps?.data);
bWarnging4 = commonUtils.isNotEmptyObject(slave4TableProps?.data);
bWarnging5 = commonUtils.isNotEmptyObject(slave5TableProps?.data);
bWarnging6 = commonUtils.isNotEmptyObject(slave6TableProps?.data);
bWarnging7 = commonUtils.isNotEmptyObject(slave7TableProps?.data);
bWarnging8 = commonUtils.isNotEmptyObject(slave8TableProps?.data);
bWarnging9 = commonUtils.isNotEmptyObject(slave9TableProps?.data);
bWarnging10 = commonUtils.isNotEmptyObject(slave10TableProps?.data);
bWarnging11 = commonUtils.isNotEmptyObject(slave11TableProps?.data);
bWarnging12 = commonUtils.isNotEmptyObject(slave12TableProps?.data);
bWarnging13 = commonUtils.isNotEmptyObject(slave13TableProps?.data);
bWarnging14 = commonUtils.isNotEmptyObject(slave14TableProps?.data);
bWarnging15 = commonUtils.isNotEmptyObject(slave15TableProps?.data);
}
if(sModelsType ==='commonListTab/tabColor' && false) {
bWarnging0 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate1, 0) > 0) ;
bWarnging1 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate2, 0) > 0) ;
bWarnging2 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate3, 0) > 0) ;
bWarnging3 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate4, 0) > 0) ;
bWarnging4 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate5, 0) > 0) ;
bWarnging5 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate6, 0) > 0);
bWarnging6 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate7, 0) > 0) ;
bWarnging7 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate8, 0) > 0) ;
bWarnging8 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate9, 0) > 0) ;
bWarnging9 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate10, 0) > 0) ;
bWarnging10 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate11, 0) > 0) ;
bWarnging11 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate12, 0) > 0) ;
bWarnging12 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate14, 0) > 0) ;
bWarnging13 = commonUtils.isNotEmptyObject(slaveRow) && !(commonUtils.isNull(slaveRow.dWastesRate13, 0) > 0) ;
}
if (commonUtils.isNotEmptyObject(slaveConfig) && commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave)) {
slaveInfo = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'MainContent')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'MainContent')[0].showName : commonFunc.showMessage(app.commonConst, 'MainContent'); /* 从表信息 */
materialsInfo = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zMaterials')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zMaterials')[0].showName : commonFunc.showMessage(app.commonConst, 'zMaterials'); /* 表一 */
checkInfo = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zCheck')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zCheck')[0].showName : commonFunc.showMessage(app.commonConst, 'zCheck'); /* 表二 */
slaveInfo0 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo0')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo0')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo0'); /* 表三 */
slaveInfo1 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo1')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo1')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo1'); /* 表四 */
slaveInfo2 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo2')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo2')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo2'); /* 表五 */
slaveInfo3 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo3')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo3')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo3'); /* 表六 */
slaveInfo4 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo4')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo4')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo4'); /* 表七 */
slaveInfo5 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo5')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo5')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo5'); /* 表八 */
slaveInfo6 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo6')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo6')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo6'); /* 表九 */
slaveInfo7 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo7')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo7')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo7'); /* 表十 */
slaveInfo8 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo8')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo8')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo8'); /* 表十一 */
slaveInfo9 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo9')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo9')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo9'); /* 表十一 */
slaveInfo10 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo10')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo10')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo10'); /* 表十一 */
slaveInfo11 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo11')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo11')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo11'); /* 表十一 */
slaveInfo12 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo12')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo12')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo12'); /* 表十一 */
slaveInfo13 = commonUtils.isNotEmptyArr(slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo13')) ? slaveConfig.gdsconfigformslave.filter(item => item.sControlName === 'zSlaveInfo13')[0].showName : commonFunc.showMessage(app.commonConst, 'zSlaveInfo13'); /* 表十一 */
}
const masterSum = commonUtils.isNotEmptyObject(slaveConfig) ? slaveConfig.gdsconfigformslave.filter(item => item.bSum && item.sName !== '') : [];
const masterTitleGroup = commonUtils.isNotEmptyObject(slaveColumn) ? slaveColumn.filter(item => commonUtils.isNotEmptyObject(item.title) && item.title.indexOf('-') > -1) : [];
const hasColumnGroup = masterTitleGroup.length;
if (masterSum.length > 0) {
NoTotalData = hasColumnGroup > 0 ? 'TitleGroup' : 'NoTitleGroup';
} else {
NoTotalData = hasColumnGroup > 0 ? 'NoTotalData TitleGroup' : 'NoTotalData NoTitleGroup';
}
// const mProps = { ...commonBusiness.createMemoProps('master', props)};
const name = 'filterTree';
const treeProps = {
...commonBusiness.getTreeTypes('tree', props),
isSearch: false,
checkable: false,
disabled: false,
checkedAll: false,
unChecked: false,
[`${name}Column`]: props[`${name}Column`],
[`${name}Config`]: props[`${name}Config`],
[`${name}Data`]: props[`${name}Data`],
getFloatNum: props.getFloatNum,
getSqlDropDownData: props.getSqlDropDownData,
getSqlCondition: props.getSqlCondition,
handleSqlDropDownNewRecord: props.handleSqlDropDownNewRecord,
getDateFormat: props.getDateFormat,
onDoubleClick: props.onDoubleClick,
onSelect: props.onSelectTree,
expandedKeys: props.expandedKeys,
};
const logProps = {
app: {
...props.app,
currentPane: {
...props.app.currentPane,
formRoute: '/indexPage/commonList',
route: '/indexPage/commonList',
name: 'logView',
config: props.logConfig,
select: props.onSelectModal.bind(this, 'logVisible'),
selectCancel: props.onCancelModal.bind(this, 'logVisible'),
sModelsType: 'modal/logView',
},
},
token: props.app.token,
slaveColumn: props.logColumn, /* 表头 */
slaveConfig: props.logConfig,
slaveData: props.logData,
dispatch: props.dispatch,
content: props.content,
id: new Date().getTime().toString(),
pageLoading: false,
};
/* 生产进度详情 */
let searchWorkSchedule = {};
let workScheduleConfig = {};
let searchWorkTitle = '';
if (commonUtils.isNotEmptyObject(props.workScheduleConfig)) {
// eslint-disable-next-line prefer-destructuring
workScheduleConfig = props.workScheduleConfig;
searchWorkTitle = workScheduleConfig.sActiveName;
const sWorkOrderId = commonUtils.isNotEmptyObject(props.workScheduleRecord) ? props.workScheduleRecord.sWorkOrderId : '';
searchWorkSchedule = {
app: {
...props.app,
currentPane: {
name: 'workSchedule',
config: workScheduleConfig,
conditonValues: props.getSqlCondition(workScheduleConfig),
title: workScheduleConfig.sActiveName,
route: '/indexPage/commonList',
formRoute: '/indexPage/commonList',
formId: workScheduleConfig.sActiveId,
key: props.sModelsId + workScheduleConfig.sId,
sModelsType: 'search/workSchedule',
bFilterProName: 'p_sWorkOrderId_pro',
bFilterProValue: sWorkOrderId,
},
},
dispatch: props.dispatch,
content: props.content,
id: new Date().getTime().toString(),
realizeHeight: props.realizeHeight, /* 拖动偏移高度 */
bNotShowBtn: true,
rowSelection: null,
};
}
return (
);
});
export default CommonBase(CommonListTabEvent(CommonListTab));