king
2024-04-08 37e28da53f6d4d7d8abe7626ba28ba7dbe16e7bb
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -318,6 +318,14 @@
    width = +width.replace(/x/, '.5')
  }
  let extraParam = []
  if (card.recordUser === 'true') {
    extraParam.push('recordUser')
  }
  if (card.dataM === 'true') {
    extraParam.push('dataM')
  }
  let forms = [
    {
      type: 'select',
@@ -499,14 +507,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
    },
    {
@@ -1259,18 +1267,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: '数据管理员'
      }]
    },
    {
@@ -1354,7 +1362,7 @@
      type: 'radio',
      key: 'permission',
      label: '权限验证',
      initVal: setting.permission || 'true',
      initVal: card.permission || 'true',
      required: false,
      options: [
        {value: 'true', text: '继承菜单'},
@@ -1510,6 +1518,65 @@
    },
    {
      type: 'radio',
      key: 'sysId',
      label: '自定义ID',
      initVal: card.sysId || '',
      tooltip: '不选行按钮可在前端生成ID值(32位),作为后续菜单的BID,存在标记时,ID值后将拼接标记值。',
      required: false,
      options: [{
        value: '',
        text: '空'
      }, {
        value: 'js',
        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',
@@ -1631,6 +1698,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 = [
@@ -1793,7 +1868,7 @@
      initVal: card.linkmenu || [],
      required: true,
      extendName: 'MenuNo',
      options: menulist
      options: menulist.length ? [...menulist, {value: 'multiMenu', label: '多菜单'}] : []
    },
    {
      type: 'textarea',
@@ -2383,18 +2458,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: '数据管理员'
      }]
    },
    {
@@ -2478,7 +2553,7 @@
      type: 'radio',
      key: 'permission',
      label: '权限验证',
      initVal: setting.permission || 'true',
      initVal: card.permission || 'true',
      required: false,
      options: [
        {value: 'true', text: '启用'},
@@ -2539,6 +2614,65 @@
    },
    {
      type: 'radio',
      key: 'sysId',
      label: '自定义ID',
      initVal: card.sysId || '',
      tooltip: '不选行按钮可在前端生成ID值(32位),作为后续菜单的BID,存在标记时,ID值后将拼接标记值。',
      required: false,
      options: [{
        value: '',
        text: '空'
      }, {
        value: 'js',
        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',