| | |
| | | let _tabfields = [] |
| | | let _linkableFields = [] |
| | | let _linksupFields = [] |
| | | let _allFields = [] |
| | | let standardform = null |
| | | |
| | | let uniq = new Map() |
| | |
| | | card.subcards[0].fields.forEach((item, i) => { |
| | | if (_form.uuid === item.uuid) { |
| | | index = i |
| | | } |
| | | |
| | | if (item.field) { |
| | | _allFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | | }) |
| | | } |
| | | |
| | | if (['text', 'number', 'textarea', 'color'].includes(item.type) && _item.field !== item.field) { |
| | |
| | | standardform, |
| | | visible: true, |
| | | editform: _form, |
| | | formlist: getModalForm(_form, _inputfields, _tabfields, _linkableFields, _linksupFields, card.columns) |
| | | formlist: getModalForm(_form, _inputfields, _tabfields, _linkableFields, _linksupFields, _allFields, card.columns) |
| | | }) |
| | | } |
| | | |
| | |
| | | let _tabfields = [] |
| | | let _linkableFields = [] |
| | | let _linksupFields = [] |
| | | let _allFields = [] |
| | | let standardform = null |
| | | |
| | | let uniq = new Map() |
| | |
| | | group.fields.forEach((item, i) => { |
| | | if (_form.uuid === item.uuid) { |
| | | index = i |
| | | } |
| | | |
| | | if (item.field) { |
| | | _allFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | | }) |
| | | } |
| | | |
| | | if (['text', 'number', 'textarea', 'color'].includes(item.type) && _item.field !== item.field) { |
| | |
| | | standardform, |
| | | visible: true, |
| | | editform: _form, |
| | | formlist: getModalForm(_form, _inputfields, _tabfields, _linkableFields, _linksupFields, card.columns) |
| | | formlist: getModalForm(_form, _inputfields, _tabfields, _linkableFields, _linksupFields, _allFields, card.columns) |
| | | }) |
| | | } |
| | | |
| | |
| | | let _tabfields = [] |
| | | let _linkableFields = [] |
| | | let _linksupFields = [] |
| | | let _allFields = [] |
| | | let standardform = null |
| | | |
| | | let uniq = new Map() |
| | |
| | | group.fields.forEach((item, i) => { |
| | | if (_form.uuid === item.uuid) { |
| | | index = i |
| | | } |
| | | |
| | | if (item.field) { |
| | | _allFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | | }) |
| | | } |
| | | |
| | | if (['text', 'number', 'textarea', 'color'].includes(item.type) && _item.field !== item.field) { |
| | |
| | | standardform, |
| | | visible: true, |
| | | editform: _form, |
| | | formlist: getModalForm(_form, _inputfields, _tabfields, _linkableFields, _linksupFields, card.columns) |
| | | formlist: getModalForm(_form, _inputfields, _tabfields, _linkableFields, _linksupFields, _allFields, card.columns) |
| | | }) |
| | | } |
| | | |
| | |
| | | let _tabfields = [] |
| | | let _linkableFields = [] |
| | | let _linksupFields = [] |
| | | let _allFields = [] |
| | | let standardform = null |
| | | |
| | | let uniq = new Map() |
| | |
| | | config.fields.forEach((item, i) => { |
| | | if (card.uuid === item.uuid) { |
| | | index = i |
| | | } |
| | | |
| | | if (item.field) { |
| | | _allFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | | }) |
| | | } |
| | | |
| | | if (['text', 'number', 'textarea', 'color'].includes(item.type) && card.field !== item.field) { |
| | |
| | | standardform, |
| | | visible: true, |
| | | card: card, |
| | | formlist: getModalForm(card, _inputfields, _tabfields, _linkableFields, _linksupFields, columns) |
| | | formlist: getModalForm(card, _inputfields, _tabfields, _linkableFields, _linksupFields, _allFields, columns) |
| | | }) |
| | | } |
| | | |
| | |
| | | let _tabfields = [] |
| | | let _linkableFields = [] |
| | | let _linksupFields = [] |
| | | let _allFields = [] |
| | | let standardform = null |
| | | |
| | | let uniq = new Map() |
| | |
| | | config.fields.forEach((item, i) => { |
| | | if (card.uuid === item.uuid) { |
| | | index = i |
| | | } |
| | | |
| | | if (item.field) { |
| | | _allFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | | }) |
| | | } |
| | | |
| | | if (['text', 'number', 'textarea', 'color'].includes(item.type) && card.field !== item.field) { |
| | |
| | | standardform, |
| | | visible: true, |
| | | card: card, |
| | | formlist: getModalForm(card, _inputfields, _tabfields, _linkableFields, _linksupFields, columns) |
| | | formlist: getModalForm(card, _inputfields, _tabfields, _linkableFields, _linksupFields, _allFields, columns) |
| | | }) |
| | | } |
| | | |
| | |
| | | if (item.empty === 'hidden' && item.oriOptions.length === 0) return |
| | | |
| | | if (item.type === 'split') { |
| | | if (item.splitctrl) { |
| | | let cell = formlist.filter(m => m.field === item.splitctrl)[0] |
| | | |
| | | if (cell && (cell.hidden || (cell.empty === 'hidden' && !cell.oriOptions.length))) { |
| | | return null |
| | | } |
| | | } |
| | | |
| | | fields.push( |
| | | <Col span={24} key={index}> |
| | | <p className="mk-form-split-line" style={item.style}>{item.label}</p> |
| | |
| | | let _tabfields = [] |
| | | let _linkableFields = [] |
| | | let _linksupFields = [] |
| | | let _allFields = [] |
| | | let standardform = null |
| | | |
| | | let uniq = new Map() |
| | |
| | | config.fields.forEach((item, i) => { |
| | | if (card.uuid === item.uuid) { |
| | | index = i |
| | | } |
| | | |
| | | if (item.field) { |
| | | _allFields.push({ |
| | | field: item.field, |
| | | label: item.label |
| | | }) |
| | | } |
| | | |
| | | if (['text', 'number', 'textarea', 'color'].includes(item.type) && card.field !== item.field) { |
| | |
| | | standardform, |
| | | visible: true, |
| | | card: card, |
| | | formlist: getModalForm(card, _inputfields, _tabfields, _linkableFields, _linksupFields) |
| | | formlist: getModalForm(card, _inputfields, _tabfields, _linkableFields, _linksupFields, _allFields) |
| | | }) |
| | | } |
| | | |
| | |
| | | * @param {*} linkableFields // 可关联表单 |
| | | * @param {*} linksupFields // 上级表单 |
| | | */ |
| | | export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, columns = []) { |
| | | export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, allFields = [], columns = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | |
| | | }) |
| | | |
| | | linksupFields = linksupFields.map((item, index) => { |
| | | item.label = `${index + 1}、${item.field || ''}(${item.label})` |
| | | return item |
| | | }) |
| | | allFields = allFields.map((item, index) => { |
| | | item.label = `${index + 1}、${item.field || ''}(${item.label})` |
| | | return item |
| | | }) |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'splitctrl', |
| | | label: '显示控制', |
| | | initVal: card.splitctrl || '', |
| | | tooltip: '分割线与该表单同步显示或隐藏。', |
| | | allowClear: true, |
| | | options: allFields |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'place', |
| | | label: '排列', |
| | |
| | | color: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'colorType', 'extra', 'marginTop', 'marginBottom'], |
| | | rate: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'splitline', 'tooltip', 'extra', 'marginTop', 'marginBottom', 'allowHalf', 'color', 'rateCount', 'character', 'place'], |
| | | hint: ['label', 'field', 'type', 'blacklist', 'message', 'span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline'], |
| | | split: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'splitctrl'], |
| | | formula: ['label', 'type', 'marginTop', 'marginBottom', 'splitline', 'span', 'labelwidth', 'formula', 'eval', 'postfix'], |
| | | brafteditor: ['required', 'hidelabel', 'hidden', 'readin', 'fieldlength', 'readonly', 'span', 'labelwidth', 'tooltip', 'extra', 'encryption', 'marginTop', 'marginBottom'], |
| | | funcvar: ['span', 'labelwidth', 'splitline', 'marginTop', 'marginBottom'], |