king
2023-08-27 da64ab0923bf8817fc8599a6e37b953ce38f64c8
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分钟)。注:时长为空时缓存数据只用于页面快速呈现,不影响接口请求。">
                <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="如果页面内容在窗口中无法完全展示,可设置最小宽度,实现页面的横向滚动。">
                <QuestionCircleOutlined className="mk-form-tip" />
                最小宽度