| | |
| | | import { btnCustomClasses, btnClasses } from '@/utils/option.js' |
| | | import { btnClasses } from '@/utils/option.js' |
| | | |
| | | |
| | | /** |
| | |
| | | * @param {*} usefulFields 存储过程可用的开始字段 |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = []) { |
| | | export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview |
| | | let printTemps = sessionStorage.getItem('printTemps') |
| | | printTemps = printTemps ? JSON.parse(printTemps) : [] |
| | | let setting = config.setting || {} |
| | | let columns = config.columns || [] |
| | | let columns = side === 'sub' && config.subColumns ? config.subColumns : (config.columns || []) |
| | | let appMenus = [] |
| | | let menulist = [] |
| | | let type = '' |
| | | |
| | | if (card.eleType === 'button') { |
| | | type = 'card' |
| | | } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') { |
| | | } else if (config.subtype === 'datacard' || config.subtype === 'tablecard' || config.subtype === 'dualdatacard') { |
| | | type = 'datacard' |
| | | } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') { |
| | | type = 'chart' |
| | |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'refund', text: '退款' }, |
| | | { value: 'closetab', text: '标签关闭' }, |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | { value: 'megvii', text: '旷视面板机' }, |
| | | { value: 'filezip', text: '文件压缩包' }, |
| | | ] |
| | |
| | | } else { |
| | | appMenus = [] |
| | | } |
| | | appMenus.push({value: 'goback', text: '返回(上一页)'}) |
| | | } else { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | |
| | | } |
| | | } |
| | | if (appType === 'mob') { |
| | | opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'innerpage', 'funcbutton'].includes(item.value)) |
| | | opentypes = opentypes.filter(item => ['pop', 'prompt', 'exec', 'excelOut', 'popview', 'innerpage', 'funcbutton'].includes(item.value)) |
| | | funTypes = [ |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'scan', text: '扫码' }, |
| | |
| | | { value: 'mkUnBinding', text: '用户解绑' }, |
| | | { value: 'mkUnsubscribe', text: '注销账户' }, |
| | | { value: 'reAuth', text: '切换系统(清空缓存-小程序)' }, |
| | | { value: 'clearCache', text: '清空本地配置' }, |
| | | { value: 'copyurl', text: '复制链接地址' }, |
| | | { value: 'logout', text: '退出' }, |
| | | { value: 'goBack', text: '返回' }, |
| | |
| | | opentypes = opentypes.filter(item => item.value !== 'tab') |
| | | funTypes = [ |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | ] |
| | | pageTemps = [ |
| | | { value: 'linkpage', text: '关联菜单' }, |
| | |
| | | { value: 'pay', text: '支付' }, |
| | | { value: 'custom', text: '链接' } |
| | | ] |
| | | } else { |
| | | if (card.pageTemplate === 'print') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'print', text: '标签打印模板' }) |
| | | } else if (card.pageTemplate === 'billprintTemp') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'billprintTemp', text: '单据打印模板' }) |
| | | } |
| | | } |
| | | |
| | | if (card.funcType === 'changeuser') { // 原类型支持 |
| | | funTypes.unshift({ value: 'changeuser', text: '切换用户' }) |
| | | } |
| | | |
| | | if (config.subtype === 'editable') { // 编辑表的添加、删除 |
| | | funTypes.push( |
| | | { value: 'addline', text: '增加行(编辑表)' }, |
| | | { value: 'delline', text: '删除行(编辑表)' } |
| | | ) |
| | | } else if (card.funcType === 'addline' || card.funcType === 'delline') { |
| | | card.funcType = '' |
| | | } |
| | | |
| | | if (type === 'chart' && appType !== 'mob') { |
| | |
| | | |
| | | let refresh = [] |
| | | if (viewType === 'popview') { // 弹窗标签 |
| | | opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') |
| | | opentypes = opentypes.filter(item => item.value !== 'popview') |
| | | |
| | | funTypes = funTypes.filter(item => item.value !== 'print') |
| | | |
| | | refresh.push({ |
| | | value: 'closepoptab', // 关闭弹窗标签 |
| | | text: '关闭弹窗' |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'OpenType', |
| | | label: '打开方式', |
| | | label: '按钮类型', |
| | | initVal: card.OpenType, |
| | | required: true, |
| | | options: opentypes |
| | |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | type: formTypes.length ? 'select' : 'radio', |
| | | key: 'formType', |
| | | label: '表单类型', |
| | | initVal: card.formType || 'switch', |
| | |
| | | }, { |
| | | value: 'radio', |
| | | text: '勾选框' |
| | | }, { |
| | | value: 'counter', |
| | | text: '计数器' |
| | | }, { |
| | | value: 'count_line', |
| | | text: '计数器(本地)' |
| | | }, |
| | | ...formTypes] |
| | | }, |
| | |
| | | key: 'procMode', |
| | | label: '参数处理', |
| | | initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), |
| | | tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。', |
| | | tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'system', |
| | |
| | | options: isApp ? appMenus : menulist |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'prefix', |
| | | label: '前缀', |
| | | initVal: card.prefix || '', |
| | | tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid开头。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | key: 'url', |
| | | label: '页面地址', |
| | | initVal: card.url || '', |
| | | tooltip: appType === '' ? '地址格式为:http://******/admin/index.html#/iframe/menuId/loginuid/BID 会打开标签页。注:使用@loginuid@时自动替换为当前系统的loginuid;选择单行且拼接参数时会拼接BID。' : '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | key: 'proUrl', |
| | | label: '正式地址', |
| | | initVal: card.proUrl || '', |
| | | tooltip: appType === '' ? '地址格式为:http://******/admin/index.html#/iframe/menuId/loginuid/BID 会打开标签页。注:使用@loginuid@时自动替换为当前系统的loginuid;选择单行且拼接参数时会拼接BID。' : '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'method', |
| | | label: '请求方式', |
| | | initVal: card.method || 'post', |
| | | required: true, |
| | | options: [{ |
| | | value: 'get', |
| | | text: 'GET' |
| | | }, { |
| | | value: 'post', |
| | | text: 'POST' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'cross', |
| | | label: '跨域请求', |
| | | initVal: card.cross || 'true', |
| | | tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '支持' |
| | | }, { |
| | | value: 'false', |
| | | text: '不支持' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'callbackType', |
| | | label: '回调方式', |
| | | initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'method', |
| | | label: '请求方式', |
| | | initVal: card.method || 'post', |
| | | required: true, |
| | | options: [{ |
| | | value: 'get', |
| | | text: 'GET' |
| | | }, { |
| | | value: 'post', |
| | | text: 'POST' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'cross', |
| | | label: '接口跨域', |
| | | initVal: card.cross || 'true', |
| | | tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '支持' |
| | | }, { |
| | | value: 'false', |
| | | text: '不支持' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'stringify', |
| | | label: '序列化', |
| | | initVal: card.stringify || 'text', |
| | | required: false, |
| | | options: [{ |
| | | value: 'text', |
| | | text: 'Text' |
| | | }, { |
| | | value: 'JSON', |
| | | text: 'JSON' |
| | | }, { |
| | | value: 'qs', |
| | | text: 'qs' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: '行设置', |
| | |
| | | key: 'execSuccess', |
| | | label: '成功后', |
| | | initVal: card.execSuccess || 'grid', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | key: 'execError', |
| | | label: '失败后', |
| | | initVal: card.execError || 'never', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | tooltip: '此颜色为按钮初始化颜色,可在样式调整中修改。', |
| | | required: false, |
| | | forbid: type === 'datacard' && appType === 'mob', // 移动端,滑动显示的按钮不设置通用颜色 |
| | | options: btnCustomClasses |
| | | options: btnClasses |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | }, { |
| | | value: 'light', |
| | | text: '灰' |
| | | }, { |
| | | value: 'system', |
| | | text: '系统' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.syncComponent || [], |
| | | tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。', |
| | | required: false, |
| | | options: modules |
| | | options: modules.length ? [...modules, {value: 'multiComponent', label: '多组件'}] : [] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | extendName: 'MenuNo', |
| | | required: false, |
| | | allowClear: true, |
| | | options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '返回(上一页)'}] : menulist, |
| | | options: appType === 'mob' || appType === 'pc' ? appMenus : menulist, |
| | | forbid: viewType === 'popview' |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'openTab', |
| | | label: '打开方式', |
| | | initVal: card.openTab || 'newtab', |
| | | tooltip: '菜单打开方式。', |
| | | forbid: appType !== '', |
| | | options: [ |
| | | {value: 'newtab', text: '标签页'}, |
| | | // {value: 'newpage', text: '新页面(标签页)'}, |
| | | {value: 'view', text: '新页面(全屏)'} |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | | label: '显示方式', |
| | | initVal: card.display || 'modal', |
| | |
| | | }, { |
| | | value: 'drawer', |
| | | text: '抽屉' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'ratio', |
| | | min: 1, |
| | | max: 3000, |
| | | precision: 0, |
| | | label: '比例', |
| | | initVal: card.ratio || 85, |
| | | tooltip: '模态框或抽屉的宽度,小于100为窗口宽度(或高度)百分比,大于100为像素值。', |
| | | required: true |
| | | }], |
| | | forbid: appType === 'mob', |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'placement', |
| | | label: '抽屉方向', |
| | | label: '弹出方向', |
| | | initVal: card.placement || 'right', |
| | | required: false, |
| | | options: [{ |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'ratio', |
| | | min: 1, |
| | | max: 3000, |
| | | precision: 0, |
| | | label: '比例', |
| | | initVal: card.ratio || 85, |
| | | tooltip: '模态框或抽屉的宽度,小于100为窗口宽度(或高度)百分比,大于100为像素值。', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'clickouter', |
| | | label: '点击蒙层', |
| | |
| | | value: 'close', |
| | | text: '关闭' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'maskStyle', |
| | | label: '蒙层样式', |
| | | initVal: card.maskStyle || 'default', |
| | | required: false, |
| | | options: [{ |
| | | value: 'default', |
| | | text: '默认' |
| | | }, { |
| | | value: 'transparent', |
| | | text: '透明' |
| | | }], |
| | | forbid: appType !== 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'closeButton', |
| | | label: '关闭按钮', |
| | | initVal: card.closeButton || 'false', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '隐藏' |
| | | }, { |
| | | value: 'true', |
| | | text: '显示' |
| | | }], |
| | | forbid: appType !== 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | value: 'bottom', |
| | | text: '底部' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'preFunc', |
| | | label: '前置函数', |
| | | initVal: card.preFunc || '', |
| | | tooltip: '前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行;当前置函数返回中ErrCode等于-1时,将不再执行内部函数。', |
| | | required: false, |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'size', |
| | | label: '开关尺寸', |
| | | label: '尺寸', |
| | | initVal: card.size || 'default', |
| | | options: [{ |
| | | value: 'large', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'checkType', |
| | | label: '选框样式', |
| | | initVal: card.checkType || 'circle', |
| | | options: [{ |
| | | value: 'circle', |
| | | text: '圆角' |
| | | }, { |
| | | value: 'square', |
| | | text: '方角' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openVal', |
| | | label: '开启值', |
| | | initVal: card.openVal === undefined ? '' : card.openVal + '', |
| | | tooltip: '当开启与关闭值均为正整数时,默认转换为INT类型。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'min', |
| | | label: '最小值', |
| | | initVal: card.min, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'max', |
| | | label: '最大值', |
| | | initVal: card.max, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'decimal', |
| | | label: '小数位', |
| | | initVal: card.decimal || 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'execType', |
| | | label: '请求方式', |
| | | initVal: card.execType || 'multi', |
| | | tooltip: '选中多条数据时的请求方式,注:当选中数据超过20条时将逐条请求。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'multi', |
| | | text: '批量请求' |
| | | }, { |
| | | value: 'single', |
| | | text: '逐条请求' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'progress', |
| | | label: '进度提示', |
| | | initVal: card.progress || 'number', |
| | |
| | | value: 'progressbar', |
| | | text: '进度条' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'table', |
| | | key: 'syncComponents', |
| | | label: '组件列表', |
| | | initVal: card.syncComponents || [], |
| | | required: true, |
| | | actions: [], |
| | | columns: [ |
| | | { |
| | | title: '组件', |
| | | dataIndex: 'syncComId', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | | required: true, |
| | | extends: [{key: 'label', value: 'label'}], |
| | | width: '70%', |
| | | render: (text, record) => record.label, |
| | | options: modules |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | |
| | | { value: 'custom', text: '自定义' } |
| | | ] |
| | | |
| | | if (card.pageTemplate === 'print') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'print', text: '标签打印模板' }) |
| | | } else if (card.pageTemplate === 'billprintTemp') { // 原类型支持 |
| | | pageTemps.unshift({ value: 'billprintTemp', text: '单据打印模板' }) |
| | | } |
| | | |
| | | let funTypes = [ |
| | | { value: 'print', text: '标签打印' }, |
| | | { value: 'refund', text: '退款' }, |
| | | { value: 'closetab', text: '标签关闭' }, |
| | | { value: 'changeuser', text: '切换用户' }, |
| | | { value: 'megvii', text: '旷视面板机' }, |
| | | { value: 'filezip', text: '文件压缩包' }, |
| | | ] |
| | | |
| | | if (card.funcType === 'changeuser') { // 原类型支持 |
| | | funTypes.unshift({ value: 'changeuser', text: '切换用户' }) |
| | | } |
| | | |
| | | let menulist = sessionStorage.getItem('fstMenuList') |
| | | if (menulist) { |
| | |
| | | |
| | | let refresh = [] |
| | | if (viewType === 'popview') { // 弹窗标签 |
| | | opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') |
| | | opentypes = opentypes.filter(item => item.value !== 'popview') |
| | | |
| | | funTypes = funTypes.filter(item => item.value !== 'print') |
| | | |
| | | refresh.push({ |
| | | value: 'closepoptab', // 关闭弹窗标签 |
| | | text: '关闭弹窗' |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'OpenType', |
| | | label: '打开方式', |
| | | label: '按钮类型', |
| | | initVal: card.OpenType, |
| | | required: true, |
| | | options: opentypes |
| | |
| | | key: 'procMode', |
| | | label: '参数处理', |
| | | initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), |
| | | tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。', |
| | | tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'system', |
| | |
| | | key: 'url', |
| | | label: '页面地址', |
| | | initVal: card.url || '', |
| | | tooltip: '地址格式为:http://******/admin/index.html#/iframe/menuId/loginuid/BID 会打开标签页。注:使用@loginuid@时自动替换为当前系统的loginuid;选择单行且拼接参数时会拼接BID。', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | | key: 'proUrl', |
| | | label: '正式地址', |
| | | initVal: card.proUrl || '', |
| | | tooltip: '地址格式为:http://******/admin/index.html#/iframe/menuId/loginuid/BID 会打开标签页。注:使用@loginuid@时自动替换为当前系统的loginuid;选择单行且拼接参数时会拼接BID。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'method', |
| | | label: '请求方式', |
| | | initVal: card.method || 'post', |
| | | required: true, |
| | | options: [{ |
| | | value: 'get', |
| | | text: 'GET' |
| | | }, { |
| | | value: 'post', |
| | | text: 'POST' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'cross', |
| | | label: '跨域请求', |
| | | initVal: card.cross || 'true', |
| | | tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '支持' |
| | | }, { |
| | | value: 'false', |
| | | text: '不支持' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'callbackType', |
| | | label: '回调方式', |
| | | initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'method', |
| | | label: '请求方式', |
| | | initVal: card.method || 'post', |
| | | required: true, |
| | | options: [{ |
| | | value: 'get', |
| | | text: 'GET' |
| | | }, { |
| | | value: 'post', |
| | | text: 'POST' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'cross', |
| | | label: '接口跨域', |
| | | initVal: card.cross || 'true', |
| | | tooltip: '如果自定义接口不支持跨域请求,会通过当前系统转发。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '支持' |
| | | }, { |
| | | value: 'false', |
| | | text: '不支持' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'stringify', |
| | | label: '序列化', |
| | | initVal: card.stringify || 'text', |
| | | required: false, |
| | | options: [{ |
| | | value: 'text', |
| | | text: 'Text' |
| | | }, { |
| | | value: 'JSON', |
| | | text: 'JSON' |
| | | }, { |
| | | value: 'qs', |
| | | text: 'qs' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: '行设置', |
| | |
| | | key: 'execSuccess', |
| | | label: '成功后', |
| | | initVal: card.execSuccess || 'grid', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。' : '选择刷新行时,如果选择多条数据会刷新表格。注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | key: 'execError', |
| | | label: '失败后', |
| | | initVal: card.execError || 'never', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新那一项,注:此时会同步刷新当前组件和上级组件-行。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。', |
| | | tooltip: refresh.length ? '执行刷新源组件时,请在源按钮中设置关闭后刷新哪一项,注:此时会同步刷新当前组件和上级组件-行。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。' : '选择刷新行时,如果选择多条数据会刷新表格,注:上级组件在数据源中添加。如需语音播报请以@speak@开头,播报内容或文件放置于<<>>中。返回信息中包含@close_tab@、@close_popup@、@goback@ 会执行(关闭标签-管理系统)、(关闭弹窗)、(返回上一页-子应用)等动作。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | |
| | | initVal: card.syncComponent || [], |
| | | tooltip: '执行成功后(或弹窗标签关闭时),需要同步刷新的组件。注:选择当前组件的上级组件无效,刷新上级组件请选择成功后“刷新上级组件 - 行”。', |
| | | required: false, |
| | | options: modules |
| | | options: modules.length ? [...modules, {value: 'multiComponent', label: '多组件'}] : [] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'openTab', |
| | | label: '打开方式', |
| | | initVal: card.openTab || 'newtab', |
| | | tooltip: '菜单打开方式。', |
| | | options: [ |
| | | {value: 'newtab', text: '标签页'}, |
| | | // {value: 'newpage', text: '新页面(标签页)'}, |
| | | {value: 'view', text: '新页面(全屏)'} |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | | label: '显示方式', |
| | | initVal: card.display || 'modal', |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'placement', |
| | | label: '抽屉方向', |
| | | label: '弹出方向', |
| | | initVal: card.placement || 'right', |
| | | required: false, |
| | | options: [{ |
| | |
| | | value: 'close', |
| | | text: '关闭' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'preFunc', |
| | | label: '前置函数', |
| | | initVal: card.preFunc || '', |
| | | tooltip: '前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行;当前置函数返回中ErrCode等于-1时,将不再执行内部函数。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'execType', |
| | | label: '请求方式', |
| | | initVal: card.execType || 'multi', |
| | | tooltip: '选中多条数据时的请求方式,注:当选中数据超过20条时将逐条请求。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'multi', |
| | | text: '批量请求' |
| | | }, { |
| | | value: 'single', |
| | | text: '逐条请求' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'progress', |
| | | label: '进度提示', |
| | | initVal: card.progress || 'number', |
| | |
| | | value: 'progressbar', |
| | | text: '进度条' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'table', |
| | | key: 'syncComponents', |
| | | label: '组件列表', |
| | | initVal: card.syncComponents || [], |
| | | required: true, |
| | | actions: [], |
| | | columns: [ |
| | | { |
| | | title: '组件', |
| | | dataIndex: 'syncComId', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | | required: true, |
| | | extends: [{key: 'label', value: 'label'}], |
| | | width: '70%', |
| | | render: (text, record) => record.label, |
| | | options: modules |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |