king
2023-08-31 4ef8dd730e7450d96f0445e146a0c76360a3a1d1
src/menu/components/card/data-card/options.jsx
@@ -5,7 +5,8 @@
 */
export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting, buttons = []) {
  let appType = sessionStorage.getItem('appType')
  let MenuType = sessionStorage.getItem('MenuType') || 'custom'
  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
  let menu = window.GLOB.customMenu
  let laypage = setting && setting.laypage !== 'false'
  let interfaces = []
@@ -180,7 +181,7 @@
      options: [
        {value: 'page', label: '页码'},
        {value: 'switch', label: '左右切换', forbid: appType === 'mob' || subtype === 'tablecard'},
        {value: 'slide', label: '滑动加载', forbid: appType !== 'mob' || sessionStorage.getItem('editMenuType') === 'popview'},
        {value: 'slide', label: '滑动加载', forbid: appType !== 'mob' || ispop},
        {value: 'more', label: '查看更多'},
      ],
      controlFields: [
@@ -329,7 +330,7 @@
      controlFields: [
        {field: 'printHeight', values: ['content']},
      ],
      forbid: subtype !== 'propcard' || MenuType !== 'billPrint'
      forbid: subtype !== 'propcard' || !isprint
    },
    {
      type: 'number',
@@ -338,7 +339,7 @@
      initval: wrap.printHeight || '',
      tooltip: subtype !== 'propcard' ? '当前数据卡高度相当于几条数据。' : '当前属性卡高度相当于几条数据。',
      required: false,
      forbid: subtype === 'tablecard' || MenuType !== 'billPrint'
      forbid: subtype === 'tablecard' || !isprint
    },
    {
      type: 'select',
@@ -487,7 +488,7 @@
        {value: 'true', label: '验证'},
        {value: 'false', label: '忽略'},
      ],
      forbid: subtype !== 'datacard'
      forbid: subtype !== 'datacard' || isprint
    },
    {
      type: 'cascader',
@@ -497,7 +498,7 @@
      required: false,
      options: modules,
      allowClear: true,
      forbid: subtype !== 'propcard'
      forbid: subtype !== 'propcard' || isprint
    },
    {
      type: 'select',
@@ -529,7 +530,7 @@
      initval: wrap.supType || 'single',
      tooltip: '上级组件为单一组件或多个组件。',
      required: false,
      forbid: subtype !== 'datacard' || appType === 'mob',
      forbid: subtype !== 'datacard' || appType === 'mob' || isprint,
      options: [
        {value: 'single', label: '单组件'},
        {value: 'multi', label: '多组件'},
@@ -548,7 +549,7 @@
        {value: 'true', label: !appType ? '继承菜单' : '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
      forbid: ispop || isprint
    },
    {
      type: 'radio',
@@ -560,7 +561,7 @@
        {value: 'true', label: '继承菜单'},
        {value: 'false', label: '禁用'},
      ],
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
      forbid: ispop || isprint
    },
    {
      type: 'multiselect',
@@ -569,7 +570,7 @@
      initval: wrap.blacklist || [],
      required: false,
      options: roleList,
      forbid: !!appType
      forbid: !!appType || isprint
    },
    {
      type: 'text',
@@ -586,7 +587,7 @@
      label: '上级组件',
      initval: supNodes,
      required: true,
      forbid: subtype !== 'datacard' || appType === 'mob',
      forbid: subtype !== 'datacard' || appType === 'mob' || isprint,
      span: 24,
      columns: [
        {