From da64ab0923bf8817fc8599a6e37b953ce38f64c8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 27 八月 2023 18:37:36 +0800
Subject: [PATCH] 2023-08-27

---
 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx |   48 ++++++++++++++++++++++++++++++++++--------------
 1 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
index a3460ed..38fdf04 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -38,6 +38,7 @@
         width: '14%',
         inputType: 'input',
         unique: true,
+        strict: true,
         editable: true
       },
       {
@@ -72,20 +73,32 @@
         ]
       },
       {
+        title: '瀵煎叆',
+        dataIndex: 'import',
+        width: '10%',
+        editable: true,
+        inputType: 'radio',
+        render: (text, record) => {
+          if (record.import === 'init') {
+            return '鍒濆鍖�'
+          } else if (record.import === 'false') {
+            return '鍚�'
+          }
+          return '鏄�'
+        },
+        options: [
+          { value: 'true', text: '鏄�' },
+          { value: 'false', text: '鍚�' },
+          { value: 'init', text: '鍒濆鍖�' }
+        ]
+      },
+      {
         title: '蹇呭~',
         dataIndex: 'required',
         width: '10%',
         editable: true,
         inputType: 'switch',
         render: (text, record) => record.required === 'true' ? '鏄�' : '鍚�'
-      },
-      {
-        title: '瀵煎叆',
-        dataIndex: 'import',
-        width: '10%',
-        editable: true,
-        inputType: 'switch',
-        render: (text, record) => record.import !== 'false' ? '鏄�' : '鍚�'
       },
       {
         title: '鏈�灏忓��',
@@ -254,8 +267,6 @@
     let _verify = fromJS(card.verify || {}).toJS()
     let _columns = _verify.columns || []
 
-    delete _verify.dataresource
-
     // 鏃ф暟鎹吋瀹�
     _columns = _columns.map(col => {
       col.required = col.required || 'true'
@@ -325,7 +336,7 @@
     _sParam.secretkey = Utils.encrypt(_sParam.LText, _sParam.timestamp)
     _sParam.open_key = Utils.encryptOpenKey(_sParam.secretkey, _sParam.timestamp) // 浜戠鏁版嵁楠岃瘉
     
-    Api.getSystemConfig(_sParam).then(res => {
+    Api.getCloudConfig(_sParam).then(res => {
       if (res.status) {
         let _scripts = res.data.map(item => {
           return {
@@ -638,7 +649,7 @@
         if (!err) {
           let _verify = {...verify, ...values}
 
-          let cols = _verify.columns.map(col => col.Column)
+          let cols = _verify.columns.map(col => col.Column.toLowerCase())
           cols = Array.from(new Set(cols))
 
           if (_verify.columns.length === 0) {
@@ -666,6 +677,15 @@
               return
             }
           }
+
+          _verify.columns.sort((a, b) => {
+            if (a.import === 'init' && b.import !== 'init') {
+              return 1
+            } else if (a.import !== 'init' && b.import === 'init') {
+              return -1
+            }
+            return 0
+          })
 
           let _loading = false
           if (this.scriptsForm && this.scriptsForm.state.editItem) {
@@ -838,8 +858,8 @@
             <Button className="excel-col-add mk-red" title="娓呯┖Excel鍒�" onClick={this.clearField}>
               娓呯┖Excel鍒�
             </Button>
-            <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>娉細鏁板�肩被鍨嬶紙int 鎴� decimal锛夛紝鍐呭涓哄繀濉紱鏈�澶у�煎拰鏈�灏忓�煎湪绫诲瀷涓烘暟鍊兼椂鏈夋晥銆�</Col>
-            <EditTable actions={['edit', 'move', 'copy', 'del']} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/>
+            <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>娉細鏁板�肩被鍨嬶紙int 鎴� decimal锛夛紝鍐呭涓哄繀濉紱鏈�澶у�煎拰鏈�灏忓�煎湪绫诲瀷涓烘暟鍊兼椂鏈夋晥銆傚鍏�-鍒濆鍖栵細鐢ㄤ簬excel涓笉瀛樺湪锛屽鍏ユ椂闇�瑕佸垵濮嬪寲鐨勫瓧娈�</Col>
+            <EditTable actions={['edit', 'move', 'copy', 'del', 'extra:required:鏄惁蹇呭~']} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/>
           </TabPane>
           {card.intertype === 'system' ? <TabPane tab={
             <span>

--
Gitblit v1.8.0