| | |
| | | menulist = [] |
| | | } |
| | | |
| | | let ops = [] |
| | | let adapters = sessionStorage.getItem('adapter') || '' |
| | | if (adapters.indexOf('wxmini') > -1) { |
| | | ops.push({value: 'miniprogram', label: '小程序'}) |
| | | } else if (setting.type === 'miniprogram') { |
| | | setting.type = '' |
| | | } |
| | | |
| | | const menuWrapForm = [ |
| | | { |
| | | type: 'text', |
| | |
| | | initval: setting.name || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'MenuNo', |
| | | label: '菜单参数', |
| | | initval: setting.MenuNo || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'width', |
| | | label: '宽度', |
| | | initval: setting.width || 24, |
| | | tooltip: '栅格布局,每行等分为24列。', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | // { |
| | | // type: 'text', |
| | | // field: 'MenuNo', |
| | | // label: '菜单参数', |
| | | // initval: setting.MenuNo || '', |
| | | // required: true |
| | | // }, |
| | | { |
| | | type: 'radio', |
| | | field: 'type', |
| | |
| | | {value: 'menu', label: '菜单'}, |
| | | {value: 'linkmenu', label: '关联菜单'}, |
| | | {value: 'link', label: '链接'}, |
| | | ...ops |
| | | ], |
| | | controlFields: [ |
| | | {field: 'copyMenuId', values: ['menu']}, |
| | | {field: 'linkMenuId', values: ['linkmenu']}, |
| | | {field: 'linkurl', values: ['link']}, |
| | | {field: 'primaryId', values: ['menu', 'linkmenu']}, |
| | | {field: 'miniAppId', values: ['miniprogram']}, |
| | | {field: 'miniPath', values: ['miniprogram']}, |
| | | ] |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'miniAppId', |
| | | label: '小程序AppID', |
| | | initval: setting.miniAppId || '', |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'miniPath', |
| | | label: '页面路径', |
| | | initval: setting.miniPath || '', |
| | | tooltip: '可指定跳转小程序页面路径。', |
| | | required: false |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | initval: setting.copyMenuId || '', |
| | | tooltip: '复制菜单仅在当前菜单创建时有效。', |
| | | required: false, |
| | | options: menulist |
| | | options: menulist, |
| | | extendName: 'MenuNo', |
| | | dropdown: 'false', |
| | | controlFields: [ |
| | | {field: 'clearMenu', notNull: true}, |
| | | ], |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | field: 'clearMenu', |
| | | label: '清空关联菜单', |
| | | initval: setting.clearMenu || 'true', |
| | | tooltip: '复制菜单时,是否清空原页面中的关联菜单。', |
| | | required: false, |
| | | options: [ |
| | | {value: 'true', label: '是'}, |
| | | {value: 'false', label: '否'} |
| | | ] |
| | | }, |
| | | { |
| | | type: 'select', |
| | |
| | | label: '关联菜单', |
| | | initval: setting.linkMenuId || '', |
| | | required: true, |
| | | extendName: 'MenuNo', |
| | | options: [ |
| | | ...menulist, |
| | | // {value: 'IM', label: '即时通信(系统页)'}, |
| | | {value: 'AIService', label: '智能客服(系统页)'} |
| | | ] |
| | | }, |
| | |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'width', |
| | | label: '宽度', |
| | | initval: setting.width || 24, |
| | | tooltip: '栅格布局,每行等分为24列。', |
| | | min: 1, |
| | | max: 24, |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | | { |
| | | type: 'number', |
| | | field: 'iconFont', |
| | | label: '字体大小', |
| | | initval: setting.iconFont || 20, |
| | | min: 12, |
| | | max: 200, |
| | | max: 300, |
| | | precision: 0, |
| | | required: true |
| | | }, |
| | |
| | | required: false, |
| | | options: columns |
| | | }, |
| | | { |
| | | type: 'text', |
| | | field: 'primaryId', |
| | | label: '静态主键值', |
| | | initval: setting.primaryId || '', |
| | | tooltip: '可作为BID传到下一页面。注:@userid@会替换为用户ID。', |
| | | required: false |
| | | } |
| | | ] |
| | | |
| | | return menuWrapForm |