king
2023-08-31 47b9baefdeeb41f50a9b7abc1abcf5e90931a89d
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 = ''
  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 = []
@@ -18,10 +19,6 @@
        })
      }
    })
  }
  if (menu.parentId === 'BillPrintTemp') {
    MenuType = 'billPrint'
  }
  let modules = []
  if (subtype === 'propcard' || subtype === 'datacard') {
@@ -107,7 +104,6 @@
        {field: 'empty', values: ['dynamic', 'public']},
        {field: 'jump', values: ['dynamic', 'public']},
        {field: 'broadcast', values: ['dynamic', 'public']},
        {field: 'autoExec', values: ['dynamic', 'public']},
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
      ],
@@ -185,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: [
@@ -280,18 +276,6 @@
      ],
      forbid: subtype === 'tablecard'
    },
    // {
    //   type: 'radio',
    //   field: 'checkAll',
    //   label: '全选',
    //   initval: wrap.checkAll || 'hidden',
    //   required: false,
    //   options: [
    //     {value: 'hidden', label: '隐藏'},
    //     {value: 'show', label: '显示'},
    //   ],
    //   forbid: subtype !== 'datacard' || appType !== 'mob'
    // },
    {
      type: 'radio',
      field: 'cardFloat',
@@ -337,16 +321,16 @@
      field: 'printType',
      label: '组件类型',
      initval: wrap.printType || 'content',
      tooltip: '选择类型为《页眉/页脚》时,打印的每页里都会带有该组件。',
      tooltip: '选择类型为《页眉/页脚》时,打印的每页里都会带有该组件。注:页眉页脚中文本元素将替换 @pageIndex@(页码)、@total@(总数)、@date@(当前日期)、@datetime@(当前时间),使用分页参数时注意打印模板的页面布局使用分页。',
      required: false,
      options: [
        {value: 'content', label: '内容'},
        {value: 'content', label: '属性卡'},
        {value: 'headerOrfooter', label: '页眉/页脚'},
      ],
      controlFields: [
        {field: 'printHeight', values: ['content']},
      ],
      forbid: subtype !== 'propcard' || MenuType !== 'billPrint'
      forbid: subtype !== 'propcard' || !isprint
    },
    {
      type: 'number',
@@ -355,7 +339,7 @@
      initval: wrap.printHeight || '',
      tooltip: subtype !== 'propcard' ? '当前数据卡高度相当于几条数据。' : '当前属性卡高度相当于几条数据。',
      required: false,
      forbid: subtype === 'tablecard' || MenuType !== 'billPrint'
      forbid: subtype === 'tablecard' || !isprint
    },
    {
      type: 'select',
@@ -504,7 +488,7 @@
        {value: 'true', label: '验证'},
        {value: 'false', label: '忽略'},
      ],
      forbid: subtype !== 'datacard'
      forbid: subtype !== 'datacard' || isprint
    },
    {
      type: 'cascader',
@@ -514,7 +498,7 @@
      required: false,
      options: modules,
      allowClear: true,
      forbid: subtype !== 'propcard'
      forbid: subtype !== 'propcard' || isprint
    },
    {
      type: 'select',
@@ -546,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: '多组件'},
@@ -562,10 +546,22 @@
      initval: wrap.permission || (!appType ? 'true' : 'false'),
      required: false,
      options: [
        {value: 'true', label: '启用'},
        {value: 'true', label: !appType ? '继承菜单' : '启用'},
        {value: 'false', label: '禁用'},
      ],
      forbid: sessionStorage.getItem('editMenuType') === 'popview'
      forbid: ispop || isprint
    },
    {
      type: 'radio',
      field: 'cacheLocal',
      label: '本地缓存',
      initval: wrap.cacheLocal || 'true',
      required: false,
      options: [
        {value: 'true', label: '继承菜单'},
        {value: 'false', label: '禁用'},
      ],
      forbid: ispop || isprint
    },
    {
      type: 'multiselect',
@@ -574,7 +570,7 @@
      initval: wrap.blacklist || [],
      required: false,
      options: roleList,
      forbid: !!appType
      forbid: !!appType || isprint
    },
    {
      type: 'text',
@@ -591,7 +587,7 @@
      label: '上级组件',
      initval: supNodes,
      required: true,
      forbid: subtype !== 'datacard' || appType === 'mob',
      forbid: subtype !== 'datacard' || appType === 'mob' || isprint,
      span: 24,
      columns: [
        {