| | |
| | | const isApp = ['pc', 'mob'].includes(appType) |
| | | |
| | | let funTypes = [ |
| | | { value: 'changeuser', text: Formdict['header.form.func.changeuser'] }, |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'closetab', text: '标签关闭' }, |
| | | ] |
| | |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'mkBinding', text: '开通扫码登录' }, |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'reAuth', text: '切换系统' }, |
| | | { value: 'reAuth', text: '切换系统(清空缓存-小程序)' }, |
| | | { value: 'goBack', text: '返回' }, |
| | | ] |
| | | pageTemps = [ |
| | |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | funTypes = [ |
| | | { value: 'changeuser', text: Formdict['header.form.func.changeuser'] }, |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | ] |
| | | opentypes = opentypes.filter(item => item.value !== 'tab') |
| | | } |
| | |
| | | if (viewType === 'popview') { // 弹窗标签 |
| | | opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') |
| | | refresh.push({ |
| | | value: 'popclose', |
| | | text: '标签刷新' |
| | | value: 'closepoptab', // 关闭弹窗标签 |
| | | text: '关闭弹窗' |
| | | }) |
| | | refresh.push({ |
| | | value: 'popclose', // 执行弹窗关闭时的刷新 |
| | | text: '刷新源组件' |
| | | }) |
| | | } |
| | | |
| | | if (!card.control && card.controlField) { |
| | | card.control = 'disabled' |
| | | } |
| | | |
| | | let forms = [ |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'funcType', |
| | | label: Formdict['header.form.funcType'], |
| | | label: '功能类型', |
| | | initVal: card.funcType || '', |
| | | required: true, |
| | | options: funTypes |
| | |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: Formdict['header.form.isRequired'], |
| | | initVal: card.Ot || 'requiredSgl', |
| | | initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'), |
| | | required: true, |
| | | forbid: card.$type === 'tableButton', |
| | | options: [] |
| | | }, |
| | | { |
| | |
| | | key: 'execSuccess', |
| | | label: Formdict['model.form.afterSuccess'], |
| | | initVal: card.execSuccess || 'never', |
| | | tooltip: refresh.length ? '执行标签刷新时,会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | }, { |
| | | value: 'grid', |
| | | text: '刷新当前组件' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, { |
| | | value: 'mainline', |
| | | text: '刷新上级组件 - 行' |
| | |
| | | key: 'execError', |
| | | label: Formdict['model.form.afterError'], |
| | | initVal: card.execError || 'never', |
| | | tooltip: refresh.length ? '执行标签关闭刷新时,会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '刷新上级组件-行时,会同步刷新当前组件,注:上级组件在数据源中添加。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | }, { |
| | | value: 'grid', |
| | | text: '刷新当前组件' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, { |
| | | value: 'mainline', |
| | | text: '刷新上级组件 - 行' |
| | |
| | | type: 'radio', |
| | | key: 'swipe', |
| | | label: "滑动显示", |
| | | initVal: card.swipe || 'false', |
| | | initVal: card.swipe === 'false' ? 'left' : (card.swipe || 'left'), // 移动端仅保留滑动显示按钮 |
| | | required: false, |
| | | forbid: (type !== 'datacard' || appType !== 'mob'), |
| | | options: [{ |
| | | value: 'false', |
| | | text: '否' |
| | | }, { |
| | | // value: 'false', |
| | | // text: '否' |
| | | // }, { |
| | | value: 'left', |
| | | text: '左滑' |
| | | }, { |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'pagination', |
| | | label: Formdict['header.form.pagination'], |
| | | label: '分页', |
| | | initVal: card.pagination || 'false', |
| | | required: false, |
| | | options: [{ |
| | |
| | | key: 'syncComponent', |
| | | label: '刷新组件', |
| | | initVal: card.syncComponent || [], |
| | | tooltip: '执行成功后,需要同步刷新的组件', |
| | | tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件', |
| | | required: false, |
| | | options: modules |
| | | }, |
| | |
| | | required: false, |
| | | forbid: isApp || viewType === 'popview', |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '控制字段', |
| | | tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。', |
| | | initVal: card.controlField || '', |
| | | required: false, |
| | | allowClear: true, |
| | | options: columns |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'controlVal', |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'clickouter', |
| | | label: '点击蒙层', |
| | | initVal: card.clickouter || 'unclose', |
| | | required: false, |
| | | options: [{ |
| | | value: 'unclose', |
| | | text: '不关闭' |
| | | }, { |
| | | value: 'close', |
| | | text: '关闭' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'reload', |
| | | label: '返回后', |
| | | initVal: card.reload || 'false', |
| | |
| | | text: '刷新' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'control', |
| | | label: '按钮控制', |
| | | initVal: card.control || (card.controlField ? 'disabled' : ''), |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '无' |
| | | }, { |
| | | value: 'disabled', |
| | | text: '禁用' |
| | | }, { |
| | | value: 'hidden', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '控制字段', |
| | | tooltip: '控制字段,可根据数据控制按钮的隐藏或禁用。', |
| | | initVal: card.controlField || '', |
| | | required: true, |
| | | allowClear: true, |
| | | options: columns |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'controlVal', |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会隐藏或禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | ] |
| | | |
| | | return forms |