| | |
| | | * @param {object} card // 图表对象 |
| | | */ |
| | | export function getBaseForm (card) { |
| | | let isApp = sessionStorage.getItem('appType') === 'pc' |
| | | let appType = sessionStorage.getItem('appType') |
| | | let menulist = null |
| | | |
| | | if (isApp) { |
| | | if (appType === 'pc' || appType === 'mob') { |
| | | menulist = sessionStorage.getItem('appMenus') |
| | | if (Array.isArray(card.linkmenu)) { |
| | | card.linkmenu = '' |
| | | } |
| | | } else { |
| | | menulist = sessionStorage.getItem('fstMenuList') |
| | | } |
| | |
| | | if (menulist) { |
| | | try { |
| | | menulist = JSON.parse(menulist) |
| | | if (isApp) { |
| | | if (appType === 'pc' || appType === 'mob') { |
| | | menulist = menulist.map(item => { |
| | | item.value = item.MenuID |
| | | item.text = item.MenuName |
| | |
| | | initVal: card.linkmenu || [], |
| | | tooltip: '在使用柱形图且未启用自定义设置时有效。', |
| | | required: false, |
| | | forbid: isApp, |
| | | forbid: appType === 'pc' || appType === 'mob', |
| | | options: menulist |
| | | }, |
| | | { |
| | |
| | | initVal: card.linkmenu || '', |
| | | tooltip: '双击饼图,会打开关联的菜单。', |
| | | required: false, |
| | | forbid: !isApp, |
| | | forbid: !(appType === 'pc' || appType === 'mob'), |
| | | options: menulist |
| | | }, |
| | | { |
| | |
| | | label: '打开方式', |
| | | initVal: card.open || 'blank', |
| | | required: false, |
| | | forbid: !isApp, |
| | | forbid: !(appType === 'pc' || appType === 'mob'), |
| | | options: [ |
| | | { value: 'blank', text: '新窗口' }, |
| | | { value: 'self', text: '当前窗口' } |
| | |
| | | key: 'datatype', |
| | | label: '数据类型', |
| | | initVal: card.datatype || 'query', |
| | | tooltip: '统计图表适用于表格不分页,且数据需要转换', |
| | | tooltip: '统计图表适用于展示数据类型为动态值。', |
| | | required: false, |
| | | options: [ |
| | | { value: 'query', text: Formdict['header.form.query'] }, |
| | |
| | | value: 'polar', |
| | | text: '极坐标' |
| | | }] |
| | | }, { |
| | | type: 'number', |
| | | key: 'InfoDefNumber', |
| | | label: '展示数', |
| | | tooltip: '默认显示类型数量', |
| | | min: 1, |
| | | max: 50, |
| | | decimal: 0, |
| | | initVal: card.InfoDefNumber || 5, |
| | | hidden: card.datatype !== 'statistics', |
| | | required: true |
| | | }, { |
| | | type: 'number', |
| | | key: 'barSize', |