From 5e1d4d5155c57c43739d61914e2d29a64f9bb683 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 27 八月 2023 17:40:38 +0800 Subject: [PATCH] Merge branch 'develop' --- src/templates/sharecomponent/settingcomponent/index.jsx | 62 ++++++++++--------------------- 1 files changed, 20 insertions(+), 42 deletions(-) diff --git a/src/templates/sharecomponent/settingcomponent/index.jsx b/src/templates/sharecomponent/settingcomponent/index.jsx index 24a1ce3..6d9bb70 100644 --- a/src/templates/sharecomponent/settingcomponent/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/index.jsx @@ -4,10 +4,7 @@ import { Modal, Button } from 'antd' import { SettingOutlined } from '@ant-design/icons' -import Utils, { FuncUtils } from '@/utils/utils.js' import SettingForm from './settingform' -import CreateFunc from '@/templates/zshare/createfunc' -import CreateInterface from '@/templates/zshare/createinterface' // import './index.scss' @@ -73,43 +70,26 @@ }) } - /** - * @description 鍒涘缓琛ㄦ牸瀛樺偍杩囩▼ - */ - tableCreatFunc = () => { - const { config } = this.props - const { menu } = this.state + // /** + // * @description 鍒涘缓琛ㄦ牸鎺ュ彛锛堣鍑猴級 + // */ + // tableCreatInterface = () => { + // const { config } = this.props + // const { menu } = this.state - this.settingRef.handleConfirm('loading').then(setting => { - let res = this.resetSetting(setting, config.setting) - let _config = {...config, setting: res} - let newLText = Utils.formatOptions(FuncUtils.getTableFunc(setting.innerFunc, menu, _config)) // 鍒涘缓瀛樺偍杩囩▼sql - let DelText = Utils.formatOptions(FuncUtils.dropfunc(setting.innerFunc)) // 鍒犻櫎瀛樺偍杩囩▼sql + // this.settingRef.handleConfirm('loading').then(setting => { + // let res = this.resetSetting(setting, config.setting) + // let _config = {...config, setting: res} + // let _menu = { + // type: config.Template === 'CommonTable' ? 'main' : 'subtable', + // MenuID: menu.MenuID, + // menuName: menu.MenuName, + // menuNo: menu.MenuNo + // } - this.refs.funcCreatComponent.exec(setting.innerFunc, newLText, DelText) - }) - } - - /** - * @description 鍒涘缓琛ㄦ牸鎺ュ彛锛堣鍑猴級 - */ - tableCreatInterface = () => { - const { config } = this.props - const { menu } = this.state - - this.settingRef.handleConfirm('loading').then(setting => { - let res = this.resetSetting(setting, config.setting) - let _config = {...config, setting: res} - let _menu = { - type: config.Template === 'CommonTable' ? 'main' : 'subtable', - MenuID: menu.MenuID, - menuName: menu.MenuName, - menuNo: menu.MenuNo - } - - this.refs.tableCreatInterface.triggerOutInterface(_menu, _config) - }) - } + // this.refs.tableCreatInterface.triggerOutInterface(_menu, _config) + // }) + // } resetSetting = (s, ori) => { let setting = fromJS(s).toJS() @@ -179,7 +159,7 @@ render() { const { config } = this.props - const { visible, search, menu, record } = this.state + const { visible, search, menu } = this.state return ( <> @@ -192,8 +172,6 @@ maskClosable={false} onCancel={() => { this.setState({ visible: false, loading: false })}} footer={[ - record && record.interType === 'system' ? <CreateInterface key="interface" loading={this.state.interloading} ref="tableCreatInterface" trigger={this.tableCreatInterface}/> : null, - record && record.interType === 'inner' ? <CreateFunc key="create" ref="funcCreatComponent" trigger={this.tableCreatFunc}/> : null, <Button key="cancel" onClick={() => { this.setState({ visible: false, loading: false }) }}>鍙栨秷</Button>, <Button key="confirm" type="primary" loading={this.state.loading} onClick={this.settingSave}>纭畾</Button> ]} @@ -203,7 +181,7 @@ menu={menu} config={config} search={search} - updRecord={(record) => this.setState({record: fromJS(record).toJS()})} + updRecord={() => {}} wrappedComponentRef={(inst) => this.settingRef = inst} /> </Modal> -- Gitblit v1.8.0