| | |
| | | import zhCN from '@/locales/zh-CN/model.js' |
| | | import enUS from '@/locales/en-US/model.js' |
| | | import { formRule, btnClasses } from '@/utils/option.js' |
| | | |
| | | const Formdict = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | |
| | | /** |
| | | * @description 获取树形页面设置表单配置信息 |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'interType', |
| | | label: Formdict['header.form.intertype'], |
| | | label: '接口类型', |
| | | initVal: setting.interType || 'inner', |
| | | required: false, |
| | | readonly: false, |
| | | options: [ |
| | | { value: 'inner', text: Formdict['model.interface.inner'] }, |
| | | { value: 'outer', text: Formdict['model.interface.outer'] } |
| | | { value: 'inner', text: '内部' }, |
| | | { value: 'outer', text: '外部' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'sysInterface', |
| | | label: Formdict['header.form.sysInterface'], |
| | | label: '系统接口', |
| | | initVal: setting.sysInterface || 'false', |
| | | required: false, |
| | | readonly: false, |
| | | options: [ |
| | | { value: 'true', text: Formdict['model.true'] }, |
| | | { value: 'false', text: Formdict['model.false'] } |
| | | { value: 'true', text: '是' }, |
| | | { value: 'false', text: '否' } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'interface', |
| | | label: Formdict['header.form.interface'], |
| | | label: '接口地址', |
| | | initVal: setting.sysInterface === 'true' ? (window.GLOB.mainSystemApi || '') : (setting.interface || ''), |
| | | required: true, |
| | | readonly: setting.sysInterface === 'true', |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'outerFunc', |
| | | label: Formdict['header.form.outerFunc'], |
| | | label: '外部函数', |
| | | initVal: setting.outerFunc || '', |
| | | required: false, |
| | | readonly: false, |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'innerFunc', |
| | | label: Formdict['header.form.innerFunc'], |
| | | label: '内部函数', |
| | | initVal: setting.innerFunc || '', |
| | | tooltip: usefulFields.length ? '开头可用字符:' + usefulFields.join(', ') : '', |
| | | placement: 'bottomLeft', |
| | |
| | | required: false, |
| | | readonly: false, |
| | | options: [ |
| | | { value: 'true', text: Formdict['model.true'] }, |
| | | { value: 'false', text: Formdict['model.false'] } |
| | | { value: 'true', text: '是' }, |
| | | { value: 'false', text: '否' } |
| | | ] |
| | | }, |
| | | { |
| | |
| | | required: false, |
| | | readonly: false, |
| | | options: [ |
| | | { value: 'true', text: Formdict['model.true'] }, |
| | | { value: 'false', text: Formdict['model.false'] } |
| | | { value: 'true', text: '是' }, |
| | | { value: 'false', text: '否' } |
| | | ] |
| | | } |
| | | ] |
| | |
| | | text: '日期(天)' |
| | | }, { |
| | | value: 'datemonth', |
| | | text: Formdict['model.form.datemonth'] |
| | | // }, { |
| | | // value: 'daterange', |
| | | // text: Formdict['model.form.daterange'] |
| | | text: '日期(月)' |
| | | }] |
| | | |
| | | } else { |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: Formdict['model.name'], |
| | | label: '名称', |
| | | initVal: card.label || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['model.form.field'], |
| | | label: '字段', |
| | | initVal: card.field || '', |
| | | required: true, |
| | | options: columns |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'type', |
| | | label: Formdict['model.form.type'], |
| | | label: '类型', |
| | | initVal: card.type, |
| | | required: true, |
| | | options: typeOptions |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'initval', |
| | | label: Formdict['header.form.initval'], |
| | | label: '初始值', |
| | | tooltip: '类型为下拉菜单时,初始值应为数据的Value值(使用数据源时,应为《值·字段》的值);类型为数值(区间)时,初始值使用逗号拼接,例如 3,10', |
| | | initVal: card.initval, |
| | | required: false |
| | |
| | | required: true, |
| | | options: [{ |
| | | value: '0', |
| | | text: Formdict['header.form.custom'] |
| | | text: '自定义' |
| | | }, { |
| | | value: '1', |
| | | text: Formdict['header.form.datasource'] |
| | | text: '数据源' |
| | | }] |
| | | }, |
| | | // { |
| | |
| | | // initVal: card.setAll || 'true', |
| | | // options: [{ |
| | | // value: 'true', |
| | | // text: Formdict['model.true'] |
| | | // text: '是' |
| | | // }, { |
| | | // value: 'false', |
| | | // text: Formdict['model.false'] |
| | | // text: '否' |
| | | // }] |
| | | // }, |
| | | { |
| | |
| | | { |
| | | type: 'codemirror', |
| | | key: 'dataSource', |
| | | label: Formdict['header.form.datasource'], |
| | | label: '数据源', |
| | | initVal: card.dataSource || '', |
| | | required: true |
| | | }, |
| | |
| | | initVal: card.orderType || 'asc', |
| | | options: [{ |
| | | value: 'asc', |
| | | text: Formdict['header.form.asc'] |
| | | text: '正序' |
| | | }, { |
| | | value: 'desc', |
| | | text: Formdict['header.form.desc'] |
| | | text: '倒序' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'match', |
| | | label: Formdict['header.form.match'], |
| | | label: '匹配模式', |
| | | initVal: card.match || 'like', |
| | | required: true, |
| | | options: [{ |
| | | value: 'like', |
| | | text: 'like' |
| | | }, { |
| | | value: 'equal', |
| | | text: 'equal' |
| | | }, { |
| | | value: 'greater', |
| | | text: '>' |
| | | }, { |
| | | value: 'less', |
| | | text: '<' |
| | | }, { |
| | | value: 'greaterequal', |
| | | text: '>=' |
| | | }] |
| | | options: [] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | |
| | | key: 'ratio', |
| | | min: 1, |
| | | max: 24, |
| | | label: Formdict['header.form.ratio'], |
| | | label: '比例', |
| | | tooltip: '栅格布局,每行等分为24列。', |
| | | initVal: card.ratio || 6, |
| | | forbid: appType === 'mob', |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'required', |
| | | label: Formdict['model.required'], |
| | | label: '必填', |
| | | initVal: card.required || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'Hide', |
| | | label: Formdict['model.hidden'], |
| | | label: '隐藏', |
| | | initVal: card.Hide || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | // tooltip: '数据查询时,类型字段是否作为参数传递,类型字段对应值为 {"日": "day", "周": "week", "月": "month", "季": "quarter", "年": "year", "自定义": "customized"}。', |
| | | // options: [{ |
| | | // value: 'true', |
| | | // text: Formdict['model.true'] |
| | | // text: '是' |
| | | // }, { |
| | | // value: 'false', |
| | | // text: Formdict['model.false'] |
| | | // text: '否' |
| | | // }] |
| | | // }, |
| | | { |
| | |
| | | forbid: appType === 'mob' || position === 'header', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | | label: '黑名单', |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList || [], |
| | |
| | | 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: '功能按钮' |
| | | } |
| | | ] |
| | | |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'OpenType', |
| | | label: Formdict['header.form.openType'], |
| | | label: '打开方式', |
| | | initVal: card.OpenType, |
| | | required: true, |
| | | options: opentypes |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'execMode', |
| | | label: Formdict['model.form.execMode'], |
| | | label: '执行方式', |
| | | initVal: card.execMode || 'exec', |
| | | required: true, |
| | | options: [{ |
| | | value: 'exec', |
| | | text: Formdict['model.form.exec'] |
| | | text: '直接执行' |
| | | }, { |
| | | value: 'prompt', |
| | | text: Formdict['model.form.prompt'] |
| | | text: '提示框' |
| | | }, { |
| | | value: 'pop', |
| | | text: Formdict['model.form.popform'] |
| | | text: '弹窗(表单)' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'intertype', |
| | | label: Formdict['header.form.intertype'], |
| | | label: '接口类型', |
| | | initVal: card.intertype || 'system', |
| | | required: true, |
| | | options: [] |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'sqlType', |
| | | label: Formdict['header.form.action.type'], |
| | | label: '操作类型', |
| | | initVal: card.sqlType || '', |
| | | required: true, |
| | | options: [] |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'sql', |
| | | label: Formdict['model.form.tablename'], |
| | | label: '表名', |
| | | initVal: card.sql || config.setting.tableName || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'innerFunc', |
| | | label: Formdict['header.form.innerFunc'], |
| | | label: '内部函数', |
| | | initVal: card.innerFunc || '', |
| | | tooltip: usefulFields.length ? `函数名称需以${usefulFields.join(', ')}等字符开始。` : '', |
| | | fields: usefulFields, |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'pageTemplate', |
| | | label: Formdict['model.form.newpage.type'], |
| | | label: '页面类型', |
| | | initVal: card.pageTemplate || '', |
| | | required: true, |
| | | options: [{ |
| | |
| | | text: '单据打印' |
| | | }, { |
| | | value: 'pay', |
| | | text: Formdict['model.pay'] |
| | | text: '支付' |
| | | }, { |
| | | value: 'custom', |
| | | text: Formdict['header.form.custom'] |
| | | text: '自定义' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'url', |
| | | label: Formdict['model.pageUrl'], |
| | | label: '页面地址', |
| | | initVal: card.url || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'sysInterface', |
| | | label: Formdict['header.form.sysInterface'], |
| | | label: '系统接口', |
| | | initVal: card.sysInterface || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'outerFunc', |
| | | label: Formdict['header.form.outerFunc'], |
| | | label: '外部函数', |
| | | initVal: card.outerFunc || '', |
| | | required: false, |
| | | readonly: false |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'callbackFunc', |
| | | label: Formdict['header.form.callbackFunc'], |
| | | label: '回调函数', |
| | | initVal: card.callbackFunc || '', |
| | | required: true, |
| | | readonly: false |
| | |
| | | required: true, |
| | | options: [{ |
| | | value: 'toolbar', |
| | | text: Formdict['header.form.toolbar'] |
| | | text: '工具栏' |
| | | }, { |
| | | value: 'grid', |
| | | text: Formdict['header.form.grid'] |
| | | text: '表格' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'Ot', |
| | | label: Formdict['header.form.isRequired'], |
| | | label: '行设置', |
| | | initVal: card.Ot || 'requiredSgl', |
| | | required: true, |
| | | options: [] |
| | |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.form.linkmenu'], |
| | | label: '关联菜单', |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | options: menulist |
| | |
| | | { |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'execSuccess', |
| | | label: Formdict['model.form.afterSuccess'], |
| | | label: '成功后', |
| | | initVal: card.execSuccess || 'grid', |
| | | tooltip: '选择刷新行时,如果选择多条数据会刷新表格。', |
| | | required: true, |
| | |
| | | { |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'execError', |
| | | label: Formdict['model.form.afterError'], |
| | | label: '失败后', |
| | | initVal: card.execError || 'never', |
| | | tooltip: '选择刷新行时,如果选择多条数据会刷新表格。', |
| | | required: true, |
| | |
| | | { |
| | | type: refresh.length === 0 ? 'radio' : 'select', |
| | | key: 'popClose', |
| | | label: Formdict['header.form.popClose'], |
| | | label: '关闭后', |
| | | initVal: card.popClose || 'never', |
| | | required: true, |
| | | options: [{ |
| | |
| | | { |
| | | type: 'icon', |
| | | key: 'icon', |
| | | label: Formdict['model.icon'], |
| | | label: '图标', |
| | | initVal: card.icon, |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'class', |
| | | label: Formdict['model.form.color'], |
| | | label: '颜色', |
| | | initVal: card.class, |
| | | required: false, |
| | | options: btnClasses |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'joint', |
| | | label: Formdict['model.form.paramJoint'], |
| | | label: '拼接参数', |
| | | initVal: card.joint || 'true', |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'sheet', |
| | | label: Formdict['model.form.tablename'], |
| | | label: '表名', |
| | | initVal: card.sheet || config.setting.tableName || '', |
| | | required: true |
| | | }, |
| | |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: Formdict['model.name'], |
| | | label: '名称', |
| | | initVal: card.label, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['model.form.field'], |
| | | label: '字段', |
| | | initVal: card.field, |
| | | required: true, |
| | | readonly: false |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'type', |
| | | label: Formdict['model.form.type'], |
| | | label: '类型', |
| | | initVal: card.type, |
| | | required: true, |
| | | options: [{ |
| | | value: 'text', |
| | | text: Formdict['model.form.text'] |
| | | text: '文本' |
| | | }, { |
| | | value: 'number', |
| | | text: Formdict['model.form.number'] |
| | | text: '数字' |
| | | }, { |
| | | value: 'picture', |
| | | text: Formdict['model.form.picture'] |
| | | text: '图片' |
| | | }, { |
| | | value: 'video', |
| | | text: '视频' |
| | | }, { |
| | | value: 'link', |
| | | text: Formdict['model.form.href'] |
| | | text: '链接' |
| | | }, { |
| | | value: 'textarea', |
| | | text: Formdict['model.form.textarea'] |
| | | text: '多行文本' |
| | | }, { |
| | | value: 'index', |
| | | text: '序号' |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'nameField', |
| | | label: Formdict['model.name'] + Formdict['model.form.field'], |
| | | label: '名称字段', |
| | | initVal: card.nameField, |
| | | required: false, |
| | | readonly: false |
| | |
| | | min: 1, |
| | | max: 1000, |
| | | decimal: 0, |
| | | label: Formdict['model.form.columnWidth'], |
| | | label: '列宽', |
| | | initVal: card.Width, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'joint', |
| | | label: Formdict['model.form.paramJoint'], |
| | | label: '拼接参数', |
| | | initVal: card.joint || 'true', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'Hide', |
| | | label: Formdict['model.hidden'], |
| | | label: '隐藏', |
| | | initVal: card.Hide || 'false', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'IsSort', |
| | | label: Formdict['model.sort'], |
| | | label: '排序', |
| | | initVal: card.IsSort || 'true', |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'Align', |
| | | label: Formdict['model.form.align'], |
| | | label: '对齐方式', |
| | | initVal: card.Align || 'left', |
| | | required: true, |
| | | options: [{ |
| | | value: 'left', |
| | | text: Formdict['model.form.alignLeft'] |
| | | text: '左对齐' |
| | | }, { |
| | | value: 'center', |
| | | text: Formdict['model.form.alignCenter'] |
| | | text: '居中' |
| | | }, { |
| | | value: 'right', |
| | | text: Formdict['model.form.alignRight'] |
| | | text: '右对齐' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | min: 0, |
| | | max: 18, |
| | | decimal: 0, |
| | | label: Formdict['header.form.decimal'], |
| | | label: '小数位', |
| | | initVal: card.decimal || 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | key: 'fieldlength', |
| | | label: Formdict['model.form.field'] + Formdict['model.length'], |
| | | label: '字段长度', |
| | | initVal: card.fieldlength || (card.type === 'text' ? 50 : 512), |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'format', |
| | | label: Formdict['header.form.format'], |
| | | label: '格式化', |
| | | initVal: card.format || 'none', |
| | | options: [{ |
| | | value: 'none', |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'textFormat', |
| | | label: Formdict['header.form.format'], |
| | | label: '格式化', |
| | | initVal: card.textFormat || 'none', |
| | | options: [{ |
| | | value: 'none', |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'prefix', |
| | | label: Formdict['header.form.prefix'], |
| | | label: '前缀', |
| | | initVal: card.prefix || '', |
| | | required: false, |
| | | readonly: false |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'postfix', |
| | | label: Formdict['header.form.postfix'], |
| | | label: '后缀', |
| | | initVal: card.postfix || '', |
| | | tooltipClass: 'middle', |
| | | required: false, |
| | |
| | | required: false, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | type: 'cascader', |
| | | key: 'linkmenu', |
| | | label: Formdict['model.menu'], |
| | | label: '菜单', |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | options: menulist |
| | |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | | label: '黑名单', |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'title', |
| | | label: Formdict['header.form.title'], |
| | | label: '标题', |
| | | initVal: card.title, |
| | | required: false |
| | | }, |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'Hide', |
| | | label: Formdict['model.hidden'], |
| | | label: '隐藏', |
| | | initVal: card.Hide, |
| | | required: true, |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | | label: '黑名单', |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList |
| | |
| | | forbid: !['line', 'bar'].includes(card.chartType), |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: Formdict['model.name'], |
| | | label: '名称', |
| | | initVal: card.label, |
| | | required: true, |
| | | readonly: false |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'field', |
| | | label: Formdict['model.form.field'], |
| | | label: '字段', |
| | | initVal: card.field || '', |
| | | required: true, |
| | | readonly: false |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'type', |
| | | label: Formdict['model.form.type'], |
| | | label: '类型', |
| | | initVal: card.type, |
| | | required: true, |
| | | options: _openType |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'initval', |
| | | label: Formdict['header.form.initval'], |
| | | label: '初始值', |
| | | initVal: initval, |
| | | required: false |
| | | }, |
| | |
| | | // initVal: card.setAll || 'false', |
| | | // options: [{ |
| | | // value: 'true', |
| | | // text: Formdict['model.true'] |
| | | // text: '是' |
| | | // }, { |
| | | // value: 'false', |
| | | // text: Formdict['model.false'] |
| | | // text: '否' |
| | | // }] |
| | | // }, |
| | | { |
| | |
| | | { |
| | | type: 'codemirror', |
| | | key: 'dataSource', |
| | | label: Formdict['header.form.datasource'], |
| | | label: '数据源', |
| | | initVal: card.dataSource || '', |
| | | required: true, |
| | | readonly: false |
| | |
| | | initVal: card.orderType || 'asc', |
| | | options: [{ |
| | | value: 'asc', |
| | | text: Formdict['header.form.asc'] |
| | | text: '正序' |
| | | }, { |
| | | value: 'desc', |
| | | text: Formdict['header.form.desc'] |
| | | text: '倒序' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | min: 0, |
| | | max: 18, |
| | | precision: 0, |
| | | label: Formdict['header.form.decimal'], |
| | | label: '小数位', |
| | | initVal: card.decimal || 0, |
| | | required: true |
| | | }, |
| | |
| | | min: 1, |
| | | max: 100000, |
| | | precision: 0, |
| | | label: Formdict['model.form.field'] + Formdict['model.length'], |
| | | label: '字段长度', |
| | | // tooltip: '文本、下拉框、日期等字段默认长度为50,多行文本与文件上传字段默认长度为512', |
| | | initVal: card.fieldlength || _fieldlength, |
| | | required: true |
| | |
| | | initVal: card.hidden || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.readonly || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.required || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.writein || 'true', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.hidelabel || 'false', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | tooltip: '提交时,是否截取首尾的空白字符。', |
| | | options: [{ |
| | | value: 'true', |
| | | text: Formdict['model.true'] |
| | | text: '是' |
| | | }, { |
| | | value: 'false', |
| | | text: Formdict['model.false'] |
| | | text: '否' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'regularExtra', |
| | | label: '正则扩展符', |
| | | initVal: card.regularExtra || '', |
| | | tooltip: '正则验证时的自定义字符,包括~!@#$%^&*()_+:;{}<>,.-', |
| | | required: false, |
| | | readonly: false |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'regularText', |
| | | label: '正则提示', |
| | | initVal: card.regularText || '', |
| | |
| | | { |
| | | type: 'multiselect', |
| | | key: 'blacklist', |
| | | label: Formdict['header.form.blacklist'], |
| | | label: '黑名单', |
| | | initVal: card.blacklist || [], |
| | | required: false, |
| | | options: roleList, |
| | |
| | | { |
| | | type: 'text', |
| | | key: 'label', |
| | | label: Formdict['header.menu.tabName'], |
| | | label: '标签名称', |
| | | initVal: card.label || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'linkTab', |
| | | label: Formdict['header.form.linkTab'], |
| | | label: '关联标签', |
| | | initVal: card.linkTab || '', |
| | | required: false, |
| | | options: [] |
| | |
| | | { |
| | | type: 'icon', |
| | | key: 'icon', |
| | | label: Formdict['model.icon'], |
| | | label: '图标', |
| | | initVal: card.icon || '', |
| | | required: false, |
| | | forbid: type === 'CalendarPage' |
| | |
| | | { |
| | | type: 'select', |
| | | key: 'supMenu', |
| | | label: Formdict['header.form.supTab'], |
| | | label: '上级标签', |
| | | initVal: supMenu, |
| | | required: false, |
| | | options: menus, |
| | |
| | | { |
| | | type: 'mutilselect', |
| | | key: 'equalTab', |
| | | label: Formdict['header.form.equalTab'], |
| | | label: '同级标签', |
| | | tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。', |
| | | initVal: equalTab, |
| | | required: false, |