| | |
| | | } |
| | | |
| | | if (item.advanced && item.initval) { |
| | | advanceValues.push({field: item.field, type: item.type, label: item.label, value: item.initval}) |
| | | let val = item.initval |
| | | if (item.precision === 'hour') { |
| | | if (/,/ig.test(val)) { |
| | | val = val.split(',').map(m => m + ':00').join(',') |
| | | } else { |
| | | val = val + ':00' |
| | | } |
| | | } |
| | | advanceValues.push({field: item.field, type: item.type, label: item.label, value: val}) |
| | | } |
| | | |
| | | if (item.type === 'group') { |
| | |
| | | record[item.field] = item.initval |
| | | } |
| | | if (item.advanced && item.initval) { |
| | | advanceValues.push({field: item.field, type: item.type, label: item.label, value: item.initval}) |
| | | let val = item.initval |
| | | if (item.precision === 'hour') { |
| | | if (/,/ig.test(val)) { |
| | | val = val.split(',').map(m => m + ':00').join(',') |
| | | } else { |
| | | val = val + ':00' |
| | | } |
| | | } |
| | | advanceValues.push({field: item.field, type: item.type, label: item.label, value: val}) |
| | | } |
| | | |
| | | return item |
| | |
| | | label: item.label, |
| | | match: item.match, |
| | | required: item.required, |
| | | precision: item.precision || '', |
| | | forbid: item.$forbid |
| | | }) |
| | | } |
| | |
| | | |
| | | let val = this.record[item.field] |
| | | if (val || val === 0) { |
| | | if (item.precision === 'hour') { |
| | | if (/,/ig.test(val)) { |
| | | val = val.split(',').map(m => m + ':00').join(',') |
| | | } else { |
| | | val = val + ':00' |
| | | } |
| | | } |
| | | advanceValues.push({field: item.field, type: item.type, label: item.label, value: val}) |
| | | } |
| | | }) |