king
2022-01-15 2f71678db0378c7c841e721dfebaea6d159e13b2
2022-01-15
5个文件已修改
6个文件已删除
359 ■■■■ 已修改文件
src/components/normalform/modalform/mkTable/index.jsx 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.jsx 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/index.jsx 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/node-wrap/index.jsx 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/node-wrap/index.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/node-wrap/menus/columnform/index.jsx 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/node-wrap/menus/columnform/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/node-wrap/menus/index.jsx 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/node-wrap/menus/index.scss 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/data-card/options.jsx 62 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pc/components/login/normal-login/options.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkTable/index.jsx
@@ -297,6 +297,29 @@
            })
          })
        })
      } else if (col.inputType === 'cascader') {
        let keys = record[col.dataIndex]
        let _options = []
        let rematch = (options, level) => {
          options.some(m => {
            if (!m.value || m.value !== keys[level]) return false
            _options.push(m)
            if (m.children && keys[level + 1]) {
              rematch(m.children, level + 1)
            }
            return true
          })
        }
        rematch(col.options, 0)
        if (_options.length) {
          col.extends.forEach(n => {
            record[n.value] = _options.map(o => o[n.key]).join(' / ')
          })
        }
      } else {
        let key = record[col.dataIndex]
        let option = col.options.filter(m => m.value === key)[0]
src/menu/components/card/cardcomponent/index.jsx
@@ -226,6 +226,8 @@
      _card.menus = res.menus
      delete res.menus
    } else {
      delete _card.menus
    }
    this.setState({
src/menu/components/card/data-card/index.jsx
@@ -15,7 +15,6 @@
const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CardComponent = asyncComponent(() => import('../cardcomponent'))
const Nodes = asyncComponent(() => import('./node-wrap'))
const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination'))
const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
@@ -479,11 +478,25 @@
  getWrapForms = () => {
    const { card } = this.state
    return getWrapForm(card.wrap, card.subtype, card.columns)
    return getWrapForm(card.wrap, card.subtype, card.columns, card.uuid, card.supNodes)
  }
  updateWrap = (res) => {
    this.updateComponent({...this.state.card, wrap: res})
    let _card = {...this.state.card, wrap: res}
    if (res.supNodes) {
      _card.supNodes = res.supNodes
      _card.supNodes = _card.supNodes.map(item => {
        item.componentId = item.nodes[item.nodes.length - 1]
        return item
      })
      delete res.supNodes
    } else {
      delete _card.supNodes
    }
    this.updateComponent(_card)
  }
  pasteComponent = (res, resolve) => {
@@ -624,16 +637,6 @@
    }
  }
  updateSupNodes = (res) => {
    const { card } = this.state
    this.setState({
      card: {...card, supNodes: res}
    })
    this.updateComponent({...card, supNodes: res})
  }
  render() {
    const { card, appType } = this.state
@@ -661,7 +664,6 @@
            <NormalForm title="数据卡设置" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            {card.wrap.supType === 'multi' && appType !== 'mob' ? <Nodes card={card} updateMenus={this.updateSupNodes}/> : null}
            <CopyComponent type="datacard" card={card}/>
            <PasteComponent options={['action', 'search', 'form', 'cardcell']} updateConfig={this.pasteComponent} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
src/menu/components/card/data-card/node-wrap/index.jsx
File was deleted
src/menu/components/card/data-card/node-wrap/index.scss
File was deleted
src/menu/components/card/data-card/node-wrap/menus/columnform/index.jsx
File was deleted
src/menu/components/card/data-card/node-wrap/menus/columnform/index.scss
src/menu/components/card/data-card/node-wrap/menus/index.jsx
File was deleted
src/menu/components/card/data-card/node-wrap/menus/index.scss
src/menu/components/card/data-card/options.jsx
@@ -4,7 +4,7 @@
/**
 * @description Wrap表单配置信息
 */
export default function (wrap, subtype, columns = [], id = '') {
export default function (wrap, subtype, columns = [], id = '', supNodes = []) {
  let appType = sessionStorage.getItem('appType')
  let MenuType = ''
  let menu = fromJS(window.GLOB.customMenu).toJS()
@@ -13,7 +13,7 @@
    MenuType = 'billPrint'
  }
  let modules = []
  if (subtype === 'propcard') {
  if (subtype === 'propcard' || subtype === 'datacard') {
    modules = MenuUtils.getSupModules(menu.components, id) || []
  }
@@ -133,19 +133,6 @@
        {value: 'false', label: '无'},
        {value: 'init', label: '初始化'},
        {value: 'always', label: '数据加载'},
      ]
    },
    {
      type: 'radio',
      field: 'supType',
      label: '上级类型',
      initval: wrap.supType || 'single',
      tooltip: '上级组件为单一组件或多个组件。',
      required: false,
      forbid: subtype !== 'datacard' || appType === 'mob',
      options: [
        {value: 'single', label: '单组件'},
        {value: 'multi', label: '多组件'},
      ]
    },
    {
@@ -299,6 +286,22 @@
      forbid: subtype !== 'datacard'
    },
    {
      type: 'radio',
      field: 'supType',
      label: '上级类型',
      initval: wrap.supType || 'single',
      tooltip: '上级组件为单一组件或多个组件。',
      required: false,
      forbid: subtype !== 'datacard' || appType === 'mob',
      options: [
        {value: 'single', label: '单组件'},
        {value: 'multi', label: '多组件'},
      ],
      controlFields: [
        {field: 'supNodes', values: ['multi']},
      ]
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
@@ -307,6 +310,35 @@
      options: roleList,
      forbid: !!appType
    },
    {
      type: 'table',
      field: 'supNodes',
      label: '上级组件',
      initval: supNodes,
      required: true,
      forbid: subtype !== 'datacard' || appType === 'mob',
      span: 24,
      columns: [
        {
          title: '序号',
          dataIndex: '$index',
          editable: false,
          required: false,
          width: '20%'
        },
        {
          title: '菜单',
          dataIndex: 'nodes',
          inputType: 'cascader',
          editable: true,
          required: true,
          extends: [{key: 'label', value: 'label'}],
          width: '50%',
          render: (text, record) => record.label,
          options: modules
        }
      ]
    }
  ]
  return cardWrapForm.map(item => {
src/pc/components/login/normal-login/options.jsx
@@ -131,6 +131,19 @@
        {value: 'autologon', label: '自动登录'},
      ]
    },
    // {
    //   type: 'radio',
    //   field: 'shortcut',
    //   label: '快捷方式',
    //   initval: wrap.shortcut || 'remember',
    //   tooltip: '账号密码登录时的快捷方式。',
    //   required: false,
    //   options: [
    //     {value: 'none', label: '无'},
    //     {value: 'remember', label: '记住密码'},
    //     {value: 'autologon', label: '自动登录'},
    //   ]
    // },
  ]
  return wrapForm