king
2020-07-14 f36141f3075edf9d41928d64f759ad6bd1b1ac60
src/templates/zshare/formconfig.jsx
@@ -620,10 +620,11 @@
/**
 * @description 获取搜索条件表单配置信息
 * @param {object} card       // 搜索条件对象
 * @param {Array}  roleList   // 角色列表
 * @param {object} card           // 搜索条件对象
 * @param {Array}  roleList       // 角色列表
 * @param {Array}  linkableFields // 可关联字段
 */
export function getSearchForm (card, roleList) {
export function getSearchForm (card, roleList, linkableFields) {
  return [
    {
      type: 'text',
@@ -763,12 +764,13 @@
      }]
    },
    {
      type: 'text',
      type: 'select',
      key: 'linkField',
      label: Formdict['header.form.linkField'],
      initVal: card.linkField || '',
      required: true,
      readonly: false
      readonly: false,
      options: linkableFields
    },
    {
      type: 'text',
@@ -839,9 +841,9 @@
      options: [{
        value: 'dropdown',
        text: Formdict['header.form.dropdown']
      }, {
        value: 'button',
        text: Formdict['header.form.button']
      // }, {
      //   value: 'button',
      //   text: Formdict['header.form.button']
      }]
    },
    {
@@ -855,19 +857,6 @@
      }, {
        value: 'sso',
        text: Formdict['header.form.database.sso']
      }]
    },
    {
      type: 'radio',
      key: 'required',
      label: Formdict['model.required'],
      initVal: card.required || 'false',
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
@@ -889,12 +878,30 @@
      options: []
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList || []
      type: 'radio',
      key: 'required',
      label: Formdict['model.required'],
      initVal: card.required || 'false',
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'radio',
      key: 'Hide',
      label: Formdict['model.hidden'],
      initVal: card.Hide || 'false',
      options: [{
        value: 'true',
        text: Formdict['model.true']
      }, {
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'radio',
@@ -909,6 +916,14 @@
        value: 'false',
        text: Formdict['model.false']
      }]
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList || []
    }
  ]
}