king
2023-06-14 08cce3334a2dc81d690b518136b0aaea64e48b0b
src/templates/zshare/formconfig.jsx
@@ -355,6 +355,12 @@
    }, {
      value: 'group',
      text: '日期(组合)'
    }, {
      value: 'switch',
      text: '开关'
    }, {
      value: 'check',
      text: '勾选框'
    }]
  }
@@ -834,6 +840,42 @@
        value: 'custom',
        text: '自定义'
      }]
    },
    {
      type: 'text',
      key: 'openVal',
      label: '开启值',
      initVal: card.openVal || '',
      required: false
    },
    {
      type: 'text',
      key: 'closeVal',
      label: '关闭值',
      initVal: card.closeVal || '',
      required: false
    },
    {
      type: 'text',
      key: 'openText',
      label: '开启提示',
      initVal: card.openText || '',
      required: false
    },
    {
      type: 'text',
      key: 'closeText',
      label: '关闭提示',
      initVal: card.closeText || '',
      required: false
    },
    {
      type: 'text',
      key: 'checkTip',
      label: '提示',
      initVal: card.checkTip || '',
      tooltip: '勾选框后的提示文字',
      required: false
    },
    {
      type: 'color',
@@ -1477,16 +1519,6 @@
        value: 'close',
        text: '关闭'
      }]
    },
    {
      type: 'text',
      key: 'preFunc',
      label: '前置函数',
      initVal: card.preFunc || '',
      tooltip: usefulFields.length ? `函数名称需以${usefulFields.join(', ')}等字符开始;前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行;当前置函数返回中ErrCode等于-1时,将不再执行内部函数。` : '',
      fields: usefulFields,
      required: false,
      readonly: false
    },
    {
      type: 'radio',
@@ -2468,6 +2500,9 @@
    value: 'switch',
    text: '开关'
  }, {
    value: 'check',
    text: '勾选框'
  }, {
    value: 'checkbox',
    text: '多选框'
  }, {
@@ -2542,6 +2577,9 @@
      value: 'switch',
      text: '开关'
    }, {
      value: 'check',
      text: '勾选框'
    }, {
      value: 'checkbox',
      text: '多选框'
    }, {
@@ -2595,6 +2633,10 @@
    card.precision = 'second'
  }
  if (!card.place && appType === 'mob') {
    card.place = ['checkbox', 'radio', 'checkcard', 'textarea'].includes(card.type) ? 'up_down' : 'left_right'
  }
  let options = card.options || []
  if (['select', 'radio', 'link'].includes(card.type) && card.setAll === 'true') { // 兼容
    options.unshift({
@@ -2606,7 +2648,7 @@
  }
  let initval = card.initval || ''
  if (card.type === 'switch') {
  if (card.type === 'switch' || card.type === 'check') {
    initval = card.initval === true
  } else if (card.type === 'number') {
    initval = card.initval || 0
@@ -2683,6 +2725,14 @@
      key: 'closeText',
      label: '关闭提示',
      initVal: card.closeText || '',
      required: false
    },
    {
      type: 'text',
      key: 'checkTip',
      label: '提示',
      initVal: card.checkTip || '',
      tooltip: '勾选框后的提示文字',
      required: false
    },
    {
@@ -2804,6 +2854,7 @@
      key: 'dataSource',
      label: '数据源',
      initVal: card.dataSource || '',
      placeholder: '系统变量:mk_departmentcode、mk_organization、mk_user_type。',
      required: true,
      readonly: false
    },
@@ -3369,6 +3420,20 @@
      }]
    },
    {
      type: 'radio',
      key: 'unchecked',
      label: '未选中项',
      initVal: card.unchecked || 'show',
      tooltip: '如果没有选中项,该表单将被隐藏。',
      options: [{
        value: 'show',
        text: '显示'
      }, {
        value: 'hidden',
        text: '隐藏'
      }]
    },
    {
      type: 'color',
      key: 'backgroundColor',
      label: '背景色',
@@ -3448,7 +3513,7 @@
      type: 'radio',
      key: 'eval',
      label: '解析',
      initVal: card.eval || 'true',
      initVal: card.eval || 'false',
      tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。',
      required: false,
      options: [{
@@ -3494,7 +3559,7 @@
      key: 'place',
      label: '排列',
      initVal: card.place || 'left_right',
      tooltip: '提示文字与输入框的位置关系。注:选择器、日期表单在表单样式为阴影时有效',
      tooltip: '提示文字与输入框的位置关系。',
      forbid: appType !== 'mob',
      options: [{
        value: 'left_right',
@@ -3661,6 +3726,20 @@
      }, {
        value: 'right',
        text: '右截'
      }]
    },
    {
      type: 'radio',
      key: 'constant',
      label: 'Unicode常量',
      tooltip: '使用时将在提交内容前加上 N,代表存入数据库时以 Unicode 格式存储。',
      initVal: card.constant || 'false',
      options: [{
        value: 'true',
        text: '使用'
      }, {
        value: 'false',
        text: '不使用'
      }]
    },
    {
@@ -3917,6 +3996,20 @@
    // },
    {
      type: 'radio',
      key: 'pickerMode',
      label: '弹窗样式',
      initVal: card.pickerMode || 'default',
      required: false,
      options: [
        {value: 'default', text: '默认'},
        {value: 'board', text: '面板'},
        {value: 'board-block', text: '面板2'},
        {value: 'dropdown', text: '下拉框'},
      ],
      forbid: appType !== 'mob'
    },
    {
      type: 'radio',
      key: 'empty',
      label: '空值隐藏',
      initVal: card.empty || 'show',