king
2020-03-17 5c8860f3cd8921e7eb0da7749628e9dc669b3203
src/templates/tableshare/formconfig.js
@@ -7,7 +7,7 @@
 * @description 获取搜索条件表单配置信息
 * @param {*} card 
 */
export function getSearchForm (card) {
export function getSearchForm (card, roleList = []) {
  return [
    {
      type: 'text',
@@ -221,6 +221,14 @@
      initVal: '',
      required: false,
      options: []
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
    }
  ]
}
@@ -587,7 +595,7 @@
 * @description 获取显示列表单配置信息
 * @param {*} card
 */
export function getColumnForm (card) {
export function getColumnForm (card, roleList = []) {
  return [
    {
      type: 'text',
@@ -789,6 +797,14 @@
      label: Formdict['header.form.field.length'],
      initVal: card.fieldlength || (card.type === 'text' ? 50 : 512),
      required: false
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
    }
  ]
}
@@ -798,7 +814,7 @@
 * @param {*} card 
 * @param {*} inputfields 
 */
export function getModalForm (card, inputfields, linkableFields, linksupFields, subtable = false) {
export function getModalForm (card, inputfields, linkableFields, linksupFields, subtable = false, roleList = []) {
  let _openType = []
  let _fieldlength = 50
@@ -1122,6 +1138,14 @@
      label: Formdict['header.form.linkForm'],
      initVal: card.linkSubField || [],
      options: inputfields
    },
    {
      type: 'multiselect',
      key: 'blacklist',
      label: Formdict['header.form.blacklist'],
      initVal: card.blacklist || [],
      required: false,
      options: roleList
    }
  ]
}