| | |
| | | * @param {*} usefulFields 存储过程可用的开始字段 |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = [], anchors = []) { |
| | | export function getActionForm (card, functip, config, usefulFields, menulist = [], modules = [], anchors = []) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview |
| | | let printTemps = sessionStorage.getItem('printTemps') |
| | |
| | | let setting = config.setting || {} |
| | | let columns = config.columns || [] |
| | | let appMenus = [] |
| | | let type = '' |
| | | |
| | | if (card.eleType === 'button') { |
| | | type = 'card' |
| | | } else if (config.subtype === 'datacard' || config.subtype === 'tablecard') { |
| | | type = 'datacard' |
| | | } else if (config.type === 'line' || config.type === 'bar' || config.type === 'scatter') { |
| | | type = 'chart' |
| | | } |
| | | |
| | | let opentypes = [ |
| | | { |
| | | value: 'pop', |
| | | text: Formdict['model.form.popform'] |
| | | text: '弹窗(表单)' |
| | | }, { |
| | | value: 'prompt', |
| | | text: Formdict['model.form.prompt'] |
| | | text: '提示框' |
| | | }, { |
| | | value: 'exec', |
| | | text: Formdict['model.form.exec'] |
| | | text: '直接执行' |
| | | }, { |
| | | value: 'excelIn', |
| | | text: Formdict['model.form.excelIn'] |
| | | text: '导入Excel' |
| | | }, { |
| | | value: 'excelOut', |
| | | text: Formdict['model.form.excelOut'] |
| | | text: '导出Excel' |
| | | }, { |
| | | value: 'popview', |
| | | text: Formdict['model.form.popview'] |
| | | text: '弹窗(标签)' |
| | | }, { |
| | | value: 'tab', |
| | | text: Formdict['model.form.tab'] |
| | | text: '标签页' |
| | | }, { |
| | | value: 'innerpage', |
| | | text: Formdict['model.form.newpage'] |
| | | text: '新页面' |
| | | }, { |
| | | value: 'funcbutton', |
| | | text: Formdict['model.form.funcbutton'] |
| | | text: '功能按钮' |
| | | } |
| | | ] |
| | | |
| | |
| | | return _list |
| | | } |
| | | |
| | | // if (type === 'editable') { |
| | | // opentypes = [ |
| | | // { |
| | | // value: 'excelIn', |
| | | // text: Formdict['model.form.excelIn'] |
| | | // }, { |
| | | // value: 'excelOut', |
| | | // text: Formdict['model.form.excelOut'] |
| | | // } |
| | | // ] |
| | | // } |
| | | let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components))) |
| | | |
| | | let pageTemps = [ |
| | |
| | | |
| | | if (type === 'chart' && appType !== 'mob') { |
| | | opentypes = opentypes.filter(item => item.value === 'excelIn' || item.value === 'excelOut') |
| | | |
| | | if (card.OpenType !== 'excelIn' && card.OpenType !== 'excelOut') { // 拖拽添加类型转换 |
| | | card.OpenType = 'excelOut' |
| | | } |
| | | } |
| | | |
| | | let refresh = [] |
| | |
| | | if (type === 'card') { |
| | | opentypes.push({ |
| | | value: 'form', |
| | | text: '表单(开关或勾选框)' |
| | | text: '表单' |
| | | }) |
| | | } else if (card.OpenType === 'form') { // 拖拽添加类型转换 |
| | | card.OpenType = 'pop' |
| | | } |
| | | |
| | | if (!card.control && card.controlField) { |
| | |
| | | value: 'closetab', |
| | | text: '关闭标签' |
| | | }] |
| | | } |
| | | |
| | | let formTypes = [] |
| | | if (appType === 'mob') { |
| | | formTypes = [{ |
| | | value: 'scan', |
| | | text: '扫描' |
| | | }] |
| | | } else if (card.formType === 'scan') { |
| | | card.formType = 'switch' |
| | | } |
| | | |
| | | let forms = [ |
| | |
| | | }, { |
| | | value: 'radio', |
| | | text: '勾选框' |
| | | }] |
| | | }, |
| | | ...formTypes] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | options: [{ |
| | | value: 'wxpay', |
| | | text: '微信' |
| | | }, { |
| | | value: 'alipay', |
| | | text: '支付宝' |
| | | // }, { |
| | | // value: 'alipay', |
| | | // text: '支付宝' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'procMode', |
| | | label: '参数处理', |
| | | initVal: card.procMode || 'system', |
| | | initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'), |
| | | required: true, |
| | | options: [{ |
| | | value: 'system', |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'sql', |
| | | label: Formdict['model.form.tablename'], |
| | | label: '表名', |
| | | initVal: card.sql || setting.tableName || '', |
| | | required: true |
| | | }, |
| | |
| | | type: 'radio', |
| | | key: 'callbackType', |
| | | label: '回调方式', |
| | | initVal: card.callbackType || 'script', |
| | | initVal: card.callbackType || (card.callbackFunc ? 'func' : 'none'), |
| | | tooltip: '使用后台脚本执行时,需要配合计划任务。', |
| | | required: true, |
| | | options: [{ |
| | |
| | | tooltip: '执行成功后需要打开的菜单。', |
| | | initVal: card.openmenu || (!appType ? [] : ''), |
| | | help: appType === 'mob' || appType === 'pc' ? '可返回上一页。' : null, |
| | | extendName: 'MenuNo', |
| | | required: false, |
| | | allowClear: true, |
| | | options: appType === 'mob' || appType === 'pc' ? [...appMenus, {value: 'goback', text: '返回(上一页)'}] : menulist, |
| | |
| | | type: 'text', |
| | | key: 'output', |
| | | label: '返回值', |
| | | tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,如@id);自定义函数可指定返回字段(如id)。', |
| | | tooltip: '执行成功后的返回值。系统函数可指定返回的变量(以@符开头,返回id时可使用@id@);自定义函数可指定返回字段(如id)。', |
| | | initVal: card.output || '', |
| | | required: false, |
| | | forbid: viewType === 'popview' |
| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidden', |
| | | label: '隐藏', |
| | | initVal: card.hidden || 'false', |
| | | tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '否' |
| | | }, { |
| | | value: 'true', |
| | | text: '是' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'splitLine', |
| | | key: 'title', |
| | | label: '表单', |
| | |
| | | label: '关闭提示', |
| | | initVal: card.closeText || '', |
| | | required: false, |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidden', |
| | | label: '隐藏', |
| | | initVal: card.hidden || 'false', |
| | | tooltip: '隐藏后按钮在页面中不显示,且不参与权限分配。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '否' |
| | | }, { |
| | | value: 'true', |
| | | text: '是' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |