king
2024-05-07 2aa5ab63b4bbce5c36dbb3511b205b3b5f6af9bd
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -1,5 +1,5 @@
import React from 'react'
import { btnClasses } from '@/utils/option.js'
/**
 * @description 获取按钮表单配置信息
@@ -8,7 +8,7 @@
 * @param {*} setting        组件配置
 * @param {*} usefulFields   存储过程可用的开始字段
 */
export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side) {
export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side, position) {
  let appType = sessionStorage.getItem('appType')
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let setting = config.setting || {}
@@ -161,6 +161,8 @@
    { value: 'print', text: '标签打印' },
    { value: 'refund', text: '退款' },
    { value: 'closetab', text: '标签关闭' },
    { value: 'expPdf', text: '导出PDF' },
    { value: 'shareLink', text: '分享链接' },
    { value: 'megvii', text: '旷视面板机' },
    { value: 'filezip', text: '文件压缩包' },
  ]
@@ -203,6 +205,8 @@
      { value: 'reAuth', text: '切换系统(清空缓存-小程序)' },
      { value: 'clearCache', text: '清空本地配置' },
      { value: 'copyurl', text: '复制链接地址' },
      { value: 'expPdf', text: '导出PDF' },
      { value: 'shareLink', text: '分享链接' },
      { value: 'logout', text: '退出' },
      { value: 'goBack', text: '返回' },
    ]
