| | |
| | | } |
| | | } |
| | | |
| | | let options = card.options || [] |
| | | if (['select', 'link'].includes(card.type) && card.setAll === 'true') { // 兼容 |
| | | options.unshift({ |
| | | key: 'empty', |
| | | Value: '', |
| | | Text: '全部', |
| | | ParentID: '' |
| | | }) |
| | | } |
| | | |
| | | return [ |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: Formdict['model.name'], |
| | | initVal: card.label || '', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['model.form.field'], |
| | | initVal: card.field || '', |
| | | tooltipClass: 'middle', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | key: 'datefield', |
| | | label: '时间字段', |
| | | initVal: card.datefield || '', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | text: Formdict['header.form.datasource'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'setAll', |
| | | label: '设置全部', |
| | | initVal: card.setAll || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'setAll', |
| | | // label: '设置全部', |
| | | // initVal: card.setAll || 'true', |
| | | // options: [{ |
| | | // value: 'true', |
| | | // text: Formdict['model.true'] |
| | | // }, { |
| | | // value: 'false', |
| | | // text: Formdict['model.false'] |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | |
| | | key: 'cardValField', |
| | | label: '值·字段', |
| | | initVal: card.cardValField || 'Value', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'urlField', |
| | | label: '地址字段', |
| | | initVal: card.urlField || '', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | key: 'fields', |
| | | label: '字段集', |
| | | initVal: card.fields || [], |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | key: 'dataSource', |
| | | label: Formdict['header.form.datasource'], |
| | | initVal: card.dataSource || '', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'options', |
| | | key: 'options', |
| | | label: '选项', |
| | | initVal: card.options || [], |
| | | required: true, |
| | | readonly: false |
| | | initVal: options, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'checkbox', |
| | |
| | | label: '选项', |
| | | initVal: card.items || ['day', 'week', 'month', 'quarter', 'year', 'customized'], |
| | | required: true, |
| | | readonly: false, |
| | | options: [{ |
| | | value: 'day', |
| | | label: '日' |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'multiple', |
| | | label: '选择形式', |
| | | initVal: card.multiple || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '单选' |
| | | }, { |
| | | value: 'true', |
| | | text: '多选' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'linkField', |
| | | label: '关联字段', |
| | | initVal: card.linkField || '', |
| | | required: true, |
| | | readonly: false, |
| | | allowClear: true, |
| | | options: linkableFields |
| | | }, |
| | | { |
| | |
| | | key: 'valueField', |
| | | label: '值·字段', |
| | | initVal: card.valueField || '', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'valueText', |
| | | label: '文本·字段', |
| | | initVal: card.valueText || '', |
| | | required: true, |
| | | readonly: false |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'orderBy', |
| | | label: '排序·字段', |
| | | initVal: card.orderBy || '', |
| | | required: false, |
| | | readonly: false |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | initVal: card.ratio || 6, |
| | | forbid: appType === 'mob', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'multiple', |
| | | label: '可多选', |
| | | initVal: card.multiple || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | initVal: card.multiple || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '多选' |
| | | }, { |
| | | value: 'false', |
| | | text: '单选' |
| | | }, { |
| | | value: 'true', |
| | | text: '多选' |
| | | }] |
| | | }, |
| | | { |