king
2023-08-27 da64ab0923bf8817fc8599a6e37b953ce38f64c8
src/templates/zshare/formconfig.jsx
@@ -359,6 +359,9 @@
      value: 'switch',
      text: '开关'
    }, {
      value: 'radio',
      text: '单选框'
    }, {
      value: 'check',
      text: '勾选框'
    }]
@@ -367,7 +370,7 @@
  if (card.focus) {
    if (['text', 'multiselect'].includes(card.type)) {
      card.match = 'like'
    } else if (['select', 'link', 'checkcard'].includes(card.type)) {
    } else if (['select', 'link', 'checkcard', 'radio'].includes(card.type)) {
      card.match = '='
    } else if (card.type === 'date') {
      card.match = '>='
@@ -384,6 +387,30 @@
      Text: '全部',
      ParentID: ''
    })
  }
  let muloptions = [{
    value: 'false',
    text: '单选'
  }, {
    value: 'true',
    text: '多选'
  }, {
    value: 'dropdown',
    text: '下拉菜单'
  }]
  if (appType !== '') {
    muloptions = [{
      value: 'false',
      text: '单选'
    }, {
      value: 'true',
      text: '多选'
    }]
    if (card.multiple === 'dropdown') {
      card.multiple = 'false'
    }
  }
  return [
@@ -573,14 +600,18 @@
      key: 'multiple',
      label: '选择形式',
      initVal: card.multiple || 'false',
      // tooltip: appType === '' ? '使用下拉菜单时,选项会依据 pid 组织数据的上下级关系,二级选项会下拉展示。注:1、显示为文本时有效;2、使用数据源请返回 pid 字段。' : '',
      required: true,
      options: [{
        value: 'false',
        text: '单选'
      }, {
        value: 'true',
        text: '多选'
      }]
      options: muloptions
    },
    {
      type: 'text',
      key: 'parentField',
      label: '上级字段',
      initVal: card.parentField || '',
      tooltip: '用于组织数据上下级关系,请注意填写顶级标识。',
      required: true,
      readonly: false
    },
    {
      type: 'select',
@@ -898,6 +929,14 @@
      initVal: card.backgroundColor || '',
      tooltip: '设置背景色后,选中效果由背景颜色控制。',
      required: true
    },
    {
      type: 'text',
      key: 'mark',
      label: '顶级标识',
      initVal: card.mark || '',
      tooltip: '上级字段(pid)与顶级标识相同时,视为顶级节点。',
      required: false
    },
    {
      type: 'multiselect',
@@ -2885,7 +2924,7 @@
      key: 'dataSource',
      label: '数据源',
      initVal: card.dataSource || '',
      placeholder: '系统变量:mk_departmentcode、mk_organization、mk_user_type。',
      placeholder: '系统变量:mk_departmentcode、mk_organization、mk_user_type。公共值:@ID@、@BID@。',
      required: true,
      readonly: false
    },
@@ -3029,7 +3068,20 @@
      }, {
        value: '-90',
        text: '前90天'
      }, {
        value: 'custom',
        text: '自定义'
      }]
    },
    {
      type: 'text',
      key: 'minDateField',
      label: '最小值(字段)',
      initVal: card.minDateField || '',
      tooltip: '最小值对应字段,也可自定义固定值,格式为YYYY-MM-DD。',
      required: true,
      readonly: false,
      options: columns
    },
    {
      type: 'select',
@@ -3079,7 +3131,20 @@
      }, {
        value: '-90',
        text: '前90天'
      }, {
        value: 'custom',
        text: '自定义'
      }]
    },
    {
      type: 'text',
      key: 'maxDateField',
      label: '最大值(字段)',
      initVal: card.maxDateField || '',
      tooltip: '最大值对应字段,也可自定义固定值,格式为YYYY-MM-DD。',
      required: true,
      readonly: false,
      options: columns
    },
    {
      type: 'radio',
@@ -3118,7 +3183,7 @@
      type: 'text',
      key: 'separator',
      label: '连接符',
      initVal: card.separator === undefined ? '/' : card.separator,
      initVal: card.separator === undefined ? ',' : card.separator,
      tooltip: '表单提交时信息之间的连接符。注:连接符为空时,初始化时填充其他表单无效。',
      required: false,
      readonly: false
@@ -3445,6 +3510,22 @@
      }, {
        value: 'hide',
        text: '隐藏'
      }]
    },
    {
      type: 'radio',
      key: 'checkAll',
      label: '全选',
      initVal: card.checkAll || 'hide',
      tooltip: '可多选的选项卡是否显示全选开关,注:当选项大于3个时有效。',
      required: false,
      forbid: appType !== '',
      options: [{
        value: 'hide',
        text: '隐藏'
      }, {
        value: 'show',
        text: '显示'
      }]
    },
    {
@@ -4013,7 +4094,7 @@
      type: 'multiselect',
      key: 'linkSubField',
      label: '填充表单',
      tooltip: '在切换选项时会把信息自动填入关联的表单(文本或数字表单)中。',
      tooltip: '在切换选项时会把信息自动填入关联的表单(文本或数字表单)中,开关会将提示文本填入此表单。',
      initVal: card.linkSubField || [],
      options: inputfields
    },
@@ -4108,8 +4189,7 @@
      key: 'icon',
      label: '图标',
      initVal: card.icon || '',
      required: false,
      forbid: type === 'CalendarPage'
      required: false
    },
    {
      type: 'select',
@@ -4117,8 +4197,7 @@
      label: '上级标签',
      initVal: supMenu,
      required: false,
      options: menus,
      forbid: type === 'CalendarPage'
      options: menus
    },
    {
      type: 'mutilselect',
@@ -4127,8 +4206,7 @@
      tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
      initVal: equalTab,
      required: false,
      options: equalTabs,
      forbid: type === 'CalendarPage'
      options: equalTabs
    },
    {
      type: 'text',
@@ -4136,8 +4214,7 @@
      label: '外键',
      tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段',
      initVal: card.foreignKey || '',
      required: false,
      forbid: type === 'CalendarPage'
      required: false
    },
    {
      type: 'number',
@@ -4157,7 +4234,7 @@
      initVal: card.searchPass || 'false',
      tooltip: '使用主表搜索条件时,主表的搜索条件会传入子表中。',
      required: false,
      forbid: type !== 'CommonTable' && type !== 'CalendarPage',
      forbid: type !== 'CommonTable',
      options: [{
        value: 'true',
        text: '使用'