| | |
| | | import MutilForm from './mutilform' |
| | | import Utils from '@/utils/utils.js' |
| | | import options from '@/store/options.js' |
| | | import { updateForm } from '@/utils/utils-update.js' |
| | | import Api from '@/api' |
| | | import './index.scss' |
| | | |
| | |
| | | _LongParam = '' |
| | | } |
| | | } |
| | | let fields = [] |
| | | |
| | | if (_LongParam && _LongParam.type === 'Modal') { |
| | | if (_LongParam.groups.length > 0) { |
| | | _LongParam.groups.forEach(group => { |
| | | fields = [...fields, ...group.sublist] |
| | | }) |
| | | } else { |
| | | fields = _LongParam.fields |
| | | } |
| | | _LongParam = updateForm(_LongParam) |
| | | } |
| | | |
| | | if (fields && fields.length > 0) { |
| | | formlist = fields.map(cell => { |
| | | if (_LongParam && _LongParam.fields.length > 0) { |
| | | _LongParam.fields.forEach(cell => { |
| | | if (!cell.field) return |
| | | let _fieldlen = cell.fieldlength || 50 |
| | | |
| | | if (cell.type === 'textarea' || cell.type === 'fileupload' || cell.type === 'multiselect') { |
| | |
| | | _field.value = '' |
| | | } |
| | | |
| | | return _field |
| | | formlist.push(_field) |
| | | }) |
| | | } |
| | | resolve(true) |