From 6c919b7a55f15af56b212d059f1a5ea44d1ed5b8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 04 十一月 2022 17:05:46 +0800 Subject: [PATCH] 2022-11-04 --- src/menu/datasource/verifycard/settingform/index.jsx | 52 +++++++++++++++------------------------------------- 1 files changed, 15 insertions(+), 37 deletions(-) diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index 3929542..7f8ddb1 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -25,14 +25,13 @@ modules: [], innerRules: [], innertip: '', - appType: sessionStorage.getItem('appType'), ismain: false } UNSAFE_componentWillMount () { const { config, setting } = this.props - let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, config.uuid) + let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, config.uuid, window.GLOB.customMenu.interfaces) let ismain = false if (window.GLOB.customMenu.Template === 'BaseTable') { @@ -74,20 +73,22 @@ _setting.supModule = setting.supModule || [] _setting.execute = setting.execute || 'true' + if (_setting.supModule.length > 0 && _setting.supModule[0] !== 'empty') { + let has = MenuUtils.checkSupModules(modules, _setting.supModule.slice(-1)[0]) + if (!has) { + _setting.supModule = [] + } + } + this.setState({modules, innerRules, innertip, setting: _setting, ismain}) } handleConfirm = () => { - const { appType } = this.state // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� return new Promise((resolve, reject) => { this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { values.sync = values.sync || 'false' - - if (appType === 'mob' && values.useMSearch === 'true') { - values.syncRefresh = 'true' - } // 鏁版嵁婧愬墠绔獙璇� if (values.interType === 'system' && values.execute !== 'false' && values.dataresource) { @@ -160,7 +161,7 @@ render() { const { columns, config } = this.props const { getFieldDecorator } = this.props.form - const { setting, modules, innerRules, appType, innertip } = this.state + const { setting, modules, innerRules, innertip } = this.state const formItemLayout = { labelCol: { @@ -230,7 +231,12 @@ </Form.Item> </Col> {setting.interType === 'outer' ? <Col span={8}> - <Form.Item label="绯荤粺鎺ュ彛"> + <Form.Item label={ + <Tooltip placement="topLeft" title="鍗曠偣鐧诲綍绯荤粺"> + <QuestionCircleOutlined className="mk-form-tip" /> + 绯荤粺鎺ュ彛 + </Tooltip> + }> {getFieldDecorator('sysInterface', { initialValue: setting.sysInterface, rules: [ @@ -472,34 +478,6 @@ )} </Form.Item> </Col> : null} - {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) && !['basetable'].includes(config.subtype) && setting.useMSearch === 'true' && appType !== 'mob' ? <Col span={8}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'澶栧眰鎼滅储鏉′欢鏀瑰彉鏃讹紝鏄惁鍒锋柊褰撳墠缁勪欢鏁版嵁銆�'}> - <QuestionCircleOutlined className="mk-form-tip" /> - 鍚屾鍒锋柊 - </Tooltip> - }> - {getFieldDecorator('syncRefresh', { - initialValue: setting.syncRefresh || 'true' - })( - <Radio.Group> - <Radio value="true">鏄�</Radio> - <Radio value="false">鍚�</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} - {/* <Col span={8}> - <Form.Item label="浜嬪姟"> - {getFieldDecorator('transaction', { - initialValue: setting.transaction || 'false' - })( - <Radio.Group> - <Radio value="true">浣跨敤</Radio> - <Radio value="false">涓嶄娇鐢�</Radio> - </Radio.Group>)} - </Form.Item> - </Col> */} {!['navbar', 'balcony', 'menubar', 'interface'].includes(config.type) ? <Col span={8}> <Form.Item label="鍒濆鍖栨暟鎹�"> {getFieldDecorator('onload', { -- Gitblit v1.8.0