From a8d8d2fdb83f21e76f90cb13ea91ad6e9bf98a9b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 24 三月 2025 10:53:52 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/form/simple-form/index.jsx |   86 ++++++++----------------------------------
 1 files changed, 17 insertions(+), 69 deletions(-)

diff --git a/src/menu/components/form/simple-form/index.jsx b/src/menu/components/form/simple-form/index.jsx
index dabb6ca..6200b70 100644
--- a/src/menu/components/form/simple-form/index.jsx
+++ b/src/menu/components/form/simple-form/index.jsx
@@ -7,7 +7,7 @@
 import asyncComponent from '@/utils/asyncComponent'
 import asyncIconComponent from '@/utils/asyncIconComponent'
 import { getModalForm } from '@/templates/zshare/formconfig'
-import { resetStyle, getTables, checkComponent } from '@/utils/utils-custom.js'
+import { resetStyle, getTables, checkComponent, getInterfaces } from '@/utils/utils-custom.js'
 import MKEmitter from '@/utils/events.js'
 import Utils from '@/utils/utils.js'
 import getWrapForm from './options'
@@ -121,72 +121,19 @@
     card.width = card.wrap.width
     card.name = card.wrap.name
     card.errors = []
-    let idCtrl = false
 
+    card.$c_fc = true
     if (card.wrap.datatype === 'dynamic') {
-      let supModule = card.setting.supModule ? card.setting.supModule[card.setting.supModule.length - 1] || '' : ''
-      if (supModule === 'empty') {
-        supModule = ''
-      }
-
       card.$c_ds = true
-      card.errors = checkComponent(card)
-
-      if (card.errors.length === 0) {
-        card.$tables = getTables(card)
-      }
-
-      card.subcards.forEach(item => {
-        if (item.subButton.intertype === 'system' && !item.subButton.sqlType) {
-          card.errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳璇疯缃搷浣滅被鍨媊})
-        }
-        if (item.subButton.verify && !item.subButton.output) {
-          if (item.subButton.verify.noteEnable === 'true') {
-            card.errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳鏈缃繑鍥炲�肩煭淇″彂閫佹棤鏁堬紒`})
-          } else if (item.subButton.verify.emailEnable === 'true') {
-            card.errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳鏈缃繑鍥炲�奸偖浠跺彂閫佹棤鏁堬紒`})
-          }
-        }
-        item.fields.forEach(m => {
-          if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
-            idCtrl = true
-          }
-          if (m.type === 'linkMain' && !supModule) {
-            card.errors.push({ level: 1, detail: `璇锋鏌ュ叧鑱斾富琛ㄢ��${m.label}鈥濇槸鍚︽湁鏁坄})
-          }
-        })
-      })
     } else {
-      let supModule = ''
-      if (card.wrap.datatype === 'static') {
-        supModule = card.wrap.supModule ? card.wrap.supModule[card.wrap.supModule.length - 1] : ''
-      }
-
-      card.$tables = getTables(card)
-
-      card.subcards.forEach(item => {
-        if (item.subButton.intertype === 'system' && !item.subButton.sqlType) {
-          card.errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳璇疯缃搷浣滅被鍨媊})
-        }
-        if (item.subButton.verify && !item.subButton.output) {
-          if (item.subButton.verify.noteEnable === 'true') {
-            card.errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳鏈缃繑鍥炲�肩煭淇″彂閫佹棤鏁堬紒`})
-          } else if (item.subButton.verify.emailEnable === 'true') {
-            card.errors.push({ level: 0, detail: `${item.subButton.label} 鎸夐挳鏈缃繑鍥炲�奸偖浠跺彂閫佹棤鏁堬紒`})
-          }
-        }
-        item.fields.forEach(m => {
-          if (m.dataSource && /@ID@/ig.test(m.dataSource)) {
-            idCtrl = true
-          }
-          if (m.type === 'linkMain' && !supModule && card.wrap.datatype === 'static') {
-            card.errors.push({ level: 1, detail: `璇锋鏌ュ叧鑱斾富琛ㄢ��${m.label}鈥濇槸鍚︽湁鏁坄})
-          }
-        })
-      })
+      delete card.$c_ds
     }
 
-    card.idCtrl = idCtrl
+    card.errors = checkComponent(card)
+    card.$tables = getTables(card)
+
+    delete card.$c_ds
+    delete card.$c_fc
 
     this.setState({
       card: card
@@ -241,7 +188,7 @@
   
   changecols = (type) => {
     let card = fromJS(this.state.card).toJS()
-    let _this = this
+    let that = this
 
     card.subcards[0].fields = card.subcards[0].fields.map(item => {
       item.labelwidth = 33.3
@@ -267,7 +214,7 @@
     confirm({
       content: `纭畾鍒囨崲涓�${type}鍒楀悧锛焋,
       onOk() {
-        _this.updateComponent(card)
+        that.updateComponent(card)
       },
       onCancel() {}
     })
@@ -288,14 +235,14 @@
 
   closeForm = (cell) => {
     let card = fromJS(this.state.card).toJS()
-    let _this = this
+    let that = this
 
     card.subcards[0].fields = card.subcards[0].fields.filter(item => item.uuid !== cell.uuid)
 
     confirm({
       content: `纭畾鍒犻櫎<<${cell.label}>>鍚楋紵`,
       onOk() {
-        _this.updateComponent(card)
+        that.updateComponent(card)
       },
       onCancel() {}
     })
@@ -325,6 +272,7 @@
       orderType: 'asc',
       readonly: 'false',
       required: 'true',
+      readin: 'top',
       focus: true
     }
 
@@ -468,9 +416,9 @@
         _card.setting.supModule = ''
       }
     } else if (res.datatype === 'public') {
-      let interfaces = window.GLOB.customMenu.interfaces || []
+      let interfaces = getInterfaces()
 
-      let d = interfaces.filter(m => m.uuid === res.publicId && m.status === 'true')[0]
+      let d = interfaces.filter(m => m.value === res.publicId)[0]
 
       if (d) {
         _card.columns = fromJS(d.columns).toJS()
@@ -503,14 +451,14 @@
 
   clearGroup = () => {
     let card = fromJS(this.state.card).toJS()
-    let _this = this
+    let that = this
 
     card.subcards[0].fields = []
 
     confirm({
       content: `纭畾娓呯┖琛ㄥ崟鍚楋紵`,
       onOk() {
-        _this.updateComponent(card)
+        that.updateComponent(card)
       },
       onCancel() {}
     })

--
Gitblit v1.8.0