| | |
| | | key: 'mark', |
| | | label: '顶级标识', |
| | | initVal: setting.mark || '', |
| | | tooltip: '父级字段值与顶级标识(默认值为空)相同时,视为顶级节点。', |
| | | tooltip: '父级字段值与顶级标识相同时,视为顶级节点。', |
| | | required: false, |
| | | readonly: false, |
| | | rules: [ |
| | |
| | | /** |
| | | * @description 获取搜索条件表单配置信息 |
| | | * @param {object} card // 搜索条件对象 |
| | | * @param {Array} roleList // 角色列表 |
| | | * @param {Array} linkableFields // 可关联字段 |
| | | */ |
| | | export function getSearchForm (card, roleList, linkableFields) { |
| | | export function getSearchForm (card, linkableFields) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | return [ |
| | | { |
| | | type: 'text', |
| | |
| | | type: 'radio', |
| | | key: 'setAll', |
| | | label: Formdict['header.form.setAll'], |
| | | initVal: card.setAll || 'false', |
| | | initVal: card.setAll || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | |
| | | text: '>=' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'display', |
| | | label: Formdict['header.form.display'], |
| | | initVal: card.display || 'dropdown', |
| | | required: true, |
| | | options: [{ |
| | | value: 'dropdown', |
| | | text: Formdict['header.form.dropdown'] |
| | | // }, { |
| | | // value: 'button', |
| | | // text: Formdict['header.form.button'] |
| | | }] |
| | | }, |
| | | // { |
| | | // type: 'select', |
| | | // key: 'display', |
| | | // label: Formdict['header.form.display'], |
| | | // initVal: card.display || 'dropdown', |
| | | // required: true, |
| | | // options: [{ |
| | | // value: 'dropdown', |
| | | // text: Formdict['header.form.dropdown'] |
| | | // // }, { |
| | | // // value: 'button', |
| | | // // text: Formdict['header.form.button'] |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | key: 'database', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'labelShow', |
| | | label: '显示名称', |
| | | initVal: card.labelShow || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | |
| | | * @param {*} card 编辑按钮 |
| | | * @param {*} functip 生成存储过程提示 |
| | | * @param {*} config 页面配置 |
| | | * @param {*} permFuncField 存储过程可用的开始字段 |
| | | * @param {*} usefulFields 存储过程可用的开始字段 |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | export function getActionForm (card, functip, config, permFuncField, type, menulist = []) { |
| | | export function getActionForm (card, functip, config, usefulFields, type, menulist = [], printTemps = []) { |
| | | let opentypes = [ |
| | | { |
| | | value: 'pop', |
| | |
| | | tabTems = [] |
| | | } |
| | | |
| | | if (card.execSuccess === 'view' || card.execSuccess === 'refresh') { // refresh为表单标签页 |
| | | card.execSuccess = 'grid' |
| | | } |
| | | if (card.execError === 'view' || card.execSuccess === 'refresh') { |
| | | card.execError = 'grid' |
| | | } |
| | | if (card.popClose === 'view') { |
| | | card.popClose = 'grid' |
| | | } |
| | | |
| | | let refresh = [] |
| | | if (type === 'subtable') { // 子表页面,可设置刷新主表及同级标签 |
| | | refresh.push({ |
| | |
| | | }, { |
| | | value: 'equaltab', |
| | | text: Formdict['header.form.refresh.equaltab'] |
| | | // }, { |
| | | // value: 'mainline', |
| | | // text: Formdict['header.form.refresh.mainline'] |
| | | }) |
| | | } |
| | | |
| | |
| | | text: Formdict['header.form.func.changeuser'] |
| | | }, { |
| | | value: 'print', |
| | | text: Formdict['header.form.func.print'] |
| | | text: '标签打印' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | label: Formdict['header.form.innerFunc'], |
| | | initVal: card.innerFunc || '', |
| | | tooltip: functip, |
| | | fields: permFuncField, |
| | | fields: usefulFields, |
| | | tooltipClass: 'middle', |
| | | required: card.intertype === 'inner', |
| | | readonly: false |
| | |
| | | initVal: card.pageTemplate || '', |
| | | required: true, |
| | | options: [{ |
| | | value: 'print', |
| | | text: Formdict['header.menu.printTemplate'] |
| | | // value: 'print', |
| | | // text: '标签打印模板' |
| | | // }, { |
| | | // value: 'billprintTemp', |
| | | // text: '单据打印模板' |
| | | // }, { |
| | | value: 'billprint', |
| | | text: '单据打印' |
| | | }, { |
| | | value: 'pay', |
| | | text: Formdict['model.pay'] |
| | |
| | | value: 'custom', |
| | | text: Formdict['header.form.custom'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'printTemp', |
| | | label: '打印模板', |
| | | initVal: card.printTemp || '', |
| | | required: true, |
| | | options: printTemps |
| | | }, |
| | | { |
| | | type: 'text', |
| | |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: 'radio', |
| | | key: 'afterExecSuccess', |
| | | label: Formdict['header.form.afterExecSuccess'], |
| | | initVal: card.afterExecSuccess || 'close', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: 'radio', |
| | | key: 'afterExecError', |
| | | label: Formdict['header.form.afterExecError'], |
| | | initVal: card.afterExecError || 'notclose', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'execSuccess', |
| | | label: Formdict['model.form.afterSuccess'], |
| | | initVal: card.execSuccess || 'never', |
| | |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | }, { |
| | | value: 'view', |
| | | text: Formdict['header.form.refresh.view'] |
| | | }, |
| | | ...refresh] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'execError', |
| | | label: Formdict['model.form.afterError'], |
| | | initVal: card.execError || 'never', |
| | |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | }, { |
| | | value: 'view', |
| | | text: Formdict['header.form.refresh.view'] |
| | | }] |
| | | }, |
| | | ...refresh] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'popClose', |
| | | label: Formdict['header.form.popClose'], |
| | | initVal: card.popClose || 'never', |
| | |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | }, { |
| | | value: 'view', |
| | | text: Formdict['header.form.refresh.view'] |
| | | }, |
| | | ...refresh] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'resetPageIndex', |
| | | label: '刷新时', |
| | | initVal: card.resetPageIndex || 'true', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: '重置页码' |
| | | }, { |
| | | value: 'false', |
| | | text: '不重置' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | /** |
| | | * @description 获取显示列表单配置信息 |
| | | * @param {object} card // 搜索条件对象 |
| | | * @param {Array} roleList // 角色列表-黑名单 |
| | | * @param {Array} menulist // 菜单列表-用于字段透视 |
| | | */ |
| | | export function getColumnForm (card, roleList = [], menulist = []) { |
| | | export function getColumnForm (card, menulist = []) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | return [ |
| | | { |
| | | type: 'text', |
| | |
| | | key: 'rowspan', |
| | | label: '行合并', |
| | | initVal: card.rowspan || 'false', |
| | | tooltip: '相邻行信息相同时,单元格合并。注:为防止表格信息错乱,行合并只能添加一个字段。', |
| | | tooltip: '相邻行信息相同时,单元格合并。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | }, { |
| | | value: 'percent', |
| | | text: '百分比' |
| | | }, { |
| | | value: 'abs', |
| | | text: '绝对值' |
| | | }], |
| | | required: false |
| | | }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'perspective', |
| | | label: '字段透视', |
| | | initVal: card.perspective || 'linkmenu', |
| | | options: [{ |
| | | value: 'linkmenu', |
| | | text: '菜单' |
| | | }, { |
| | | value: 'linkurl', |
| | | text: '链接' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.form.linkmenu'], |
| | | label: Formdict['model.menu'], |
| | | initVal: card.linkmenu || [], |
| | | required: false, |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'linkurl', |
| | | label: '链接地址', |
| | | initVal: card.linkurl || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | |
| | | /** |
| | | * @description 获取图表视图外部配置表单 |
| | | * @param {object} card // 搜索条件对象 |
| | | * @param {Array} roleList // 角色列表-黑名单 |
| | | * @param {Array} columns // 显示列 |
| | | * @param {Array} actions // 按钮组excel |
| | | * @param {Array} extraActions // 常规按钮 |
| | | */ |
| | | export function getChartViewForm (card, roleList = [], _columns, actions, extraActions) { |
| | | export function getChartViewForm (card, _columns, actions, extraActions) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | } catch { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | let _charts = [{ |
| | | value: 'line', |
| | | text: '折线图' |
| | |
| | | required: true |
| | | }, { |
| | | type: 'number', |
| | | key: 'correction', |
| | | label: '数据修正', |
| | | tooltip: '当数据项少于设置值时,系统会自动修正(避免柱形图过宽),在自定义中,设置为折线图时失效。', |
| | | key: 'barSize', |
| | | label: '柱形宽度', |
| | | tooltip: '空值时,宽度自适应。', |
| | | min: 5, |
| | | max: 30, |
| | | max: 100, |
| | | decimal: 0, |
| | | initVal: card.correction, |
| | | initVal: card.barSize, |
| | | forbid: !['bar'].includes(card.chartType), |
| | | required: false |
| | | } |
| | |
| | | * @description 获取表单配置信息 |
| | | * @param {*} card // 表单对象 |
| | | * @param {*} inputfields // 可关联表单 |
| | | * @param {*} tabfields // 可切换表单 |
| | | * @param {*} linkableFields // 可关联表单 |
| | | * @param {*} linksupFields // 上级表单 |
| | | * @param {*} subtable // 是否为子表表单 |
| | | * @param {*} roleList // 角色列表-黑名单 |
| | | */ |
| | | export function getModalForm (card, inputfields, linkableFields, linksupFields, subtable = false, roleList = []) { |
| | | export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, subtable = false) { |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | | try { |
| | | roleList = JSON.parse(roleList) |
| | | roleList = roleList.map(role => { |
| | | return { |
| | | uuid: role.uuid, |
| | | field: role.value, |
| | | label: role.text |
| | | } |
| | | }) |
| | | } catch { |
| | | roleList = [] |
| | | } |
| | | } else { |
| | | roleList = [] |
| | | } |
| | | |
| | | let _openType = [] |
| | | let _fieldlength = 50 |
| | | |
| | |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'openText', |
| | | label: '开启提示', |
| | | initVal: card.openText || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'closeText', |
| | | label: '关闭提示', |
| | | initVal: card.closeText || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'resourceType', |
| | | label: Formdict['header.form.resourceType'], |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'setAll', |
| | | label: Formdict['header.form.setAll'], |
| | | label: '设置空值', |
| | | initVal: card.setAll || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'suffix', |
| | | label: '后缀名', |
| | | tooltip: '可以上传文件的后缀名,多个类型用逗号分隔,空值时不校验。', |
| | | initVal: card.suffix || '', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'encryption', |
| | | label: '加密传输', |
| | |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'tooltip', |
| | | label: '悬浮提示', |
| | | tooltip: '鼠标悬浮于提示文字上方时,显示提示信息。', |
| | | initVal: card.tooltip || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'emptyText', |
| | | label: '空值文本', |
| | | tooltip: '空值的提示文本,选择设置空值时有效,默认值为《空》。', |
| | | initVal: card.emptyText || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'enter', |
| | | label: '回车事件', |
| | | initVal: (card.type === 'text' || card.type === 'number') ? (card.enter || 'sub') : (card.enter || 'false'), |
| | | tooltip: '点击Enter键,或文本类表单输入回车符。', |
| | | options: [{ |
| | | value: 'sub', |
| | | text: '提交' |
| | | }, { |
| | | value: 'tab', |
| | | text: '切换' |
| | | }, { |
| | | value: 'false', |
| | | text: '无动作' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'tabField', |
| | | label: '切换字段', |
| | | initVal: card.tabField || '', |
| | | options: tabfields, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'multiselect', |
| | | key: 'linkSubField', |
| | | label: Formdict['model.form.linkform'], |
| | | tooltip: '在切换选项时会把信息自动填入关联的表单(文本或数字表单)中。', |
| | | initVal: card.linkSubField || [], |
| | | options: inputfields |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'tooltip', |
| | | label: '表单注释', |
| | | tooltip: '鼠标悬浮于提示文字上方时,显示注释。', |
| | | initVal: card.tooltip || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'multiselect', |