@@ -307,6 +311,29 @@
    }]
  } else if (card.formType === 'scan') {
    card.formType = 'switch'
  }
  let width = card.width || (card.width === 0 ? 0 : 12)
  if (/x/.test(card.width)) {
    width = +width.replace(/x/, '.5')
  }
  let extraParam = []
  if (card.recordUser === 'true') {
    extraParam.push('recordUser')
  }
  if (card.dataM === 'true') {
    extraParam.push('dataM')
  }
  if (!appType) {
    if (typeof(card.openmenu) === 'string') {
      card.openmenu = []
    }
  } else {
    if (typeof(card.openmenu) !== 'string') {
      card.openmenu = ''
    }
  }
  let forms = [
@@ -468,6 +495,19 @@
      key: 'printTemp',
      label: '打印模板',
      initVal: card.printTemp || '',
      help: (record) => {
        if (record.printTemp) {
          return <span onClick={() => {
            sessionStorage.setItem('mk-print-temp', record.printTemp)
            window.open('#/hs')
            setTimeout(() => {
              sessionStorage.removeItem('mk-print-temp')
            }, 50)
          }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#查看模板</span>
        }
        return ''
      },
      required: true
    },
    {
@@ -477,14 +517,14 @@
      initVal: card.linkmenu || (isApp ? '' : []),
      required: true,
      extendName: 'MenuNo',
      options: isApp ? appMenus : menulist
      options: isApp ? appMenus : (menulist.length ? [...menulist, {value: 'multiMenu', label: '多菜单'}] : [])
    },
    {
      type: 'text',
      key: 'prefix',
      label: '前缀',
      initVal: card.prefix || '',
      tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid开头。',
      tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid(:或,)开头,mkbid(:或,)跳转后将被去除。例如:mkbid:123456 跳转后页面BID为 123456。',
      required: false
    },
    {
@@ -669,7 +709,7 @@
      key: 'execSuccess',
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。',
      required: true,
      options: [{
        value: 'never',
@@ -697,7 +737,7 @@
      key: 'execError',
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。',
      required: true,
      options: [{
        value: 'never',
@@ -751,17 +791,69 @@
      }]
    },
    {
      type: 'radio',
      key: 'shortUrl',
      label: '短链接',
      initVal: card.shortUrl || 'false',
      options: [{
        value: 'false',
        text: '禁用'
      }, {
        value: 'true',
        text: '启用'
      }]
    },
    {
      type: 'textarea',
      key: 'shareUrl',
      label: '链接地址',
      initVal: card.shareUrl || '',
      tooltip: '链接中如果存在@BID@或@ID@将自动替换。',
      required: true
    },
    {
      type: 'textarea',
      key: 'shareProUrl',
      label: '正式链接',
      initVal: card.shareProUrl || '',
      tooltip: '链接中如果存在@BID@或@ID@将自动替换。',
      required: false
    },
    {
      type: 'text',
      key: 'shareTip',
      label: '分享提示',
      initVal: card.shareTip || '',
      tooltip: '分享时对用户的提示信息。',
      required: false
    },
    {
      type: 'number',
      key: 'width',
      min: 1,
      min: 0,
      max: 24,
      precision: 0,
      precision: 1,
      label: '宽度',
      initVal: card.width || 12,
      tooltip: '栅格布局,每行等分为24列。',
      initVal: width,
      tooltip: '栅格布局,每行等分为24列。为 0 时宽度自适应。可设置半列即.5。',
      forbid: type !== 'card',
      required: true
    },
    // {
    //   type: 'radio',
    //   key: 'exportType',
    //   label: '导出方式',
    //   initVal: card.exportType || 'download',
    //   tooltip: '',
    //   required: true,
    //   options: [{
    //     value: 'download',
    //     text: '下载本地'
    //   }, {
    //     value: 'link',
    //     text: '生成链接'
    //   }]
    // },
    {
      type: 'radio',
      key: 'show',
@@ -778,6 +870,25 @@
      }, {
        value: 'link',
        text: '文字+图标'
      }]
    },
    {
      type: 'radio',
      key: 'hover',
      label: '悬浮效果',
      initVal: card.hover || '',
      tooltip: '鼠标悬浮按钮上方时的颜色变化。',
      required: false,
      forbid: type === 'card' || appType === 'mob',
      options: [{
        value: '',
        text: '无'
      }, {
        value: 'mk-btn-hover-bg',
        text: '背景变化'
      }, {
        value: 'mk-btn-hover-border',
        text: '边框变化'
      }]
    },
    {
@@ -960,15 +1071,38 @@
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。',
      initVal: card.output || '',
      required: false,
      forbid: viewType === 'popview'
      // forbid: viewType === 'popview'
    },
    {
      type: 'text',
      key: 'tipTitle',
      label: '确认提示',
      initVal: card.tipTitle || '',
      tooltip: '注:弹窗(表单)在显示为是否框时有效。',
      tooltip: '提示框的确认提示信息。',
      required: false
    },
    {
      type: 'text',
      key: 'hoverTitle',
      label: '悬浮提示',
      initVal: card.hoverTitle || '',
      tooltip: '鼠标悬浮在按钮上方时的提示信息。',
      forbid: appType === 'mob',
      required: false
    },
    {
      type: 'select',
      key: 'showName',
      label: '显示内容',
      initVal: card.showName || '',
      tooltip: '行级按钮可通过行信息控制按钮显示内容。',
      required: false,
      allowClear: true,
      forbid: position !== 'line',
      options: columns.map(item => ({
        value: item.field,
        text: `${item.label}(${item.field})`
      }))
    },
    {
      type: 'radio',
@@ -1143,18 +1277,18 @@
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
      key: 'recordUser',
      label: '记录用户',
      initVal: card.recordUser || 'false',
      tooltip: '当选择“是”时,内部函数的传参会增加 username 与 fullname。',
      type: 'checkbox',
      key: 'extraParam',
      label: '扩展参数',
      initVal: extraParam,
      tooltip: '选择“用户信息”时,内部函数的传参会增加 username 与 fullname。选择“数据管理员”时,内部函数的传参会增加 dataM ,管理员值为“Y”,普通用户为空。',
      required: false,
      options: [{
        value: 'false',
        text: '否'
        value: 'recordUser',
        text: '用户信息'
      }, {
        value: 'true',
        text: '是'
        value: 'dataM',
        text: '数据管理员'
      }]
    },
    {
@@ -1204,6 +1338,21 @@
      initVal: card.reason || '',
      required: false
    },
    // {
    //   type: 'radio',
    //   key: 'formCache',
    //   label: '表单缓存',
    //   initVal: card.formCache || 'false',
    //   tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
    //   required: false,
    //   options: [{
    //     value: 'false',
    //     text: '不清空'
    //   }, {
    //     value: 'clear',
    //     text: '清空'
    //   }]
    // },
    {
      type: 'radio',
      key: 'hidden',
@@ -1218,6 +1367,18 @@
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'radio',
      key: 'permission',
      label: '权限验证',
      initVal: card.permission || 'true',
      required: false,
      options: [
        {value: 'true', text: '继承菜单'},
        {value: 'false', text: '禁用'},
      ],
      forbid: viewType === 'popview'
    },
    {
      type: 'splitLine',
@@ -1349,13 +1510,14 @@
      label: '组件列表',
      initVal: card.syncComponents || [],
      required: true,
      actions: [],
      actions: ['edit', 'del', 'add', 'move'],
      columns: [
        {
          title: '组件',
          dataIndex: 'syncComId',
          inputType: 'cascader',
          editable: true,
          unique: true,
          required: true,
          extends: [{key: 'label', value: 'label'}],
          width: '70%',
@@ -1363,6 +1525,90 @@
          options: modules
        }
      ]
    },
    {
      type: 'radio',
      key: 'sysId',
      label: '自定义ID',
      initVal: card.sysId || '',
      tooltip: '不选行按钮可在前端生成ID值(32位),作为后续菜单的BID,存在标记时,ID值后将拼接标记值。',
      required: false,
      options: [{
        value: '',
        text: '组件BID'
      }, {
        value: 'js',
        text: '前端生成'
      }, {
        value: 'empty',
        text: '空'
      }]
    },
    {
      type: 'text',
      key: 'sign',
      label: '标记',
      initVal: card.sign || '',
      required: false
    },
    {
      type: 'table',
      key: 'multiMenus',
      label: '菜单列表',
      initVal: card.multiMenus || [],
      required: true,
      actions: ['edit', 'del', 'add', 'move'],
      columns: [
        {
          title: '名称',
          dataIndex: 'name',
          inputType: 'text',
          editable: true,
          required: false,
          width: '30%'
        },
        {
          title: '菜单',
          dataIndex: 'menuId',
          inputType: 'cascader',
          editable: true,
          required: true,
          extends: [{key: 'label', value: 'label', mutilLabel: 'name'}],
          width: '30%',
          render: (text, record) => record.label,
          options: menulist
        },
        {
          title: '标记',
          dataIndex: 'sign',
          inputType: 'text',
          editable: true,
          required: false,
          width: '20%'
        }
      ]
    },
    {
      type: 'radio',
      key: 'preHandle',
      label: '自定义脚本',
      initVal: card.preHandle || 'false',
      // tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。',
      required: false,
      options: [{
        value: 'false',
        text: '禁用'
      }, {
        value: 'true',
        text: '启用'
      }]
    },
    {
      type: 'codemirror',
      key: 'pre_func',
      label: '自定义脚本',
      initVal: card.pre_func || '',
      required: true,
    }
  ]
