From 191d6d48a282479c02ea212ca33789ad34137361 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 11 一月 2021 16:21:17 +0800 Subject: [PATCH] 2021-01-11 --- src/tabviews/commontable/index.jsx | 81 +--------------------------------------- 1 files changed, 3 insertions(+), 78 deletions(-) diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index 3f0ae4c..341926f 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types' import {connect} from 'react-redux' import { is, fromJS } from 'immutable' -import { notification, Spin, Tabs, Icon, Switch, Modal, Button, message, Typography, Row, Col } from 'antd' +import { notification, Spin, Tabs, Icon, Switch, Row, Col } from 'antd' import Api from '@/api' import zhCN from '@/locales/zh-CN/main.js' @@ -24,9 +24,9 @@ const SubTable = asyncSpinComponent(() => import('@/tabviews/subtable')) const CardComponent = asyncSpinComponent(() => import('@/tabviews/zshare/cardcomponent')) const ChartComponent = asyncSpinComponent(() => import('@/tabviews/zshare/chartcomponent')) +const PagemsgComponent = asyncComponent(() => import('@/tabviews/zshare/pageMessage')) const { TabPane } = Tabs -const { Paragraph } = Typography class NormalTable extends Component { static propTpyes = { @@ -60,7 +60,6 @@ search: '', // 鎼滅储鏉′欢鏁扮粍锛屼娇鐢ㄦ椂闇�鍒嗗満鏅鐞� BIDs: {}, // 涓婄骇琛╥d pickup: false, // 涓昏〃鏁版嵁闅愯棌鏄剧ず鍒囨崲 - treevisible: false, // 鑿滃崟缁撴瀯鏍戝脊妗嗘樉绀洪殣钘忔帶鍒� tabActive: null, // 鏍囩椤靛睍寮�鎺у埗 chartId: '', // 灞曞紑鍥捐〃ID statFields: [], // 鍚堣瀛楁 @@ -778,57 +777,6 @@ }) } - handleviewconfig = (e) => { - e.stopPropagation() - - const { MenuNo } = this.props - const { config } = this.state - - if (config && config.funcs && config.funcs.length > 0) { - this.setState({ - treevisible: true - }) - } else { - let oInput = document.createElement('input') - oInput.value = MenuNo || '' - document.body.appendChild(oInput) - oInput.select() - document.execCommand('Copy') - document.body.removeChild(oInput) - message.success(this.state.dict['main.copy.success']) - } - } - - getTreeNode = (data) => { - let _type = { - view: '椤甸潰', - btn: '鎸夐挳', - tab: '鏍囩' - } - - return data.map(item => { - let _title = _type[item.subtype] - let _others = [] - - _others.push( - (item.menuNo ? item.menuNo + '(鑿滃崟鍙傛暟)' : ''), - (item.tableName ? item.tableName + '(琛ㄥ悕) ' : ''), - (item.innerFunc ? item.innerFunc + '(鍐呴儴鍑芥暟) ' : ''), - (item.outerFunc ? item.outerFunc + '(澶栭儴鍑芥暟)' : '') - ) - _others = _others.filter(Boolean) - _others = _others.join('銆�') - - if (item.label) { - _title = _title + '(' + item.label + ')' - } - if (_others) { - _title = _title + ': ' + _others - } - return <p key={item.uuid}>{_title}</p> - }) - } - /** * @description 鍥捐〃瑙嗗浘鍒囨崲 */ @@ -1061,30 +1009,7 @@ })} </Tabs>)) } - {menuType !== 'HS' ? <Button - icon="copy" - shape="circle" - className="common-table-copy" - onClick={this.handleviewconfig} - /> : null} - <Modal - className="menu-tree-modal" - title={'鑿滃崟淇℃伅'} - width={'650px'} - maskClosable={false} - visible={this.state.treevisible} - onCancel={() => this.setState({treevisible: false})} - footer={[ - <Button key="close" onClick={() => this.setState({treevisible: false})}>{this.state.dict['main.close']}</Button> - ]} - destroyOnClose - > - <div className="menu-header"> - <span>鑿滃崟鍚嶇О锛歿this.props.MenuName}</span> - <span>鑿滃崟鍙傛暟锛歿<Paragraph copyable>{this.props.MenuNo}</Paragraph>}</span> - </div> - {this.state.treevisible ? this.getTreeNode(config.funcs) : null} - </Modal> + {menuType !== 'HS' ? <PagemsgComponent menu={{MenuName: this.props.MenuName, MenuNo: this.props.MenuNo}} config={config} dict={this.state.dict} /> : null} {viewlost ? <NotFount msg={this.state.lostmsg} /> : null} </div> ) -- Gitblit v1.8.0