king
2023-03-11 642b103206a54923a460ee36550f275b22d6f09c
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -1,8 +1,5 @@
import zhCN from '@/locales/zh-CN/model.js'
import enUS from '@/locales/en-US/model.js'
import { btnCustomClasses } from '@/utils/option.js'
import { btnCustomClasses, btnClasses } from '@/utils/option.js'
const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS
/**
 * @description 获取按钮表单配置信息
@@ -12,7 +9,7 @@
 * @param {*} usefulFields   存储过程可用的开始字段
 * @param {*} type           按钮类型,用于区分可选的打开方式
 */
export function getActionForm (card, functip, config, usefulFields, menulist = [], modules = [], anchors = []) {
export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = []) {
  let appType = sessionStorage.getItem('appType')
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let printTemps = sessionStorage.getItem('printTemps')
@@ -20,11 +17,12 @@
  let setting = config.setting || {}
  let columns = config.columns || []
  let appMenus = []
  let menulist = []
  let type = ''
  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'
@@ -115,10 +113,22 @@
    } else {
      appMenus = []
    }
  } else {
    menulist = sessionStorage.getItem('fstMenuList')
    if (menulist) {
      try {
        menulist = JSON.parse(menulist)
      } catch (e) {
        menulist = []
      }
    } else {
      menulist = []
    }
  }
  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: '退款' },
@@ -127,6 +137,7 @@
      { value: 'mkUnBinding', text: '用户解绑' },
      { value: 'mkUnsubscribe', text: '注销账户' },
      { value: 'reAuth', text: '切换系统(清空缓存-小程序)' },
      { value: 'clearCache', text: '清空本地配置' },
      { value: 'copyurl', text: '复制链接地址' },
      { value: 'logout', text: '退出' },
      { value: 'goBack', text: '返回' },
@@ -138,13 +149,13 @@
  } else if (appType === 'pc') {
    opentypes = opentypes.filter(item => item.value !== 'tab')
    funTypes = [
      { value: 'refund', text: '退款' },
      { value: 'print', text: '标签打印' },
      { value: 'changeuser', text: '切换用户' },
    ]
    pageTemps = [
      { value: 'linkpage', text: '关联菜单' },
      { value: 'billprint', text: '单据打印' },
      { value: 'pay', text: Formdict['model.pay'] },
      { value: 'pay', text: '支付' },
      { value: 'custom', text: '链接' }
    ]
  }
