king
2022-03-24 26d0fa42ea8c63a87e8ef93d0915f75f46fb1f9c
src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx
@@ -8,35 +8,7 @@
 * @param {object} card       // 图表对象
 */
export function getBaseForm (card) {
  // let appType = sessionStorage.getItem('appType')
  // let menulist = null
  // if (appType === 'pc') {
  //   menulist = sessionStorage.getItem('appMenus')
  //   if (Array.isArray(card.linkmenu)) {
  //     card.linkmenu = ''
  //   }
  // } else {
  //   menulist = sessionStorage.getItem('fstMenuList')
  // }
  // if (menulist) {
  //   try {
  //     menulist = JSON.parse(menulist)
  //     if (appType === 'pc') {
  //       menulist = menulist.map(item => {
  //         item.value = item.MenuID
  //         item.text = item.MenuName
  //         return item
  //       })
  //     }
  //   } catch (e) {
  //     menulist = []
  //   }
  // } else {
  //   menulist = []
  // }
  let appType = sessionStorage.getItem('appType')
  let roleList = sessionStorage.getItem('sysRoles')
  if (roleList) {
    try {
@@ -92,7 +64,8 @@
      initVal: card.blacklist || [],
      multi: true,
      required: false,
      options: roleList
      options: roleList,
      forbid: !!appType
    },
    // {
    //   type: 'cascader',
@@ -194,8 +167,8 @@
      tooltip: '统计图表适用于展示数据类型为动态值。',
      required: false,
      options: [
        { value: 'query', text: Formdict['header.form.query'] },
        { value: 'statistics', text: Formdict['header.form.statistics'] }
        { value: 'query', text: '查询' },
        { value: 'statistics', text: '统计' }
      ]
    }, {
      type: 'select',
@@ -301,12 +274,12 @@
    }, {
      type: 'radio',
      key: 'show',
      label: '格式化',
      label: '显示',
      initVal: card.show || 'value',
      required: false,
      options: [{
        value: 'value',
        text: '无'
        text: '数值'
      }, {
        value: 'percent',
        text: '百分比'
@@ -432,6 +405,20 @@
        text: '隐藏'
      }]
    }, {
      type: 'radio',
      key: 'download',
      label: '导出图片',
      initVal: card.download || 'forbid',
      required: false,
      forbid: appType === 'mob',
      options: [{
        value: 'forbid',
        text: '禁用'
      }, {
        value: 'enable',
        text: '启用'
      }]
    }, {
      type: 'number',
      key: 'barSize',
      label: '柱形宽度',
@@ -487,7 +474,7 @@
      key: 'selectColor',
      label: '选中颜色',
      initVal: card.selectColor || '',
      tooltip: '选中柱形图的颜色,在交互效果《元素选中(多选)》和《元素选中(单选)》中有效,自定义设置中无效。',
      tooltip: '选中柱形图的颜色,在交互效果《元素选中(多选)》和《元素选中(单选)》中有效,启用自定义设置时无效。',
      forbid: !['bar'].includes(card.chartType),
      allowClear: true,
      required: false