From f8c3c53f9e29541f8c0e3fcbf682c301fd17e06a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 23 十一月 2020 17:49:23 +0800 Subject: [PATCH] 2020-11-23 --- src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 59 +---------------------------------------------------------- 1 files changed, 1 insertions(+), 58 deletions(-) diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index 9138958..6d94404 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -4,8 +4,6 @@ import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip, InputNumber, Cascader } from 'antd' import { btnIcons, btnClasses, formRule } from '@/utils/option.js' -import Api from '@/api' -import options from '@/store/options.js' import Utils from '@/utils/utils.js' import './index.scss' @@ -629,11 +627,7 @@ } ] })( - <Cascader - options={this.state.menulist} - loadData={this.loadData} - placeholder="" - /> + <Cascader options={this.state.menulist} placeholder="" /> )} </Form.Item> </Col> @@ -641,57 +635,6 @@ } }) return fields - } - - loadData = selectedOptions => { - const { MenuID } = this.props - const targetOption = selectedOptions[selectedOptions.length - 1] - targetOption.loading = true - - let _param = { - func: 'sPC_Get_FunMenu', - ParentID: targetOption.value, - systemType: options.sysType, - debug: 'Y' - } - - Api.getSystemConfig(_param).then(result => { - if (result.status) { - targetOption.loading = false - targetOption.children = result.data.map(item => { - let submenu = { - value: item.ParentID, - label: item.MenuNameP, - children: item.FunMenu.map(cell => { - return { - value: cell.MenuID, - label: cell.MenuName, - MenuID: cell.MenuID, - MenuName: cell.MenuName, - MenuNo: cell.MenuNo, - Ot: cell.Ot, - PageParam: cell.PageParam, - LinkUrl: cell.LinkUrl, - disabled: cell.MenuID === MenuID - } - }) - } - - return submenu - }) - - this.setState({ - menulist: [...this.state.menulist] - }) - } else { - notification.warning({ - top: 92, - message: result.message, - duration: 5 - }) - targetOption.loading = false - } - }) } handleConfirm = () => { -- Gitblit v1.8.0