king
2021-12-14 0e274944e11094012aa2e1557df8fe438b3b6d20
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -82,7 +82,7 @@
  const isApp = ['pc', 'mob'].includes(appType)
  let funTypes = [
    { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
    { value: 'changeuser', text: '切换用户' },
    { value: 'print', text: '标签打印' },
    { value: 'closetab', text: '标签关闭' },
  ]
@@ -106,7 +106,7 @@
        { value: 'logout', text: '退出' },
        { value: 'mkBinding', text: '开通扫码登录' },
        { value: 'mkUnBinding', text: '用户解绑' },
        { value: 'reAuth', text: '切换系统' },
        { value: 'reAuth', text: '切换系统(清空缓存-小程序)' },
        { value: 'goBack', text: '返回' },
      ]
      pageTemps = [
@@ -122,7 +122,7 @@
        { value: 'custom', text: '链接' }
      ]
      funTypes = [
        { value: 'changeuser', text: Formdict['header.form.func.changeuser'] },
        { value: 'changeuser', text: '切换用户' },
      ]
      opentypes = opentypes.filter(item => item.value !== 'tab')
    }
@@ -136,9 +136,17 @@
  if (viewType === 'popview') { // 弹窗标签
    opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton')
    refresh.push({
      value: 'popclose',
      text: '标签刷新'
      value: 'closepoptab', // 关闭弹窗标签
      text: '关闭弹窗'
    })
    refresh.push({
      value: 'popclose',  // 执行弹窗关闭时的刷新
      text: '刷新源组件'
    })
  }
  if (!card.control && card.controlField) {
    card.control = 'disabled'
  }
  let forms = [
@@ -153,7 +161,7 @@
    {
      type: 'select',
      key: 'funcType',
      label: Formdict['header.form.funcType'],
      label: '功能类型',
      initVal: card.funcType || '',
      required: true,
      options: funTypes
@@ -356,9 +364,8 @@
      type: 'select',
      key: 'Ot',
      label: Formdict['header.form.isRequired'],
      initVal: card.Ot || 'requiredSgl',
      initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'),
      required: true,
      forbid: card.$type === 'tableButton',
      options: []
    },
    {
@@ -375,7 +382,7 @@
      key: 'execSuccess',
      label: Formdict['model.form.afterSuccess'],
      initVal: card.execSuccess || 'never',
      tooltip: refresh.length ? '执行标签刷新时,会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。',
      required: true,
      options: [{
        value: 'never',
@@ -383,6 +390,9 @@
      }, {
        value: 'grid',
        text: '刷新当前组件'
      }, {
        value: 'line',
        text: '刷新行'
      }, {
        value: 'mainline',
        text: '刷新上级组件 - 行'
@@ -397,7 +407,7 @@
      key: 'execError',
      label: Formdict['model.form.afterError'],
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行标签关闭刷新时,会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。',
      required: true,
      options: [{
        value: 'never',
@@ -405,6 +415,9 @@
      }, {
        value: 'grid',
        text: '刷新当前组件'
      }, {
        value: 'line',
        text: '刷新行'
      }, {
        value: 'mainline',
        text: '刷新上级组件 - 行'
@@ -475,13 +488,13 @@
      type: 'radio',
      key: 'swipe',
      label: "滑动显示",
      initVal: card.swipe || 'false',
      initVal: card.swipe === 'false' ? 'left' : (card.swipe || 'left'), // 移动端仅保留滑动显示按钮
      required: false,
      forbid: (type !== 'datacard' || appType !== 'mob'),
      options: [{
        value: 'false',
        text: '否'
      }, {
      //   value: 'false',
      //   text: '否'
      // }, {
        value: 'left',
        text: '左滑'
      }, {
@@ -530,7 +543,7 @@
    {
      type: 'radio',
      key: 'pagination',
      label: Formdict['header.form.pagination'],
      label: '分页',
      initVal: card.pagination || 'false',
      required: false,
      options: [{
@@ -560,7 +573,7 @@
      key: 'syncComponent',
      label: '刷新组件',
      initVal: card.syncComponent || [],
      tooltip: '执行成功后,需要同步刷新的组件',
      tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件',
      required: false,
      options: modules
    },
@@ -582,24 +595,6 @@
      required: false,
      forbid: isApp || viewType === 'popview',
      options: menulist
    },
    {
      type: 'select',
      key: 'controlField',
      label: '控制字段',
      tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。',
      initVal: card.controlField || '',
      required: false,
      allowClear: true,
      options: columns
    },
    {
      type: 'text',
      key: 'controlVal',
      label: '控制值',
      tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会禁用,多个值用逗号分隔。',
      initVal: card.controlVal || '',
      required: false
    },
    {
      type: 'cascader',
@@ -693,6 +688,20 @@
    },
    {
      type: 'radio',
      key: 'clickouter',
      label: '点击蒙层',
      initVal: card.clickouter || 'unclose',
      required: false,
      options: [{
        value: 'unclose',
        text: '不关闭'
      }, {
        value: 'close',
        text: '关闭'
      }]
    },
    {
      type: 'radio',
      key: 'reload',
      label: '返回后',
      initVal: card.reload || 'false',
@@ -706,6 +715,41 @@
        text: '刷新'
      }]
    },
    {
      type: 'radio',
      key: 'control',
      label: '按钮控制',
      initVal: card.control || (card.controlField ? 'disabled' : ''),
      required: false,
      options: [{
        value: '',
        text: '无'
      }, {
        value: 'disabled',
        text: '禁用'
      }, {
        value: 'hidden',
        text: '隐藏'
      }]
    },
    {
      type: 'select',
      key: 'controlField',
      label: '控制字段',
      tooltip: '控制字段,可根据数据控制按钮的隐藏或禁用。',
      initVal: card.controlField || '',
      required: true,
      allowClear: true,
      options: columns
    },
    {
      type: 'text',
      key: 'controlVal',
      label: '控制值',
      tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会隐藏或禁用,多个值用逗号分隔。',
      initVal: card.controlVal || '',
      required: false
    },
  ]
  return forms