king
2022-08-06 cbeffcc0902631909c0373f274752a97ddaf2d4e
src/templates/zshare/formconfig.jsx
@@ -289,7 +289,7 @@
 * @param {object} card           // 搜索条件对象
 * @param {Array}  linkableFields // 可关联字段
 */
export function getSearchForm (card, linkableFields, columns) {
export function getSearchForm (card, linkableFields, columns, position) {
  let roleList = sessionStorage.getItem('sysRoles')
  let appType = sessionStorage.getItem('appType')
  if (roleList) {
@@ -321,7 +321,7 @@
      text: '选项卡'
    }, {
      value: 'date',
      text: Formdict['model.form.dateday']
      text: '日期(天)'
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
@@ -348,10 +348,10 @@
      text: '选项卡'
    }, {
      value: 'date',
      text: Formdict['model.form.dateday']
      text: '日期(天)'
    }, {
      value: 'dateweek',
      text: Formdict['model.form.dateweek']
      text: '日期(周)'
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
@@ -793,8 +793,8 @@
      key: 'advanced',
      label: '高级搜索',
      initVal: card.advanced || 'false',
      tooltip: '在隐藏搜索按钮时,高级搜索无效。',
      forbid: appType === 'mob',
      tooltip: '在高级搜索以模态框或抽屉展开时,搜索条件在开发界面占比为6,实际效果请在运行时查看。',
      forbid: appType === 'mob' || position === 'header',
      options: [{
        value: 'true',
        text: Formdict['model.true']
@@ -947,6 +947,10 @@
    card.control = 'disabled'
  }
  if (card.intertype === 'outer' && !card.procMode && !card.innerFunc) { // 兼容外部函数直传类型
    card.procMode = 'none'
  }
  return [
    {
      type: 'select',
@@ -955,6 +959,14 @@
      initVal: card.OpenType,
      required: true,
      options: opentypes
    },
    {
      type: 'text',
      key: 'label',
      label: '按钮名称',
      initVal: card.label,
      required: true,
      readonly: false
    },
    {
      type: 'select',
@@ -1018,7 +1030,8 @@
      type: 'radio',
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || 'system',
      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。',
      required: true,
      options: [{
        value: 'system',
@@ -1026,6 +1039,9 @@
      }, {
        value: 'inner',
        text: '内部函数'
      }, {
        value: 'none',
        text: '无'
      }]
    },
    {
@@ -1035,14 +1051,6 @@
      initVal: card.sqlType || '',
      required: true,
      options: []
    },
    {
      type: 'text',
      key: 'label',
      label: '按钮名称',
      initVal: card.label,
      required: true,
      readonly: false
    },
    {
      type: 'text',
@@ -1193,7 +1201,7 @@
      type: 'radio',
      key: 'callbackType',
      label: '回调方式',
      initVal: card.callbackType || 'script',
      initVal: card.callbackType || (card.callbackFunc ? 'func' : 'script'),
      tooltip: '使用后台脚本执行时,需要配合计划任务。',
      required: true,
      options: [{
@@ -1202,6 +1210,12 @@
      }, {
        value: 'default',
        text: '后台脚本'
      }, {
        value: 'func',
        text: '回调函数'
      }, {
        value: 'none',
        text: '无'
      }]
    },
    {
@@ -1216,7 +1230,7 @@
      key: 'callbackFunc',
      label: Formdict['header.form.callbackFunc'],
      initVal: card.callbackFunc || '',
      required: false,
      required: true,
      readonly: false
    },
    {
@@ -2381,10 +2395,10 @@
    text: '选项卡'
  }, {
    value: 'fileupload',
    text: Formdict['header.form.fileupload']
    text: '文件上传'
  }, {
    value: 'date',
    text: Formdict['model.form.dateday']
    text: '日期(天)'
  }, {
    value: 'datemonth',
    text: Formdict['model.form.datemonth']
@@ -2394,6 +2408,9 @@
  }, {
    value: 'textarea',
    text: Formdict['model.form.textarea']
  }, {
    value: 'cascader',
    text: '级联菜单'
  }, {
    value: 'rate',
    text: '评分'
@@ -2449,10 +2466,10 @@
      text: '选项卡'
    }, {
      value: 'fileupload',
      text: Formdict['header.form.fileupload']
      text: '文件上传'
    }, {
      value: 'date',
      text: Formdict['model.form.dateday']
      text: '日期(天)'
    }, {
      value: 'datemonth',
      text: Formdict['model.form.datemonth']
@@ -2462,6 +2479,9 @@
    }, {
      value: 'textarea',
      text: Formdict['model.form.textarea']
    }, {
      value: 'cascader',
      text: '级联菜单'
    }, {
      value: 'rate',
      text: '评分'
@@ -2589,10 +2609,10 @@
      required: true,
      options: [{
        value: '0',
        text: Formdict['header.form.custom']
        text: '自定义'
      }, {
        value: '1',
        text: Formdict['header.form.datasource']
        text: '数据源'
      }]
    },
    {
@@ -2719,6 +2739,14 @@
      readonly: false,
      allowClear: true,
      options: linkableFields
    },
    {
      type: 'text',
      key: 'topmark',
      label: '顶级标识',
      initVal: card.topmark || '',
      tooltip: '关联字段值与顶级标识相同时,视为顶级节点。',
      required: false
    },
    {
      type: 'text',
@@ -2912,6 +2940,15 @@
        value: 'nvarchar(50)',
        text: 'nvarchar(50)'
      }]
    },
    {
      type: 'text',
      key: 'separator',
      label: '连接符',
      initVal: card.separator || card.separator === undefined ? '/' : '',
      tooltip: '表单提交时信息之间的连接符。注:连接符为空时,初始化时填充其他表单无效。',
      required: false,
      readonly: false
    },
    {
      type: 'radio',
@@ -3244,12 +3281,16 @@
      key: 'encryption',
      label: '加密传输',
      initVal: card.type === 'brafteditor' ? (card.encryption || 'true') : (card.encryption || 'false'),
      tooltip: '使用md5加密时,加密前内容会转为小写,加密后的md5值为32位大写。',
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
        text: '无'
      }, {
        value: 'true',
        text: 'base64加密'
      }, {
        value: 'md5',
        text: 'md5加密'
      }]
    },
    {