king
2021-08-04 abe961768cb069e84ed958f4c768c512cc3db598
2021-08-04
10个文件已修改
1个文件已添加
2个文件已删除
1051 ■■■■■ 已修改文件
src/components/normalform/modalform/index.jsx 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.scss 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/mkRadio/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/index.jsx 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/balcony/options.jsx 405 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcellcomponent/formconfig.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/options.jsx 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/settingform/index.jsx 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/card/cardcomponent/settingform/index.scss 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/pcdesign/index.jsx 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/normalform/modalform/index.jsx
@@ -1,13 +1,15 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
// import { fromJS } from 'immutable'
import { Form, Row, Col, Tooltip, Icon, Cascader } from 'antd'
import { fromJS } from 'immutable'
import { Form, Row, Col, Tooltip, Icon, Cascader, Input } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import MKEInput from './mkInput'
import MKNumberInput from './mkNumberInput'
import MKSelect from './mkSelect'
import './index.scss'
const { TextArea } = Input
const MKRadio = asyncComponent(() => import('./mkRadio'))
const StyleInput = asyncComponent(() => import('./styleInput'))
@@ -37,6 +39,13 @@
      }
      
      item.hidden = false
      if (item.forbid) {
        item.hidden = true
      }
      if (item.options) {
        item.oriOptions = fromJS(item.options).toJS()
      }
      if (item.type === 'text') {
        let _rules = [{
@@ -103,7 +112,15 @@
    })
    formlist = formlist.map(cell => {
      return fieldMap.get(cell.field) || cell
      let item = fieldMap.get(cell.field)
      if (item.linkField) {
        let supInitVal = fieldMap.get(item.linkField).initval || ''
        item.options = item.oriOptions.filter(option => option.ParentID === supInitVal)
      }
      return item
    })
    this.record = record
@@ -173,7 +190,7 @@
    const fields = []
    formlist.forEach((item, index) => {
      if (item.hidden) return
      if (item.hidden || item.forbid) return
      let content = null
      let label = item.tooltip ? <Tooltip placement="topLeft" title={item.tooltip}><Icon type="question-circle" />{item.label}</Tooltip> : item.label
@@ -194,6 +211,8 @@
        content = (<MKFileUpload config={item} onChange={(val) => this.recordChange({[item.field]: val})} />)
      } else if (item.type === 'cascader') {
        content = (<Cascader options={item.options} expandTrigger="hover" placeholder="" />)
      } else if (item.type === 'textarea') {
        content = (<TextArea rows={item.rows || 2} placeholder=""/>)
      }
      if (!content) return
src/components/normalform/modalform/index.scss
@@ -24,20 +24,7 @@
  .ant-form-item {
    display: flex;
  }
  .ant-form-item.checkcard {
    margin-bottom: 10px;
    .ant-form-item-control {
      line-height: 1.5;
    }
  }
  .ant-form-item.hint {
    margin-bottom: 0px;
    .message {
      margin-top: 9px;
      line-height: 1.5;
      color: rgba(0, 0, 0, 0.85);
    }
  }
  .ant-form-item-control-wrapper {
    flex: 1;
  }
@@ -48,27 +35,7 @@
    white-space: nowrap;
    width: 33.3%;
  }
  >.ant-row.cols2 .ant-col-24 {
    .ant-form-item {
      .ant-form-item-label {
        width: 16%;
      }
    }
  }
  >.ant-row.cols3 .ant-col-24 {
    .ant-form-item {
      .ant-form-item-label {
        width: 10.5%;
      }
    }
  }
  >.ant-row.cols4 .ant-col-24 {
    .ant-form-item {
      .ant-form-item-label {
        width: 7.5%;
      }
    }
  }
  .ant-input-number {
    width: 100%;
  }
@@ -84,29 +51,14 @@
      min-width: 100px;
    }
  }
  .normal-braft-editor {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    overflow-x: hidden;
  }
  p {
    color: #1890ff;
    font-size: 15px;
    padding-left: 10px;
    border-bottom: 1px solid #e9e9e9;
  }
  .ant-input-disabled {
    color: rgba(0, 0, 0, 0.65)!important;
    cursor: default!important;
  }
  .ant-input-number-input {
    color: rgba(0, 0, 0, 0.65)!important;
    cursor: default!important;
  }
  .ant-select-disabled {
    color: rgba(0, 0, 0, 0.65)!important;
    .ant-select-selection--multiple .ant-select-selection__choice {
      color: rgba(0, 0, 0, 0.65)!important;
  .ant-col-12 + .ant-col-24 {
    .ant-form-item-label {
      width: 16%;
    }
  }
}
src/components/normalform/modalform/mkRadio/index.jsx
@@ -84,7 +84,7 @@
    const { value, options } = this.state
    return (
      <Radio.Group value={value} onChange={this.onChange}>
      <Radio.Group style={{whiteSpace: 'nowrap'}} value={value} onChange={this.onChange}>
        {options.map(option => <Radio key={option.value} value={option.value}>{option.label}</Radio>)}
      </Radio.Group>
    )
src/menu/components/card/balcony/index.jsx
@@ -8,8 +8,7 @@
import { resetStyle } from '@/utils/utils-custom.js'
import MKEmitter from '@/utils/events.js'
import Utils from '@/utils/utils.js'
import MenuUtils from '@/utils/utils-custom.js'
import { balconyWrapForm } from './options'
import getWrapForm from './options'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import './index.scss'
@@ -208,34 +207,8 @@
  getWrapForms = () => {
    const { wrap } = this.state.card
    let modules = MenuUtils.getLinkModules(fromJS(window.GLOB.customMenu).toJS().components) || []
    let supmodules = MenuUtils.getSupModules(fromJS(window.GLOB.customMenu).toJS().components, '') || []
    let roleList = sessionStorage.getItem('sysRoles')
    if (roleList) {
      try {
        roleList = JSON.parse(roleList)
      } catch {
        roleList = []
      }
    } else {
      roleList = []
    }
    return fromJS(balconyWrapForm).toJS().map(item => {
      item.initval = wrap[item.field] || item.initval
      if (item.field === 'blacklist') {
        item.options = roleList
      } else if (item.field === 'syncModule') {
        item.options = modules
      } else if (item.field === 'supModule') {
        item.options = supmodules
      }
      return item
    })
    return getWrapForm(wrap)
  }
  updateWrap = (res) => {
src/menu/components/card/balcony/options.jsx
@@ -1,195 +1,216 @@
import { fromJS } from 'immutable'
import MenuUtils from '@/utils/utils-custom.js'
/**
 * @description Wrap表单配置信息
 */
export const balconyWrapForm = [
  {
    type: 'text',
    field: 'name',
    label: '组件名称',
    initval: '',
    tooltip: '用于组件间的区分。',
    required: true
  },
  {
    type: 'number',
    field: 'width',
    label: '宽度',
    initval: '',
    tooltip: '栅格布局,每行等分为24列。',
    min: 1,
    max: 24,
    precision: 0,
    required: true
  },
  {
    type: 'radio',
    field: 'datatype',
    label: '数据来源',
    initval: '',
    tooltip: '选择静态值,无需配置数据源。',
    required: false,
    options: [
      {value: 'dynamic', label: '动态'},
      {value: 'static', label: '静态'},
    ]
  },
  {
    type: 'radio',
    field: 'linkType',
    label: '受控类型',
    initval: 'static',
    tooltip: '组件与其他组件之间的控制类型,独立表示与其他没有关联。',
    required: false,
    options: [
      {value: 'static', label: '独立'},
      {value: 'sync', label: '同步'},
      {value: 'sup', label: '上级'},
    ],
    controlFields: [
      {field: 'supModule', values: ['sup']},
      {field: 'supControl', values: ['sup']},
      {field: 'syncModule', values: ['sync']},
      {field: 'checkAll', values: ['sync']},
    ]
  },
  {
    type: 'cascader',
    field: 'supModule',
    label: '上级组件',
    initval: '',
    required: true,
    options: []
  },
  {
    type: 'radio',
    field: 'supControl',
    label: '显示控制',
    tooltip: '当前组件在主表选中行时显示,还是始终显示。',
    initval: 'show',
    required: false,
    options: [
      {value: 'hidden', label: '选行'},
      {value: 'show', label: '始终'},
    ]
  },
  {
    type: 'cascader',
    field: 'syncModule',
    label: '同步组件',
    initval: '',
    required: true,
    options: []
  },
  {
    type: 'radio',
    field: 'checkAll',
    label: '全选',
    initval: 'hidden',
    tooltip: '当同步组件可多选时,设置全选有效。',
    required: false,
    options: [
      {value: 'hidden', label: '隐藏'},
      {value: 'show', label: '显示'},
    ]
  },
  {
    type: 'radio',
    field: 'position',
    label: '位置',
    initval: 'relative',
    tooltip: '使用固定定位时,请在测试环境中查看定位效果。',
    required: false,
    options: [
      {value: 'relative', label: '相对定位'},
      {value: 'fixed', label: '固定定位'},
    ],
    controlFields: [
      {field: 'quick', values: ['fixed']},
      {field: 'top', values: ['fixed']},
      {field: 'right', values: ['fixed']},
      {field: 'bottom', values: ['fixed']},
      {field: 'left', values: ['fixed']},
      {field: 'realwidth', values: ['fixed']},
      {field: 'transform', values: ['fixed']},
    ]
  },
  {
    type: 'select',
    field: 'quick',
    label: '快捷选择',
    initval: '',
    required: false,
    subFields: ['top', 'left', 'right', 'bottom', 'transform'],
    options: [
      {value: 'top', label: '上', top: '0px', left: '0px', right: '0px', bottom: '', transform: ''},
      {value: 'top-left', label: '左上', top: '0px', left: '0px', right: '', bottom: '', transform: ''},
      {value: 'top-right', label: '右上', top: '0px', left: '', right: '0px', bottom: '', transform: ''},
      {value: 'left-middle', label: '左中', top: '50%', left: '0px', right: '', bottom: '', transform: 'translateY(-50%)'},
      {value: 'right-middle', label: '右中', top: '50%', left: '', right: '0px', bottom: '', transform: 'translateY(-50%)'},
      {value: 'bottom-left', label: '左下', top: '', left: '0px', right: '', bottom: '0px', transform: ''},
      {value: 'bottom-right', label: '右下', top: '', left: '', right: '0px', bottom: '0px', transform: ''},
      {value: 'bottom', label: '下', top: '', left: '0px', right: '0px', bottom: '0px', transform: ''},
      {value: 'middle', label: '中间', top: '50%', left: '50%', right: '', bottom: '', transform: 'translate(-50%, -50%)'}
    ]
  },
  {
    type: 'styleInput',
    field: 'top',
    label: '距上',
    initval: '',
    required: false
  },
  {
    type: 'styleInput',
    field: 'right',
    label: '距右',
    initval: '',
    required: false
  },
  {
    type: 'styleInput',
    field: 'bottom',
    label: '距下',
    initval: '',
    required: false
  },
  {
    type: 'styleInput',
    field: 'left',
    label: '距左',
    initval: '',
    required: false
  },
  {
    type: 'styleInput',
    field: 'realwidth',
    label: '实际宽度',
    initval: '',
    required: false
  },
  {
    type: 'select',
    field: 'transform',
    label: '变换',
    initval: '',
    required: false,
    options: [
      {value: 'translateY(-50%)', label: '上移50%'},
      {value: 'translateY(50%)', label: '下移50%'},
      {value: 'translateX(-50%)', label: '左移50%'},
      {value: 'translateX(50%)', label: '右移50%'},
      {value: 'translate(-50%, -50%)', label: '左上移50%'},
      {value: 'translate(-50%, 50%)', label: '左下移50%'},
      {value: 'translate(50%, -50%)', label: '右上移50%'},
      {value: 'translate(50%, 50%)', label: '右下移50%'},
    ]
  },
  {
    type: 'multiselect',
    field: 'blacklist',
    label: '黑名单',
    initval: '',
    required: false,
    options: []
  },
]
export default function (wrap) {
  let modules = MenuUtils.getLinkModules(fromJS(window.GLOB.customMenu).toJS().components) || []
  let supmodules = MenuUtils.getSupModules(fromJS(window.GLOB.customMenu).toJS().components, '') || []
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
    try {
      roleList = JSON.parse(roleList)
    } catch {
      roleList = []
    }
  } else {
    roleList = []
  }
  const balconyWrapForm = [
    {
      type: 'text',
      field: 'name',
      label: '组件名称',
      initval: wrap.name || '',
      tooltip: '用于组件间的区分。',
      required: true
    },
    {
      type: 'number',
      field: 'width',
      label: '宽度',
      initval: wrap.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    },
    {
      type: 'radio',
      field: 'datatype',
      label: '数据来源',
      initval: wrap.datatype || 'static',
      tooltip: '选择静态值,无需配置数据源。',
      required: false,
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
      ]
    },
    {
      type: 'radio',
      field: 'linkType',
      label: '受控类型',
      initval: wrap.linkType || 'static',
      tooltip: '组件与其他组件之间的控制类型,独立表示与其他没有关联。',
      required: false,
      options: [
        {value: 'static', label: '独立'},
        {value: 'sync', label: '同步'},
        {value: 'sup', label: '上级'},
      ],
      controlFields: [
        {field: 'supModule', values: ['sup']},
        {field: 'supControl', values: ['sup']},
        {field: 'syncModule', values: ['sync']},
        {field: 'checkAll', values: ['sync']},
      ]
    },
    {
      type: 'cascader',
      field: 'supModule',
      label: '上级组件',
      initval: wrap.supModule || '',
      required: true,
      options: supmodules
    },
    {
      type: 'radio',
      field: 'supControl',
      label: '显示控制',
      tooltip: '当前组件在主表选中行时显示,还是始终显示。',
      initval: wrap.supControl || 'show',
      required: false,
      options: [
        {value: 'hidden', label: '选行'},
        {value: 'show', label: '始终'},
      ]
    },
    {
      type: 'cascader',
      field: 'syncModule',
      label: '同步组件',
      initval: wrap.syncModule || '',
      required: true,
      options: modules
    },
    {
      type: 'radio',
      field: 'checkAll',
      label: '全选',
      initval: wrap.checkAll || 'hidden',
      tooltip: '当同步组件可多选时,设置全选有效。',
      required: false,
      options: [
        {value: 'hidden', label: '隐藏'},
        {value: 'show', label: '显示'},
      ]
    },
    {
      type: 'radio',
      field: 'position',
      label: '位置',
      initval: wrap.position || 'relative',
      tooltip: '使用固定定位时,请在测试环境中查看定位效果。',
      required: false,
      options: [
        {value: 'relative', label: '相对定位'},
        {value: 'fixed', label: '固定定位'},
      ],
      controlFields: [
        {field: 'quick', values: ['fixed']},
        {field: 'top', values: ['fixed']},
        {field: 'right', values: ['fixed']},
        {field: 'bottom', values: ['fixed']},
        {field: 'left', values: ['fixed']},
        {field: 'realwidth', values: ['fixed']},
        {field: 'transform', values: ['fixed']},
      ]
    },
    {
      type: 'select',
      field: 'quick',
      label: '快捷选择',
      initval: '',
      required: false,
      subFields: ['top', 'left', 'right', 'bottom', 'transform'],
      options: [
        {value: 'top', label: '上', top: '0px', left: '0px', right: '0px', bottom: '', transform: ''},
        {value: 'top-left', label: '左上', top: '0px', left: '0px', right: '', bottom: '', transform: ''},
        {value: 'top-right', label: '右上', top: '0px', left: '', right: '0px', bottom: '', transform: ''},
        {value: 'left-middle', label: '左中', top: '50%', left: '0px', right: '', bottom: '', transform: 'translateY(-50%)'},
        {value: 'right-middle', label: '右中', top: '50%', left: '', right: '0px', bottom: '', transform: 'translateY(-50%)'},
        {value: 'bottom-left', label: '左下', top: '', left: '0px', right: '', bottom: '0px', transform: ''},
        {value: 'bottom-right', label: '右下', top: '', left: '', right: '0px', bottom: '0px', transform: ''},
        {value: 'bottom', label: '下', top: '', left: '0px', right: '0px', bottom: '0px', transform: ''},
        {value: 'middle', label: '中间', top: '50%', left: '50%', right: '', bottom: '', transform: 'translate(-50%, -50%)'}
      ]
    },
    {
      type: 'styleInput',
      field: 'top',
      label: '距上',
      initval: wrap.top || '',
      required: false
    },
    {
      type: 'styleInput',
      field: 'right',
      label: '距右',
      initval: wrap.right || '',
      required: false
    },
    {
      type: 'styleInput',
      field: 'bottom',
      label: '距下',
      initval: wrap.bottom || '',
      required: false
    },
    {
      type: 'styleInput',
      field: 'left',
      label: '距左',
      initval: wrap.left || '',
      required: false
    },
    {
      type: 'styleInput',
      field: 'realwidth',
      label: '实际宽度',
      initval: wrap.realwidth || '',
      required: false
    },
    {
      type: 'select',
      field: 'transform',
      label: '变换',
      initval: wrap.transform || '',
      required: false,
      options: [
        {value: 'translateY(-50%)', label: '上移50%'},
        {value: 'translateY(50%)', label: '下移50%'},
        {value: 'translateX(-50%)', label: '左移50%'},
        {value: 'translateX(50%)', label: '右移50%'},
        {value: 'translate(-50%, -50%)', label: '左上移50%'},
        {value: 'translate(-50%, 50%)', label: '左下移50%'},
        {value: 'translate(50%, -50%)', label: '右上移50%'},
        {value: 'translate(50%, 50%)', label: '右下移50%'},
      ]
    },
    {
      type: 'multiselect',
      field: 'blacklist',
      label: '黑名单',
      initval: wrap.blacklist || '',
      required: false,
      options: roleList
    },
  ]
  return balconyWrapForm
}
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -34,7 +34,6 @@
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
        appMenus = []
      }
