| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'showType', |
| | | label: '展现形式', |
| | | initVal: card.showType || 'line', |
| | | required: false, |
| | | options: [ |
| | | { value: 'line', text: '进度条' }, |
| | | { value: 'circle', text: '进度圈' }, |
| | | { value: 'dashboard', text: '仪表盘' }, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'color', |
| | | label: '颜色', |
| | | initVal: card.color || 'rgba(0, 0, 0, 0.85)', |
| | | label: '进度条颜色', |
| | | initVal: card.color || '#1890ff', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'trailColor', |
| | | label: '未完成颜色', |
| | | initVal: card.trailColor || '#f5f5f5', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'showInfo', |
| | | label: '进度值', |
| | | initVal: card.showInfo || 'false', |
| | | required: false, |
| | | options: [ |
| | | { value: 'true', text: '显示' }, |
| | | { value: 'false', text: '隐藏' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'infoColor', |
| | | label: '进度值颜色', |
| | | initVal: card.infoColor || 'rgba(0, 0, 0, 0.65)', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'strokeLinecap', |
| | | label: '线型', |
| | | initVal: card.strokeLinecap || 'round', |
| | | required: false, |
| | | options: [ |
| | | { value: 'round', text: '圆角' }, |
| | | { value: 'square', text: '直角' }, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'textAlign', |
| | | label: '对齐方式', |
| | | initVal: card.textAlign || 'left', |
| | | required: false, |
| | | options: [ |
| | | { value: 'left', text: '左' }, |
| | | { value: 'center', text: '中' }, |
| | | { value: 'right', text: '右' }, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'strokeWidth', |
| | | min: 1, |
| | | max: 200, |
| | | precision: 0, |
| | | label: '线条宽度', |
| | | initVal: card.strokeWidth || 8, |
| | | required: true, |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'outlineWidth', |
| | | min: 10, |
| | | max: 2000, |
| | | precision: 0, |
| | | label: '外形宽度', |
| | | initVal: card.outlineWidth || '', |
| | | tooltip: '外形宽度为空时,宽度为元素的宽度。注:超出时按元素宽度计算。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | type: 'number', |
| | | key: 'barHeight', |
| | | min: 5, |
| | | max: 50, |
| | | max: 500, |
| | | label: '高度', |
| | | initVal: card.barHeight || 25, |
| | | required: true, |
| | |
| | | type: 'number', |
| | | key: 'qrWidth', |
| | | min: 5, |
| | | max: 500, |
| | | label: '宽度', |
| | | max: 1000, |
| | | label: '二维码尺寸', |
| | | initVal: card.qrWidth || 50, |
| | | required: true, |
| | | }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'eval', |
| | | label: '解析', |
| | | initVal: card.eval || 'true', |
| | | tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | key: 'formula', |
| | | label: '公式', |
| | | initVal: card.formula || '', |
| | | tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。', |
| | | tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等', |
| | | placeholder: '例如:@price@ * @number@', |
| | | required: true |
| | | }, |
| | |
| | | key: 'noValue', |
| | | label: '空值', |
| | | initVal: card.noValue || 'show', |
| | | tooltip: '当元素内容为空时,是否显示当前元素。', |
| | | required: false, |
| | | options: [ |
| | | { value: 'show', text: '显示' }, |