@@ -1376,7 +1622,7 @@
 * @param {*} setting        组件配置
 * @param {*} usefulFields   存储过程可用的开始字段
 */
export function getBaseTableActionForm (card, functip, config, usefulFields, modules) {
export function getBaseTableActionForm (card, functip, config, usefulFields, modules, position) {
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let setting = config.setting || {}
  let columns = config.columns || []
@@ -1430,6 +1676,8 @@
    { value: 'print', text: '标签打印' },
    { value: 'refund', text: '退款' },
    { value: 'closetab', text: '标签关闭' },
    { value: 'expPdf', text: '导出PDF' },
    { value: 'shareLink', text: '分享链接' },
    { value: 'megvii', text: '旷视面板机' },
    { value: 'filezip', text: '文件压缩包' },
  ]
@@ -1463,6 +1711,14 @@
  if (card.OpenType === 'form') { // 拖拽添加类型转换
    card.OpenType = 'pop'
  }
  let extraParam = []
  if (card.recordUser === 'true') {
    extraParam.push('recordUser')
  }
  if (card.dataM === 'true') {
    extraParam.push('dataM')
  }
  let forms = [
@@ -1603,6 +1859,19 @@
      key: 'printTemp',
      label: '打印模板',
      initVal: card.printTemp || '',
      help: (record) => {
        if (record.printTemp) {
          return <span onClick={() => {
            sessionStorage.setItem('mk-print-temp', record.printTemp)
            window.open('#/hs')
            setTimeout(() => {
              sessionStorage.removeItem('mk-print-temp')
            }, 50)
          }} style={{color: '#1890ff', cursor: 'pointer', fontSize: '13px'}}>#查看模板</span>
        }
        return ''
      },
      required: true
    },
    {
@@ -1612,7 +1881,7 @@
      initVal: card.linkmenu || [],
      required: true,
      extendName: 'MenuNo',
      options: menulist
      options: menulist.length ? [...menulist, {value: 'multiMenu', label: '多菜单'}] : []
    },
    {
      type: 'textarea',
@@ -1796,7 +2065,7 @@
      key: 'execSuccess',
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用);@no_target_menu@ 不执行打开菜单。',
      required: true,
      options: [{
        value: 'never',
@@ -1821,7 +2090,7 @@
      key: 'execError',
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新哪一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮(弹窗按钮)中设置关闭后刷新哪一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。' : '选择刷新行时,如果选择多条数据会刷新组件;选择刷新行 / 组件时,如果当前行数据不存在会刷新组件。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息(@retmsg)特殊标识:@close_tab@ 执行(关闭标签-管理系统);@close_popup@ 执行(关闭弹窗);@goback@ 执行(返回上一页-子应用)。',
      required: true,
      options: [{
        value: 'never',
@@ -1872,18 +2141,70 @@
        text: '不重置'
      }]
    },
    // {
    //   type: 'radio',
    //   key: 'exportType',
    //   label: '导出方式',
    //   initVal: card.exportType || 'download',
    //   tooltip: '',
    //   required: true,
    //   options: [{
    //     value: 'download',
    //     text: '下载本地'
    //   }, {
    //     value: 'link',
    //     text: '生成链接'
    //   }]
    // },
    {
      type: 'number',
      key: 'width',
      min: 1,
      max: 24,
      precision: 0,
      label: '宽度',
      initVal: card.width || 12,
      tooltip: '栅格布局,每行等分为24列。',
      forbid: card.eleType !== 'button',
      type: 'radio',
      key: 'shortUrl',
      label: '短链接',
      initVal: card.shortUrl || 'false',
      options: [{
        value: 'false',
        text: '禁用'
      }, {
        value: 'true',
        text: '启用'
      }]
    },
    {
      type: 'textarea',
      key: 'shareUrl',
      label: '链接地址',
      initVal: card.shareUrl || '',
      tooltip: '链接中如果存在@BID@或@ID@将自动替换。',
      required: true
    },
    {
      type: 'textarea',
      key: 'shareProUrl',
      label: '正式链接',
      initVal: card.shareProUrl || '',
      tooltip: '链接中如果存在@BID@或@ID@将自动替换。',
      required: false
    },
    {
      type: 'text',
      key: 'shareTip',
      label: '分享提示',
      initVal: card.shareTip || '',
      tooltip: '分享时对用户的提示信息。',
      required: false
    },
    // {
    //   type: 'number',
    //   key: 'width',
    //   min: 1,
    //   max: 24,
    //   precision: 0,
    //   label: '宽度',
    //   initVal: card.width || 12,
    //   tooltip: '栅格布局,每行等分为24列。',
    //   forbid: card.eleType !== 'button',
    //   required: true
    // },
    {
      type: 'radio',
      key: 'show',
@@ -1899,6 +2220,24 @@
      }, {
        value: 'link',
        text: '文字+图标'
      }]
    },
    {
      type: 'radio',
      key: 'hover',
      label: '悬浮效果',
      initVal: card.hover || '',
      tooltip: '鼠标悬浮按钮上方时的颜色变化。',
      required: false,
      options: [{
        value: '',
        text: '无'
      }, {
        value: 'mk-btn-hover-bg',
        text: '背景变化'
      }, {
        value: 'mk-btn-hover-border',
        text: '边框变化'
      }]
    },
    {
@@ -2005,15 +2344,37 @@
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。',
      initVal: card.output || '',
      required: false,
      forbid: viewType === 'popview'
      // forbid: viewType === 'popview'
    },
    {
      type: 'text',
      key: 'tipTitle',
      label: '确认提示',
      initVal: card.tipTitle || '',
      tooltip: '注:弹窗(表单)在显示为是否框时有效。',
      tooltip: '提示框的确认提示信息。',
      required: false
    },
    {
      type: 'text',
      key: 'hoverTitle',
      label: '悬浮提示',
      initVal: card.hoverTitle || '',
      tooltip: '鼠标悬浮在按钮上方时的提示信息。',
      required: false
    },
    {
      type: 'select',
      key: 'showName',
      label: '显示内容',
      initVal: card.showName || '',
      tooltip: '行级按钮可通过行信息控制按钮显示内容。',
      required: false,
      allowClear: true,
      forbid: position !== 'line',
      options: columns.map(item => ({
        value: item.field,
        text: `${item.label}(${item.field})`
      }))
    },
    {
      type: 'radio',
@@ -2110,18 +2471,18 @@
      required: false
    },
    {
      type: 'radio',
      key: 'recordUser',
      label: '记录用户',
      initVal: card.recordUser || 'false',
      tooltip: '当选择“是”时,内部函数的传参会增加 username 与 fullname。',
      type: 'checkbox',
      key: 'extraParam',
      label: '扩展参数',
      initVal: extraParam,
      tooltip: '选择“用户信息”时,内部函数的传参会增加 username 与 fullname。选择“数据管理员”时,内部函数的传参会增加 dataM ,管理员值为“Y”,普通用户为空。',
      required: false,
      options: [{
        value: 'false',
        text: '否'
        value: 'recordUser',
        text: '用户信息'
      }, {
        value: 'true',
        text: '是'
        value: 'dataM',
        text: '数据管理员'
      }]
    },
    {
@@ -2171,6 +2532,21 @@
      initVal: card.reason || '',
      required: false
    },
    // {
    //   type: 'radio',
    //   key: 'formCache',
    //   label: '表单缓存',
    //   initVal: card.formCache || 'false',
    //   tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。',
    //   required: false,
    //   options: [{
    //     value: 'false',
    //     text: '不清空'
    //   }, {
    //     value: 'clear',
    //     text: '清空'
    //   }]
    // },
    {
      type: 'radio',
      key: 'hidden',
@@ -2185,6 +2561,18 @@
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'radio',
      key: 'permission',
      label: '权限验证',
      initVal: card.permission || 'true',
      required: false,
      options: [
        {value: 'true', text: '启用'},
        {value: 'false', text: '禁用'},
      ],
      forbid: viewType === 'popview'
    },
    {
      type: 'radio',
@@ -2221,12 +2609,13 @@
      label: '组件列表',
      initVal: card.syncComponents || [],
      required: true,
      actions: [],
      actions: ['edit', 'del', 'add', 'move'],
      columns: [
        {
          title: '组件',
          dataIndex: 'syncComId',
          inputType: 'cascader',
          unique: true,
          editable: true,
          required: true,
          extends: [{key: 'label', value: 'label'}],
@@ -2235,6 +2624,90 @@
          options: modules
        }
      ]
    },
    {
      type: 'radio',
      key: 'sysId',
      label: '自定义ID',
      initVal: card.sysId || '',
      tooltip: '不选行按钮可在前端生成ID值(32位),作为后续菜单的BID,存在标记时,ID值后将拼接标记值。',
      required: false,
      options: [{
        value: '',
        text: '组件BID'
      }, {
        value: 'js',
        text: '前端生成'
      }, {
        value: 'empty',
        text: '空'
      }]
    },
    {
      type: 'text',
      key: 'sign',
      label: '标记',
      initVal: card.sign || '',
      required: false
    },
    {
      type: 'table',
      key: 'multiMenus',
      label: '菜单列表',
      initVal: card.multiMenus || [],
      required: true,
      actions: ['edit', 'del', 'add', 'move'],
      columns: [
        {
          title: '名称',
          dataIndex: 'name',
          inputType: 'text',
          editable: true,
          required: false,
          width: '30%'
        },
        {
          title: '菜单',
          dataIndex: 'menuId',
          inputType: 'cascader',
          editable: true,
          required: true,
          extends: [{key: 'label', value: 'label', mutilLabel: 'name'}],
          width: '30%',
          render: (text, record) => record.label,
          options: menulist
        },
        {
          title: '标记',
          dataIndex: 'sign',
          inputType: 'text',
          editable: true,
          required: false,
          width: '20%'
        }
      ]
    },
    {
      type: 'radio',
      key: 'preHandle',
      label: '自定义脚本',
      initVal: card.preHandle || 'false',
      // tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。',
      required: false,
      options: [{
        value: 'false',
        text: '禁用'
      }, {
        value: 'true',
        text: '启用'
      }]
    },
    {
      type: 'codemirror',
      key: 'pre_func',
      label: '自定义脚本',
      initVal: card.pre_func || '',
      required: true,
    }
  ]