| | |
| | | }, { |
| | | value: 'datemonth', |
| | | text: Formdict['model.form.datemonth'] |
| | | }, { |
| | | value: 'daterange', |
| | | text: Formdict['model.form.daterange'] |
| | | // }, { |
| | | // value: 'daterange', |
| | | // text: Formdict['model.form.daterange'] |
| | | }] |
| | | } else { |
| | | typeOptions = [{ |
| | |
| | | text: Formdict['model.false'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'query', |
| | | label: '参与查询', |
| | | initVal: card.query || 'true', |
| | | tooltip: '是否作为 where 条件,参与数据查询。', |
| | | options: [{ |
| | | value: 'true', |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: '否' |
| | | }] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'transfer', |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'labelShow', |
| | | label: '显示名称', |
| | | label: '名称', |
| | | initVal: card.labelShow || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '显示' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | } |
| | | ] |
| | | |
| | | // 标签类型,主表才会存在表单标签页 |
| | | let tabTems = [{ |
| | | value: 'FormTab', |
| | | text: '表单标签页' |
| | | }] |
| | | if (type === 'subtable') { |
| | | tabTems = [] |
| | | } |
| | | |
| | | if (card.execSuccess === 'view' || card.execSuccess === 'refresh') { // refresh为表单标签页 |
| | | card.execSuccess = 'grid' |
| | | } |
| | | if (card.execError === 'view' || card.execSuccess === 'refresh') { |
| | | if (card.execError === 'view' || card.execError === 'refresh') { |
| | | card.execError = 'grid' |
| | | } |
| | | if (card.popClose === 'view') { |
| | |
| | | value: 'equaltab', |
| | | text: Formdict['header.form.refresh.equaltab'] |
| | | }) |
| | | } |
| | | |
| | | if (card.OpenType === 'blank') { |
| | | card.OpenType = 'tab' |
| | | } |
| | | if (!card.control && card.controlField) { |
| | | card.control = 'disabled' |
| | | } |
| | | |
| | | return [ |
| | |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'tabTemplate', |
| | | label: '标签类型', |
| | | initVal: card.tabTemplate || '', |
| | | required: true, |
| | | options: [ |
| | | { |
| | | value: 'ThdMenu', |
| | | text: Formdict['model.menu.level3'] |
| | | }, |
| | | ...tabTems |
| | | ] |
| | | }, |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.form.linkmenu'], |
| | |
| | | options: menulist |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'afterExecSuccess', |
| | | label: Formdict['header.form.afterExecSuccess'], |
| | | initVal: card.afterExecSuccess || 'close', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: Formdict['model.close'] |
| | | }, { |
| | | value: 'notclose', |
| | | text: Formdict['model.notclose'] |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'afterExecError', |
| | | label: Formdict['header.form.afterExecError'], |
| | | initVal: card.afterExecError || 'notclose', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: Formdict['model.close'] |
| | | }, { |
| | | value: 'notclose', |
| | | text: Formdict['model.notclose'] |
| | | }] |
| | | }, |
| | | { |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'execSuccess', |
| | | label: Formdict['model.form.afterSuccess'], |
| | | initVal: card.execSuccess || 'never', |
| | | tooltip: '选择刷新行时,如果选择多条数据会刷新表格。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | text: '刷新表格' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | key: 'execError', |
| | | label: Formdict['model.form.afterError'], |
| | | initVal: card.execError || 'never', |
| | | tooltip: '选择刷新行时,如果选择多条数据会刷新表格。', |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | text: '刷新表格' |
| | | }, { |
| | | value: 'line', |
| | | text: '刷新行' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | required: true, |
| | | options: [{ |
| | | value: 'never', |
| | | text: Formdict['header.form.refresh.never'] |
| | | text: '不刷新' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.refresh.grid'] |
| | | text: '刷新表格' |
| | | }, |
| | | ...refresh] |
| | | }, |
| | |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '控制字段', |
| | | tooltip: '禁用控制字段,可根据数据控制按钮是否禁用。', |
| | | initVal: card.controlField || '', |
| | | required: false, |
| | | options: [{label: '无', field: ''}, ...columns] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'controlVal', |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'display', |
| | | label: '显示方式', |
| | |
| | | tooltipClass: 'middle', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'control', |
| | | label: '按钮控制', |
| | | initVal: card.control || '', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '无' |
| | | }, { |
| | | value: 'disabled', |
| | | text: '禁用' |
| | | }, { |
| | | value: 'hidden', |
| | | text: '隐藏' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'controlField', |
| | | label: '控制字段', |
| | | tooltip: '控制字段,可根据数据控制按钮的隐藏或禁用。', |
| | | initVal: card.controlField || '', |
| | | required: true, |
| | | options: columns |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'controlVal', |
| | | label: '控制值', |
| | | tooltip: '当选择控制字段,且字段值与控制值相等时,按钮会隐藏或禁用,多个值用逗号分隔。', |
| | | initVal: card.controlVal || '', |
| | | required: false |
| | | }, |
| | | ] |
| | | } |
| | |
| | | * @param {*} tabfields // 可切换表单 |
| | | * @param {*} linkableFields // 可关联表单 |
| | | * @param {*} linksupFields // 上级表单 |
| | | * @param {*} subtable // 是否为子表表单 |
| | | */ |
| | | export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields, subtable = false) { |
| | | export function getModalForm (card, inputfields = [], tabfields = [], linkableFields, linksupFields) { |
| | | let appType = sessionStorage.getItem('appType') |
| | | let roleList = sessionStorage.getItem('sysRoles') |
| | | if (roleList) { |
| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'minDate', |
| | | label: '最小值', |
| | | initVal: card.minDate || '', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '无' |
| | | }, { |
| | | value: '0', |
| | | text: '当天' |
| | | }, { |
| | | value: '-1', |
| | | text: '前一天' |
| | | }, { |
| | | value: '-2', |
| | | text: '前两天' |
| | | }, { |
| | | value: '-3', |
| | | text: '前三天' |
| | | }, { |
| | | value: '-7', |
| | | text: '前七天' |
| | | }, { |
| | | value: '-30', |
| | | text: '前30天' |
| | | }, { |
| | | value: '-90', |
| | | text: '前90天' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'maxDate', |
| | | label: '最大值', |
| | | initVal: card.maxDate || '', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '无' |
| | | }, { |
| | | value: '0', |
| | | text: '当天' |
| | | }, { |
| | | value: '1', |
| | | text: '后一天' |
| | | }, { |
| | | value: '2', |
| | | text: '后两天' |
| | | }, { |
| | | value: '3', |
| | | text: '后三天' |
| | | }, { |
| | | value: '7', |
| | | text: '后七天' |
| | | }, { |
| | | value: '30', |
| | | text: '后30天' |
| | | }, { |
| | | value: '90', |
| | | text: '后90天' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fieldlength', |
| | | min: 1, |
| | |
| | | type: 'select', |
| | | key: 'fileType', |
| | | label: '显示方式', |
| | | initVal: card.fileType || (appType === 'mob' ? 'picture-card' : 'text'), |
| | | initVal: card.fileType || 'text', |
| | | options: [{ |
| | | value: 'text', |
| | | text: '文件' |
| | | }, { |
| | | }, |
| | | { |
| | | value: 'picture', |
| | | text: '图文信息' |
| | | }, { |
| | | }, |
| | | { |
| | | value: 'picture-card', |
| | | text: '图片卡' |
| | | }] |
| | | }], |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'number', |
| | |
| | | label: '光标', |
| | | initVal: card.cursor || 'left', |
| | | options: [{ |
| | | value: 'right', |
| | | text: '右对齐' |
| | | }, { |
| | | value: 'left', |
| | | text: '左对齐' |
| | | }, { |
| | | value: 'right', |
| | | text: '右对齐' |
| | | }], |
| | | forbid: appType !== 'mob' |
| | | }, |
| | |
| | | text: 'nvarchar(50)' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'mode', |
| | | label: '模式', |
| | | initVal: card.mode || 'picker', |
| | | options: [{ |
| | | value: 'picker', |
| | | text: '选择器' |
| | | }, { |
| | | value: 'calendar', |
| | | text: '日历' |
| | | }], |
| | | forbid: appType !== 'mob' |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'mode', |
| | | // label: '模式', |
| | | // initVal: card.mode || 'picker', |
| | | // options: [{ |
| | | // value: 'picker', |
| | | // text: '选择器' |
| | | // }, { |
| | | // value: 'calendar', |
| | | // text: '日历' |
| | | // }], |
| | | // forbid: appType !== 'mob' |
| | | // }, |
| | | { |
| | | type: 'number', |
| | | key: 'span', |
| | |
| | | key: 'place', |
| | | label: '排列', |
| | | initVal: card.place || 'left_right', |
| | | tooltip: '提示文字与输入框的位置关系。注:上下排列是会禁用扫码功能。', |
| | | tooltip: '提示文字与输入框的位置关系。', |
| | | forbid: appType !== 'mob', |
| | | options: [{ |
| | | value: 'left_right', |