king
2023-03-11 642b103206a54923a460ee36550f275b22d6f09c
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -22,7 +22,7 @@
  if (card.eleType === 'button') {
    type = 'card'
  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') {
  } else if (config.subtype === 'datacard' || config.subtype === 'tablecard' || config.subtype === 'dualdatacard') {
    type = 'datacard'
  } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') {
    type = 'chart'
@@ -126,8 +126,9 @@
    }
  }
  if (appType === 'mob') {
    opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'innerpage', 'funcbutton'].includes(item.value))
    opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'popview', 'innerpage', 'funcbutton'].includes(item.value))
    funTypes = [
      { value: 'print', text: '标签打印' },
      { value: 'scan', text: '扫码' },
      { value: 'pay', text: '支付' },
      { value: 'refund', text: '退款' },
@@ -136,6 +137,7 @@
      { value: 'mkUnBinding', text: '用户解绑' },
      { value: 'mkUnsubscribe', text: '注销账户' },
      { value: 'reAuth', text: '切换系统(清空缓存-小程序)' },
      { value: 'clearCache', text: '清空本地配置' },
      { value: 'copyurl', text: '复制链接地址' },
      { value: 'logout', text: '退出' },
      { value: 'goBack', text: '返回' },
@@ -147,7 +149,7 @@
  } else if (appType === 'pc') {
    opentypes = opentypes.filter(item => item.value !== 'tab')
    funTypes = [
      { value: 'refund', text: '退款' },
      { value: 'print', text: '标签打印' },
      { value: 'changeuser', text: '切换用户' },
    ]
    pageTemps = [
@@ -201,7 +203,7 @@
  }
  let closetab = []
  if (!appType) {
  if (!appType && viewType !== 'popview') {
    closetab = [{
      value: 'closetab',
      text: '关闭标签'
@@ -264,6 +266,9 @@
      }, {
        value: 'radio',
        text: '勾选框'
      }, {
        value: 'counter',
        text: '计数器'
      }, 
      ...formTypes]
    },
@@ -311,6 +316,7 @@
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。',
      required: true,
      options: [{
        value: 'system',
@@ -382,6 +388,14 @@
      options: isApp ? appMenus : menulist
    },
    {
      type: 'text',
      key: 'prefix',
      label: '前缀',
      initVal: card.prefix || '',
      tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid开头。',
      required: false
    },
    {
      type: 'textarea',
      key: 'url',
      label: '页面地址',
@@ -391,15 +405,19 @@
    {
      type: 'radio',
      key: 'sysInterface',
      label: '系统接口',
      label: '系统类型',
      initVal: card.sysInterface || 'false',
      tooltip: '业务系统指同一sso下的其他业务系统,外部系统指不同sso下的其他业务系统。',
      required: true,
      options: [{
        value: 'true',
        text: '是'
      }, {
        value: 'false',
        text: '否'
        text: '业务'
      }, {
        value: 'true',
        text: '单点'
      }, {
        value: 'external',
        text: '外部'
      }]
    },
    {
@@ -422,6 +440,21 @@
      key: 'proInterface',
      label: '正式地址',
      initVal: card.proInterface || '',
      tooltip: '正式系统所使用的接口地址。',
      required: false
    },
    {
      type: 'keyinterface',
      key: 'exInterface',
      label: '测试地址',
      initVal: card.exInterface || '',
      required: true
    },
    {
      type: 'keyinterface',
      key: 'exProInterface',
      label: '正式地址',
      initVal: card.exProInterface || '',
      tooltip: '正式系统所使用的接口地址。',
      required: false
    },
@@ -502,7 +535,7 @@
      key: 'execSuccess',
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
@@ -525,7 +558,7 @@
      key: 'execError',
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
@@ -686,10 +719,20 @@
      required: true
    },
    {
      type: 'cascader',
      key: 'syncComponent',
      label: '刷新组件',
      initVal: card.syncComponent || [],
      tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。',
      required: false,
      options: modules
    },
    {
      type: 'radio',
      key: 'pagination',
      label: '分页',
      initVal: card.pagination || 'false',
      tooltip: '导出数据量较大时(1000+),可设置分页请求数据。',
      required: false,
      options: [{
        value: 'true',
@@ -697,7 +740,8 @@
      }, {
        value: 'false',
        text: '否'
      }]
      }],
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
@@ -711,16 +755,8 @@
      }, {
        value: 'false',
        text: '非必填'
      }]
    },
    {
      type: 'cascader',
      key: 'syncComponent',
      label: '刷新组件',
      initVal: card.syncComponent || [],
      tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。',
      required: false,
      options: modules
      }],
      forbid: appType === 'mob'
    },
    {
      type: 'cascader',
@@ -805,23 +841,13 @@
      }, {
        value: 'drawer',
        text: '抽屉'
      }]
    },
    {
      type: 'number',
      key: 'ratio',
      min: 1,
      max: 3000,
      precision: 0,
      label: '比例',
      initVal: card.ratio || 85,
      tooltip: '模态框或抽屉的宽度,小于100为窗口宽度(或高度)百分比,大于100为像素值。',
      required: true
      }],
      forbid: appType === 'mob',
    },
    {
      type: 'radio',
      key: 'placement',
      label: '抽屉方向',
      label: '弹出方向',
      initVal: card.placement || 'right',
      required: false,
      options: [{
@@ -839,6 +865,17 @@
      }]
    },
    {
      type: 'number',
      key: 'ratio',
      min: 1,
      max: 3000,
      precision: 0,
      label: '比例',
      initVal: card.ratio || 85,
      tooltip: '模态框或抽屉的宽度,小于100为窗口宽度(或高度)百分比,大于100为像素值。',
      required: true
    },
    {
      type: 'radio',
      key: 'clickouter',
      label: '点击蒙层',
@@ -851,6 +888,36 @@
        value: 'close',
        text: '关闭'
      }]
    },
    {
      type: 'radio',
      key: 'maskStyle',
      label: '蒙层样式',
      initVal: card.maskStyle || 'default',
      required: false,
      options: [{
        value: 'default',
        text: '默认'
      }, {
        value: 'transparent',
        text: '透明'
      }],
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
      key: 'closeButton',
      label: '关闭按钮',
      initVal: card.closeButton || 'false',
      required: false,
      options: [{
        value: 'false',
        text: '隐藏'
      }, {
        value: 'true',
        text: '显示'
      }],
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
@@ -911,7 +978,10 @@
      initVal: card.controlField || '',
      required: true,
      allowClear: true,
      options: columns
      options: columns.map(item => ({
        value: item.field,
        text: `${item.label}(${item.field})`
      }))
    },
    {
      type: 'text',
@@ -959,7 +1029,7 @@
    {
      type: 'radio',
      key: 'size',
      label: '开关尺寸',
      label: '尺寸',
      initVal: card.size || 'default',
      options: [{
        value: 'large',
@@ -973,12 +1043,46 @@
      }]
    },
    {
      type: 'radio',
      key: 'checkType',
      label: '选框样式',
      initVal: card.checkType || 'circle',
      options: [{
        value: 'circle',
        text: '圆角'
      }, {
        value: 'square',
        text: '方角'
      }]
    },
    {
      type: 'text',
      key: 'openVal',
      label: '开启值',
      initVal: card.openVal === undefined ? '' : card.openVal + '',
      tooltip: '当开启与关闭值均为正整数时,默认转换为INT类型。',
      required: false
    },
    {
      type: 'number',
      key: 'min',
      label: '最小值',
      initVal: card.min,
      required: false
    },
    {
      type: 'number',
      key: 'max',
      label: '最大值',
      initVal: card.max,
      required: false
    },
    {
      type: 'number',
      key: 'decimal',
      label: '小数位',
      initVal: card.decimal || 0,
      required: true
    },
    {
      type: 'text',
@@ -1001,6 +1105,21 @@
      label: '关闭提示',
      initVal: card.closeText || '',
      required: false,
    },
    {
      type: 'radio',
      key: 'execType',
      label: '请求方式',
      initVal: card.execType || 'multi',
      tooltip: '选中多条数据时的请求方式,注:当选中数据超过20条时将逐条请求。',
      required: false,
      options: [{
        value: 'multi',
        text: '批量请求'
      }, {
        value: 'single',
        text: '逐条请求'
      }]
    },
    {
      type: 'radio',
@@ -1068,6 +1187,8 @@
  ]
  let pageTemps = [
    // { value: 'print', text: '标签打印模板' },
    // { value: 'billprintTemp', text: '单据打印模板' },
    { value: 'billprint', text: '单据打印' },
    { value: 'pay', text: '支付' },
    { value: 'custom', text: '自定义' }
@@ -1184,6 +1305,7 @@
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。',
      required: true,
      options: [{
        value: 'system',
@@ -1264,15 +1386,19 @@
    {
      type: 'radio',
      key: 'sysInterface',
      label: '系统接口',
      label: '系统类型',
      initVal: card.sysInterface || 'false',
      tooltip: '业务系统指同一sso下的其他业务系统,外部系统指不同sso下的其他业务系统。',
      required: true,
      options: [{
        value: 'true',
        text: '是'
      }, {
        value: 'false',
        text: '否'
        text: '业务'
      }, {
        value: 'true',
        text: '单点'
      }, {
        value: 'external',
        text: '外部'
      }]
    },
    {
@@ -1295,6 +1421,21 @@
      key: 'proInterface',
      label: '正式地址',
      initVal: card.proInterface || '',
      tooltip: '正式系统所使用的接口地址。',
      required: false
    },
    {
      type: 'keyinterface',
      key: 'exInterface',
      label: '测试地址',
      initVal: card.exInterface || '',
      required: true
    },
    {
      type: 'keyinterface',
      key: 'exProInterface',
      label: '正式地址',
      initVal: card.exProInterface || '',
      tooltip: '正式系统所使用的接口地址。',
      required: false
    },
@@ -1375,7 +1516,7 @@
      key: 'execSuccess',
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
@@ -1397,7 +1538,7 @@
      key: 'execError',
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
@@ -1458,6 +1599,23 @@
      required: true
    },
    {
      type: 'radio',
      key: 'show',
      label: '显示为',
      initVal: card.show || 'button',
      required: true,
      options: [{
        value: 'icon',
        text: '图标'
      }, {
        value: 'button',
        text: '图标+文字'
      }, {
        value: 'link',
        text: '文字+图标'
      }]
    },
    {
      type: 'icon',
      key: 'icon',
      label: '图标',
@@ -1495,10 +1653,20 @@
      required: true
    },
    {
      type: 'cascader',
      key: 'syncComponent',
      label: '刷新组件',
      initVal: card.syncComponent || [],
      tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。',
      required: false,
      options: modules
    },
    {
      type: 'radio',
      key: 'pagination',
      label: '分页',
      initVal: card.pagination || 'false',
      tooltip: '导出数据量较大时(1000+),可设置分页请求数据。',
      required: false,
      options: [{
        value: 'true',
@@ -1521,15 +1689,6 @@
        value: 'false',
        text: '非必填'
      }]
    },
    {
      type: 'cascader',
      key: 'syncComponent',
      label: '刷新组件',
      initVal: card.syncComponent || [],
      tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。',
      required: false,
      options: modules
    },
    {
      type: 'cascader',
@@ -1598,7 +1757,7 @@
    {
      type: 'radio',
      key: 'placement',
      label: '抽屉方向',
      label: '弹出方向',
      initVal: card.placement || 'right',
      required: false,
      options: [{
@@ -1657,7 +1816,10 @@
      initVal: card.controlField || '',
      required: true,
      allowClear: true,
      options: columns
      options: columns.map(item => ({
        value: item.field,
        text: `${item.label}(${item.field})`
      }))
    },
    {
      type: 'text',
@@ -1690,6 +1852,21 @@
    },
    {
      type: 'radio',
      key: 'execType',
      label: '请求方式',
      initVal: card.execType || 'multi',
      tooltip: '选中多条数据时的请求方式,注:当选中数据超过20条时将逐条请求。',
      required: false,
      options: [{
        value: 'multi',
        text: '批量请求'
      }, {
        value: 'single',
        text: '逐条请求'
      }]
    },
    {
      type: 'radio',
      key: 'progress',
      label: '进度提示',
      initVal: card.progress || 'number',