From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 27 八月 2023 18:37:36 +0800 Subject: [PATCH] 2023-08-27 --- src/views/menudesign/menuform/index.jsx | 53 +++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/views/menudesign/menuform/index.jsx b/src/views/menudesign/menuform/index.jsx index f746df1..0a0e3ba 100644 --- a/src/views/menudesign/menuform/index.jsx +++ b/src/views/menudesign/menuform/index.jsx @@ -4,7 +4,6 @@ import { QuestionCircleOutlined } from '@ant-design/icons' import Api from '@/api' -import options from '@/store/options.js' import './index.scss' const { TextArea } = Input @@ -77,7 +76,7 @@ getMenus = () => { const { MenuId, config } = this.props - Api.getSystemConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { + Api.getCloudConfig({func: 's_get_pc_menus', systemType: window.GLOB.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenu = null let thdMenuList = [] @@ -173,7 +172,6 @@ }) } - // 涓�浜岀骇鑿滃崟鍒囨崲 selectChange = (key, value) => { const { config } = this.props const { menulist } = this.state @@ -194,7 +192,7 @@ this.props.updateConfig({...config, fstMenuId: value, parentId: _id}) }) } else { - if (key === 'cacheTime' || key === 'minWidth') { + if (key === 'cacheTime' || key === 'minWidth' || key === 'localCacheTime') { if (typeof(value) !== 'number') { value = '' } @@ -293,17 +291,13 @@ <Form.Item label="鎵撳紑鏂瑰紡"> {getFieldDecorator('OpenType', { initialValue: config.OpenType || 'newtab', - rules: [ - { - required: true, - message: '璇烽�夋嫨鎵撳紑鏂瑰紡!' - } - ] + rules: [{ required: true, message: '璇烽�夋嫨鎵撳紑鏂瑰紡!' }] })( - <Radio.Group onChange={(e) => {this.selectChange('OpenType', e.target.value)}}> - <Radio value="newtab">鏍囩椤�</Radio> - <Radio value="newpage">鏂伴〉闈�</Radio> - </Radio.Group> + <Select onChange={(value) => {this.selectChange('OpenType', value)}}> + <Select.Option value="newtab">鏍囩椤�</Select.Option> + <Select.Option value="newpage">鏂伴〉闈紙鏍囩椤碉級</Select.Option> + <Select.Option value="view">鏂伴〉闈紙鍏ㄥ睆锛�</Select.Option> + </Select> )} </Form.Item> </Col> @@ -341,6 +335,20 @@ )} </Form.Item> </Col> + {config.cacheLocal === 'true' ? <Col span={24}> + <Form.Item label={ + <Tooltip placement="topLeft" title="璁剧疆鏈湴缂撳瓨鏃堕暱鍚庯紝鍦ㄧ紦瀛樻湡闄愬唴涓嶅悜鍚庡彴璇锋眰鏁版嵁锛屾椂闀挎渶澶т负5澶╋紙鍗�7200鍒嗛挓锛夈�傛敞锛氭椂闀夸负绌烘椂缂撳瓨鏁版嵁鍙敤浜庨〉闈㈠揩閫熷憟鐜帮紝涓嶅奖鍝嶆帴鍙h姹傘��"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鏃堕暱(鍒�) + </Tooltip> + }> + {getFieldDecorator('localCacheTime', { + initialValue: config.localCacheTime + })( + <InputNumber min={1} max={7200} precision={0} onChange={(val) => {this.selectChange('localCacheTime', val)}}/> + )} + </Form.Item> + </Col> : null} <Col span={24}> <Form.Item label={ <Tooltip placement="topLeft" title="瀵逛簬涓嶇粡甯告�у彉鍔ㄧ殑淇℃伅锛岀紦瀛樻暟鎹湁鍔╀簬鎻愰珮鏌ヨ鏁堢巼銆�"> @@ -388,6 +396,23 @@ </Col> : null} <Col span={24}> <Form.Item label={ + <Tooltip placement="topLeft" title="鏁版嵁鍔犺浇鏃剁殑閬僵鏄惁鏄剧ず銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 鍔犺浇閬僵 + </Tooltip> + }> + {getFieldDecorator('mask', { + initialValue: config.mask || 'true' + })( + <Radio.Group onChange={(e) => {this.selectChange('mask', e.target.value)}}> + <Radio value="true">鏄剧ず</Radio> + <Radio value="false">闅愯棌</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> + <Col span={24}> + <Form.Item label={ <Tooltip placement="topLeft" title="濡傛灉椤甸潰鍐呭鍦ㄧ獥鍙d腑鏃犳硶瀹屽叏灞曠ず锛屽彲璁剧疆鏈�灏忓搴︼紝瀹炵幇椤甸潰鐨勬í鍚戞粴鍔ㄣ��"> <QuestionCircleOutlined className="mk-form-tip" /> 鏈�灏忓搴� -- Gitblit v1.8.0