| | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import { btnCustomClasses } from '@/utils/option.js' |
| | | |
| | | const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | |
| | | /** |
| | | * @description 获取按钮表单配置信息 |
| | |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | | { value: 'billprint', text: '单据打印' }, |
| | | { value: 'pay', text: Formdict['model.pay'] }, |
| | | { value: 'pay', text: '支付' }, |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | } |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'OpenType', |
| | | label: Formdict['header.form.openType'], |
| | | label: '打开方式', |
| | | initVal: card.OpenType, |
| | | required: true, |
| | | options: opentypes |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'execMode', |
| | | label: Formdict['model.form.execMode'], |
| | | label: '执行方式', |
| | | initVal: card.execMode || 'exec', |
| | | required: true, |
| | | options: [{ |
| | | value: 'exec', |
| | | text: Formdict['model.form.exec'] |
| | | text: '直接执行' |
| | | }, { |
| | | value: 'prompt', |
| | | text: Formdict['model.form.prompt'] |
| | | text: '提示框' |
| | | }, { |
| | | value: 'pop', |
| | | text: Formdict['model.form.popform'] |
| | | text: '弹窗(表单)' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'intertype', |
| | | label: Formdict['header.form.intertype'], |
| | | label: '接口类型', |
| | | initVal: card.intertype || 'system', |
| | | required: true, |
| | | options: [] |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'sqlType', |
| | | label: Formdict['header.form.action.type'], |
| | | label: '操作类型', |
| | | initVal: card.sqlType || '', |
| | | required: true, |
| | | options: [] |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'innerFunc', |
| | | label: Formdict['header.form.innerFunc'], |
| | | label: '内部函数', |
| | | initVal: card.innerFunc || '', |
| | | tooltip: functip, |
| | | fields: usefulFields, |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'pageTemplate', |
| | | label: Formdict['model.form.newpage.type'], |
| | | label: '页面类型', |
| | | initVal: card.pageTemplate || '', |
| | | required: true, |
| | | options: pageTemps |
| | |
| | | { |
| | | type: 'textarea', |
| | | key: 'url', |
| | | label: Formdict['model.pageUrl'], |
| | | label: '页面地址', |
| | | initVal: card.url || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'sysInterface', |
| | | label: Formdict['header.form.sysInterface'], |
| | | label: '系统接口', |
| | | initVal: card.sysInterface || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'outerFunc', |
| | | label: Formdict['header.form.outerFunc'], |
| | | label: '外部函数', |
| | | initVal: card.outerFunc || '', |
| | | required: false, |
| | | }, |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'callbackFunc', |
| | | label: Formdict['header.form.callbackFunc'], |
| | | label: '回调函数', |
| | | initVal: card.callbackFunc || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: Formdict['header.form.isRequired'], |
| | | label: '行设置', |
| | | initVal: card.Ot || (card.sqlType === 'insert' ? 'notRequired' : 'requiredSgl'), |
| | | required: true, |
| | | options: [] |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'execSuccess', |
| | | label: Formdict['model.form.afterSuccess'], |
| | | label: '成功后', |
| | | initVal: card.execSuccess || 'grid', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'execError', |
| | | label: Formdict['model.form.afterError'], |
| | | label: '失败后', |
| | | initVal: card.execError || 'never', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'popClose', |
| | | label: Formdict['header.form.popClose'], |
| | | label: '关闭后', |
| | | initVal: card.popClose || 'never', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: '刷新当前组件' |
| | |
| | | { |
| | | type: 'icon', |
| | | key: 'icon', |
| | | label: Formdict['model.icon'], |
| | | label: '图标', |
| | | initVal: card.icon, |
| | | required: false, |
| | | forbid: type === 'datacard' && appType === 'mob', // 移动端,滑动显示的按钮只显示文字 |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'class', |
| | | label: Formdict['model.form.color'], |
| | | label: '颜色', |
| | | initVal: card.class, |
| | | tooltip: '此颜色为按钮初始化颜色,可在样式调整中修改。', |
| | | required: false, |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'color', |
| | | label: Formdict['model.form.color'], |
| | | label: '颜色', |
| | | initVal: card.color || 'primary', |
| | | required: false, |
| | | forbid: (type !== 'datacard' || appType !== 'mob'), // 移动端,滑动显示的按钮只可设置固定颜色 |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'joint', |
| | | label: Formdict['model.form.paramJoint'], |
| | | label: '拼接参数', |
| | | initVal: card.joint || 'true', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'sheet', |
| | | label: Formdict['model.form.tablename'], |
| | | label: '表名', |
| | | initVal: card.sheet || setting.tableName || '', |
| | | required: true |
| | | }, |
| | |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['model.form.field'], |
| | | label: '字段', |
| | | initVal: card.field || '', |
| | | required: true, |
| | | readonly: false |