src/menu/components/card/cardcomponent/index.jsx
@@ -1,18 +1,17 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, Popover, Icon, Switch, Col } from 'antd'
import { Popover, Icon, Switch, Col } from 'antd'
import asyncComponent from '@/utils/asyncComponent'
import asyncIconComponent from '@/utils/asyncIconComponent'
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import SettingForm from './settingform'
import { resetStyle } from '@/utils/utils-custom.js'
import getSettingForm from './options'
import Utils from '@/utils/utils.js'
import MKEmitter from '@/utils/events.js'
import './index.scss'
const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
const CardCellComponent = asyncComponent(() => import('../cardcellcomponent'))
const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
const PasteComponent = asyncIconComponent(() => import('./pastecomponent'))
@@ -28,12 +27,9 @@
  }
  state = {
    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
    card: null,            // 卡片信息,包括正反面
    formlist: null,        // 设置表单信息
    elements: null,        // 编辑组
    visible: false,        // 模态框控制
    settingVisible: false,
    side: 'front'
  }
@@ -194,24 +190,33 @@
    MKEmitter.emit('changeStyle', [cards.uuid, card.uuid], options, _style)
  }
  settingSubmit = () => {
  getSettingForms = () => {
    const { cards } = this.props
    const { setting } = this.state.card
    return getSettingForm(setting, cards.subtype === 'propcard')
  }
  updateSetting = (res) => {
    const { card, side } = this.state
    this.settingRef.handleConfirm().then(res => {
      this.setState({
        settingVisible: false,
        card: {...card, setting: res}
      })
    if (res.appmenu) {
      res.menu = res.appmenu
      delete res.appmenu
    }
      if (side === 'back' && res.type === 'simple') {
        this.setState({
          side: 'front',
          elements: fromJS(card.elements).toJS()
        })
      }
      this.props.updateElement({...card, setting: res})
    this.setState({
      card: {...card, setting: res}
    })
    if (side === 'back' && res.type === 'simple') {
      this.setState({
        side: 'front',
        elements: fromJS(card.elements).toJS()
      })
    }
    this.props.updateElement({...card, setting: res})
  }
  clickComponent = (e) => {
@@ -231,7 +236,7 @@
  render() {
    const { cards, offset } = this.props
    const { card, elements, side, settingVisible, dict } = this.state
    const { card, elements, side } = this.state
    let _style = {...card.style}
@@ -256,7 +261,9 @@
              <div className="mk-popover-control">
                <Icon className="plus" title="添加元素" onClick={this.addElement} type="plus" />
                <Icon className="plus" title="添加按钮" onClick={this.addButton} type="plus-square" />
                <Icon className="edit" title="编辑" type="edit" onClick={() => this.setState({settingVisible: true})} />
                <NormalForm title="卡片设置" width={800} update={this.updateSetting} getForms={this.getSettingForms}>
                  <Icon type="edit" className="edit" title="编辑"/>
                </NormalForm>
                <CopyComponent type="cardcell" card={card}/>
                <PasteComponent elements={elements} options={['action', 'customCardElement']} updateConfig={(list) => this.updateCard(list, 'paste')} />
                <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" />
@@ -276,25 +283,6 @@
            </Popover>
          </div>
        </div>
        <Modal
          wrapClassName="popview-modal"
          title={'卡片设置'}
          visible={settingVisible}
          width={800}
          maskClosable={false}
          okText={dict['model.submit']}
          onOk={this.settingSubmit}
          onCancel={() => { this.setState({ settingVisible: false }) }}
          destroyOnClose
        >
          <SettingForm
            dict={dict}
            cards={cards}
            setting={card.setting}
            inputSubmit={this.settingSubmit}
            wrappedComponentRef={(inst) => this.settingRef = inst}
          />
        </Modal>
      </Col>
    )
  }
src/menu/components/card/cardcomponent/options.jsx
New file
@@ -0,0 +1,163 @@
/**
 * @description Setting表单配置信息
 */
export default function (setting, hasPrimaryKey) {
  let appType = sessionStorage.getItem('appType')
  let menulist = []
  let appmenulist = []
  if (appType) {
    appmenulist = sessionStorage.getItem('appMenus')
    if (appmenulist) {
      try {
        appmenulist = JSON.parse(appmenulist)
      } catch {
        appmenulist = []
      }
    } else {
      appmenulist = []
    }
  } else {
    menulist = sessionStorage.getItem('fstMenuList')
    if (menulist) {
      try {
        menulist = JSON.parse(menulist)
      } catch {
        menulist = []
      }
    } else {
      menulist = []
    }
  }
  const cardSettingForm = [
    {
      type: 'number',
      field: 'width',
      label: '卡片宽度',
      initval: setting.width || 24,
      tooltip: '栅格布局,每行等分为24列。',
      min: 1,
      max: 24,
      precision: 0,
      required: true
    },
    {
      type: 'radio',
      field: 'type',
      label: '卡片类型',
      initval: setting.type || 'simple',
      tooltip: '选择复式卡时,可配置鼠标悬浮时的显示信息。',
      required: false,
      options: [
        {value: 'simple', label: '单卡'},
        {value: 'multi', label: '复式卡'},
      ],
      controlFields: [
        {field: 'transform', values: ['multi']},
      ],
      forbid: appType === 'mob'
    },
    {
      type: 'select',
      field: 'transform',
      label: '过渡效果',
      initval: setting.transform || 'up',
      tooltip: '复式卡片鼠标悬浮信息的动画效果。',
      required: false,
      options: [
        {value: 'up', label: '向上滑动'},
        {value: 'down', label: '向下滑动'},
        {value: 'left', label: '向左滑动'},
        {value: 'right', label: '向右滑动'},
        {value: 'scale', label: '缩放'},
        {value: 'opacity', label: '透明度'},
        {value: 'rotateX', label: '纵向展开'},
        {value: 'rotateY', label: '横向展开'},
      ]
    },
    {
      type: 'text',
      field: 'primaryId',
      label: '主键值',
      initval: setting.primaryId || '',
      tooltip: '卡片点击时,向其他组件传递的ID值。',
      required: false,
      forbid: !hasPrimaryKey
    },
    {
      type: 'radio',
      field: 'click',
      label: '点击事件',
      initval: setting.click || '',
      tooltip: '当选择触发按钮时,只有当卡片中只存在一个按钮时有效。',
      required: false,
      options: [
        {value: '', label: '无'},
        {value: 'menu', label: '菜单'},
        {value: 'link', label: '链接'},
        {value: 'button', label: '按钮'},
      ],
      controlFields: [
        {field: 'menu', values: ['menu']},
        {field: 'appmenu', values: ['menu']},
        {field: 'linkurl', values: ['link']},
        {field: 'open', values: ['menu', 'link']},
        {field: 'joint', values: ['menu', 'link']},
      ]
    },
    {
      type: 'cascader',
      field: 'menu',
      label: '菜单',
      initval: setting.menu || [],
      required: true,
      options: menulist,
      forbid: !!appType
    },
    {
      type: 'select',
      field: 'appmenu',
      label: '关联菜单',
      initval: setting.menu || '',
      required: true,
      options: appmenulist,
      forbid: !appType
    },
    {
      type: 'textarea',
      field: 'linkurl',
      label: '链接',
      initval: setting.linkurl || '',
      required: true,
      options: [],
      span: 24
    },
    {
      type: 'radio',
      field: 'open',
      label: '打开方式',
      initval: setting.open || 'blank',
      required: false,
      options: [
        {value: 'blank', label: '新窗口'},
        {value: 'self', label: '当前窗口'},
      ],
      forbid: appType !== 'pc'
    },
    {
      type: 'radio',
      field: 'joint',
      label: '参数拼接',
      initval: setting.joint || 'true',
      required: false,
      options: [
        {value: 'true', label: '是'},
        {value: 'false', label: '否'},
      ],
    },
  ]
  return cardSettingForm
}
src/menu/components/card/cardcomponent/settingform/index.jsx
File was deleted
src/menu/components/card/cardcomponent/settingform/index.scss
File was deleted
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -74,7 +74,6 @@
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
        appMenus = []
      }
src/views/mobdesign/index.jsx
@@ -500,6 +500,11 @@
      appIndeList = appIndeList.map(item => (item.keys_type !== 'index' ? item.keys_id : '')).join(',')
      let menus = res.menus.filter(item => appIndeList.indexOf(item.MenuID) === -1)
      menus = menus.map(item => {
        item.value = item.MenuID
        item.label = item.MenuName
        return item
      })
      sessionStorage.setItem('appMenus', JSON.stringify(menus))
    })
  }
src/views/pcdesign/index.jsx
@@ -565,6 +565,11 @@
      appIndeList = appIndeList.map(item => (item.keys_type !== 'index' ? item.keys_id : '')).join(',')
      let menus = res.menus.filter(item => appIndeList.indexOf(item.MenuID) === -1)
      menus = menus.map(item => {
        item.value = item.MenuID
        item.label = item.MenuName
        return item
      })
      sessionStorage.setItem('appMenus', JSON.stringify(menus))
    })
  }