king
2021-06-24 423ca1c5d4e4cc7eba9e12125e74f47f5756f967
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -11,7 +11,9 @@
 * @param {*} usefulFields   存储过程可用的开始字段
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, setting, usefulFields, type, menulist = [], modules = [], columns = []) {
export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) {
  let setting = config.setting || {}
  let columns = config.columns || []
  let appMenus = []
  let opentypes = [
    {
@@ -59,7 +61,7 @@
  if (isApp) {
    opentypes = opentypes.filter(item => item.value !== 'tab')
    pageTemps = [
      { value: 'page', text: '菜单' },
      // { value: 'page', text: '菜单' },
      { value: 'linkpage', text: '关联菜单' },
      { value: 'billprint', text: '单据打印' },
      { value: 'pay', text: Formdict['model.pay'] },
@@ -198,7 +200,7 @@
      label: '链接方式',
      initVal: card.open || 'blank',
      required: true,
      forbid: !isApp,
      forbid: sessionStorage.getItem('appType') !== 'pc',
      options: [{
        value: 'blank',
        text: '新窗口'
@@ -215,14 +217,14 @@
      required: true,
      options: appMenus
    },
    {
      type: 'select',
      key: 'copyMenuId',
      label: '复制菜单',
      initVal: card.copyMenuId || '',
      required: false,
      options: appMenus
    },
    // {
    //   type: 'select',
    //   key: 'copyMenuId',
    //   label: '复制菜单',
    //   initVal: card.copyMenuId || '',
    //   required: false,
    //   options: appMenus
    // },
    {
      type: 'textarea',
      key: 'url',
@@ -444,6 +446,24 @@
      }]
    },
    {
      type: 'radio',
      key: 'swipe',
      label: "滑动显示",
      initVal: card.swipe || 'false',
      required: false,
      forbid: (type !== 'datacard' || sessionStorage.getItem('appType') !== 'mob'),
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'left',
        text: '左滑'
      }, {
        value: 'right',
        text: '右滑'
      }]
    },
    {
      type: 'select',
      key: 'icon',
      label: Formdict['model.icon'],
@@ -520,19 +540,19 @@
      type: 'select',
      key: 'controlField',
      label: '控制字段',
      tooltip: '显示控制字段,可根据行数据控制按钮是否显示。',
      tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。',
      initVal: card.controlField || '',
      required: false,
      forbid: card.$type !== 'tableButton',
      // forbid: card.$type !== 'tableButton',
      options: [{label: '无', field: ''}, ...columns]
    },
    {
      type: 'text',
      key: 'controlVal',
      label: '控制值',
      tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会隐藏,多个值用逗号分隔。',
      tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会禁用,多个值用逗号分隔。',
      initVal: card.controlVal || '',
      forbid: card.$type !== 'tableButton',
      // forbid: card.$type !== 'tableButton',
      required: false
    }
  ]