| | |
| | | text: '序号' |
| | | }] |
| | | |
| | | if (!card.isSub) { |
| | | options.push({ |
| | | value: 'action', |
| | | text: '操作' |
| | | }) |
| | | let decimal = card.decimal === undefined ? 0 : card.decimal |
| | | if (card.type === 'formula' && typeof(card.decimal) !== 'number') { |
| | | decimal = '' |
| | | } |
| | | |
| | | return [ |
| | |
| | | key: 'label', |
| | | label: '列头文字', |
| | | initVal: card.label, |
| | | required: true |
| | | required: true, |
| | | rules: [{ |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | label: '字段', |
| | | initVal: card.field, |
| | | required: true, |
| | | options: card.isSub ? fields : [] |
| | | options: card.isSub ? fields : [], |
| | | rules: [{ |
| | | pattern: /^[\u4E00-\u9FA50-9a-zA-Z_]*$/ig, |
| | | message: '字段名只允许包含数字、字母、汉字以及_' |
| | | }, { |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'nameField', |
| | | label: '名称字段', |
| | | initVal: card.nameField || '', |
| | | required: false |
| | | required: false, |
| | | rules: [{ |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | value: 'false', |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'eval', |
| | | label: '解析', |
| | | initVal: card.eval || 'false', |
| | | tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。', |
| | | required: false, |
| | | options: [ |
| | | { value: 'true', text: '是' }, |
| | | { value: 'false', text: '否' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | max: 18, |
| | | decimal: 0, |
| | | label: '小数位', |
| | | initVal: card.decimal === undefined ? 0 : card.decimal, |
| | | initVal: decimal, |
| | | required: !card.isSub |
| | | }, |
| | | { |
| | |
| | | label: '前缀', |
| | | initVal: card.prefix || '', |
| | | required: false, |
| | | readonly: false |
| | | readonly: false, |
| | | rules: [{ |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | label: '后缀', |
| | | initVal: card.postfix || '', |
| | | required: false, |
| | | readonly: false |
| | | readonly: false, |
| | | rules: [{ |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | initVal: card.linkfields || [], |
| | | required: false, |
| | | options: fields, |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'eval', |
| | | label: '解析', |
| | | initVal: card.eval || 'false', |
| | | tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。', |
| | | required: false, |
| | | options: [ |
| | | { value: 'true', text: '是' }, |
| | | { value: 'false', text: '否' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'textarea', |