| | |
| | | }) |
| | | } |
| | | |
| | | if (type === 'card') { |
| | | opentypes.push({ |
| | | value: 'form', |
| | | text: '表单' |
| | | }) |
| | | } |
| | | |
| | | if (!card.control && card.controlField) { |
| | | card.control = 'disabled' |
| | | } |
| | |
| | | initVal: card.funcType || '', |
| | | required: true, |
| | | options: funTypes |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'formType', |
| | | label: '表单类型', |
| | | initVal: card.formType || 'switch', |
| | | required: true, |
| | | options: [{ |
| | | value: 'switch', |
| | | text: '开关' |
| | | }, { |
| | | value: 'radio', |
| | | text: '勾选框' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | key: 'reload', |
| | | label: '返回后', |
| | | initVal: card.reload || 'false', |
| | | tooltip: '按钮成功后返回上一页面或使用功能按钮-返回功能时,返回后是否刷新数据。注:在明科云app中(应用模式为app)有效。', |
| | | tooltip: '返回后是否刷新数据。注:在明科云APP或小程序中有效。', |
| | | forbid: appType !== 'mob', |
| | | options: [{ |
| | | value: 'false', |
| | |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'splitLine', |
| | | key: 'title', |
| | | label: '表单', |
| | | initVal: '' |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['model.form.field'], |
| | | initVal: card.field || '', |
| | | required: true, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'size', |
| | | label: '开关尺寸', |
| | | initVal: card.size || 'default', |
| | | options: [{ |
| | | value: 'default', |
| | | text: '大' |
| | | }, { |
| | | value: 'small', |
| | | text: '小' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openVal', |
| | | label: '开启值', |
| | | initVal: card.openVal === undefined ? '' : card.openVal + '', |
| | | tooltip: '当开启与关闭值均为正整数时,默认转换为INT类型。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'closeVal', |
| | | label: '关闭值', |
| | | initVal: card.closeVal === undefined ? '' : card.closeVal + '', |
| | | tooltip: '当开启与关闭值均为正整数时,默认转换为INT类型。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openText', |
| | | label: '开启提示', |
| | | initVal: card.openText || '', |
| | | required: false, |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'closeText', |
| | | label: '关闭提示', |
| | | initVal: card.closeText || '', |
| | | required: false, |
| | | }, |
| | | ] |
| | | |
| | | return forms |