king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -20,11 +20,13 @@
    { value: 'barcode', text: '条形码'},
    { value: 'qrcode', text: '二维码'},
    { value: 'currentDate', text: '当前时间'},
    { value: 'formula', text: '公式'},
  ]
  if (type === 'table' || (type === 'card' && subtype === 'datacard')) {
    _options.push({value: 'sequence', text: '序号'})
  }
  let appMenus = []
  const isApp = sessionStorage.getItem('appType') === 'pc'
@@ -33,8 +35,7 @@
    if (appMenus) {
      try {
        appMenus = JSON.parse(appMenus)
        appMenus = appMenus.map(item => ({value: item.MenuID, text: item.MenuName}))
      } catch {
      } catch (e) {
        appMenus = []
      }
    } else {
@@ -307,6 +308,17 @@
    },
    {
      type: 'radio',
      key: 'noValue',
      label: '空值',
      initVal: card.noValue || 'show',
      required: false,
      options: [
        { value: 'show', text: '显示' },
        { value: 'hide', text: '隐藏' }
      ]
    },
    {
      type: 'radio',
      key: 'link',
      label: '链接',
      initVal: card.link || '',
@@ -320,7 +332,7 @@
      ]
    },
    {
      type: 'select',
      type: 'radio',
      key: 'link',
      label: '链接',
      initVal: card.link || '',
@@ -328,9 +340,19 @@
      forbid: !isApp,
      options: [
        { value: '', text: '无' },
        // { value: 'page', text: '菜单' },
        { value: 'linkpage', text: '关联菜单' },
        { value: 'custom', text: '链接' }
      ]
    },
    {
      type: 'radio',
      key: 'scale',
      label: '图片放大',
      initVal: card.scale || 'false',
      required: false,
      options: [
        { value: 'false', text: '不可以' },
        { value: 'true', text: '可以' }
      ]
    },
    {
@@ -385,6 +407,15 @@
      required: true,
      options: []
    },
    {
      type: 'textarea',
      key: 'formula',
      label: '公式',
      initVal: card.formula || '',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果。',
      placeholder: '例如:@price@ * @number@',
      required: true
    },
  ]
  return forms