king
2022-09-29 1607bcf25594cfb033b209c8028c70f9842a1a1e
src/menu/components/card/data-card/index.jsx
@@ -181,7 +181,6 @@
    card.errors = []
    let columns = card.columns.map(c => c.field)
    // let lowcols = card.columns.map(c => c.field.toLowerCase())
    if (card.setting.interType === 'system' && card.setting.execute !== 'false' && !card.setting.dataresource) {
      card.errors.push({ level: 0, detail: '未设置数据源!'})
@@ -195,30 +194,10 @@
      card.errors.push({ level: 0, detail: '未设置上级组件!'})
    }
    // let supModule = ''
    // if (card.wrap.supType === 'multi') { // 数据卡多上级组件
    //   if (card.supNodes && card.supNodes[0]) {
    //     supModule = card.supNodes[0].componentId
    //   }
    // } else if (card.setting.supModule) {
    //   supModule = card.setting.supModule[card.setting.supModule.length - 1] || ''
    //   if (supModule === 'empty') {
    //     supModule = ''
    //   }
    // }
    card.action.forEach(cell => {
      if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
        if (!cell.modal || cell.modal.fields.length === 0) {
          card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
        // } else {
        //   cell.modal.fields.forEach(m => {
        //     if (m.type === 'linkMain' && !supModule) {
        //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
        //     } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
        //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
        //     }
        //   })
        }
      }
      // $check@有效性检测
@@ -240,14 +219,6 @@
          if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
            if (!cell.modal || cell.modal.fields.length === 0) {
              card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
            // } else {
            //   cell.modal.fields.forEach(m => {
            //     if (m.type === 'linkMain' && !supModule) {
            //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
            //     } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
            //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
            //     }
            //   })
            }
          }
          if (linkbtn && linkbtn === cell.uuid) {
@@ -264,14 +235,6 @@
            if (cell.OpenType === 'pop' || (cell.OpenType === 'funcbutton' && cell.execMode === 'pop')) {
              if (!cell.modal || cell.modal.fields.length === 0) {
                card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单尚未添加`})
              // } else {
              //   cell.modal.fields.forEach(m => {
              //     if (m.type === 'linkMain' && !supModule) {
              //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中关联主表表单“${m.label}”无效`})
              //     } else if (m.field && !columns.includes(m.field) && lowcols.includes(m.field.toLowerCase())) {
              //       card.errors.push({ level: 1, detail: `按钮“${cell.label}”中表单“${m.label}”大小写与字段集不一致`})
              //     }
              //   })
              }
            }
            if (linkbtn && linkbtn === cell.uuid) {