| | |
| | | width = +width.replace(/x/, '.5') |
| | | } |
| | | |
| | | let extraParam = [] |
| | | if (card.recordUser === 'true') { |
| | | extraParam.push('recordUser') |
| | | } |
| | | if (card.dataM === 'true') { |
| | | extraParam.push('dataM') |
| | | } |
| | | |
| | | if (!appType) { |
| | | if (typeof(card.openmenu) === 'string') { |
| | | card.openmenu = [] |
| | | } |
| | | } else { |
| | | if (typeof(card.openmenu) !== 'string') { |
| | | card.openmenu = '' |
| | | } |
| | | } |
| | | |
| | | let forms = [ |
| | | { |
| | | type: 'select', |
| | |
| | | initVal: card.linkmenu || (isApp ? '' : []), |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: isApp ? appMenus : menulist |
| | | options: isApp ? appMenus : (menulist.length ? [...menulist, {value: 'multiMenu', label: '多菜单'}] : []) |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'prefix', |
| | | label: '前缀', |
| | | initVal: card.prefix || '', |
| | | tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid开头。', |
| | | tooltip: '扫码信息将与前缀拼接后执行。注:跳转菜单需以mkbid(:或,)开头,mkbid(:或,)跳转后将被去除。例如:mkbid:123456 跳转后页面BID为 123456。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | key: 'tipTitle', |
| | | label: '确认提示', |
| | | initVal: card.tipTitle || '', |
| | | tooltip: '注:弹窗(表单)在显示为是否框时有效。', |
| | | tooltip: '提示框的确认提示信息。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | forbid: appType === 'mob' |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'recordUser', |
| | | label: '记录用户', |
| | | initVal: card.recordUser || 'false', |
| | | tooltip: '当选择“是”时,内部函数的传参会增加 username 与 fullname。', |
| | | type: 'checkbox', |
| | | key: 'extraParam', |
| | | label: '扩展参数', |
| | | initVal: extraParam, |
| | | tooltip: '选择“用户信息”时,内部函数的传参会增加 username 与 fullname。选择“数据管理员”时,内部函数的传参会增加 dataM ,管理员值为“Y”,普通用户为空。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '否' |
| | | value: 'recordUser', |
| | | text: '用户信息' |
| | | }, { |
| | | value: 'true', |
| | | text: '是' |
| | | value: 'dataM', |
| | | text: '数据管理员' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.reason || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'formCache', |
| | | label: '表单缓存', |
| | | initVal: card.formCache || 'false', |
| | | tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '不清空' |
| | | }, { |
| | | value: 'clear', |
| | | text: '清空' |
| | | }] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'formCache', |
| | | // label: '表单缓存', |
| | | // initVal: card.formCache || 'false', |
| | | // tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。', |
| | | // required: false, |
| | | // options: [{ |
| | | // value: 'false', |
| | | // text: '不清空' |
| | | // }, { |
| | | // value: 'clear', |
| | | // text: '清空' |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidden', |
| | |
| | | type: 'radio', |
| | | key: 'permission', |
| | | label: '权限验证', |
| | | initVal: setting.permission || 'true', |
| | | initVal: card.permission || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '继承菜单'}, |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'sysId', |
| | | label: '自定义ID', |
| | | initVal: card.sysId || '', |
| | | tooltip: '不选行按钮可在前端生成ID值(32位),作为后续菜单的BID,存在标记时,ID值后将拼接标记值。', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '组件BID' |
| | | }, { |
| | | value: 'js', |
| | | text: '前端生成' |
| | | }, { |
| | | value: 'empty', |
| | | text: '空' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'sign', |
| | | label: '标记', |
| | | initVal: card.sign || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'table', |
| | | key: 'multiMenus', |
| | | label: '菜单列表', |
| | | initVal: card.multiMenus || [], |
| | | required: true, |
| | | actions: ['edit', 'del', 'add', 'move'], |
| | | columns: [ |
| | | { |
| | | title: '名称', |
| | | dataIndex: 'name', |
| | | inputType: 'text', |
| | | editable: true, |
| | | required: false, |
| | | width: '30%' |
| | | }, |
| | | { |
| | | title: '菜单', |
| | | dataIndex: 'menuId', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | | required: true, |
| | | extends: [{key: 'label', value: 'label', mutilLabel: 'name'}], |
| | | width: '30%', |
| | | render: (text, record) => record.label, |
| | | options: menulist |
| | | }, |
| | | { |
| | | title: '标记', |
| | | dataIndex: 'sign', |
| | | inputType: 'text', |
| | | editable: true, |
| | | required: false, |
| | | width: '20%' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'preHandle', |
| | | label: '自定义脚本', |
| | | initVal: card.preHandle || 'false', |
| | |
| | | |
| | | if (card.OpenType === 'form') { // 拖拽添加类型转换 |
| | | card.OpenType = 'pop' |
| | | } |
| | | |
| | | let extraParam = [] |
| | | if (card.recordUser === 'true') { |
| | | extraParam.push('recordUser') |
| | | } |
| | | if (card.dataM === 'true') { |
| | | extraParam.push('dataM') |
| | | } |
| | | |
| | | let forms = [ |
| | |
| | | initVal: card.linkmenu || [], |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: menulist |
| | | options: menulist.length ? [...menulist, {value: 'multiMenu', label: '多菜单'}] : [] |
| | | }, |
| | | { |
| | | type: 'textarea', |
| | |
| | | key: 'tipTitle', |
| | | label: '确认提示', |
| | | initVal: card.tipTitle || '', |
| | | tooltip: '注:弹窗(表单)在显示为是否框时有效。', |
| | | tooltip: '提示框的确认提示信息。', |
| | | required: false |
| | | }, |
| | | { |
| | |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'recordUser', |
| | | label: '记录用户', |
| | | initVal: card.recordUser || 'false', |
| | | tooltip: '当选择“是”时,内部函数的传参会增加 username 与 fullname。', |
| | | type: 'checkbox', |
| | | key: 'extraParam', |
| | | label: '扩展参数', |
| | | initVal: extraParam, |
| | | tooltip: '选择“用户信息”时,内部函数的传参会增加 username 与 fullname。选择“数据管理员”时,内部函数的传参会增加 dataM ,管理员值为“Y”,普通用户为空。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '否' |
| | | value: 'recordUser', |
| | | text: '用户信息' |
| | | }, { |
| | | value: 'true', |
| | | text: '是' |
| | | value: 'dataM', |
| | | text: '数据管理员' |
| | | }] |
| | | }, |
| | | { |
| | |
| | | initVal: card.reason || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'formCache', |
| | | label: '表单缓存', |
| | | initVal: card.formCache || 'false', |
| | | tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。', |
| | | required: false, |
| | | options: [{ |
| | | value: 'false', |
| | | text: '不清空' |
| | | }, { |
| | | value: 'clear', |
| | | text: '清空' |
| | | }] |
| | | }, |
| | | // { |
| | | // type: 'radio', |
| | | // key: 'formCache', |
| | | // label: '表单缓存', |
| | | // initVal: card.formCache || 'false', |
| | | // tooltip: '主要用于数据修改后,更新相关表单的选项,清空缓存后表单再次打开时数据会重新加载。', |
| | | // required: false, |
| | | // options: [{ |
| | | // value: 'false', |
| | | // text: '不清空' |
| | | // }, { |
| | | // value: 'clear', |
| | | // text: '清空' |
| | | // }] |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | key: 'hidden', |
| | |
| | | type: 'radio', |
| | | key: 'permission', |
| | | label: '权限验证', |
| | | initVal: setting.permission || 'true', |
| | | initVal: card.permission || 'true', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', text: '启用'}, |
| | |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'sysId', |
| | | label: '自定义ID', |
| | | initVal: card.sysId || '', |
| | | tooltip: '不选行按钮可在前端生成ID值(32位),作为后续菜单的BID,存在标记时,ID值后将拼接标记值。', |
| | | required: false, |
| | | options: [{ |
| | | value: '', |
| | | text: '组件BID' |
| | | }, { |
| | | value: 'js', |
| | | text: '前端生成' |
| | | }, { |
| | | value: 'empty', |
| | | text: '空' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | key: 'sign', |
| | | label: '标记', |
| | | initVal: card.sign || '', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'table', |
| | | key: 'multiMenus', |
| | | label: '菜单列表', |
| | | initVal: card.multiMenus || [], |
| | | required: true, |
| | | actions: ['edit', 'del', 'add', 'move'], |
| | | columns: [ |
| | | { |
| | | title: '名称', |
| | | dataIndex: 'name', |
| | | inputType: 'text', |
| | | editable: true, |
| | | required: false, |
| | | width: '30%' |
| | | }, |
| | | { |
| | | title: '菜单', |
| | | dataIndex: 'menuId', |
| | | inputType: 'cascader', |
| | | editable: true, |
| | | required: true, |
| | | extends: [{key: 'label', value: 'label', mutilLabel: 'name'}], |
| | | width: '30%', |
| | | render: (text, record) => record.label, |
| | | options: menulist |
| | | }, |
| | | { |
| | | title: '标记', |
| | | dataIndex: 'sign', |
| | | inputType: 'text', |
| | | editable: true, |
| | | required: false, |
| | | width: '20%' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'preHandle', |
| | | label: '自定义脚本', |
| | | initVal: card.preHandle || 'false', |