| | |
| | | * @description 获取搜索条件表单配置信息 |
| | | * @param {*} card |
| | | */ |
| | | export function getSearchForm (card) { |
| | | export function getSearchForm (card, roleList = []) { |
| | | return [ |
| | | { |
| | | type: 'text', |
| | |
| | | initVal: '', |
| | | required: false, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList |
| | | } |
| | | ] |
| | | } |
| | |
| | | * @description 获取显示列表单配置信息 |
| | | * @param {*} card |
| | | */ |
| | | export function getColumnForm (card) { |
| | | export function getColumnForm (card, roleList = []) { |
| | | return [ |
| | | { |
| | | type: 'text', |
| | |
| | | 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 |
| | | } |
| | | ] |
| | | } |
| | |
| | | * @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 |
| | | |
| | |
| | | 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 |
| | | } |
| | | ] |
| | | } |