| | |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch { |
| | | } catch (e) { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'dropdown', |
| | | label: '下拉框', |
| | | initVal: card.dropdown || 'true', |
| | | forbid: appType === 'mob', |
| | | options: [{ |
| | | value: 'true', |
| | | text: '定宽' |
| | | }, { |
| | | value: 'false', |
| | | text: '自适应' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'inputType', |
| | | label: '输入样式', |
| | | initVal: card.inputType || 'input', |
| | | tooltip: '使用高级搜索时无效。', |
| | | required: false, |
| | | forbid: appType === null, |
| | | options: [{ |
| | | value: 'input', |
| | | text: '输入框' |
| | |
| | | /** |
| | | * @description 获取按钮表单配置信息 |
| | | * @param {*} card 编辑按钮 |
| | | * @param {*} functip 生成存储过程提示 |
| | | * @param {*} config 页面配置 |
| | | * @param {*} usefulFields 存储过程可用的开始字段 |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | export function getActionForm (card, functip, config, usefulFields, type, menulist = [], printTemps = []) { |
| | | export function getActionForm (card, config, usefulFields, type, menulist = [], printTemps = []) { |
| | | let columns = (config.columns || []).filter(col => col.field) |
| | | |
| | | let opentypes = [ |
| | |
| | | options: opentypes |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | type: 'select', |
| | | key: 'funcType', |
| | | label: Formdict['header.form.funcType'], |
| | | initVal: card.funcType || '', |
| | |
| | | }, { |
| | | value: 'print', |
| | | text: '标签打印' |
| | | }, { |
| | | value: 'closetab', |
| | | text: '标签关闭' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | key: 'innerFunc', |
| | | label: Formdict['header.form.innerFunc'], |
| | | initVal: card.innerFunc || '', |
| | | tooltip: functip, |
| | | tooltip: `函数名称需以${usefulFields.join(', ')}等字符开始。`, |
| | | fields: usefulFields, |
| | | tooltipClass: 'middle', |
| | | required: card.intertype === 'inner', |
| | | readonly: false |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // key: 'tabType', |
| | | // label: Formdict['model.form.tabType'], |
| | | // initVal: card.tabType || 'SubTable', |
| | | // required: true, |
| | | // options: [{ |
| | | // value: 'SubTable', |
| | | // text: Formdict['model.menu.tab.subtable'] |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'select', |
| | | key: 'linkTab', |
| | |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'refreshTab', |
| | | label: '刷新标签', |
| | | initVal: card.refreshTab || [], |
| | | required: false, |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'afterExecSuccess', |
| | | label: Formdict['header.form.afterExecSuccess'], |
| | |
| | | initVal: card.class, |
| | | required: false, |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'openmenu', |
| | | label: '打开菜单', |
| | | initVal: card.openmenu || [], |
| | | tooltip: '执行成功后需要打开的菜单。', |
| | | required: false, |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'output', |
| | | label: '返回值', |
| | | tooltip: '执行成功后的返回值。', |
| | | initVal: card.output || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | text: '下侧' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'preFunc', |
| | | label: '前置函数', |
| | | initVal: card.preFunc || '', |
| | | tooltip: `函数名称需以${usefulFields.join(', ')}等字符开始;前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行。`, |
| | | fields: usefulFields, |
| | | tooltipClass: 'middle', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | ] |
| | | } |
| | | |
| | |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch { |
| | | } catch (e) { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch { |
| | | } catch (e) { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | |
| | | label: role.text |
| | | } |
| | | }) |
| | | } catch { |
| | | } catch (e) { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'disableField', |
| | | label: '禁用·字段', |
| | | initVal: card.disableField || '', |
| | | tooltip: '设置禁用字段,且字段值为true时,选项不可选。', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'multiple', |
| | | label: '可多选', |
| | |
| | | type: 'radio', |
| | | key: 'readin', |
| | | label: Formdict['header.form.readin'], |
| | | tooltip: Formdict['header.form.readin.tooltip'], |
| | | tooltip: '是否将表格选中的数据自动填充到表单(字段相同)', |
| | | initVal: card.readin || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | }, { |
| | | value: 'top', |
| | | text: '首行' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'dropdown', |
| | | label: '下拉框', |
| | | initVal: card.dropdown || 'true', |
| | | forbid: appType === 'mob', |
| | | options: [{ |
| | | value: 'true', |
| | | text: '定宽' |
| | | }, { |
| | | value: 'false', |
| | | text: '自适应' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.label || '', |
| | | required: true |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // key: 'type', |
| | | // label: Formdict['model.form.tabType'], |
| | | // initVal: card.type || 'SubTable', |
| | | // required: true, |
| | | // options: [{ |
| | | // value: 'SubTable', |
| | | // text: Formdict['model.menu.tab.subtable'] |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'select', |
| | | key: 'linkTab', |