king
2023-06-22 79e4981aa6cc9354276fc54cdf6d14eb08ab7fee
src/templates/zshare/formconfig.jsx
@@ -386,6 +386,30 @@
    })
  }
  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 [
    {
      type: 'text',
@@ -472,12 +496,12 @@
    {
      type: 'number',
      key: 'width',
      min: 1,
      min: 0,
      max: 24,
      precision: 0,
      label: '元素宽度',
      initVal: card.width || 4,
      tooltip: '栅格布局,每行等分为24列。',
      initVal: card.width === 0 ? 0 : (card.width || 4),
      tooltip: '栅格布局,每行等分为24列。注:当宽度为0时,元素根据内容自适应',
      required: true
    },
    {
@@ -573,14 +597,9 @@
      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: 'select',
@@ -826,6 +845,20 @@
    },
    {
      type: 'radio',
      key: 'border',
      label: '边框',
      initVal: card.border || 'show',
      required: false,
      options: [{
        value: 'show',
        text: '显示'
      }, {
        value: 'hide',
        text: '隐藏'
      }]
    },
    {
      type: 'radio',
      key: 'selectStyle',
      label: '选中效果',
      tooltip: '背景及文字变化时会使用系统色。',
@@ -884,6 +917,14 @@
      initVal: card.backgroundColor || '',
      tooltip: '设置背景色后,选中效果由背景颜色控制。',
      required: true
    },
    {
      type: 'text',
      key: 'mark',
      label: '顶级标识',
      initVal: card.mark || '',
      tooltip: 'pid与顶级标识相同时,视为顶级节点。',
      required: false
    },
    {
      type: 'multiselect',
@@ -1204,35 +1245,6 @@
    },
    {
      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'),
@@ -1266,6 +1278,52 @@
      initVal: card.callbackFunc || '',
      required: true,
      readonly: 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: 'stringify',
      label: '序列化',
      initVal: card.stringify || 'text',
      required: false,
      options: [{
        value: 'text',
        text: 'Text'
      }, {
        value: 'JSON',
        text: 'JSON'
      }, {
        value: 'qs',
        text: 'qs'
      }]
    },
    {
      type: 'radio',
@@ -2769,12 +2827,12 @@
    {
      type: 'number',
      key: 'width',
      min: 1,
      min: 0,
      max: 24,
      precision: 0,
      label: '元素宽度',
      initVal: card.width || 4,
      tooltip: '栅格布局,每行等分为24列。',
      initVal: card.width === 0 ? 0 : (card.width || 4),
      tooltip: '栅格布局,每行等分为24列。注:当宽度为0时,元素根据内容自适应',
      required: true
    },
    {
@@ -2854,6 +2912,7 @@
      key: 'dataSource',
      label: '数据源',
      initVal: card.dataSource || '',
      placeholder: '系统变量:mk_departmentcode、mk_organization、mk_user_type。',
      required: true,
      readonly: false
    },
@@ -3399,6 +3458,36 @@
      }, {
        value: 'adaptive',
        text: '自适应'
      }]
    },
    {
      type: 'radio',
      key: 'border',
      label: '边框',
      initVal: card.border || 'show',
      required: false,
      options: [{
        value: 'show',
        text: '显示'
      }, {
        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: '显示'
      }]
    },
    {
@@ -4062,8 +4151,7 @@
      key: 'icon',
      label: '图标',
      initVal: card.icon || '',
      required: false,
      forbid: type === 'CalendarPage'
      required: false
    },
    {
      type: 'select',
@@ -4071,8 +4159,7 @@
      label: '上级标签',
      initVal: supMenu,
      required: false,
      options: menus,
      forbid: type === 'CalendarPage'
      options: menus
    },
    {
      type: 'mutilselect',
@@ -4081,8 +4168,7 @@
      tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
      initVal: equalTab,
      required: false,
      options: equalTabs,
      forbid: type === 'CalendarPage'
      options: equalTabs
    },
    {
      type: 'text',
@@ -4090,8 +4176,7 @@
      label: '外键',
      tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段',
      initVal: card.foreignKey || '',
      required: false,
      forbid: type === 'CalendarPage'
      required: false
    },
    {
      type: 'number',
@@ -4111,7 +4196,7 @@
      initVal: card.searchPass || 'false',
      tooltip: '使用主表搜索条件时,主表的搜索条件会传入子表中。',
      required: false,
      forbid: type !== 'CommonTable' && type !== 'CalendarPage',
      forbid: type !== 'CommonTable',
      options: [{
        value: 'true',
        text: '使用'