king
2024-05-16 b69b5f6329ca5f87932436b7a6c1ddfc3377e10f
src/menu/components/card/cardcellcomponent/formconfig.jsx
@@ -128,14 +128,13 @@
  }
  let fields = []
  if (cards.subtype === 'propcard' && cards.wrap.datatype === 'static') {
  let isStatic = (cards.subtype === 'propcard' || cards.type === 'balcony') && cards.wrap.datatype === 'static'
  if (isStatic) {
    if (cards.wrap.supModule && cards.wrap.supModule.length) {
      let cell = MenuUtils.getComponent(cards.wrap.supModule[cards.wrap.supModule.length - 1])
      if (cell && cell.columns) {
        fields = cell.columns.map(col => ({ value: col.field }))
      }
    } else {
      fields = cards.columns.map(col => ({ value: col.field }))
    }
  }
@@ -172,12 +171,17 @@
      ]
    },
    {
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      type: isStatic ? 'text' : 'select',
      key: 'field',
      label: '字段',
      initVal: card.field || '',
      tooltip: isStatic ? '可绑定上级组件字段,不存在上级组件时可绑定url参数字段。' : '',
      required: true,
      options: fields
      options: fields,
      rules: [{
        pattern: /^[\u4E00-\u9FA50-9a-zA-Z_-]*$/ig,
        message: '字段名只允许包含数字、字母、汉字以及_-'
      }]
    },
    {
      type: 'icon',
@@ -256,7 +260,7 @@
      required: true
    },
    {
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      type: isStatic ? 'text' : 'select',
      key: 'posterField',
      label: '预览地址',
      initVal: card.posterField || '',
@@ -475,7 +479,7 @@
      required: false
    },
    {
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      type: isStatic ? 'text' : 'select',
      key: 'bgImage',
      label: '动态背景',
      initVal: card.bgImage || '',
@@ -641,6 +645,7 @@
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || '',
      tooltip: '行信息(字段集中前40个长度不超过256的字段)将传递至此菜单,可在url变量、表单(关联主表)、静态属性卡、浮动卡中使用。',
      required: true,
      options: appMenus || [],
      forbid: !['pc', 'mob'].includes(appType)
@@ -650,17 +655,19 @@
      key: 'linkmenu',
      label: '关联菜单',
      initVal: card.linkmenu || [],
      tooltip: '行信息将传递至此菜单,可在url变量、表单(关联主表)、静态属性卡、浮动卡中使用。',
      required: true,
      options: menulist,
      forbid: ['pc', 'mob'].includes(appType)
    },
    {
      type: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      defType: cards.subtype === 'propcard' && cards.wrap.datatype === 'static' ? 'text' : 'select',
      type: isStatic ? 'text' : 'select',
      defType: isStatic ? 'text' : 'select',
      key: 'linkurl',
      label: '链接地址',
      initVal: card.linkurl || '',
      tooltip: ['pc', 'mob'].includes(appType) ? '当链接类型为“其他”,且链接地址以@menuid@开头时,其后内容将被视为菜单ID。' : '',
      tooltip: '在链接中以@***@形式拼接的字段(字段来源于字段集中,此外 id、appkey、userid、LoginUID 为系统字段),跳转时将替换为对应值,例如:http://sso.mk9h.cn/doc/index.html?appkey=@appkey@&LoginUID=@LoginUID@,其中appkey与LoginUID将被替换。' + (['pc', 'mob'].includes(appType) ? '当链接类型为“其他”,且链接地址以@menuid@开头时,其后内容将被视为菜单ID。' : ''),
      toolWidth: 350,
      required: true,
      options: fields
    },
@@ -678,25 +685,12 @@
      ]
    },
    {
      type: 'radio',
      key: 'joint',
      label: '拼接参数',
      initVal: card.joint || 'true',
      required: false,
      options: [{
        value: 'true',
        text: '是'
      }, {
        value: 'false',
        text: '否'
      }]
    },
    {
      type: 'codemirror',
      key: 'formula',
      label: '公式',
      initVal: card.formula || '',
      tooltip: '执行时会使用查询到的数据替换相应的字段,展示获得的结果,在不使用解析时换行符或空格会替换为页面元素。可使用JS的一些语法,如:三元表达式 @field1@ > @field2@ ? 0 : 1;Math对象,取绝对值 Math.abs(@field@)、四舍五入 Math.round(@field@)等。注:会替换公式中的@username@、@fullName@、@bid@。',
      toolWidth: 450,
      placeholder: '例如:@price@ * @number@',
      required: true
    },