| | |
| | | }, { |
| | | value: 'group', |
| | | text: '日期(组合)' |
| | | }, { |
| | | value: 'switch', |
| | | text: '开关' |
| | | }, { |
| | | value: 'check', |
| | | text: '勾选框' |
| | | }] |
| | | } |
| | | |
| | |
| | | value: 'custom', |
| | | text: '自定义' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openVal', |
| | | label: '开启值', |
| | | initVal: card.openVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'closeVal', |
| | | label: '关闭值', |
| | | initVal: card.closeVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openText', |
| | | label: '开启提示', |
| | | initVal: card.openText || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'closeText', |
| | | label: '关闭提示', |
| | | initVal: card.closeText || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'checkTip', |
| | | label: '提示', |
| | | initVal: card.checkTip || '', |
| | | tooltip: '勾选框后的提示文字', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'color', |
| | |
| | | value: 'close', |
| | | text: '关闭' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'preFunc', |
| | | label: '前置函数', |
| | | initVal: card.preFunc || '', |
| | | tooltip: usefulFields.length ? `函数名称需以${usefulFields.join(', ')}等字符开始;前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行;当前置函数返回中ErrCode等于-1时,将不再执行内部函数。` : '', |
| | | fields: usefulFields, |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | value: 'switch', |
| | | text: '开关' |
| | | }, { |
| | | value: 'check', |
| | | text: '勾选框' |
| | | }, { |
| | | value: 'checkbox', |
| | | text: '多选框' |
| | | }, { |
| | |
| | | value: 'switch', |
| | | text: '开关' |
| | | }, { |
| | | value: 'check', |
| | | text: '勾选框' |
| | | }, { |
| | | value: 'checkbox', |
| | | text: '多选框' |
| | | }, { |
| | |
| | | card.precision = 'second' |
| | | } |
| | | |
| | | if (!card.place && appType === 'mob') { |
| | | card.place = ['checkbox', 'radio', 'checkcard', 'textarea'].includes(card.type) ? 'up_down' : 'left_right' |
| | | } |
| | | |
| | | let options = card.options || [] |
| | | if (['select', 'radio', 'link'].includes(card.type) && card.setAll === 'true') { // 兼容 |
| | | options.unshift({ |
| | |
| | | } |
| | | |
| | | let initval = card.initval || '' |
| | | if (card.type === 'switch') { |
| | | if (card.type === 'switch' || card.type === 'check') { |
| | | initval = card.initval === true |
| | | } else if (card.type === 'number') { |
| | | initval = card.initval || 0 |
| | |
| | | key: 'closeText', |
| | | label: '关闭提示', |
| | | initVal: card.closeText || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'checkTip', |
| | | label: '提示', |
| | | initVal: card.checkTip || '', |
| | | tooltip: '勾选框后的提示文字', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | key: 'dataSource', |
| | | label: '数据源', |
| | | initVal: card.dataSource || '', |
| | | placeholder: '系统变量:mk_departmentcode、mk_organization、mk_user_type。', |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'unchecked', |
| | | label: '未选中项', |
| | | initVal: card.unchecked || 'show', |
| | | tooltip: '如果没有选中项,该表单将被隐藏。', |
| | | options: [{ |
| | | value: 'show', |
| | | text: '显示' |
| | | }, { |
| | | value: 'hidden', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'color', |
| | | key: 'backgroundColor', |
| | | label: '背景色', |
| | |
| | | type: 'radio', |
| | | key: 'eval', |
| | | label: '解析', |
| | | initVal: card.eval || 'true', |
| | | initVal: card.eval || 'false', |
| | | tooltip: '当公式内容涉及计算时请选择“是”,当公式内容为字段拼接时请选择“否”。', |
| | | required: false, |
| | | options: [{ |
| | |
| | | key: 'place', |
| | | label: '排列', |
| | | initVal: card.place || 'left_right', |
| | | tooltip: '提示文字与输入框的位置关系。注:选择器、日期表单在表单样式为阴影时有效', |
| | | tooltip: '提示文字与输入框的位置关系。', |
| | | forbid: appType !== 'mob', |
| | | options: [{ |
| | | value: 'left_right', |
| | |
| | | }, { |
| | | value: 'right', |
| | | text: '右截' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'constant', |
| | | label: 'Unicode常量', |
| | | tooltip: '使用时将在提交内容前加上 N,代表存入数据库时以 Unicode 格式存储。', |
| | | initVal: card.constant || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: '使用' |
| | | }, { |
| | | value: 'false', |
| | | text: '不使用' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | key: 'pickerMode', |
| | | label: '弹窗样式', |
| | | initVal: card.pickerMode || 'default', |
| | | required: false, |
| | | options: [ |
| | | {value: 'default', text: '默认'}, |
| | | {value: 'board', text: '面板'}, |
| | | {value: 'board-block', text: '面板2'}, |
| | | {value: 'dropdown', text: '下拉框'}, |
| | | ], |
| | | forbid: appType !== 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'empty', |
| | | label: '空值隐藏', |
| | | initVal: card.empty || 'show', |