| | |
| | | value: 'number', |
| | | text: '数字' |
| | | }, { |
| | | value: 'custom', |
| | | text: '自定义列' |
| | | }, { |
| | | value: 'formula', |
| | | text: '公式' |
| | | }, { |
| | | value: 'picture', |
| | | text: '图片' |
| | | }, { |
| | |
| | | value: 'textarea', |
| | | text: '多行文本' |
| | | }, { |
| | | value: 'custom', |
| | | text: '自定义列' |
| | | }, { |
| | | value: 'colspan', |
| | | text: '合并列' |
| | | }, { |
| | | value: 'formula', |
| | | text: '公式' |
| | | }, { |
| | | value: 'index', |
| | | 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 |
| | | tooltip: '名称字段为链接在界面中显示的内容,在链接中以@***@形式拼接的字段(字段来源于字段集中,此外 id、appkey、userid、LoginUID 为系统字段),跳转时将替换为对应值,例如:http://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@,其中appkey与LoginUID将被替换。', |
| | | toolWidth: 350, |
| | | required: false, |
| | | rules: [{ |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | label: '列宽', |
| | | initVal: card.Width || 120, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'joint', |
| | | label: '拼接参数', |
| | | initVal: card.joint || 'true', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | type: 'radio', |
| | | key: 'IsSort', |
| | | label: '排序', |
| | | initVal: card.IsSort || (card.isSub ? 'false' : 'true'), |
| | | initVal: card.IsSort || (card.isSub || card.type === 'custom' ? 'false' : 'true'), |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | }, { |
| | | value: 'false', |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'sortField', |
| | | label: '排序字段', |
| | | initVal: card.sortField || '', |
| | | required: true, |
| | | options: fields |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'eval', |
| | | label: '解析方式', |
| | | initVal: card.eval || 'false', |
| | | tooltip: '当公式内容涉及计算时请选择“计算”,当公式内容为字段拼接时请选择“字段替换”,使用函数时入参为data(数组)。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '字段替换' |
| | | }, { |
| | | value: 'true', |
| | | text: '计算' |
| | | }, { |
| | | value: 'func', |
| | | text: '函数' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | value: 'false', |
| | | text: '否' |
| | | }], |
| | | forbid: card.isSub |
| | | forbid: card.isSub || card.sum !== 'true' |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | 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', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'lostTip', |
| | | label: '图片缺失', |
| | | initVal: card.lostTip || 'true', |
| | | tooltip: '图片地址不存在时,是否提示图片丢失。', |
| | | required: false, |
| | | options: [ |
| | | { value: 'true', text: '提示' }, |
| | | { value: 'false', text: '不提示' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'perspective', |
| | | label: '字段透视', |
| | | initVal: card.perspective || '', |
| | |
| | | key: 'linkurl', |
| | | label: '链接地址', |
| | | initVal: card.linkurl || '', |
| | | tooltip: '在链接中以@***@形式拼接的字段(字段来源于字段集中,此外 id、appkey、userid、LoginUID 为系统字段),跳转时将替换为对应值,例如:http://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@,其中appkey与LoginUID将被替换。', |
| | | toolWidth: 350, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'linkfields', |
| | | label: '关联字段', |
| | | 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', |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'noValue', |
| | | label: '空值', |
| | | initVal: card.noValue || 'show', |
| | | tooltip: '数值为 0 或时间小于 1949-10-02 时,是否显示', |
| | | required: false, |
| | | options: [{ |
| | | value: 'show', |
| | | text: '显示' |
| | | }, { |
| | | value: 'hide', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: '黑名单', |