king
2021-05-13 145a6eb83133497b3863add21610ac6015e6533e
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -8,11 +8,14 @@
 * @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')
  }
@@ -20,7 +23,7 @@
  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
@@ -98,7 +101,7 @@
      initVal: card.linkmenu || [],
      tooltip: '在使用柱形图且未启用自定义设置时有效。',
      required: false,
      forbid: isApp,
      forbid: appType === 'pc' || appType === 'mob',
      options: menulist
    },
    {
@@ -108,7 +111,7 @@
      initVal: card.linkmenu || '',
      tooltip: '双击饼图,会打开关联的菜单。',
      required: false,
      forbid: !isApp,
      forbid: !(appType === 'pc' || appType === 'mob'),
      options: menulist
    },
    {
@@ -117,7 +120,7 @@
      label: '打开方式',
      initVal: card.open || 'blank',
      required: false,
      forbid: !isApp,
      forbid: !(appType === 'pc' || appType === 'mob'),
      options: [
        { value: 'blank', text: '新窗口' },
        { value: 'self', text: '当前窗口' }
@@ -165,7 +168,7 @@
      key: 'datatype',
      label: '数据类型',
      initVal: card.datatype || 'query',
      tooltip: '统计图表适用于表格不分页,且数据需要转换',
      tooltip: '统计图表适用于展示数据类型为动态值。',
      required: false,
      options: [
        { value: 'query', text: Formdict['header.form.query'] },
@@ -352,17 +355,6 @@
        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',