king
2025-02-06 d1cd5af5adb53e91efdd278328e1b6f8ad834fb5
src/menu/components/form/simple-form/options.jsx
@@ -1,4 +1,4 @@
import MenuUtils from '@/utils/utils-custom.js'
import MenuUtils, { getInterfaces } from '@/utils/utils-custom.js'
/**
 * @description Wrap表单配置信息
@@ -23,13 +23,13 @@
  if (appType === 'mob') {
    config.subcards[0].fields.forEach(f => {
      if (f.field && ['select', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
        fields.push(f)
        fields.push({...f, label: `${f.label}(${f.field})`})
      }
    })
  } else {
    config.subcards[0].fields.forEach(f => {
      if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
        fields.push(f)
        fields.push({...f, label: `${f.label}(${f.field})`})
      }
    })
  }
@@ -45,6 +45,7 @@
    }
  }
  let interfaces = getInterfaces()
  let buttons = []
  if (!wrap.enable || wrap.enable === 'true') {
@@ -94,17 +95,35 @@
      options: [
        {value: 'dynamic', label: '动态'},
        {value: 'static', label: '静态'},
        {value: 'public', label: '公共数据源'},
      ],
      controlFields: [
        {field: 'empty', values: ['dynamic']},
        {field: 'supModule', values: ['static']},
        {field: 'publicId', values: ['public']},
      ]
    },
    {
      type: 'select',
      field: 'publicId',
      label: '数据源',
      initval: wrap.publicId || '',
      required: true,
      options: interfaces
    },
    {
      type: 'select',
      field: 'focus',
      label: '焦点',
      label: '初始焦点',
      initval: wrap.focus || '',
      required: false,
      options: fields
    },
    {
      type: 'select',
      field: 'refocus',
      label: '刷新焦点',
      initval: wrap.refocus || '',
      required: false,
      options: fields
    },
@@ -214,7 +233,6 @@
      initval: wrap.empty || 'show',
      tooltip: '当查询数据为空时,隐藏该组件。',
      required: false,
      skip: true,
      options: [
        {value: 'show', label: '否'},
        {value: 'hidden', label: '是'},