@@ -173,7 +184,7 @@
  if (type === 'card') {
    opentypes.push({
      value: 'form',
      text: '表单(开关或勾选框)'
      text: '表单'
    })
  } else if (card.OpenType === 'form') { // 拖拽添加类型转换
    card.OpenType = 'pop'
@@ -192,18 +203,28 @@
  }
  let closetab = []
  if (!appType) {
  if (!appType && viewType !== 'popview') {
    closetab = [{
      value: 'closetab',
      text: '关闭标签'
    }]
  }
  let formTypes = []
  if (appType === 'mob') {
    formTypes = [{
      value: 'scan',
      text: '扫描'
    }]
  } else if (card.formType === 'scan') {
    card.formType = 'switch'
  }
  let forms = [
    {
      type: 'select',
      key: 'OpenType',
      label: Formdict['header.form.openType'],
      label: '打开方式',
      initVal: card.OpenType,
      required: true,
      options: opentypes
@@ -245,29 +266,33 @@
      }, {
        value: 'radio',
        text: '勾选框'
      }]
      }, {
        value: 'counter',
        text: '计数器'
      },
      ...formTypes]
    },
    {
      type: 'select',
      key: 'execMode',
      label: Formdict['model.form.execMode'],
      label: '执行方式',
      initVal: card.execMode || 'exec',
      required: true,
      options: [{
        value: 'exec',
        text: Formdict['model.form.exec']
        text: '直接执行'
      }, {
        value: 'prompt',
        text: Formdict['model.form.prompt']
        text: '提示框'
      }, {
        value: 'pop',
        text: Formdict['model.form.popform']
        text: '弹窗(表单)'
      }]
    },
    {
      type: 'radio',
      key: 'intertype',
      label: Formdict['header.form.intertype'],
      label: '接口类型',
      initVal: card.intertype || 'system',
      required: true,
      options: []
@@ -281,9 +306,9 @@
      options: [{
        value: 'wxpay',
        text: '微信'
      }, {
        value: 'alipay',
        text: '支付宝'
      // }, {
      //   value: 'alipay',
      //   text: '支付宝'
      }]
    },
    {
@@ -291,6 +316,7 @@
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。',
      required: true,
      options: [{
        value: 'system',
@@ -306,7 +332,7 @@
    {
      type: 'radio',
      key: 'sqlType',
      label: Formdict['header.form.action.type'],
      label: '操作类型',
      initVal: card.sqlType || '',
      required: true,
      options: []
@@ -321,7 +347,7 @@
    {
      type: 'text',
      key: 'innerFunc',
      label: Formdict['header.form.innerFunc'],
      label: '内部函数',
      initVal: card.innerFunc || '',
      tooltip: functip,
      fields: usefulFields,
@@ -339,7 +365,7 @@
    {
      type: 'select',
      key: 'pageTemplate',
      label: Formdict['model.form.newpage.type'],
      label: '页面类型',
      initVal: card.pageTemplate || '',
      required: true,
      options: pageTemps
@@ -362,30 +388,42 @@
      options: isApp ? appMenus : menulist
    },
    {
      type: 'text',
      key: 'prefix',
      label: '前缀',
      initVal: card.prefix || '',
      tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid开头。',
      required: false
    },
    {
      type: 'textarea',
      key: 'url',
      label: Formdict['model.pageUrl'],
      label: '页面地址',
      initVal: card.url || '',
      required: true
    },
    {
      type: 'radio',
      key: 'sysInterface',
      label: Formdict['header.form.sysInterface'],
      label: '系统类型',
      initVal: card.sysInterface || 'false',
      tooltip: '业务系统指同一sso下的其他业务系统,外部系统指不同sso下的其他业务系统。',
      required: true,
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '业务'
      }, {
        value: 'true',
        text: '单点'
      }, {
        value: 'external',
        text: '外部'
      }]
    },
    {
      type: 'text',
      key: 'outerFunc',
      label: Formdict['header.form.outerFunc'],
      label: '外部函数',
      initVal: card.outerFunc || '',
      required: false,
    },
@@ -402,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
    },
@@ -465,14 +518,14 @@
    {
      type: 'text',
      key: 'callbackFunc',
      label: Formdict['header.form.callbackFunc'],
      label: '回调函数',
      initVal: card.callbackFunc || '',
      required: true
    },
    {
      type: 'select',
      key: 'Ot',
      label: Formdict['header.form.isRequired'],
      label: '行设置',
      initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'),
      required: true,
      options: []
@@ -480,13 +533,13 @@
    {
      type: 'select',
      key: 'execSuccess',
      label: Formdict['model.form.afterSuccess'],
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
        text: Formdict['header.form.refresh.never']
        text: '不刷新'
      }, {
        value: 'line',
        text: '刷新行'
@@ -503,13 +556,13 @@
    {
      type: 'select',
      key: 'execError',
      label: Formdict['model.form.afterError'],
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
        text: Formdict['header.form.refresh.never']
        text: '不刷新'
      }, {
        value: 'line',
        text: '刷新行'
@@ -525,12 +578,12 @@
    {
      type: 'select',
      key: 'popClose',
      label: Formdict['header.form.popClose'],
      label: '关闭后',
      initVal: card.popClose || 'never',
      required: true,
      options: [{
        value: 'never',
        text: Formdict['header.form.refresh.never']
        text: '不刷新'
      }, {
        value: 'grid',
        text: '刷新当前组件'
@@ -604,7 +657,7 @@
    {
      type: 'icon',
      key: 'icon',
      label: Formdict['model.icon'],
      label: '图标',
      initVal: card.icon,
      required: false,
      forbid: type === 'datacard' && appType === 'mob', // 移动端,滑动显示的按钮只显示文字
@@ -613,7 +666,7 @@
    {
      type: 'select',
      key: 'class',
      label: Formdict['model.form.color'],
      label: '颜色',
      initVal: card.class,
      tooltip: '此颜色为按钮初始化颜色,可在样式调整中修改。',
      required: false,
@@ -623,7 +676,7 @@
    {
      type: 'radio',
      key: 'color',
      label: Formdict['model.form.color'],
      label: '颜色',
      initVal: card.color || 'primary',
      required: false,
      forbid: (type !== 'datacard' || appType !== 'mob'), // 移动端,滑动显示的按钮只可设置固定颜色
@@ -647,37 +700,48 @@
    {
      type: 'radio',
      key: 'joint',
      label: Formdict['model.form.paramJoint'],
      label: '拼接参数',
      initVal: card.joint || 'true',
      required: false,
      options: [{
        value: 'true',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '否'
      }]
    },
    {
      type: 'text',
      key: 'sheet',
      label: Formdict['model.form.tablename'],
      label: '表名',
      initVal: card.sheet || setting.tableName || '',
      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',
        text: Formdict['model.true']
        text: '是'
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
        text: '否'
      }],
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
@@ -691,16 +755,8 @@
      }, {
        value: 'false',
        text: '非必填'
      }]
    },
    {
      type: 'cascader',
      key: 'syncComponent',
      label: '刷新组件',
      initVal: card.syncComponent || [],
      tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。',
      required: false,
      options: modules
      }],
      forbid: appType === 'mob'
    },
    {
      type: 'cascader',
@@ -737,6 +793,7 @@
      tooltip: '执行成功后需要打开的菜单。',
      initVal: card.openmenu || (!appType ? [] : ''),
      help: appType === 'mob' || appType === 'pc' ? '可返回上一页。' : null,
      extendName: 'MenuNo',
      required: false,
      allowClear: true,
      options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '返回(上一页)'}] : menulist,
@@ -746,7 +803,7 @@
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,如@id);自定义函数可指定返回字段(如id)。',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。',
      initVal: card.output || '',
      required: false,
      forbid: viewType === 'popview'
@@ -784,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: [{
@@ -818,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: '点击蒙层',
@@ -830,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',
@@ -890,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',
@@ -907,6 +998,21 @@
      required: false
    },
    {
      type: 'radio',
      key: 'hidden',
      label: '隐藏',
      initVal: card.hidden || 'false',
      tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。',
      required: false,
      options: [{
        value: 'false',
        text: '否'
      }, {
        value: 'true',
        text: '是'
      }]
    },
    {
      type: 'splitLine',
      key: 'title',
      label: '表单',
@@ -915,7 +1021,7 @@
    {
      type: 'text',
      key: 'field',
      label: Formdict['model.form.field'],
      label: '字段',
      initVal: card.field || '',
      required: true,
      readonly: false
@@ -923,7 +1029,7 @@
    {
      type: 'radio',
      key: 'size',
      label: '开关尺寸',
      label: '尺寸',
      initVal: card.size || 'default',
      options: [{
        value: 'large',
@@ -937,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',
@@ -968,6 +1108,735 @@
    },
    {
      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',
      required: false,
      forbid: appType === 'mob',
      options: [{
        value: 'number',
        text: '剩余数'
      }, {
        value: 'progressbar',
        text: '进度条'
      }]
    }
  ]
  return forms
}
/**
 * @description 获取按钮表单配置信息
 * @param {*} card           编辑按钮
 * @param {*} functip        生成存储过程提示
 * @param {*} setting        组件配置
 * @param {*} usefulFields   存储过程可用的开始字段
 */
export function getBaseTableActionForm (card, functip, config, usefulFields, modules) {
  let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview
  let printTemps = sessionStorage.getItem('printTemps')
  printTemps = printTemps ? JSON.parse(printTemps) : []
  let setting = config.setting || {}
  let columns = config.columns || []
  let opentypes = [
    {
      value: 'pop',
      text: '弹窗(表单)'
    }, {
      value: 'prompt',
      text: '提示框'
    }, {
      value: 'exec',
      text: '直接执行'
    }, {
      value: 'excelIn',
      text: '导入Excel'
    }, {
      value: 'excelOut',
      text: '导出Excel'
    }, {
      value: 'popview',
      text: '弹窗(标签)'
    }, {
      value: 'tab',
      text: '标签页'
    }, {
      value: 'innerpage',
      text: '新页面'
    }, {
      value: 'funcbutton',
      text: '功能按钮'
    }
  ]
  let pageTemps = [
    // { value: 'print', text: '标签打印模板' },
    // { value: 'billprintTemp', text: '单据打印模板' },
    { value: 'billprint', text: '单据打印' },
    { value: 'pay', text: '支付' },
    { value: 'custom', text: '自定义' }
  ]
  let funTypes = [
    { value: 'print', text: '标签打印' },
    { value: 'refund', text: '退款' },
    { value: 'closetab', text: '标签关闭' },
    { value: 'changeuser', text: '切换用户' },
    { value: 'megvii', text: '旷视面板机' },
    { value: 'filezip', text: '文件压缩包' },
  ]
  let menulist = sessionStorage.getItem('fstMenuList')
  if (menulist) {
    try {
      menulist = JSON.parse(menulist)
    } catch (e) {
      menulist = []
    }
  } else {
    menulist = []
  }
  let refresh = []
  if (viewType === 'popview') { // 弹窗标签
    opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton')
    refresh.push({
      value: 'closepoptab', // 关闭弹窗标签
      text: '关闭弹窗'
    })
  }
  if (card.OpenType === 'form') { // 拖拽添加类型转换
    card.OpenType = 'pop'
  }
  let forms = [
    {
      type: 'select',
      key: 'OpenType',
      label: '打开方式',
      initVal: card.OpenType,
      required: true,
      options: opentypes
    },
    {
      type: 'text',
      key: 'label',
      label: '按钮名称',
      initVal: card.label,
      required: true,
    },
    {
      type: 'select',
      key: 'funcType',
      label: '功能类型',
      initVal: card.funcType || '',
      required: true,
      options: funTypes
    },
    {
      type: 'radio',
      key: 'subFunc',
      label: '接口名称',
      initVal: card.subFunc || 'addUser',
      required: true,
      options: [
        { value: 'addUser', text: '添加用户' },
      ]
    },
    {
      type: 'select',
      key: 'execMode',
      label: '执行方式',
      initVal: card.execMode || 'exec',
      required: true,
      options: [{
        value: 'exec',
        text: '直接执行'
      }, {
        value: 'prompt',
        text: '提示框'
      }, {
        value: 'pop',
        text: '弹窗(表单)'
      }]
    },
    {
      type: 'radio',
      key: 'intertype',
      label: '接口类型',
      initVal: card.intertype || 'system',
      required: true,
      options: []
    },
    {
      type: 'checkbox',
      key: 'payType',
      label: '支付方式',
      initVal: card.payType || [],
      required: true,
      options: [{
        value: 'wxpay',
        text: '微信'
      // }, {
      //   value: 'alipay',
      //   text: '支付宝'
      }]
    },
    {
      type: 'radio',
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。',
      required: true,
      options: [{
        value: 'system',
        text: '系统函数'
      }, {
        value: 'inner',
        text: '内部函数'
      }, {
        value: 'none',
        text: '无'
      }]
    },
    {
      type: 'radio',
      key: 'sqlType',
      label: '操作类型',
      initVal: card.sqlType || '',
      required: true,
      options: []
    },
    {
      type: 'text',
      key: 'sql',
      label: '表名',
      initVal: card.sql || setting.tableName || '',
      required: true
    },
    {
      type: 'text',
      key: 'innerFunc',
      label: '内部函数',
      initVal: card.innerFunc || '',
      tooltip: functip,
      fields: usefulFields,
      required: false,
    },
    {
      type: 'text',
      key: 'urlkey',
      label: '地址字段',
      initVal: card.urlkey || '',
      tooltip: '图片(文件)链接的字段名。',
      required: false,
      readonly: false
    },
    {
      type: 'select',
      key: 'pageTemplate',
      label: '页面类型',
      initVal: card.pageTemplate || '',
      required: true,
      options: pageTemps
    },
    {
      type: 'select',
      key: 'printTemp',
      label: '打印模板',
      initVal: card.printTemp || '',
      required: true,
      options: printTemps
    },
    {
      type: 'cascader',
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || [],
      required: true,
      extendName: 'MenuNo',
      options: menulist
    },
    {
      type: 'textarea',
      key: 'url',
      label: '页面地址',
      initVal: card.url || '',
      required: true
    },
    {
      type: 'radio',
      key: 'sysInterface',
      label: '系统类型',
      initVal: card.sysInterface || 'false',
      tooltip: '业务系统指同一sso下的其他业务系统,外部系统指不同sso下的其他业务系统。',
      required: true,
      options: [{
        value: 'false',
        text: '业务'
      }, {
        value: 'true',
        text: '单点'
      }, {
        value: 'external',
        text: '外部'
      }]
    },
    {
      type: 'text',
      key: 'outerFunc',
      label: '外部函数',
      initVal: card.outerFunc || '',
      required: false,
    },
    {
      type: 'textarea',
      key: 'interface',
      label: '测试地址',
      initVal: card.sysInterface === 'true' ? (window.GLOB.mainSystemApi || '') : (card.interface || ''),
      required: true,
      readonly: card.sysInterface === 'true'
    },
    {
      type: 'textarea',
      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
    },
    {
      type: 'radio',
      key: 'method',
      label: '请求方式',
      initVal: card.method || 'post',
      required: true,
      options: [{
        value: 'get',
        text: 'GET'
      }, {
        value: 'post',
        text: 'POST'
      }]
    },
    {
      type: 'radio',
      key: 'cross',
      label: '跨域请求',
      initVal: card.cross || 'true',
      tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。',
      required: false,
      options: [{
        value: 'true',
        text: '支持'
      }, {
        value: 'false',
        text: '不支持'
      }]
    },
    {
      type: 'radio',
      key: 'callbackType',
      label: '回调方式',
      initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'),
      tooltip: '使用后台脚本执行时,需要配合计划任务。',
      required: true,
      options: [{
        value: 'script',
        text: '自定义脚本'
      }, {
        value: 'default',
        text: '后台脚本'
      }, {
        value: 'func',
        text: '回调函数'
      }, {
        value: 'none',
        text: '无'
      }]
    },
    {
      type: 'text',
      key: 'cbTable',
      label: '回调表名',
      initVal: card.cbTable || '',
      required: true
    },
    {
      type: 'text',
      key: 'callbackFunc',
      label: '回调函数',
      initVal: card.callbackFunc || '',
      required: true
    },
    {
      type: 'select',
      key: 'Ot',
      label: '行设置',
      initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'),
      required: true,
      options: []
    },
    {
      type: 'select',
      key: 'execSuccess',
      label: '成功后',
      initVal: card.execSuccess || 'grid',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
        text: '不刷新'
      }, {
        value: 'line',
        text: '刷新行'
      }, {
        value: 'grid',
        text: '刷新当前组件'
      }, {
        value: 'mainline',
        text: '刷新上级组件 - 行'
      },
      ...refresh]
    },
    {
      type: 'select',
      key: 'execError',
      label: '失败后',
      initVal: card.execError || 'never',
      tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。',
      required: true,
      options: [{
        value: 'never',
        text: '不刷新'
      }, {
        value: 'line',
        text: '刷新行'
      }, {
        value: 'grid',
        text: '刷新当前组件'
      }, {
        value: 'mainline',
        text: '刷新上级组件 - 行'
      },
      ...refresh]
    },
    {
      type: 'select',
      key: 'popClose',
      label: '关闭后',
      initVal: card.popClose || 'never',
      required: true,
      options: [{
        value: 'never',
        text: '不刷新'
      }, {
        value: 'grid',
        text: '刷新当前组件'
      }, {
        value: 'mainline',
        text: '刷新上级组件 - 行'
      }]
    },
    {
      type: 'radio',
      key: 'resetPageIndex',
      label: '刷新时',
      initVal: card.resetPageIndex || 'true',
      required: false,
      options: [{
        value: 'true',
        text: '重置页码'
      }, {
        value: 'false',
        text: '不重置'
      }]
    },
    {
      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',
      label: '显示为',
      initVal: card.show || 'button',
      required: true,
      options: [{
        value: 'icon',
        text: '图标'
      }, {
        value: 'button',
        text: '图标+文字'
      }, {
        value: 'link',
        text: '文字+图标'
      }]
    },
    {
      type: 'icon',
      key: 'icon',
      label: '图标',
      initVal: card.icon,
      required: false,
      options: []
    },
    {
      type: 'select',
      key: 'class',
      label: '颜色',
      initVal: card.class,
      required: false,
      options: btnClasses
    },
    {
      type: 'radio',
      key: 'joint',
      label: '拼接参数',
      initVal: card.joint || 'true',
      required: false,
      options: [{
        value: 'true',
        text: '是'
      }, {
        value: 'false',
        text: '否'
      }]
    },
    {
      type: 'text',
      key: 'sheet',
      label: '表名',
      initVal: card.sheet || setting.tableName || '',
      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',
        text: '是'
      }, {
        value: 'false',
        text: '否'
      }]
    },
    {
      type: 'radio',
      key: 'search',
      label: '搜索条件',
      initVal: card.search || 'false',
      required: false,
      options: [{
        value: 'true',
        text: '必填'
      }, {
        value: 'false',
        text: '非必填'
      }]
    },
    {
      type: 'cascader',
      key: 'refreshTab',
      label: '刷新菜单',
      initVal: card.refreshTab || [],
      tooltip: '执行成功后(或功能按钮中标签关闭类型),需要同步刷新的菜单',
      required: false,
      forbid: viewType === 'popview',
      options: menulist
    },
    {
      type: 'cascader',
      key: 'openmenu',
      label: '打开菜单',
      tooltip: '执行成功后需要打开的菜单。',
      initVal: card.openmenu || [],
      extendName: 'MenuNo',
      required: false,
      allowClear: true,
      options: menulist,
      forbid: viewType === 'popview'
    },
    {
      type: 'text',
      key: 'output',
      label: '返回值',
      tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。',
      initVal: card.output || '',
      required: false,
      forbid: viewType === 'popview'
    },
    {
      type: 'text',
      key: 'tipTitle',
      label: '确认提示',
      initVal: card.tipTitle || '',
      tooltip: '注:弹窗(表单)在显示为是否框时有效。',
      required: false
    },
    {
      type: 'radio',
      key: 'display',
      label: '显示方式',
      initVal: card.display || 'modal',
      required: true,
      options: [{
        value: 'modal',
        text: '模态框'
      }, {
        value: 'drawer',
        text: '抽屉'
      }]
    },
    {
      type: 'number',
      key: 'ratio',
      min: 1,
      max: 3000,
      precision: 0,
      label: '比例',
      initVal: card.ratio || 85,
      tooltip: '模态框或抽屉的宽度,小于100为窗口宽度(或高度)百分比,大于100为像素值。',
      required: true
    },
    {
      type: 'radio',
      key: 'placement',
      label: '弹出方向',
      initVal: card.placement || 'right',
      required: false,
      options: [{
        value: 'right',
        text: '右侧'
      }, {
        value: 'left',
        text: '左侧'
      }, {
        value: 'top',
        text: '上侧'
      }, {
        value: 'bottom',
        text: '下侧'
      }]
    },
    {
      type: 'radio',
      key: 'clickouter',
      label: '点击蒙层',
      initVal: card.clickouter || 'unclose',
      required: false,
      options: [{
        value: 'unclose',
        text: '不关闭'
      }, {
        value: 'close',
        text: '关闭'
      }]
    },
    {
      type: 'radio',
      key: 'control',
      label: '按钮控制',
      initVal: card.control || (card.controlField ? 'disabled' : ''),
      tooltip: '当选择禁用或隐藏,且字段值与控制值相等时,按钮会隐藏或禁用。当选择上级,主表字段值与控制值相等或主表字段值不存在时,按钮会隐藏。注:多个值用逗号分隔',
      required: false,
      options: [{
        value: '',
        text: '无'
      }, {
        value: 'disabled',
        text: '禁用'
      }, {
        value: 'hidden',
        text: '隐藏'
      }, {
        value: 'parent',
        text: '上级'
      }]
    },
    {
      type: 'select',
      key: 'controlField',
      label: '控制字段',
      initVal: card.controlField || '',
      required: true,
      allowClear: true,
      options: columns.map(item => ({
        value: item.field,
        text: `${item.label}(${item.field})`
      }))
    },
    {
      type: 'text',
      key: 'controlVal',
      label: '控制值',
      initVal: card.controlVal || '',
      required: false
    },
    {
      type: 'text',
      key: 'reason',
      label: '禁用原因',
      initVal: card.reason || '',
      required: false
    },
    {
      type: 'radio',
      key: 'hidden',
      label: '隐藏',
      initVal: card.hidden || 'false',
@@ -983,11 +1852,25 @@
    },
    {
      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',
      required: false,
      forbid: appType === 'mob',
      options: [{
        value: 'number',
        text: '剩余数'